aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/kvm_host.h
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2008-11-25 14:17:04 -0500
committerAvi Kivity <avi@redhat.com>2009-03-24 05:02:46 -0400
commit1371d90460189d02bf1bcca19dbfe6bd10dc6031 (patch)
tree2f1f8d6bf0cd55e253784a061332c02e8e2d9e9d /arch/x86/include/asm/kvm_host.h
parentc0725420cfdcf6dd9705b164a8c6cba86684080d (diff)
KVM: SVM: Implement GIF, clgi and stgi
This patch implements the GIF flag and the clgi and stgi instructions that set this flag. Only if the flag is set (default), interrupts can be received by the CPU. To keep the information about that somewhere, this patch adds a new hidden flags vector. that is used to store information that does not go into the vmcb, but is SVM specific. I tried to write some code to make -no-kvm-irqchip work too, but the first level guest won't even boot with that atm, so I ditched it. v2 moves the hflags to x86 generic code v3 makes use of the new permission helper v6 only enables interrupt_window if GIF=1 Acked-by: Joerg Roedel <joro@8bytes.org> Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/include/asm/kvm_host.h')
-rw-r--r--arch/x86/include/asm/kvm_host.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index 2998efe89278..29e4157732db 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -259,6 +259,7 @@ struct kvm_vcpu_arch {
259 unsigned long cr3; 259 unsigned long cr3;
260 unsigned long cr4; 260 unsigned long cr4;
261 unsigned long cr8; 261 unsigned long cr8;
262 u32 hflags;
262 u64 pdptrs[4]; /* pae */ 263 u64 pdptrs[4]; /* pae */
263 u64 shadow_efer; 264 u64 shadow_efer;
264 u64 apic_base; 265 u64 apic_base;
@@ -738,6 +739,8 @@ enum {
738 TASK_SWITCH_GATE = 3, 739 TASK_SWITCH_GATE = 3,
739}; 740};
740 741
742#define HF_GIF_MASK (1 << 0)
743
741/* 744/*
742 * Hardware virtualization extension instructions may fault if a 745 * Hardware virtualization extension instructions may fault if a
743 * reboot turns off virtualization while processes are running. 746 * reboot turns off virtualization while processes are running.