Statistics
| Branch: | Revision:

root / kvm.h @ 42673936

History | View | Annotate | Download (4.4 kB)

# Date Author Comment
b3755a91 03/12/2010 08:34 pm Paul Brook

Disable phsyical memory handling in userspace emulation.

Code to handle physical memory access is not meaningful in usrmode emulation,
so disable it.

Signed-off-by: Paul Brook <>

ea375f9a 03/04/2010 05:29 am Jan Kiszka

KVM: Rework VCPU state writeback API

This grand cleanup drops all reset and vmsave/load related
synchronization points in favor of four(!) generic hooks:

- cpu_synchronize_all_states in qemu_savevm_state_complete
(initial sync from kernel before vmsave)...

b0b1d690 03/04/2010 05:29 am Jan Kiszka

KVM: Rework of guest debug state writing

So far we synchronized any dirty VCPU state back into the kernel before
updating the guest debug state. This was a tribute to a deficite in x86
kernels before 2.6.33. But as this is an arch-dependent issue, it is
better handle in the x86 part of KVM and remove the writeback point for...

20c20526 02/23/2010 11:46 pm Blue Swirl

Fix mingw32 build

Signed-off-by: Blue Swirl <>

cc84de95 02/22/2010 10:58 am Marcelo Tosatti

kvm: consume internal signal with sigtimedwait

Change the way the internal qemu signal, used for communication between
iothread and vcpus, is handled.

Block and consume it with sigtimedwait on the outer vcpu loop, which
allows more precise timing control....

7b8f3b78 02/10/2010 12:56 am Michael S. Tsirkin

kvm: move kvm to use memory notifiers

remove direct kvm calls from exec.c, make
kvm use memory notifiers framework instead.

Signed-off-by: Michael S. Tsirkin <>
Acked-by: Avi Kivity <>
Signed-off-by: Anthony Liguori <>

62a2744c 02/03/2010 11:47 pm Sheng Yang

kvm: Flush coalesced MMIO buffer periodly

The default action of coalesced MMIO is, cache the writing in buffer, until:
1. The buffer is full.
2. Or the exit to QEmu due to other reasons.

But this would result in a very late writing in some condition.
1. The each time write to MMIO content is small....

a0fb002c 12/03/2009 11:25 pm Jan Kiszka

kvm: x86: Add support for VCPU event states

This patch extends the qemu-kvm state sync logic with support for
KVM_GET/SET_VCPU_EVENTS, giving access to yet missing exception,
interrupt and NMI states.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

caa5af0f 11/17/2009 04:49 pm Jan Kiszka

kvm: Add arch reset handler

Will be required by succeeding changes.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

9bdbe550 11/12/2009 07:23 pm Hollis Blanchard

kvm: Move KVM mp_state accessors to i386-specific code

Unbreaks PowerPC and S390 KVM builds.

Signed-off-by: Hollis Blanchard <>
Signed-off-by: Anthony Liguori <>

c227f099 10/02/2009 12:12 am Anthony Liguori

Revert "Get rid of _t suffix"

In the very least, a change like this requires discussion on the list.

The naming convention is goofy and it causes a massive merge problem. Something
like this must be presented on the list first so people can provide input...

99a0949b 10/01/2009 09:45 pm malc

Get rid of _t suffix

Some not so obvious bits, slirp and Xen were left alone for the time
being.

Signed-off-by: malc <>

72cf2d4f 09/12/2009 10:36 am Blue Swirl

Fix sys-queue.h conflict for good

Problem: Our file sys-queue.h is a copy of the BSD file, but there are
some additions and it's not entirely compatible. Because of that, there have
been conflicts with system headers on BSD systems. Some hacks have been
introduced in the commits 15cc9235840a22c289edbe064a9b3c19c5f49896,...

4c0960c0 08/28/2009 04:35 am Avi Kivity

kvm: Simplify cpu_synchronize_state()

cpu_synchronize_state() is a little unreadable since the 'modified'
argument isn't self-explanatory. Simplify it by making it always
synchronize the kernel state into qemu, and automatically flush the
registers back to the kernel if they've been synchronized on this...

6f725c13 07/22/2009 06:58 pm Glauber Costa

provide tests for pit in kernel and irqchip in kernel

KVM can have an in-kernel pit or irqchip. While we don't implement it
yet, having a way for test for it (that always returns zero) will allow us
to reuse code in qemu-kvm that tests for it.

Signed-off-by: Glauber Costa <>...

8d2ba1fb 06/29/2009 10:18 pm Jan Kiszka

kvm: Rework VCPU synchronization

