summaryrefslogtreecommitdiff
path: root/kvm.h
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2011-10-16 13:23:26 +0200
committerJan Kiszka <jan.kiszka@siemens.com>2012-01-19 12:14:42 +0100
commit680c1c6fd73c0cb3971938944936f18bbb7bad1b (patch)
tree82f323ff3cd5432f07a58139384688e453f3db7c /kvm.h
parent9b5b76d44930dc9266bb6d30862704cb3c86d2ca (diff)
downloadqemu-680c1c6fd73c0cb3971938944936f18bbb7bad1b.tar.gz
qemu-680c1c6fd73c0cb3971938944936f18bbb7bad1b.tar.bz2
qemu-680c1c6fd73c0cb3971938944936f18bbb7bad1b.zip
kvm: x86: Add user space part for in-kernel APIC
This introduces the alternative APIC device which makes use of KVM's in-kernel device model. External NMI injection via LINT1 is emulated by checking the current state of the in-kernel APIC, only injecting a NMI into the VCPU if LINT1 is unmasked and configured to DM_NMI. MSI is not yet supported, so we disable this when the in-kernel model is in use. CC: Lai Jiangshan <laijs@cn.fujitsu.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Diffstat (limited to 'kvm.h')
-rw-r--r--kvm.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/kvm.h b/kvm.h
index ad430fd09a..40b5ffcfa3 100644
--- a/kvm.h
+++ b/kvm.h
@@ -31,6 +31,7 @@ extern int kvm_allowed;
#endif
struct kvm_run;
+struct kvm_lapic_state;
typedef struct KVMCapabilityInfo {
const char *name;
@@ -134,6 +135,9 @@ int kvm_irqchip_set_irq(KVMState *s, int irq, int level);
void kvm_irqchip_add_route(KVMState *s, int gsi, int irqchip, int pin);
int kvm_irqchip_commit_routes(KVMState *s);
+void kvm_put_apic_state(DeviceState *d, struct kvm_lapic_state *kapic);
+void kvm_get_apic_state(DeviceState *d, struct kvm_lapic_state *kapic);
+
struct kvm_guest_debug;
struct kvm_debug_exit_arch;