From: Alexander Graf Subject: Re: [PATCH V11 06/15] xen: Add the Xen platform pci device Date: Wed, 23 Mar 2011 13:08:05 +0100 Message-ID: References: <1299004529-31290-1-git-send-email-anthony.perard@citrix.com> <1299004529-31290-7-git-send-email-anthony.perard@citrix.com> Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <1299004529-31290-7-git-send-email-anthony.perard@citrix.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org To: Anthony.Perard@citrix.com Cc: Stefano Stabellini , Xen Devel , QEMU-devel , Steven Smith List-Id: xen-devel@lists.xenproject.org On 01.03.2011, at 19:35, Anthony.Perard@citrix.com wrote: > From: Steven Smith >=20 > Introduce a new emulated PCI device, specific to fully virtualized Xen > guests. The device is necessary for PV on HVM drivers to work. >=20 > Signed-off-by: Steven Smith > Signed-off-by: Anthony PERARD > Signed-off-by: Stefano Stabellini > --- > Makefile.target | 2 + > hw/hw.h | 3 + > hw/pc_piix.c | 4 + > hw/pci_ids.h | 2 + > hw/xen.h | 2 + > hw/xen_platform.c | 349 = +++++++++++++++++++++++++++++++++++++++++++++++++++++ > trace-events | 3 + > xen-stub.c | 4 + > 8 files changed, 369 insertions(+), 0 deletions(-) > create mode 100644 hw/xen_platform.c >=20 > diff --git a/Makefile.target b/Makefile.target > index b08c7f7..c539b1e 100644 > --- a/Makefile.target > +++ b/Makefile.target > @@ -217,6 +217,8 @@ endif > obj-i386-$(CONFIG_XEN) +=3D xen-all.o > obj-$(CONFIG_NO_XEN) +=3D xen-stub.o >=20 > +obj-i386-$(CONFIG_XEN) +=3D xen_platform.o > + > # Inter-VM PCI shared memory > obj-$(CONFIG_KVM) +=3D ivshmem.o >=20 > diff --git a/hw/hw.h b/hw/hw.h > index 5e24329..c285b2e 100644 > --- a/hw/hw.h > +++ b/hw/hw.h > @@ -682,6 +682,9 @@ extern const VMStateDescription = vmstate_usb_device; > #define VMSTATE_INT32_LE(_f, _s) \ > VMSTATE_SINGLE(_f, _s, 0, vmstate_info_int32_le, int32_t) >=20 > +#define VMSTATE_UINT8_TEST(_f, _s, _t) = \ > + VMSTATE_SINGLE_TEST(_f, _s, _t, 0, vmstate_info_uint8, uint8_t) > + > #define VMSTATE_UINT16_TEST(_f, _s, _t) = \ > VMSTATE_SINGLE_TEST(_f, _s, _t, 0, vmstate_info_uint16, uint16_t) >=20 > diff --git a/hw/pc_piix.c b/hw/pc_piix.c > index 6eff06e..417c456 100644 > --- a/hw/pc_piix.c > +++ b/hw/pc_piix.c > @@ -121,6 +121,10 @@ static void pc_init1(ram_addr_t ram_size, >=20 > pc_vga_init(pci_enabled? pci_bus: NULL); >=20 > + if (xen_enabled()) { > + pci_xen_platform_init(pci_bus); It probably makes sense to fold that function in here. That way you = wouldn't need the entry in the stub file. Alex