During startup and after reset we have to synchronize user space to the
in-kernel KVM state. Namely, we need to transfer the VCPU registers when
they change due to VCPU as well as APIC reset.

This patch refactors the required hooks so that kvm_init_vcpu registers...

f8d926e9 05/22/2009 06:50 pm Jan Kiszka

kvm: x86: Save/restore KVM-specific CPU states

Save and restore all so far neglected KVM-specific CPU states. Handling
the TSC stabilizes migration in KVM mode. The interrupt_bitmap and
mp_state are currently unused, but will become relevant for in-kernel...

4495d6a7 05/22/2009 06:50 pm Jan Kiszka

kvm: Introduce kvm_set_migration_log

Introduce a global dirty logging flag that enforces logging for all
slots. This can be used by the live migration code to enable/disable
global logging withouth destroying the per-slot setting.

Signed-off-by: Jan Kiszka <>...

151f7749 05/22/2009 06:50 pm Jan Kiszka

kvm: Rework dirty bitmap synchronization

Extend kvm_physical_sync_dirty_bitmap() so that is can sync across
multiple slots. Useful for updating the whole dirty log during
migration. Moreover, properly pass down errors the whole call chain.

Signed-off-by: Jan Kiszka <>...

b827df58 05/08/2009 11:42 pm Avi Kivity

kvm: Add support for querying supported cpu features

kvm does not support all cpu features; add support for dunamically querying
the supported feature set.

Signed-off-by: Avi Kivity <>
Signed-off-by: Anthony Liguori <>

ad7b8b33 05/08/2009 11:42 pm Anthony Liguori

Introduce kvm_check_extension to check if KVM extensions are supported

Signed-off-by: Anthony Liguori <>

6f0437e8 05/01/2009 05:44 pm Jan Kiszka

kvm: Avoid COW if KVM MMU is asynchronous

Avi Kivity wrote:

Suggest wrapping in a function and hiding it deep inside kvm-all.c.

Done in v2:

---------->

If the KVM MMU is asynchronous (kernel does not support MMU_NOTIFIER),
we have to avoid COW for the guest memory. Otherwise we risk serious...

d3f8d37f 04/17/2009 05:26 pm aliguori

kvm: Add sanity checks to slot management (Jan Kiszka)

Fail loudly if we run out of memory slot.

Make sure that dirty log start/stop works with consistent memory regions
by reporting invalid parameters. This reveals several inconsistencies in
the vga code, patch to fix them follows later in this series....

e22a25c9 03/12/2009 10:12 pm aliguori

Guest debugging support for KVM (Jan Kiszka)

This is a backport of the guest debugging support for the KVM
accelerator that is now part of the KVM tree. It implements the reworked
KVM kernel API for guest debugging (KVM_CAP_SET_GUEST_DEBUG) which is
not yet part of any mainline kernel but will probably be 2.6.30 stuff....

f5d6f51b 12/16/2008 12:20 am aliguori

kvm: sync vcpu state during initialization (Hollis Blanchard)

Currently on x86, qemu initializes CPUState but KVM ignores it and does its
own vcpu initialization. However, PowerPC KVM needs to be able to set the
initial register state to support the -kernel and -append options....

f65ed4c1 12/09/2008 10:09 pm aliguori

KVM: Coalesced MMIO support

MMIO exits are more expensive in KVM or Xen than in QEMU because they
involve, at least, privilege transitions. However, MMIO write
operations can be effectively batched if those writes do not have side
effects.

Good examples of this include VGA pixel operations when in a planar...

bd322087 12/04/2008 10:33 pm aliguori

Add virtio-balloon support

This adds a VirtIO based balloon driver. It uses madvise() to actually balloon
the memory when possible.

Until 2.6.27, KVM forced memory pinning so we must disable ballooning unless the
kernel actually supports it when using KVM. It's always safe when using TCG....

5832d1f2 11/24/2008 09:36 pm aliguori

kvm: Introduce kvm logging interface (Glauber Costa)

Introduce functions to control logging of memory regions.
We select regions based on its start address, a
guest_physical_addr (target_phys_addr_t, in qemu nomenclature).

The main user of this interface right now is VGA optimization...

984b5181 11/13/2008 09:21 pm aliguori

Define kvm_ioctl in the same way as ioctl

The third argument to ioctl is a ... which allows any value to be passed. In
practice, glibc always treats the argument as a void *.

Do the same thing for the kvm ioctls to keep things consistent with a
traditional ioctl....

05330448 11/05/2008 06:29 pm aliguori

Add missing files to KVM commit.

Signed-off-by: Anthony Liguori <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5629 c046a42c-6fe2-441c-8c8c-71466251a162