qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] hw/vfio/pci-quirks: Set category of the "vfio-pci-igd-lpc-bridge" device
@ 2017-01-24  8:02 Thomas Huth
  2017-02-03 18:10 ` Alex Williamson
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Huth @ 2017-01-24  8:02 UTC (permalink / raw)
  To: Alex Williamson, qemu-devel

The device has "bridge" in its name, so it should obviously be in
the category DEVICE_CATEGORY_BRIDGE.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 hw/vfio/pci-quirks.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/vfio/pci-quirks.c b/hw/vfio/pci-quirks.c
index 811eecd..4891b37 100644
--- a/hw/vfio/pci-quirks.c
+++ b/hw/vfio/pci-quirks.c
@@ -1185,6 +1185,7 @@ static void vfio_pci_igd_lpc_bridge_class_init(ObjectClass *klass, void *data)
     DeviceClass *dc = DEVICE_CLASS(klass);
     PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
 
+    set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
     dc->desc = "VFIO dummy ISA/LPC bridge for IGD assignment";
     dc->hotpluggable = false;
     k->realize = vfio_pci_igd_lpc_bridge_realize;
-- 
1.8.3.1

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

* Re: [Qemu-devel] [PATCH] hw/vfio/pci-quirks: Set category of the "vfio-pci-igd-lpc-bridge" device
  2017-01-24  8:02 [Qemu-devel] [PATCH] hw/vfio/pci-quirks: Set category of the "vfio-pci-igd-lpc-bridge" device Thomas Huth
@ 2017-02-03 18:10 ` Alex Williamson
  2017-02-06 10:09   ` Thomas Huth
  0 siblings, 1 reply; 4+ messages in thread
From: Alex Williamson @ 2017-02-03 18:10 UTC (permalink / raw)
  To: Thomas Huth; +Cc: qemu-devel

On Tue, 24 Jan 2017 09:02:38 +0100
Thomas Huth <thuth@redhat.com> wrote:

> The device has "bridge" in its name, so it should obviously be in
> the category DEVICE_CATEGORY_BRIDGE.

Well, physical device is a bridge, but this is really just a stub.
Does that count?  It doesn't create a subordinate bus that can actually
host devices.  Thanks,

Alex

> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  hw/vfio/pci-quirks.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/hw/vfio/pci-quirks.c b/hw/vfio/pci-quirks.c
> index 811eecd..4891b37 100644
> --- a/hw/vfio/pci-quirks.c
> +++ b/hw/vfio/pci-quirks.c
> @@ -1185,6 +1185,7 @@ static void vfio_pci_igd_lpc_bridge_class_init(ObjectClass *klass, void *data)
>      DeviceClass *dc = DEVICE_CLASS(klass);
>      PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
>  
> +    set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
>      dc->desc = "VFIO dummy ISA/LPC bridge for IGD assignment";
>      dc->hotpluggable = false;
>      k->realize = vfio_pci_igd_lpc_bridge_realize;

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

* Re: [Qemu-devel] [PATCH] hw/vfio/pci-quirks: Set category of the "vfio-pci-igd-lpc-bridge" device
  2017-02-03 18:10 ` Alex Williamson
@ 2017-02-06 10:09   ` Thomas Huth
  2017-02-06 16:38     ` Alex Williamson
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Huth @ 2017-02-06 10:09 UTC (permalink / raw)
  To: Alex Williamson; +Cc: qemu-devel

On 03.02.2017 19:10, Alex Williamson wrote:
> On Tue, 24 Jan 2017 09:02:38 +0100
> Thomas Huth <thuth@redhat.com> wrote:
> 
>> The device has "bridge" in its name, so it should obviously be in
>> the category DEVICE_CATEGORY_BRIDGE.
> 
> Well, physical device is a bridge, but this is really just a stub.
> Does that count?  It doesn't create a subordinate bus that can actually
> host devices.

The device category is only used for sorting the device into a category
in the help output when the user runs QEMU with "-device ?". The
DEVICE_CATEGORY_BRIDGE is title there "Controller/Bridge/Hub devices",
so IMHO that should be fine for this device. Otherwise it should maybe
go into DEVICE_CATEGORY_MISC instead - but at least it should not stay
uncategorized, all devices that show up in the "-device ?" help text
should eventually get a category.

 Thomas

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

* Re: [Qemu-devel] [PATCH] hw/vfio/pci-quirks: Set category of the "vfio-pci-igd-lpc-bridge" device
  2017-02-06 10:09   ` Thomas Huth
@ 2017-02-06 16:38     ` Alex Williamson
  0 siblings, 0 replies; 4+ messages in thread
From: Alex Williamson @ 2017-02-06 16:38 UTC (permalink / raw)
  To: Thomas Huth; +Cc: qemu-devel

On Mon, 6 Feb 2017 11:09:45 +0100
Thomas Huth <thuth@redhat.com> wrote:

> On 03.02.2017 19:10, Alex Williamson wrote:
> > On Tue, 24 Jan 2017 09:02:38 +0100
> > Thomas Huth <thuth@redhat.com> wrote:
> >   
> >> The device has "bridge" in its name, so it should obviously be in
> >> the category DEVICE_CATEGORY_BRIDGE.  
> > 
> > Well, physical device is a bridge, but this is really just a stub.
> > Does that count?  It doesn't create a subordinate bus that can actually
> > host devices.  
> 
> The device category is only used for sorting the device into a category
> in the help output when the user runs QEMU with "-device ?". The
> DEVICE_CATEGORY_BRIDGE is title there "Controller/Bridge/Hub devices",
> so IMHO that should be fine for this device. Otherwise it should maybe
> go into DEVICE_CATEGORY_MISC instead - but at least it should not stay
> uncategorized, all devices that show up in the "-device ?" help text
> should eventually get a category.

Ok, I'll queue this for my next pull request.  Thanks,

Alex

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

end of thread, other threads:[~2017-02-06 16:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-24  8:02 [Qemu-devel] [PATCH] hw/vfio/pci-quirks: Set category of the "vfio-pci-igd-lpc-bridge" device Thomas Huth
2017-02-03 18:10 ` Alex Williamson
2017-02-06 10:09   ` Thomas Huth
2017-02-06 16:38     ` Alex Williamson

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