aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm/kvm.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2007-02-19 07:37:47 -0500
committerAvi Kivity <avi@qumranet.com>2007-03-04 04:12:40 -0500
commit102d8325a1d2f266d3d0a03fdde948544e72c12d (patch)
tree21024c8b9b2b702c79200343e26f14f075da0479 /drivers/kvm/kvm.h
parent5972e9535e94bf875eb8eab8a667ba04c7583874 (diff)
KVM: add MSR based hypercall API
This adds a special MSR based hypercall API to KVM. This is to be used by paravirtual kernels and virtual drivers. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/kvm.h')
-rw-r--r--drivers/kvm/kvm.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h
index 9a49b2ed2a1e..fd7746a2bc3e 100644
--- a/drivers/kvm/kvm.h
+++ b/drivers/kvm/kvm.h
@@ -14,6 +14,7 @@
14 14
15#include "vmx.h" 15#include "vmx.h"
16#include <linux/kvm.h> 16#include <linux/kvm.h>
17#include <linux/kvm_para.h>
17 18
18#define CR0_PE_MASK (1ULL << 0) 19#define CR0_PE_MASK (1ULL << 0)
19#define CR0_TS_MASK (1ULL << 3) 20#define CR0_TS_MASK (1ULL << 3)
@@ -237,6 +238,9 @@ struct kvm_vcpu {
237 unsigned long cr0; 238 unsigned long cr0;
238 unsigned long cr2; 239 unsigned long cr2;
239 unsigned long cr3; 240 unsigned long cr3;
241 gpa_t para_state_gpa;
242 struct page *para_state_page;
243 gpa_t hypercall_gpa;
240 unsigned long cr4; 244 unsigned long cr4;
241 unsigned long cr8; 245 unsigned long cr8;
242 u64 pdptrs[4]; /* pae */ 246 u64 pdptrs[4]; /* pae */
@@ -382,6 +386,8 @@ struct kvm_arch_ops {
382 int (*run)(struct kvm_vcpu *vcpu, struct kvm_run *run); 386 int (*run)(struct kvm_vcpu *vcpu, struct kvm_run *run);
383 int (*vcpu_setup)(struct kvm_vcpu *vcpu); 387 int (*vcpu_setup)(struct kvm_vcpu *vcpu);
384 void (*skip_emulated_instruction)(struct kvm_vcpu *vcpu); 388 void (*skip_emulated_instruction)(struct kvm_vcpu *vcpu);
389 void (*patch_hypercall)(struct kvm_vcpu *vcpu,
390 unsigned char *hypercall_addr);
385}; 391};
386 392
387extern struct kvm_stat kvm_stat; 393extern struct kvm_stat kvm_stat;