qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] hw/i386: Rename default_bus_bypass_iommu
@ 2021-10-25 10:47 Jean-Philippe Brucker
  2021-10-25 17:14 ` Paolo Bonzini
  2021-10-25 21:15 ` Michael S. Tsirkin
  0 siblings, 2 replies; 3+ messages in thread
From: Jean-Philippe Brucker @ 2021-10-25 10:47 UTC (permalink / raw)
  To: mst
  Cc: Jean-Philippe Brucker, ehabkost, richard.henderson, qemu-devel,
	Eric Auger, pbonzini, Philippe Mathieu-Daudé

Since commit d8fb7d0969d5 ("vl: switch -M parsing to keyval"), machine
parameter definitions cannot use underscores, because keyval_dashify()
transforms them to dashes and the parser doesn't find the parameter.

This affects option default_bus_bypass_iommu which was introduced in the
same release:

$ qemu-system-x86_64 -M q35,default_bus_bypass_iommu=on
qemu-system-x86_64: Property 'pc-q35-6.1-machine.default-bus-bypass-iommu' not found

Rename the parameter to "default-bus-bypass-iommu". Passing
"default_bus_bypass_iommu" is still valid since the underscore are
transformed automatically.

Fixes: c9e96b04fc19 ("hw/i386: Add a default_bus_bypass_iommu pc machine option")
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
---
v1: https://lore.kernel.org/qemu-devel/20211013160607.649990-3-jean-philippe@linaro.org/
v2: no change, added review tag and resending to be merged separately
    from the equivalent arm fix
---
 hw/i386/pc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 86223acfd3..54e4c00dce 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1718,7 +1718,7 @@ static void pc_machine_class_init(ObjectClass *oc, void *data)
     object_class_property_add_bool(oc, "hpet",
         pc_machine_get_hpet, pc_machine_set_hpet);
 
-    object_class_property_add_bool(oc, "default_bus_bypass_iommu",
+    object_class_property_add_bool(oc, "default-bus-bypass-iommu",
         pc_machine_get_default_bus_bypass_iommu,
         pc_machine_set_default_bus_bypass_iommu);
 
-- 
2.33.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] hw/i386: Rename default_bus_bypass_iommu
  2021-10-25 10:47 [PATCH v2] hw/i386: Rename default_bus_bypass_iommu Jean-Philippe Brucker
@ 2021-10-25 17:14 ` Paolo Bonzini
  2021-10-25 21:15 ` Michael S. Tsirkin
  1 sibling, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2021-10-25 17:14 UTC (permalink / raw)
  To: Jean-Philippe Brucker, mst
  Cc: ehabkost, richard.henderson, qemu-stable, qemu-devel, Eric Auger,
	Philippe Mathieu-Daudé

