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 RFC V3 03/12] xen: Introduce --enabl

On 17.09.2010, at 13:14, Anthony.Perard@xxxxxxxxxx wrote:

> From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
> 
> This options will check if the target is build with Xen support.
> 
> Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
> Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
> ---
> 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


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

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