]> err.no Git - linux-2.6/blobdiff - include/asm-x86/kvm_host.h
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
[linux-2.6] / include / asm-x86 / kvm_host.h
index 28940e1a97138df7cfa9939488125cd576c7fb77..4702b04b979a74e9dce84bbebe670a0fe4f71d9f 100644 (file)
@@ -211,6 +211,7 @@ struct kvm_vcpu_arch {
        int mp_state;
        int sipi_vector;
        u64 ia32_misc_enable_msr;
+       bool tpr_access_reporting;
 
        struct kvm_mmu mmu;
 
@@ -223,6 +224,11 @@ struct kvm_vcpu_arch {
        int   last_pt_write_count;
        u64  *last_pte_updated;
 
+       struct {
+               gfn_t gfn;          /* presumed gfn during guest pte update */
+               struct page *page;  /* page corresponding to that gfn */
+       } update_pte;
+
        struct i387_fxsave_struct host_fx_image;
        struct i387_fxsave_struct guest_fx_image;
 
@@ -289,6 +295,7 @@ struct kvm_vm_stat {
        u32 mmu_pde_zapped;
        u32 mmu_flooded;
        u32 mmu_recycled;
+       u32 mmu_cache_miss;
        u32 remote_tlb_flush;
 };
 
@@ -327,6 +334,7 @@ struct kvm_x86_ops {
        void (*check_processor_compatibility)(void *rtn);
        int (*hardware_setup)(void);               /* __init */
        void (*hardware_unsetup)(void);            /* __exit */
+       bool (*cpu_has_accelerated_tpr)(void);
 
        /* Create, but do not attach this VCPU */
        struct kvm_vcpu *(*vcpu_create)(struct kvm *kvm, unsigned id);
@@ -407,8 +415,10 @@ enum emulation_result {
        EMULATE_FAIL,         /* can't emulate this instruction */
 };
 
+#define EMULTYPE_NO_DECODE         (1 << 0)
+#define EMULTYPE_TRAP_UD           (1 << 1)
 int emulate_instruction(struct kvm_vcpu *vcpu, struct kvm_run *run,
-                       unsigned long cr2, u16 error_code, int no_decode);
+                       unsigned long cr2, u16 error_code, int emulation_type);
 void kvm_report_emulation_failure(struct kvm_vcpu *cvpu, const char *context);
 void realmode_lgdt(struct kvm_vcpu *vcpu, u16 size, unsigned long address);
 void realmode_lidt(struct kvm_vcpu *vcpu, u16 size, unsigned long address);