qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 31/40] xenner: libxc emu: xenstore


From: Blue Swirl
Subject: Re: [Qemu-devel] [PATCH 31/40] xenner: libxc emu: xenstore
Date: Mon, 1 Nov 2010 18:36:21 +0000

On Mon, Nov 1, 2010 at 3:01 PM, Alexander Graf <address@hidden> wrote:
> Xenner emulates parts of libxc, so we can not use the real xen infrastructure
> when running xen pv guests without xen.
>
> This patch adds support for emulation of xenstored.
>
> Signed-off-by: Alexander Graf <address@hidden>
> ---
>  hw/xenner_guest_store.c |  494 +++++++++++++++++++++++++++++++++
>  hw/xenner_libxenstore.c |  709 
> +++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 1203 insertions(+), 0 deletions(-)
>  create mode 100644 hw/xenner_guest_store.c
>  create mode 100644 hw/xenner_libxenstore.c
>
> diff --git a/hw/xenner_guest_store.c b/hw/xenner_guest_store.c
> new file mode 100644
> index 0000000..c067275
> --- /dev/null
> +++ b/hw/xenner_guest_store.c
> @@ -0,0 +1,494 @@
> +/*
> + *  Copyright (C) 2005 Rusty Russell IBM Corporation
> + *  Copyright (C) Red Hat 2007
> + *  Copyright (C) Novell Inc. 2010
> + *
> + *  Author(s): Gerd Hoffmann <address@hidden>
> + *             Alexander Graf <address@hidden>
> + *
> + *  Xenner emulation -- guest interface to xenstore
> + *
> + *  tools/xenstore/xenstored_domain.c equivalent, some code is from there.
> + *
> + *  This program is free software; you can redistribute it and/or modify
> + *  it under the terms of the GNU General Public License as published by
> + *  the Free Software Foundation; under version 2 of the License.
> + *
> + *  This program is distributed in the hope that it will be useful,
> + *  but WITHOUT ANY WARRANTY; without even the implied warranty of
> + *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + *  GNU General Public License for more details.
> + *
> + *  You should have received a copy of the GNU General Public License along
> + *  with this program; if not, see <http://www.gnu.org/licenses/>.
> + */
> +
> +#include "xen.h"
> +#include "xen_interfaces.h"
> +#include "xenner.h"
> +#include "qemu-char.h"
> +
> +/* ------------------------------------------------------------- */
> +
> +static target_phys_addr_t xen_store_mfn;
> +
> +static struct xs_handle *xs_guest;
> +static char xs_buf[1024];
> +static char xs_len;
> +static int debug = 0;
> +
> +static int evtchndev;
> +static evtchn_port_t evtchnport;

A lot of static state. Couldn't this be wrapped inside a structure,
which is then passed around?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]