On 25/10/21 12:47, Jean-Philippe Brucker wrote:
> Since commit d8fb7d0969d5 ("vl: switch -M parsing to keyval"), machine
> parameter definitions cannot use underscores, because keyval_dashify()
> transforms them to dashes and the parser doesn't find the parameter.
> 
> This affects option default_bus_bypass_iommu which was introduced in the
> same release:
> 
> $ qemu-system-x86_64 -M q35,default_bus_bypass_iommu=on
> qemu-system-x86_64: Property 'pc-q35-6.1-machine.default-bus-bypass-iommu' not found
> 
> Rename the parameter to "default-bus-bypass-iommu". Passing
> "default_bus_bypass_iommu" is still valid since the underscore are
> transformed automatically.
> 
> Fixes: c9e96b04fc19 ("hw/i386: Add a default_bus_bypass_iommu pc machine option")
> Reviewed-by: Eric Auger <eric.auger@redhat.com>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Tested-by: Eric Auger <eric.auger@redhat.com>
> Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
> ---
> v1: https://lore.kernel.org/qemu-devel/20211013160607.649990-3-jean-philippe@linaro.org/
> v2: no change, added review tag and resending to be merged separately
>      from the equivalent arm fix
> ---
>   hw/i386/pc.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/i386/pc.c b/hw/i386/pc.c
> index 86223acfd3..54e4c00dce 100644
> --- a/hw/i386/pc.c
> +++ b/hw/i386/pc.c
> @@ -1718,7 +1718,7 @@ static void pc_machine_class_init(ObjectClass *oc, void *data)
>       object_class_property_add_bool(oc, "hpet",
>           pc_machine_get_hpet, pc_machine_set_hpet);
>   
> -    object_class_property_add_bool(oc, "default_bus_bypass_iommu",
> +    object_class_property_add_bool(oc, "default-bus-bypass-iommu",
>           pc_machine_get_default_bus_bypass_iommu,
>           pc_machine_set_default_bus_bypass_iommu);
>   
> 

Queued, with Cc: qemu-stable@nongnu.org.

Thanks,

Paolo



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] hw/i386: Rename default_bus_bypass_iommu
  2021-10-25 10:47 [PATCH v2] hw/i386: Rename default_bus_bypass_iommu Jean-Philippe Brucker
  2021-10-25 17:14 ` Paolo Bonzini
@ 2021-10-25 21:15 ` Michael S. Tsirkin
  1 sibling, 0 replies; 3+ messages in thread
From: Michael S. Tsirkin @ 2021-10-25 21:15 UTC (permalink / raw)
  To: Jean-Philippe Brucker
  Cc: ehabkost, richard.henderson, qemu-devel, Eric Auger, pbonzini,
	Philippe Mathieu-Daudé

On Mon, Oct 25, 2021 at 11:47:38AM +0100, Jean-Philippe Brucker wrote:
> Since commit d8fb7d0969d5 ("vl: switch -M parsing to keyval"), machine
> parameter definitions cannot use underscores, because keyval_dashify()
> transforms them to dashes and the parser doesn't find the parameter.
> 
> This affects option default_bus_bypass_iommu which was introduced in the
> same release:
> 
> $ qemu-system-x86_64 -M q35,default_bus_bypass_iommu=on
> qemu-system-x86_64: Property 'pc-q35-6.1-machine.default-bus-bypass-iommu' not found
> 
> Rename the parameter to "default-bus-bypass-iommu". Passing
> "default_bus_bypass_iommu" is still valid since the underscore are
> transformed automatically.
> 
> Fixes: c9e96b04fc19 ("hw/i386: Add a default_bus_bypass_iommu pc machine option")
> Reviewed-by: Eric Auger <eric.auger@redhat.com>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Tested-by: Eric Auger <eric.auger@redhat.com>
> Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>

Reviewed-by: Michael S. Tsirkin <mst@redhat.com>

> ---
> v1: https://lore.kernel.org/qemu-devel/20211013160607.649990-3-jean-philippe@linaro.org/
> v2: no change, added review tag and resending to be merged separately
>     from the equivalent arm fix
> ---
>  hw/i386/pc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/i386/pc.c b/hw/i386/pc.c
> index 86223acfd3..54e4c00dce 100644
> --- a/hw/i386/pc.c
> +++ b/hw/i386/pc.c
> @@ -1718,7 +1718,7 @@ static void pc_machine_class_init(ObjectClass *oc, void *data)
>      object_class_property_add_bool(oc, "hpet",
>          pc_machine_get_hpet, pc_machine_set_hpet);
>  
> -    object_class_property_add_bool(oc, "default_bus_bypass_iommu",
> +    object_class_property_add_bool(oc, "default-bus-bypass-iommu",
>          pc_machine_get_default_bus_bypass_iommu,
>          pc_machine_set_default_bus_bypass_iommu);
>  
> -- 
> 2.33.0



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-10-25 21:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-25 10:47 [PATCH v2] hw/i386: Rename default_bus_bypass_iommu Jean-Philippe Brucker
2021-10-25 17:14 ` Paolo Bonzini
2021-10-25 21:15 ` Michael S. Tsirkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).