Skip to contentSkip to conversation

Fix machine parameter default_bus_bypass_iommu

PATCH RESEND Superseded Jean-Philippe Brucker 3 participants 8 messages Oct 13, 2021 – Oct 23, 2021

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover Fix machine parameter default_bus_bypass_iommu

The machine option "default_bus_bypass_iommu" is broken since commit d8fb7d0969d5 ("vl: switch -M parsing to keyval"). Fix both machines that implement it.

Resending with Review and Tested tags, no other change since last posting:
https://lore.kernel.org/qemu-devel/[email protected]/

The fix was suggested by Paolo:
https://lore.kernel.org/qemu-devel/[email protected]/

Jean-Philippe Brucker (2):
hw/arm/virt: Rename default_bus_bypass_iommu
hw/i386: Rename default_bus_bypass_iommu

 hw/arm/virt.c | 4 ++--
 hw/i386/pc.c  | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
Signature · 1 line
2.33.0
#1 lore raw

PATCH RESEND 1/2 hw/arm/virt: Rename default_bus_bypass_iommu

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")
---
 hw/arm/virt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/arm/virt.c +2 -2
index 7170aaacd5..5fdd5aa888 100644
@@ -2687,10 +2687,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");
 
Signature · 1 line
2.33.0
#2 lore raw

PATCH RESEND 2/2 hw/i386: Rename default_bus_bypass_iommu

In reply to Jean-Philippe Brucker

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")
---
 hw/i386/pc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/i386/pc.c +1 -1
index 86223acfd3..54e4c00dce 100644
@@ -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);
 
Signature · 1 line
2.33.0
#3 lore raw

Re: [RESEND PATCH 2/2] hw/i386: Rename default_bus_bypass_iommu

Quoted 10 lines · Jean-Philippe Brucker

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
Quoted 8 lines

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

I can merge this one but I think it's independent of the ARM patch, right? So just two independent patches.

Quoted 19 lines
---
 hw/i386/pc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/i386/pc.c +1 -1
index 86223acfd3..54e4c00dce 100644
@@ -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);
 
Signature · 1 line
2.33.0
#4 lore raw

Re: [RESEND PATCH 2/2] hw/i386: Rename default_bus_bypass_iommu

Quoted 15 lines · Michael S. Tsirkin
Quoted 14 lines · Jean-Philippe Brucker

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.

Quoted 7 lines
Quoted 4 lines
Fixes c9e96b04fc19 ("hw/i386: Add a default_bus_bypass_iommu pc machine option")

I can merge this one but I think it's independent of the ARM patch, right? So just two independent patches.

Yes they are independent

Thanks,
Jean

Quoted 21 lines
Quoted 20 lines
---
 hw/i386/pc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/i386/pc.c +1 -1
index 86223acfd3..54e4c00dce 100644
@@ -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);
 
Signature · 1 line
2.33.0
#5 lore raw

Re: [RESEND PATCH 2/2] hw/i386: Rename default_bus_bypass_iommu

Quoted 21 lines · Jean-Philippe Brucker
Quoted 20 lines · Michael S. Tsirkin
Quoted 18 lines · Jean-Philippe Brucker

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")
Quoted 7 lines
Quoted 2 lines

I can merge this one but I think it's independent of the ARM patch, right? So just two independent patches.

Yes they are independent

Thanks,
Jean

Ok just post them separately pls then.

Quoted 21 lines
Quoted 21 lines
Quoted 20 lines
---
 hw/i386/pc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/i386/pc.c +1 -1
index 86223acfd3..54e4c00dce 100644
@@ -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);
 
Signature · 1 line
2.33.0
#6 lore raw
In reply to Jean-Philippe Brucker

Hi Paolo,

Quoted 3 lines · Jean-Philippe Brucker

The machine option "default_bus_bypass_iommu" is broken since commit d8fb7d0969d5 ("vl: switch -M parsing to keyval"). Fix both machines that implement it.

Please could you take a look at these fixes? Another patch adds a test that uses default_bus_bypass_iommu [1], and is blocked by this.

Thanks,
Jean

[1] https://lore.kernel.org/qemu-devel/[email protected]/

Quoted 19 lines

Resending with Review and Tested tags, no other change since last posting:
https://lore.kernel.org/qemu-devel/[email protected]/

The fix was suggested by Paolo:
https://lore.kernel.org/qemu-devel/[email protected]/

Jean-Philippe Brucker (2):
hw/arm/virt: Rename default_bus_bypass_iommu
hw/i386: Rename default_bus_bypass_iommu

 hw/arm/virt.c | 4 ++--
 hw/i386/pc.c  | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
Signature · 1 line
2.33.0
Reviewed-by on the v1 series
#7 lore raw
In reply to Jean-Philippe Brucker
Quoted 11 lines · Jean-Philippe Brucker

The machine option "default_bus_bypass_iommu" is broken since commit d8fb7d0969d5 ("vl: switch -M parsing to keyval"). Fix both machines that implement it.

Resending with Review and Tested tags, no other change since last posting:
https://lore.kernel.org/qemu-devel/[email protected]/

The fix was suggested by Paolo:
https://lore.kernel.org/qemu-devel/[email protected]/

Quoted 7 lines

Jean-Philippe Brucker (2):
hw/arm/virt: Rename default_bus_bypass_iommu
hw/i386: Rename default_bus_bypass_iommu

 hw/arm/virt.c | 4 ++--
 hw/i386/pc.c  | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)