qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Anthony Liguori <aliguori@us.ibm.com>
Cc: Glauber Costa <glommer@redhat.com>,
	qemu-devel@nongnu.org, kvm-devel <kvm@vger.kernel.org>
Subject: [Qemu-devel] Re: [PATCH 3/3] Add KVM support to QEMU
Date: Tue, 04 Nov 2008 15:24:47 +0200	[thread overview]
Message-ID: <49104D1F.1020905@redhat.com> (raw)
In-Reply-To: <1225224814-9875-3-git-send-email-aliguori@us.ibm.com>

Anthony Liguori wrote:
> This patch adds very basic KVM support.  KVM is a kernel module for Linux that
> allows userspace programs to make use of hardware virtualization support.  It
> current supports x86 hardware virtualization using Intel VT-x or AMD-V.  It
> also supports IA64 VT-i, PPC 440, and S390.
>
> This patch only implements the bare minimum support to get a guest booting.  It
> has very little impact the rest of QEMU and attempts to integrate nicely with
> the rest of QEMU.
>
> Even though this implementation is basic, it is significantly faster than TCG.
> Booting and shutting down a Linux guest:
>
> w/TCG:  1:32.36 elapsed  84% CPU
>
> w/KVM:  0:31.14 elapsed  59% CPU
>
> Right now, KVM is disabled by default and must be explicitly enabled with
>  -enable-kvm.  We can enable it by default later when we have had better
> testing.
>
> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
>
> diff --git a/KVM_TODO b/KVM_TODO
> new file mode 100644
> index 0000000..9529049
> --- /dev/null
> +++ b/KVM_TODO
> @@ -0,0 +1,9 @@
> +1) Add hooks for load/save of register state
> +  o Fixes gdbstub, save/restore, and vmport
> +2) Add VGA optimization
> +3) Add IO thread
> +4) Add guest SMP support
> +5) Add TPR optimization
> +6) Add support for in-kernel APIC
> +7) Add support for in-kernel PIT
> +8) Merge in additional changes in kvm-userspace tree
>   

One of the important changes is running with signal delivery disabled, 
since that's particularly slow (requires save/restore of the floating 
point state, for example).

> +
> +typedef struct kvm_userspace_memory_region KVMSlot;
>   

KVMMemorySlot?

> +
> +static KVMState *kvm_state;
>   

Why a pointer?

> +    if (ret < 0) {
> +        dprintf("kvm_create_vcpu failed\n");
>   

showing errno would be nice.

> +
> +static void kvm_getput_reg(__u64 *kvm_reg, target_ulong *qemu_reg, int set)
> +{
> +    if (set)
> +        *kvm_reg = *qemu_reg;
> +    else
> +        *qemu_reg = *kvm_reg;
> +}
>   

Ugh.

I think live migration is now broken, since kvm accesses will not update 
the qemu dirty bitmap.

-- 
error compiling committee.c: too many arguments to function

  parent reply	other threads:[~2008-11-04 13:24 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-28 20:13 [Qemu-devel] [PATCH 1/3] Add additional CPU flag definitions Anthony Liguori
2008-10-28 20:13 ` [Qemu-devel] [PATCH 2/3] Split CPUID from op_helper Anthony Liguori
2008-10-28 20:13   ` [Qemu-devel] [PATCH 3/3] Add KVM support to QEMU Anthony Liguori
2008-10-28 20:49     ` Hollis Blanchard
2008-10-28 21:10       ` Anthony Liguori
2008-10-28 20:57     ` Andreas Färber
2008-10-28 21:04       ` Glauber Costa
2008-10-28 21:16         ` Anthony Liguori
2008-10-28 21:05       ` Anthony Liguori
2008-11-04 13:25         ` Avi Kivity
2008-10-28 21:41     ` [Qemu-devel] " Gerd Hoffmann
2008-10-28 21:51       ` Anthony Liguori
2008-10-28 23:04         ` Glauber Costa
2008-10-28 23:36           ` Anthony Liguori
2008-10-29  9:54             ` Avi Kivity
2008-10-29 12:35               ` Glauber Costa
2008-10-29 12:39                 ` Avi Kivity
2008-10-29 12:56                   ` Glauber Costa
2008-10-29 13:07               ` Anthony Liguori
2008-10-29 13:23                 ` Avi Kivity
2008-10-29 13:32                   ` Anthony Liguori
2008-10-29 13:51             ` Hollis Blanchard
2008-10-29 14:09               ` Avi Kivity
2008-10-29 14:16                 ` Fabrice Bellard
2008-10-29 14:23                   ` Anthony Liguori
2008-10-29 19:13                 ` Blue Swirl
2008-11-01 16:25                   ` Blue Swirl
2008-10-29 14:58     ` Glauber Costa
2008-10-29 17:41     ` Glauber Costa
2008-10-29 19:01       ` Anthony Liguori
2008-11-04 13:24     ` Avi Kivity [this message]
2008-11-04 14:02       ` Anthony Liguori
2008-11-04 14:46         ` Avi Kivity
2008-11-04 14:50           ` 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=49104D1F.1020905@redhat.com \
    --to=avi@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=glommer@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=qemu-devel@nongnu.org \
    /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).