From: Anthony Liguori <aliguori@us.ibm.com>
To: Fabrice Bellard <fabrice@bellard.org>
Cc: kvm-devel@lists.sourceforge.net, qemu-devel@nongnu.org,
Paul Brook <paul@codesourcery.com>
Subject: [Qemu-devel] Re: [PATCH 6/6] QEMU support for the Kernel Virtual Machine interface
Date: Fri, 01 Feb 2008 08:18:56 -0600 [thread overview]
Message-ID: <47A32A50.7020208@us.ibm.com> (raw)
In-Reply-To: <47A2EB14.8030804@bellard.org>
Fabrice Bellard wrote:
> Some questions:
>
> - QEMU already maintains modified page status for VGA memory (and
> kqemu for example fully supports that), so I don't see why KVM needs a
> new method.
KQEMU passes the dirty bitmap directly to the kernel. KVM does
aggressive shadow page table caching though so maintaining the bitmap
requires removing write protection from the shadow page table entries
explicitly whenever you want to reset it. This is not something you
would want to do every time you go back and forth between
userspace/kernelspace.
KVM also doesn't pass the phys_map to the kernel like KQEMU does.
Instead, it divides memory into a set of slots. slots are contiguous
areas of RAM memory. An IO access that does fall into a slot is treated
as MMIO and is then sent to userspace. We then use the phys_map in
userspace to dispatch the MMIO operation.
There are only a handful of slots and they happen to be arranged in
order of most frequent access (I believe) such that you can very quickly
determine whether memory is MMIO or not.
> - Why is kvm_cpu_register_physical_memory() needed ? kqemu can work
> without it because there is a remapping between physical memory and
> RAM address. I suggest to add that feature in KVM or to modify
> cpu_register_physical_memory() to hide it.
The only reason the second call exists is to simplify the backwards
compatibility code. I will fix it properly though because I do agree
with you that it shouldn't be necessary.
> - If KVM implements its own CPU loop, why are there patches in
> libqemu.a (CPU core) ?
Good question! I looked through the code and some of it was just dead
code from before we had our own main loop. The rest is as follows:
In exec.c, we need to bump the size of the phys_map to support larger
memory (since we use it to dispatch MMIO). We also need to ensure that
cpu_interrupt calls into KVM code. There are also hooks for debugging
support. We've added more flags to cpu.h that we use when synchronizing
KVM register state to CPUState. We also added some additional state to
CPUState that we need to use.
Other than that, I've removed everything else.
Regards,
Anthony Liguori
> Regards,
>
> Fabrice.
next prev parent reply other threads:[~2008-02-01 14:19 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-31 22:36 [Qemu-devel] [PATCH 0/6] Support for the Kernel Virtual Machine interface Anthony Liguori
2008-01-31 22:36 ` [Qemu-devel] [PATCH 1/6] Use correct types to enable > 2G support Anthony Liguori
2008-01-31 23:54 ` [Qemu-devel] " Paul Brook
2008-02-01 0:25 ` Anthony Liguori
2008-02-01 0:37 ` Paul Brook
2008-02-01 0:40 ` Anthony Liguori
2008-02-01 10:26 ` Fabrice Bellard
2008-02-01 14:35 ` Anthony Liguori
2008-02-01 15:13 ` Avi Kivity
2008-02-01 11:56 ` Robert William Fuller
2008-02-01 16:09 ` M. Warner Losh
2008-02-01 16:47 ` Philip Boulain
2008-02-01 17:35 ` Jamie Lokier
2008-02-01 15:33 ` [Qemu-devel] Re: [kvm-devel] " Anthony Liguori
2008-02-01 15:40 ` Ian Jackson
2008-02-01 17:53 ` [kvm-devel] [Qemu-devel] " Anthony Liguori
2008-02-01 17:57 ` Daniel P. Berrange
2008-02-01 20:31 ` Anthony Liguori
2008-02-01 21:33 ` Paul Brook
2008-02-01 16:00 ` Paul Brook
2008-02-01 16:21 ` Fabrice Bellard
2008-02-05 11:34 ` Ian Jackson
2008-02-01 17:49 ` [Qemu-devel] Re: [kvm-devel] " Anthony Liguori
2008-02-03 8:58 ` Izik Eidus
2008-01-31 22:36 ` [Qemu-devel] [PATCH 2/6] SCI fixes Anthony Liguori
2008-01-31 22:36 ` [Qemu-devel] [PATCH 3/6] Fix daemonize options Anthony Liguori
2008-01-31 22:36 ` [Qemu-devel] [PATCH 4/6] Tell BIOS about the number of CPUs Anthony Liguori
2008-02-01 0:14 ` [Qemu-devel] " Paul Brook
2008-02-01 0:28 ` Anthony Liguori
2008-02-01 0:40 ` Paul Brook
2008-01-31 22:36 ` [Qemu-devel] [PATCH 5/6] Refactor option ROM loading Anthony Liguori
2008-01-31 22:36 ` [Qemu-devel] [PATCH 6/6] QEMU support for the Kernel Virtual Machine interface Anthony Liguori
2008-02-01 9:49 ` [Qemu-devel] " Fabrice Bellard
2008-02-01 14:18 ` Anthony Liguori [this message]
2008-01-31 22:53 ` [qemu-devel] [PATCH 0/6] 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=47A32A50.7020208@us.ibm.com \
--to=aliguori@us.ibm.com \
--cc=fabrice@bellard.org \
--cc=kvm-devel@lists.sourceforge.net \
--cc=paul@codesourcery.com \
--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).