diff mbox series

[v1,3/3] virtio-mem: Set "unplugged-inaccessible=auto" for the 6.2 machine on x86

Message ID 20211130092838.24224-4-david@redhat.com
State New
Headers show
Series virtio-mem: Support VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE | expand

Commit Message

David Hildenbrand Nov. 30, 2021, 9:28 a.m. UTC
Set the new default to "auto", keeping it set to "on" for compat
machines. This property is only available for x86 targets.

TODO: once 6.2 was released and we have compat machines, target the next
      QEMU release.

Signed-off-by: David Hildenbrand <david@redhat.com>
---
 hw/i386/pc.c           | 1 +
 hw/virtio/virtio-mem.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

Comments

Michal Prívozník Nov. 30, 2021, 3:34 p.m. UTC | #1
On 11/30/21 10:28, David Hildenbrand wrote:
> Set the new default to "auto", keeping it set to "on" for compat

I believe you wanted to say: keeping it set to "off", because that's
what the patch does.

> machines. This property is only available for x86 targets.
> 
> TODO: once 6.2 was released and we have compat machines, target the next
>       QEMU release.
> 
> Signed-off-by: David Hildenbrand <david@redhat.com>
> ---
>  hw/i386/pc.c           | 1 +
>  hw/virtio/virtio-mem.c | 2 +-
>  2 files changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/hw/i386/pc.c b/hw/i386/pc.c
> index a2ef40ecbc..045ba05431 100644
> --- a/hw/i386/pc.c
> +++ b/hw/i386/pc.c
> @@ -99,6 +99,7 @@ GlobalProperty pc_compat_6_1[] = {
>      { TYPE_X86_CPU, "hv-version-id-major", "0x0006" },
>      { TYPE_X86_CPU, "hv-version-id-minor", "0x0001" },
>      { "ICH9-LPC", "x-keep-pci-slot-hpc", "false" },
> +    { "virtio-mem", "unplugged-inaccessible", "off" },
>  };
>  const size_t pc_compat_6_1_len = G_N_ELEMENTS(pc_compat_6_1);
>  
> diff --git a/hw/virtio/virtio-mem.c b/hw/virtio/virtio-mem.c
> index 1e57156e81..a5d26d414f 100644
> --- a/hw/virtio/virtio-mem.c
> +++ b/hw/virtio/virtio-mem.c
> @@ -1169,7 +1169,7 @@ static Property virtio_mem_properties[] = {
>                       TYPE_MEMORY_BACKEND, HostMemoryBackend *),
>  #if defined(VIRTIO_MEM_HAS_LEGACY_GUESTS)
>      DEFINE_PROP_ON_OFF_AUTO(VIRTIO_MEM_UNPLUGGED_INACCESSIBLE_PROP, VirtIOMEM,
> -                            unplugged_inaccessible, ON_OFF_AUTO_OFF),
> +                            unplugged_inaccessible, ON_OFF_AUTO_AUTO),
>  #endif
>      DEFINE_PROP_END_OF_LIST(),
>  };
> 

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>

Michal
David Hildenbrand Nov. 30, 2021, 3:53 p.m. UTC | #2
On 30.11.21 16:34, Michal Prívozník wrote:
> On 11/30/21 10:28, David Hildenbrand wrote:
>> Set the new default to "auto", keeping it set to "on" for compat
> 
> I believe you wanted to say: keeping it set to "off", because that's
> what the patch does.

Right, I switched semantics from a "legacy-guest-support=on/off/auto" to
"unplugged-inaccessible=on/off/auto"

Thanks a lot for the fast review!!!
Pankaj Gupta Dec. 8, 2021, 8:11 a.m. UTC | #3
> Set the new default to "auto", keeping it set to "on" for compat
> machines. This property is only available for x86 targets.
>
> TODO: once 6.2 was released and we have compat machines, target the next
>       QEMU release.
>
> Signed-off-by: David Hildenbrand <david@redhat.com>
> ---
>  hw/i386/pc.c           | 1 +
>  hw/virtio/virtio-mem.c | 2 +-
>  2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/hw/i386/pc.c b/hw/i386/pc.c
> index a2ef40ecbc..045ba05431 100644
> --- a/hw/i386/pc.c
> +++ b/hw/i386/pc.c
> @@ -99,6 +99,7 @@ GlobalProperty pc_compat_6_1[] = {
>      { TYPE_X86_CPU, "hv-version-id-major", "0x0006" },
>      { TYPE_X86_CPU, "hv-version-id-minor", "0x0001" },
>      { "ICH9-LPC", "x-keep-pci-slot-hpc", "false" },
> +    { "virtio-mem", "unplugged-inaccessible", "off" },
>  };
>  const size_t pc_compat_6_1_len = G_N_ELEMENTS(pc_compat_6_1);
>
> diff --git a/hw/virtio/virtio-mem.c b/hw/virtio/virtio-mem.c
> index 1e57156e81..a5d26d414f 100644
> --- a/hw/virtio/virtio-mem.c
> +++ b/hw/virtio/virtio-mem.c
> @@ -1169,7 +1169,7 @@ static Property virtio_mem_properties[] = {
>                       TYPE_MEMORY_BACKEND, HostMemoryBackend *),
>  #if defined(VIRTIO_MEM_HAS_LEGACY_GUESTS)
>      DEFINE_PROP_ON_OFF_AUTO(VIRTIO_MEM_UNPLUGGED_INACCESSIBLE_PROP, VirtIOMEM,
> -                            unplugged_inaccessible, ON_OFF_AUTO_OFF),
> +                            unplugged_inaccessible, ON_OFF_AUTO_AUTO),
>  #endif
>      DEFINE_PROP_END_OF_LIST(),
>  };

With correction in commit message pointed by Michal.
 Reviewed-by: Pankaj Gupta <pankaj.gupta@ionos.com>
diff mbox series

Patch

diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index a2ef40ecbc..045ba05431 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -99,6 +99,7 @@  GlobalProperty pc_compat_6_1[] = {
     { TYPE_X86_CPU, "hv-version-id-major", "0x0006" },
     { TYPE_X86_CPU, "hv-version-id-minor", "0x0001" },
     { "ICH9-LPC", "x-keep-pci-slot-hpc", "false" },
+    { "virtio-mem", "unplugged-inaccessible", "off" },
 };
 const size_t pc_compat_6_1_len = G_N_ELEMENTS(pc_compat_6_1);
 
diff --git a/hw/virtio/virtio-mem.c b/hw/virtio/virtio-mem.c
index 1e57156e81..a5d26d414f 100644
--- a/hw/virtio/virtio-mem.c
+++ b/hw/virtio/virtio-mem.c
@@ -1169,7 +1169,7 @@  static Property virtio_mem_properties[] = {
                      TYPE_MEMORY_BACKEND, HostMemoryBackend *),
 #if defined(VIRTIO_MEM_HAS_LEGACY_GUESTS)
     DEFINE_PROP_ON_OFF_AUTO(VIRTIO_MEM_UNPLUGGED_INACCESSIBLE_PROP, VirtIOMEM,
-                            unplugged_inaccessible, ON_OFF_AUTO_OFF),
+                            unplugged_inaccessible, ON_OFF_AUTO_AUTO),
 #endif
     DEFINE_PROP_END_OF_LIST(),
 };