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 V6 05/15] xen: Add xen in -accel opt

On 21.10.2010, at 19:36, Anthony.Perard@xxxxxxxxxx wrote:

> From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
> 
> This come with the initialisation of Xen.
> 
> Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
> ---
> Makefile.target |    5 +++++
> hw/xen.h        |   10 ++++++++++
> vl.c            |    2 ++
> xen-all.c       |   25 +++++++++++++++++++++++++
> xen-stub.c      |   17 +++++++++++++++++
> 5 files changed, 59 insertions(+), 0 deletions(-)
> create mode 100644 xen-all.c
> create mode 100644 xen-stub.c
> 
> diff --git a/Makefile.target b/Makefile.target
> index ddabc8a..644cafa 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
> @@ -185,6 +186,10 @@ QEMU_CFLAGS += $(VNC_PNG_CFLAGS)
> # xen backend driver support
> obj-$(CONFIG_XEN) += xen_machine_pv.o xen_domainbuild.o
> 
> +# xen support
> +obj-$(CONFIG_XEN) += xen-all.o
> +obj-$(CONFIG_NO_XEN) += xen-stub.o
> +
> # xen full virtualized machine
> obj-i386-$(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

Please see my comment on patch 04. I don't think this preprocessor magic buys 
us anything over static inline function definitions. And with those we can get 
rid of a lot of pitfalls.


Alex


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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] Re: [Qemu-devel] [PATCH V6 05/15] xen: Add xen in -accel option., Alexander Graf <=