diff options
author | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-11-05 16:04:33 +0000 |
---|---|---|
committer | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-11-05 16:04:33 +0000 |
commit | 7ba1e61953f4592606e60b2e7507ff6a6faf861a (patch) | |
tree | 9a7e55d78062271b6c9e1e5aa01bcbb2eab4b6ef /target-i386/cpu.h | |
parent | 6fd805e1d45308d156469562bc6fd6d1e8d92360 (diff) |
Add KVM support to QEMU
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>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5627 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-i386/cpu.h')
-rw-r--r-- | target-i386/cpu.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/target-i386/cpu.h b/target-i386/cpu.h index 263a477765..167bae268a 100644 --- a/target-i386/cpu.h +++ b/target-i386/cpu.h @@ -587,6 +587,8 @@ typedef struct CPUX86State { target_ulong kernelgsbase; #endif + uint64_t tsc; + uint64_t pat; /* exception/interrupt handling */ @@ -617,6 +619,10 @@ typedef struct CPUX86State { int kqemu_enabled; int last_io_time; #endif + + /* For KVM */ + uint64_t interrupt_bitmap[256 / 64]; + /* in order to simplify APIC support, we leave this pointer to the user */ struct APICState *apic_state; |