diff options
Diffstat (limited to 'arch/x86/kvm/mmu.c')
-rw-r--r-- | arch/x86/kvm/mmu.c | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index b1178d1bb8f5..7a8e99c6dc81 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c | |||
@@ -59,21 +59,6 @@ enum { | |||
59 | AUDIT_POST_SYNC | 59 | AUDIT_POST_SYNC |
60 | }; | 60 | }; |
61 | 61 | ||
62 | char *audit_point_name[] = { | ||
63 | "pre page fault", | ||
64 | "post page fault", | ||
65 | "pre pte write", | ||
66 | "post pte write", | ||
67 | "pre sync", | ||
68 | "post sync" | ||
69 | }; | ||
70 | |||
71 | #ifdef CONFIG_KVM_MMU_AUDIT | ||
72 | static void kvm_mmu_audit(struct kvm_vcpu *vcpu, int point); | ||
73 | #else | ||
74 | static void kvm_mmu_audit(struct kvm_vcpu *vcpu, int point) { } | ||
75 | #endif | ||
76 | |||
77 | #undef MMU_DEBUG | 62 | #undef MMU_DEBUG |
78 | 63 | ||
79 | #ifdef MMU_DEBUG | 64 | #ifdef MMU_DEBUG |
@@ -1539,6 +1524,13 @@ static int kvm_sync_page_transient(struct kvm_vcpu *vcpu, | |||
1539 | return ret; | 1524 | return ret; |
1540 | } | 1525 | } |
1541 | 1526 | ||
1527 | #ifdef CONFIG_KVM_MMU_AUDIT | ||
1528 | #include "mmu_audit.c" | ||
1529 | #else | ||
1530 | static void kvm_mmu_audit(struct kvm_vcpu *vcpu, int point) { } | ||
1531 | static void mmu_audit_disable(void) { } | ||
1532 | #endif | ||
1533 | |||
1542 | static int kvm_sync_page(struct kvm_vcpu *vcpu, struct kvm_mmu_page *sp, | 1534 | static int kvm_sync_page(struct kvm_vcpu *vcpu, struct kvm_mmu_page *sp, |
1543 | struct list_head *invalid_list) | 1535 | struct list_head *invalid_list) |
1544 | { | 1536 | { |
@@ -4035,12 +4027,6 @@ void kvm_mmu_destroy(struct kvm_vcpu *vcpu) | |||
4035 | mmu_free_memory_caches(vcpu); | 4027 | mmu_free_memory_caches(vcpu); |
4036 | } | 4028 | } |
4037 | 4029 | ||
4038 | #ifdef CONFIG_KVM_MMU_AUDIT | ||
4039 | #include "mmu_audit.c" | ||
4040 | #else | ||
4041 | static void mmu_audit_disable(void) { } | ||
4042 | #endif | ||
4043 | |||
4044 | void kvm_mmu_module_exit(void) | 4030 | void kvm_mmu_module_exit(void) |
4045 | { | 4031 | { |
4046 | mmu_destroy_caches(); | 4032 | mmu_destroy_caches(); |