diff options
| author | David S. Miller <davem@davemloft.net> | 2008-07-27 19:51:21 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2008-07-27 19:51:21 -0400 |
| commit | 281c7413ed914623d3245299a4761b6b27ab9fdb (patch) | |
| tree | 182b5222a7ad4b77c32f7845ea777ca665d7def2 /arch/x86/kvm/svm.c | |
| parent | 2ab61b01110aa04cd853c619a74881e3225a5e24 (diff) | |
| parent | c9272c4f9fbe2087beb3392f526dc5b19efaa56b (diff) | |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'arch/x86/kvm/svm.c')
| -rw-r--r-- | arch/x86/kvm/svm.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index b756e876dce3..e2ee264740c7 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c | |||
| @@ -453,7 +453,8 @@ static __init int svm_hardware_setup(void) | |||
| 453 | if (npt_enabled) { | 453 | if (npt_enabled) { |
| 454 | printk(KERN_INFO "kvm: Nested Paging enabled\n"); | 454 | printk(KERN_INFO "kvm: Nested Paging enabled\n"); |
| 455 | kvm_enable_tdp(); | 455 | kvm_enable_tdp(); |
| 456 | } | 456 | } else |
| 457 | kvm_disable_tdp(); | ||
| 457 | 458 | ||
| 458 | return 0; | 459 | return 0; |
| 459 | 460 | ||
| @@ -1007,10 +1008,13 @@ static int pf_interception(struct vcpu_svm *svm, struct kvm_run *kvm_run) | |||
| 1007 | struct kvm *kvm = svm->vcpu.kvm; | 1008 | struct kvm *kvm = svm->vcpu.kvm; |
| 1008 | u64 fault_address; | 1009 | u64 fault_address; |
| 1009 | u32 error_code; | 1010 | u32 error_code; |
| 1011 | bool event_injection = false; | ||
| 1010 | 1012 | ||
| 1011 | if (!irqchip_in_kernel(kvm) && | 1013 | if (!irqchip_in_kernel(kvm) && |
| 1012 | is_external_interrupt(exit_int_info)) | 1014 | is_external_interrupt(exit_int_info)) { |
| 1015 | event_injection = true; | ||
| 1013 | push_irq(&svm->vcpu, exit_int_info & SVM_EVTINJ_VEC_MASK); | 1016 | push_irq(&svm->vcpu, exit_int_info & SVM_EVTINJ_VEC_MASK); |
| 1017 | } | ||
| 1014 | 1018 | ||
| 1015 | fault_address = svm->vmcb->control.exit_info_2; | 1019 | fault_address = svm->vmcb->control.exit_info_2; |
| 1016 | error_code = svm->vmcb->control.exit_info_1; | 1020 | error_code = svm->vmcb->control.exit_info_1; |
| @@ -1024,6 +1028,8 @@ static int pf_interception(struct vcpu_svm *svm, struct kvm_run *kvm_run) | |||
| 1024 | (u32)fault_address, (u32)(fault_address >> 32), | 1028 | (u32)fault_address, (u32)(fault_address >> 32), |
| 1025 | handler); | 1029 | handler); |
| 1026 | 1030 | ||
| 1031 | if (event_injection) | ||
| 1032 | kvm_mmu_unprotect_page_virt(&svm->vcpu, fault_address); | ||
| 1027 | return kvm_mmu_page_fault(&svm->vcpu, fault_address, error_code); | 1033 | return kvm_mmu_page_fault(&svm->vcpu, fault_address, error_code); |
| 1028 | } | 1034 | } |
| 1029 | 1035 | ||
