]> Pileus Git - ~andy/linux/blobdiff - arch/x86/kvm/mmu.h
Merge tag 'for-v3.11' of git://git.infradead.org/battery-2.6
[~andy/linux] / arch / x86 / kvm / mmu.h
index 2adcbc2cac6db49ad68ae47132e41fa4f7e6101b..5b59c573aba7a749ad52ed696b3402e5fd275106 100644 (file)
 
 int kvm_mmu_get_spte_hierarchy(struct kvm_vcpu *vcpu, u64 addr, u64 sptes[4]);
 void kvm_mmu_set_mmio_spte_mask(u64 mmio_mask);
+
+/*
+ * Return values of handle_mmio_page_fault_common:
+ * RET_MMIO_PF_EMULATE: it is a real mmio page fault, emulate the instruction
+ *                     directly.
+ * RET_MMIO_PF_INVALID: invalid spte is detected then let the real page
+ *                     fault path update the mmio spte.
+ * RET_MMIO_PF_RETRY: let CPU fault again on the address.
+ * RET_MMIO_PF_BUG: bug is detected.
+ */
+enum {
+       RET_MMIO_PF_EMULATE = 1,
+       RET_MMIO_PF_INVALID = 2,
+       RET_MMIO_PF_RETRY = 0,
+       RET_MMIO_PF_BUG = -1
+};
+
 int handle_mmio_page_fault_common(struct kvm_vcpu *vcpu, u64 addr, bool direct);
 int kvm_init_shadow_mmu(struct kvm_vcpu *vcpu, struct kvm_mmu *context);
 
@@ -97,4 +114,5 @@ static inline bool permission_fault(struct kvm_mmu *mmu, unsigned pte_access,
        return (mmu->permissions[pfec >> 1] >> pte_access) & 1;
 }
 
+void kvm_mmu_invalidate_zap_all_pages(struct kvm *kvm);
 #endif