All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] xen: move to new pci initializers
@ 2011-06-26 13:39 Michael S. Tsirkin
  2011-06-27 12:21 ` Stefano Stabellini
  0 siblings, 1 reply; 4+ messages in thread
From: Michael S. Tsirkin @ 2011-06-26 13:39 UTC (permalink / raw)
  To: qemu-devel
  Cc: Anthony PERARD, Steven Smith, Alexander Graf, Stefano Stabellini

move ids to pci info structure

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

Untested.

---
 hw/xen_platform.c |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/hw/xen_platform.c b/hw/xen_platform.c
index 9a01735..f43e175 100644
--- a/hw/xen_platform.c
+++ b/hw/xen_platform.c
@@ -290,18 +290,10 @@ static int xen_platform_initfn(PCIDevice *dev)
 
     pci_conf = d->pci_dev.config;
 
-    pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_XEN);
-    pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_XEN_PLATFORM);
-    pci_set_word(pci_conf + PCI_SUBSYSTEM_VENDOR_ID, PCI_VENDOR_ID_XEN);
-    pci_set_word(pci_conf + PCI_SUBSYSTEM_ID, PCI_DEVICE_ID_XEN_PLATFORM);
-
     pci_set_word(pci_conf + PCI_COMMAND, PCI_COMMAND_IO | PCI_COMMAND_MEMORY);
 
-    pci_config_set_revision(pci_conf, 1);
     pci_config_set_prog_interface(pci_conf, 0);
 
-    pci_config_set_class(pci_conf, PCI_CLASS_OTHERS << 8 | 0x80);
-
     pci_conf[PCI_INTERRUPT_PIN] = 1;
 
     pci_register_bar(&d->pci_dev, 0, 0x100,
@@ -330,6 +322,13 @@ static PCIDeviceInfo xen_platform_info = {
     .qdev.size = sizeof(PCIXenPlatformState),
     .qdev.vmsd = &vmstate_xen_platform,
     .qdev.reset = platform_reset,
+
+    .vendor_id    =  PCI_VENDOR_ID_XEN,
+    .device_id    = PCI_DEVICE_ID_XEN_PLATFORM,
+    .class_id     = PCI_CLASS_OTHERS << 8 | 0x80,
+    .subsystem_vendor_id = PCI_VENDOR_ID_XEN,
+    .subsystem_id = PCI_DEVICE_ID_XEN_PLATFORM,
+    .revision = 1,
 };
 
 static void xen_platform_register(void)
-- 
1.7.5.53.gc233e

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

* Re: [Qemu-devel] [PATCH] xen: move to new pci initializers
  2011-06-26 13:39 [Qemu-devel] [PATCH] xen: move to new pci initializers Michael S. Tsirkin
@ 2011-06-27 12:21 ` Stefano Stabellini
  2011-06-29 11:05   ` Alexander Graf
  0 siblings, 1 reply; 4+ messages in thread
From: Stefano Stabellini @ 2011-06-27 12:21 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: Steven Smith, Alexander Graf, Anthony Perard, qemu-devel,
	Stefano Stabellini

On Sun, 26 Jun 2011, Michael S. Tsirkin wrote:
> move ids to pci info structure
> 
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> 
> Untested.
> 

tested and working correctly, it is fine by me.


> ---
>  hw/xen_platform.c |   15 +++++++--------
>  1 files changed, 7 insertions(+), 8 deletions(-)
> 
> diff --git a/hw/xen_platform.c b/hw/xen_platform.c
> index 9a01735..f43e175 100644
> --- a/hw/xen_platform.c
> +++ b/hw/xen_platform.c
> @@ -290,18 +290,10 @@ static int xen_platform_initfn(PCIDevice *dev)
>  
>      pci_conf = d->pci_dev.config;
>  
> -    pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_XEN);
> -    pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_XEN_PLATFORM);
> -    pci_set_word(pci_conf + PCI_SUBSYSTEM_VENDOR_ID, PCI_VENDOR_ID_XEN);
> -    pci_set_word(pci_conf + PCI_SUBSYSTEM_ID, PCI_DEVICE_ID_XEN_PLATFORM);
> -
>      pci_set_word(pci_conf + PCI_COMMAND, PCI_COMMAND_IO | PCI_COMMAND_MEMORY);
>  
> -    pci_config_set_revision(pci_conf, 1);
>      pci_config_set_prog_interface(pci_conf, 0);
>  
> -    pci_config_set_class(pci_conf, PCI_CLASS_OTHERS << 8 | 0x80);
> -
>      pci_conf[PCI_INTERRUPT_PIN] = 1;
>  
>      pci_register_bar(&d->pci_dev, 0, 0x100,
> @@ -330,6 +322,13 @@ static PCIDeviceInfo xen_platform_info = {
>      .qdev.size = sizeof(PCIXenPlatformState),
>      .qdev.vmsd = &vmstate_xen_platform,
>      .qdev.reset = platform_reset,
> +
> +    .vendor_id    =  PCI_VENDOR_ID_XEN,
> +    .device_id    = PCI_DEVICE_ID_XEN_PLATFORM,
> +    .class_id     = PCI_CLASS_OTHERS << 8 | 0x80,
> +    .subsystem_vendor_id = PCI_VENDOR_ID_XEN,
> +    .subsystem_id = PCI_DEVICE_ID_XEN_PLATFORM,
> +    .revision = 1,
>  };
>  
>  static void xen_platform_register(void)
> -- 
> 1.7.5.53.gc233e
> 

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

* Re: [Qemu-devel] [PATCH] xen: move to new pci initializers
  2011-06-27 12:21 ` Stefano Stabellini
