[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH RFC V3 03/12] xen: Introduce --enable-xen comman
From: |
Alexander Graf |
Subject: |
Re: [Qemu-devel] [PATCH RFC V3 03/12] xen: Introduce --enable-xen command options. |
Date: |
Fri, 17 Sep 2010 13:41:04 +0200 |
On 17.09.2010, at 13:14, address@hidden wrote:
> From: Anthony PERARD <address@hidden>
>
> This options will check if the target is build with Xen support.
>
> Signed-off-by: Anthony PERARD <address@hidden>
> Signed-off-by: Stefano Stabellini <address@hidden>
> ---
> Makefile.target | 3 +++
> hw/xen.h | 10 ++++++++++
> qemu-options.hx | 9 +++++++++
> vl.c | 16 ++++++++++++++++
> xen-all.c | 25 +++++++++++++++++++++++++
> xen-stub.c | 17 +++++++++++++++++
> 6 files changed, 80 insertions(+), 0 deletions(-)
> create mode 100644 xen-all.c
> create mode 100644 xen-stub.c
>
> diff --git a/Makefile.target b/Makefile.target
> index f112e66..1984f58 100644
> --- a/Makefile.target
> +++ b/Makefile.target
> @@ -2,6 +2,7 @@
>
> GENERATED_HEADERS = config-target.h
> CONFIG_NO_KVM = $(if $(subst n,,$(CONFIG_KVM)),n,y)
> +CONFIG_NO_XEN = $(if $(subst n,,$(CONFIG_XEN)),n,y)
>
> include ../config-host.mak
> include config-devices.mak
> @@ -182,6 +183,8 @@ QEMU_CFLAGS += $(VNC_PNG_CFLAGS)
>
> # xen backend driver support
> obj-$(CONFIG_XEN) += xen_machine_pv.o xen_domainbuild.o
> +obj-$(CONFIG_XEN) += xen-all.o
> +obj-$(CONFIG_NO_XEN) += xen-stub.o
>
> # xen full virtualized machine
> obj-$(CONFIG_XEN) += xen_machine_fv.o
> diff --git a/hw/xen.h b/hw/xen.h
> index 780dcf7..14bbb6e 100644
> --- a/hw/xen.h
> +++ b/hw/xen.h
> @@ -18,4 +18,14 @@ enum xen_mode {
> extern uint32_t xen_domid;
> extern enum xen_mode xen_mode;
>
> +extern int xen_allowed;
> +
> +#if defined CONFIG_XEN
> +#define xen_enabled() (xen_allowed)
> +#else
> +#define xen_enabled() (0)
> +#endif
> +
> +int xen_init(int smp_cpus);
> +
> #endif /* QEMU_HW_XEN_H */
> diff --git a/qemu-options.hx b/qemu-options.hx
> index a0b5ae9..457ca32 100644
> --- a/qemu-options.hx
> +++ b/qemu-options.hx
> @@ -1904,6 +1904,15 @@ Enable KVM full virtualization support. This option is
> only available
> if KVM support is enabled when compiling.
> ETEXI
>
> +DEF("enable-xen", 0, QEMU_OPTION_enable_xen, \
> + "-enable-xen enable Xen full virtualization support\n",
> QEMU_ARCH_ALL)
This is probably a good point in time to switch to something a bit more
sophisticated. I was thinking of
qemu -accel xen,kvm,tcg
which would first try to enable xen support, then kvm support and fall back to
tcg if none is available. The default would be pretty much the line above.
That way we could finally get rid of all those -enable-kvm and -enable-whatever
switches. We would still need to keep backwards compat for -enable-kvm by
mapping it to "-accel kvm" internally. But in the long run an -accel parameter
just makes so much more sense.
Alex
- [Qemu-devel] [PATCH RFC V3 00/12] xen device model support, anthony . perard, 2010/09/17
- [Qemu-devel] [PATCH RFC V3 03/12] xen: Introduce --enable-xen command options., anthony . perard, 2010/09/17
- Re: [Qemu-devel] [PATCH RFC V3 03/12] xen: Introduce --enable-xen command options.,
Alexander Graf <=
- [Qemu-devel] [PATCH RFC V3 02/12] xen: Add xen_machine_fv, anthony . perard, 2010/09/17
- [Qemu-devel] [PATCH RFC V3 01/12] xen: Support new libxc calls from xen unstable., anthony . perard, 2010/09/17
- [Qemu-devel] [PATCH RFC V3 06/12] xen: add a 8259 Interrupt Controller, anthony . perard, 2010/09/17
- [Qemu-devel] [PATCH RFC V3 04/12] xen: Add the Xen platform pci device, anthony . perard, 2010/09/17
- [Qemu-devel] [PATCH RFC V3 08/12] Intruduce qemu_ram_ptr_unlock., anthony . perard, 2010/09/17
- [Qemu-devel] [PATCH RFC V3 07/12] xen: Introduce the Xen mapcache, anthony . perard, 2010/09/17