On 01.03.2011, at 19:35, Anthony.Perard@xxxxxxxxxx wrote:
> From: Steven Smith <ssmith@xxxxxxxxxxxxx>
>
> Introduce a new emulated PCI device, specific to fully virtualized Xen
> guests. The device is necessary for PV on HVM drivers to work.
>
> Signed-off-by: Steven Smith <ssmith@xxxxxxxxxxxxx>
> Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
> Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
> ---
> 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
>
> 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) += xen-all.o
> obj-$(CONFIG_NO_XEN) += xen-stub.o
>
> +obj-i386-$(CONFIG_XEN) += xen_platform.o
> +
> # Inter-VM PCI shared memory
> obj-$(CONFIG_KVM) += ivshmem.o
>
> 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)
>
> +#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)
>
> 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,
>
> pc_vga_init(pci_enabled? pci_bus: NULL);
>
> + 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
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|