@ 2011-06-29 11:05   ` Alexander Graf
  2011-06-29 12:51     ` Michael S. Tsirkin
  0 siblings, 1 reply; 4+ messages in thread
From: Alexander Graf @ 2011-06-29 11:05 UTC (permalink / raw)
  To: Stefano Stabellini
  Cc: Steven Smith, Anthony Perard, qemu-devel, Michael S. Tsirkin


On 27.06.2011, at 14:21, Stefano Stabellini wrote:

> On Sun, 26 Jun 2011, Michael S. Tsirkin wrote:
>> move ids to pci info structure
>> 
>> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
>> 
>> Untested.
>> 
> 
> tested and working correctly, it is fine by me.

Michael, which tree do you want this to go through?


Alex

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

* Re: [Qemu-devel] [PATCH] xen: move to new pci initializers
  2011-06-29 11:05   ` Alexander Graf
@ 2011-06-29 12:51     ` Michael S. Tsirkin
  0 siblings, 0 replies; 4+ messages in thread
From: Michael S. Tsirkin @ 2011-06-29 12:51 UTC (permalink / raw)
  To: Alexander Graf
  Cc: Steven Smith, Anthony Perard, qemu-devel, Stefano Stabellini

On Wed, Jun 29, 2011 at 01:05:07PM +0200, Alexander Graf wrote:
> 
> On 27.06.2011, at 14:21, Stefano Stabellini wrote:
> 
> > On Sun, 26 Jun 2011, Michael S. Tsirkin wrote:
> >> move ids to pci info structure
> >> 
> >> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> >> 
> >> Untested.
> >> 
> > 
> > tested and working correctly, it is fine by me.
> 
> Michael, which tree do you want this to go through?
> 
> 
> Alex

I put this on my tree.

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

end of thread, other threads:[~2011-06-29 12:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-26 13:39 [Qemu-devel] [PATCH] xen: move to new pci initializers Michael S. Tsirkin
2011-06-27 12:21 ` Stefano Stabellini
2011-06-29 11:05   ` Alexander Graf
2011-06-29 12:51     ` Michael S. Tsirkin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.