qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: anthony.perard@citrix.com
Cc: Xen Devel <xen-devel@lists.xensource.com>,
	QEMU-devel <qemu-devel@nongnu.org>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: [Qemu-devel] [PATCH V10 05/15] xen: Add xenfv machine
Date: Thu, 24 Feb 2011 11:31:18 -0600	[thread overview]
Message-ID: <4D6695E6.7040004@codemonkey.ws> (raw)
In-Reply-To: <1296658172-16609-6-git-send-email-anthony.perard@citrix.com>

On 02/02/2011 08:49 AM, anthony.perard@citrix.com wrote:
> From: Anthony PERARD<anthony.perard@citrix.com>
>
> Introduce the Xen FV (Fully Virtualized) machine to Qemu, some more Xen
> specific call will be added in further patches.
>
> Signed-off-by: Anthony PERARD<anthony.perard@citrix.com>
> ---
>   hw/pc.c      |   19 +++++++++++++++++--
>   hw/pc_piix.c |   21 ++++++++++++++++++++-
>   hw/xen.h     |    4 ++++
>   3 files changed, 41 insertions(+), 3 deletions(-)
>
> diff --git a/hw/pc.c b/hw/pc.c
> index 4dfdc0b..ab9d365 100644
> --- a/hw/pc.c
> +++ b/hw/pc.c
> @@ -41,6 +41,7 @@
>   #include "sysemu.h"
>   #include "blockdev.h"
>   #include "ui/qemu-spice.h"
> +#include "xen.h"
>
>   /* output Bochs bios info messages */
>   //#define DEBUG_BIOS
> @@ -906,7 +907,11 @@ static void pc_cpu_reset(void *opaque)
>       CPUState *env = opaque;
>
>       cpu_reset(env);
> -    env->halted = !cpu_is_bsp(env);
> +    if (!xen_enabled()) {
> +        env->halted = !cpu_is_bsp(env);
> +    } else {
> +        env->halted = 1;
> +    }
>   }
>
>   static CPUState *pc_new_cpu(const char *cpu_model)
> @@ -940,7 +945,12 @@ void pc_cpus_init(const char *cpu_model)
>   #endif
>       }
>
> -    for(i = 0; i<  smp_cpus; i++) {
> +    if (!xen_enabled()) {
> +        for(i = 0; i<  smp_cpus; i++) {
> +            pc_new_cpu(cpu_model);
> +        }
> +    } else {
> +        /* Xen require only one Qemu VCPU */
>           pc_new_cpu(cpu_model);
>       }
>   }
> @@ -968,6 +978,11 @@ void pc_memory_init(ram_addr_t ram_size,
>       *above_4g_mem_size_p = above_4g_mem_size;
>       *below_4g_mem_size_p = below_4g_mem_size;
>
> +    if (xen_enabled()) {
> +        /* Nothing to do for Xen */
> +        return;
> +    }
> +
>   #if TARGET_PHYS_ADDR_BITS == 32
>       if (above_4g_mem_size>  0) {
>           hw_error("To much RAM for 32-bit physical address");
> diff --git a/hw/pc_piix.c b/hw/pc_piix.c
> index 7b74473..0ab8907 100644
> --- a/hw/pc_piix.c
> +++ b/hw/pc_piix.c
> @@ -36,6 +36,10 @@
>   #include "sysbus.h"
>   #include "arch_init.h"
>   #include "blockdev.h"
> +#include "xen.h"
> +#ifdef CONFIG_XEN
> +#  include "xen/hvm/hvm_info_table.h"
> +#endif
>    

Admittedly a nit, but isn't this a system header?

Regards,

Anthony Liguori

  reply	other threads:[~2011-02-24 17:33 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-02 14:49 [Qemu-devel] [PATCH V10 00/15] Xen device model support anthony.perard
2011-02-02 14:49 ` [Qemu-devel] [PATCH V10 01/15] xen: Replace some tab-indents with spaces (clean-up) anthony.perard
2011-02-24 16:06   ` Anthony Liguori
2011-02-02 14:49 ` [Qemu-devel] [PATCH V10 02/15] xen: Make xen build only on x86 target anthony.perard
2011-02-24 16:11   ` Anthony Liguori
2011-02-24 16:25     ` [Xen-devel] " Anthony PERARD
2011-02-24 17:27       ` Anthony Liguori
2011-02-24 17:46         ` Jan Kiszka
2011-02-24 17:59           ` Anthony Liguori
2011-03-11  6:20             ` Alexander Graf
2011-03-11 11:15               ` Stefano Stabellini
2011-02-02 14:49 ` [Qemu-devel] [PATCH V10 03/15] xen: Support new libxc calls from xen unstable anthony.perard
2011-02-24 17:29   ` Anthony Liguori
2011-02-25 14:06     ` [Xen-devel] " Anthony PERARD
2011-02-25 14:11       ` Anthony Liguori
2011-02-25 16:01         ` Anthony PERARD
2011-02-02 14:49 ` [Qemu-devel] [PATCH V10 04/15] xen: Add initialisation of Xen anthony.perard
2011-02-02 14:49 ` [Qemu-devel] [PATCH V10 05/15] xen: Add xenfv machine anthony.perard
2011-02-24 17:31   ` Anthony Liguori [this message]
2011-02-25 13:55     ` Anthony PERARD
2011-02-25 14:09       ` Anthony Liguori
2011-02-25 14:28         ` [Xen-devel] " Anthony PERARD
2011-02-02 14:49 ` [Qemu-devel] [PATCH V10 06/15] xen: Add the Xen platform pci device anthony.perard
2011-02-24 17:33   ` Anthony Liguori
2011-02-24 17:36     ` Paolo Bonzini
2011-02-25  9:58       ` [Xen-devel] " Ian Campbell
2011-02-25 10:54         ` Paolo Bonzini
2011-02-25 14:18           ` [Xen-devel] " Anthony PERARD
2011-02-02 14:49 ` [Qemu-devel] [PATCH V10 07/15] piix_pci: Introduces Xen specific call for irq anthony.perard
2011-02-24 17:34   ` Anthony Liguori
2011-02-02 14:49 ` [Qemu-devel] [PATCH V10 08/15] xen: Introduce Xen Interrupt Controller anthony.perard
2011-02-02 14:49 ` [Qemu-devel] [PATCH V10 09/15] xen: Introduce the Xen mapcache anthony.perard
2011-02-02 14:49 ` [Qemu-devel] [PATCH V10 10/15] configure: Always use 64bits target physical addresses with xen enabled anthony.perard
2011-02-02 14:49 ` [Qemu-devel] [PATCH V10 11/15] Introduce qemu_put_ram_ptr anthony.perard
2011-02-02 14:49 ` [Qemu-devel] [PATCH V10 12/15] vl.c: Introduce getter for shutdown_requested and reset_requested anthony.perard
2011-02-02 14:49 ` [Qemu-devel] [PATCH V10 13/15] xen: Initialize event channels and io rings anthony.perard
2011-02-02 14:49 ` [Qemu-devel] [PATCH V10 14/15] xen: Set running state in xenstore anthony.perard
2011-02-02 14:49 ` [Qemu-devel] [PATCH V10 15/15] xen: Add Xen hypercall for sleep state in the cmos_s3 callback anthony.perard
2011-02-24 17:38 ` [Qemu-devel] [PATCH V10 00/15] Xen device model support Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D6695E6.7040004@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=anthony.perard@citrix.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).