WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [Qemu-devel] [PATCH V11 06/15] xen: Add the Xen platform

To: Anthony.Perard@xxxxxxxxxx
Subject: [Xen-devel] Re: [Qemu-devel] [PATCH V11 06/15] xen: Add the Xen platform pci device
From: Alexander Graf <agraf@xxxxxxx>
Date: Wed, 23 Mar 2011 13:08:05 +0100
Cc: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>, Xen Devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, QEMU-devel <qemu-devel@xxxxxxxxxx>, Anthony Liguori <anthony@xxxxxxxxxxxxx>, Steven Smith <ssmith@xxxxxxxxxxxxx>
Delivery-date: Wed, 23 Mar 2011 05:09:27 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1299004529-31290-7-git-send-email-anthony.perard@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1299004529-31290-1-git-send-email-anthony.perard@xxxxxxxxxx> <1299004529-31290-7-git-send-email-anthony.perard@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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

<Prev in Thread] Current Thread [Next in Thread>