Statistics
| Branch: | Revision:

root / target-i386 / kvm.c @ ac72472b

History | View | Annotate | Download (25.7 kB)

# Date Author Comment
d9db889f 07/10/2009 09:44 pm Jan Kiszka

kvm: Work around borken MSR_GET_INDEX_LIST

Allocate enough memory for KVM_GET_MSR_INDEX_LIST as older kernels shot
far beyond their limits, corrupting user space memory.

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

6c0d7ee8 06/29/2009 09:52 pm Andre Przywara

preserve the hypervisor bit while KVM trims the CPUID bits

The KVM kernel will disable all bits in CPUID which are not present in
the host. As this is mostly true for the hypervisor bit (1.ecx),
preserve its value before the trim and restore it afterwards....

6c1f42fe 06/29/2009 09:52 pm Andre Przywara

fix KVMs GET_SUPPORTED_CPUID feature usage

If we want to trim the user provided CPUID bits for KVM to be not greater
than that of the host, we should not remove the bits after we sent
them to the kernel.
This fixes the masking of features that are not present on the host by...

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...

76ae317f 05/20/2009 05:12 pm Mark McLoughlin

kvm: work around supported cpuid ioctl() brokenness

KVM_GET_SUPPORTED_CPUID has been known to fail to return -E2BIG
when it runs out of entries. Detect this by always trying again
with a bigger table if the ioctl() fills the table.

Signed-off-by: Mark McLoughlin <>

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 <>

a33609ca 04/17/2009 11:50 pm aliguori

kvm: Fix cpuid initialization (Jan Kiszka)

Fix (more or less) spurious guest boot failures due to corrupted cpuid
states. The reason was insufficient initialization of cpuid entries
before passing them to the kernel.

At this chance also fix improper entry pointer progression and simplify...

64bf3f4e 03/28/2009 07:51 pm aliguori

kvm: Drop kvm_patch_opcode_byte (Jan Kiszka)

As cpu_memory_rw_debug is now capable of modifying ROM, we can drop our
own patch function.

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

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

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....

b136a4c6 02/11/2009 11:00 pm aliguori

KVM: cpuid function 2: store all values (Amit Shah)

Incrementing the array index was missed in the previous series which causes
us to not store all the values.

Signed-off-by: Amit Shah <>
Signed-off-by: Anthony Liguori <>...

a36b1029 02/09/2009 05:50 pm aliguori

KVM: Get all cpuid values from function 2 (Amit Shah)

cpuid function 2 can have multiple values to describe cache behaviour.
Loop till we have fetched all the values.

Signed-off-by: Amit Shah <>
Signed-off-by: Anthony Liguori <>...

486bd5a2 02/09/2009 05:50 pm aliguori

KVM: Fetch sub-leaf cpuid values for functions 4, 0xb, 0xd. (Amit Shah)

CPUID functions 4, 0xb and 0xd have sub-leaf values which depend on the
input value of ECX. Store these values as well.

Signed-off-by: Amit Shah <>
Signed-off-by: Anthony Liguori <>...

e00b6f80 02/09/2009 05:50 pm aliguori

KVM: CPUID takes ecx as input value for some functions (Amit Shah)

The CPUID instruction takes the value of ECX as an input parameter
in addition to the value of EAX as the count for functions 4, 0xb
and 0xd. Make sure we pass the value to the instruction....

0d0266a5 02/06/2009 12:06 am aliguori

targets: remove error handling from qemu_malloc() callers (Avi Kivity)

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

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

8c6c919e 01/26/2009 10:32 pm aliguori

kvm-x86: Remove eflags conversion into emulator format (Jan Kiszka)

It seems that the conversion of the kernel-delivered eflags state into
qemu's internal split representation was once needed in an older kvm
design (register read-back may have taken place from inside cpu_exec)....

55308450 12/13/2008 10:49 pm aliguori

Initialize msr list size properly in KVM

Hollis Blanchard noticed that the last commit was not sufficient. We also need
to initialize the msr size in our newly allocated list.

Signed-off-by: Anthony Liguori <>

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

4c9f7372 12/13/2008 10:41 pm aliguori

Correctly initialize msr list in KVM

I believe this was spotted by Gerd Hoffman but I can't find his patch
now. This will cause very subtle corruption on the heap because we
don't allocate the appropriately sized buffer.

Signed-off-by: Anthony Liguori <>...

40a2d705 12/11/2008 11:03 pm aliguori

Fix crash in kvm.c (Stefan Weil)

Fix crash with kvm enabled.

Signed-off-by: Stefan Weil <>
Signed-off-by: Anthony Liguori <>

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

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