qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] hw/arm/virt: Rename default_bus_bypass_iommu
@ 2021-10-26  9:37 Jean-Philippe Brucker
  2021-10-26 10:32 ` Philippe Mathieu-Daudé
  2021-11-01 17:46 ` Richard Henderson
  0 siblings, 2 replies; 3+ messages in thread
From: Jean-Philippe Brucker @ 2021-10-26  9:37 UTC (permalink / raw)
  To: peter.maydell
  Cc: Jean-Philippe Brucker, qemu-devel, qemu-stable, Eric Auger,
	qemu-arm, 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-aarch64 -M virt,default_bus_bypass_iommu=on
qemu-system-aarch64: Property 'virt-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: 6d7a85483a06 ("hw/arm/virt: Add default_bus_bypass_iommu 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>
---
v2: Resending to be merged separately from the equivalent x86 fix,
    already queued by Paolo [2]. No change other than added review tag.
v1: https://lore.kernel.org/qemu-devel/20211013160607.649990-2-jean-philippe@linaro.org/

[2] https://lore.kernel.org/qemu-devel/55e7387a-4bc0-1743-1013-19c38a6ceb77@redhat.com/
---
 hw/arm/virt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index ca433adb5b..369552ad45 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -2737,10 +2737,10 @@ static void virt_machine_class_init(ObjectClass *oc, void *data)
                                           "Set the IOMMU type. "
                                           "Valid values are none and smmuv3");
 
-    object_class_property_add_bool(oc, "default_bus_bypass_iommu",
+    object_class_property_add_bool(oc, "default-bus-bypass-iommu",
                                    virt_get_default_bus_bypass_iommu,
                                    virt_set_default_bus_bypass_iommu);
-    object_class_property_set_description(oc, "default_bus_bypass_iommu",
+    object_class_property_set_description(oc, "default-bus-bypass-iommu",
                                           "Set on/off to enable/disable "
                                           "bypass_iommu for default root bus");
 
-- 
2.33.0



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

* Re: [PATCH v2] hw/arm/virt: Rename default_bus_bypass_iommu
  2021-10-26  9:37 [PATCH v2] hw/arm/virt: Rename default_bus_bypass_iommu Jean-Philippe Brucker
@ 2021-10-26 10:32 ` Philippe Mathieu-Daudé
  2021-11-01 17:46 ` Richard Henderson
  1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-10-26 10:32 UTC (permalink / raw)
  To: Jean-Philippe Brucker, peter.maydell
  Cc: Eric Auger, qemu-arm, qemu-devel, qemu-stable

On 10/26/21 11:37, 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-aarch64 -M virt,default_bus_bypass_iommu=on
> qemu-system-aarch64: Property 'virt-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.
> 

Cc: qemu-stable@nongnu.org

> Fixes: 6d7a85483a06 ("hw/arm/virt: Add default_bus_bypass_iommu 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>
> ---
> v2: Resending to be merged separately from the equivalent x86 fix,
>     already queued by Paolo [2]. No change other than added review tag.
> v1: https://lore.kernel.org/qemu-devel/20211013160607.649990-2-jean-philippe@linaro.org/
> 
> [2] https://lore.kernel.org/qemu-devel/55e7387a-4bc0-1743-1013-19c38a6ceb77@redhat.com/
> ---
>  hw/arm/virt.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
> index ca433adb5b..369552ad45 100644
> --- a/hw/arm/virt.c
> +++ b/hw/arm/virt.c
> @@ -2737,10 +2737,10 @@ static void virt_machine_class_init(ObjectClass *oc, void *data)
>                                            "Set the IOMMU type. "
>                                            "Valid values are none and smmuv3");
>  
> -    object_class_property_add_bool(oc, "default_bus_bypass_iommu",
> +    object_class_property_add_bool(oc, "default-bus-bypass-iommu",
>                                     virt_get_default_bus_bypass_iommu,
>                                     virt_set_default_bus_bypass_iommu);
> -    object_class_property_set_description(oc, "default_bus_bypass_iommu",
> +    object_class_property_set_description(oc, "default-bus-bypass-iommu",
>                                            "Set on/off to enable/disable "
>                                            "bypass_iommu for default root bus");
>  
> 



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

* Re: [PATCH v2] hw/arm/virt: Rename default_bus_bypass_iommu
  2021-10-26  9:37 [PATCH v2] hw/arm/virt: Rename default_bus_bypass_iommu Jean-Philippe Brucker
  2021-10-26 10:32 ` Philippe Mathieu-Daudé
@ 2021-11-01 17:46 ` Richard Henderson
  1 sibling, 0 replies; 3+ messages in thread
From: Richard Henderson @ 2021-11-01 17:46 UTC (permalink / raw)
  To: Jean-Philippe Brucker, peter.maydell
  Cc: Eric Auger, qemu-arm, Philippe Mathieu-Daudé,
	qemu-devel, qemu-stable

On 10/26/21 5:37 AM, 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-aarch64 -M virt,default_bus_bypass_iommu=on
> qemu-system-aarch64: Property 'virt-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: 6d7a85483a06 ("hw/arm/virt: Add default_bus_bypass_iommu 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>
> ---
> v2: Resending to be merged separately from the equivalent x86 fix,
>      already queued by Paolo [2]. No change other than added review tag.
> v1:https://lore.kernel.org/qemu-devel/20211013160607.649990-2-jean-philippe@linaro.org/
> 
> [2]https://lore.kernel.org/qemu-devel/55e7387a-4bc0-1743-1013-19c38a6ceb77@redhat.com/
> ---
>   hw/arm/virt.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)

Thanks, applied to target-arm.next.


r~


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

end of thread, other threads:[~2021-11-01 18:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-26  9:37 [PATCH v2] hw/arm/virt: Rename default_bus_bypass_iommu Jean-Philippe Brucker
2021-10-26 10:32 ` Philippe Mathieu-Daudé
2021-11-01 17:46 ` Richard Henderson

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).