diff mbox series

[RESEND,2/2] hw/i386: Rename default_bus_bypass_iommu

Message ID 20211013160607.649990-3-jean-philippe@linaro.org (mailing list archive)
State New, archived
Headers show
Series Fix machine parameter default_bus_bypass_iommu | expand

Commit Message

Jean-Philippe Brucker Oct. 13, 2021, 4:06 p.m. UTC
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>
Tested-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
---
 hw/i386/pc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michael S. Tsirkin Oct. 22, 2021, 2:46 p.m. UTC | #1
On Wed, Oct 13, 2021 at 05:06:08PM +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>
> Tested-by: Eric Auger <eric.auger@redhat.com>
> Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>

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

> ---
>  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
Jean-Philippe Brucker Oct. 22, 2021, 2:58 p.m. UTC | #2
On Fri, Oct 22, 2021 at 10:46:08AM -0400, Michael S. Tsirkin wrote:
> On Wed, Oct 13, 2021 at 05:06:08PM +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>
> > Tested-by: Eric Auger <eric.auger@redhat.com>
> > Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
> 
> 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

> 
> > ---
> >  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
>
Michael S. Tsirkin Oct. 23, 2021, 8:15 p.m. UTC | #3
On Fri, Oct 22, 2021 at 03:58:28PM +0100, Jean-Philippe Brucker wrote:
> On Fri, Oct 22, 2021 at 10:46:08AM -0400, Michael S. Tsirkin wrote:
> > On Wed, Oct 13, 2021 at 05:06:08PM +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>
> > > Tested-by: Eric Auger <eric.auger@redhat.com>
> > > Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
> > 
> > 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.

> > 
> > > ---
> > >  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
> >
diff mbox series

Patch

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