diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2009-10-09 10:08:33 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-12-03 02:32:17 -0500 |
commit | d36f19e9ecd22dc035ef4cc6361b564be650f8e7 (patch) | |
tree | 70ee0627a4298909413efcdf516cdca44abba47d | |
parent | 532a46b98963f110e9425a251e127d6537915dde (diff) |
KVM: SVM: Remove nsvm_printk debugging code
With all important informations now delivered through
tracepoints we can savely remove the nsvm_printk debugging
code for nested svm.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
-rw-r--r-- | arch/x86/kvm/svm.c | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 8b9f6fbba48c..69610c5d6dea 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c | |||
@@ -53,15 +53,6 @@ MODULE_LICENSE("GPL"); | |||
53 | 53 | ||
54 | #define DEBUGCTL_RESERVED_BITS (~(0x3fULL)) | 54 | #define DEBUGCTL_RESERVED_BITS (~(0x3fULL)) |
55 | 55 | ||
56 | /* Turn on to get debugging output*/ | ||
57 | /* #define NESTED_DEBUG */ | ||
58 | |||
59 | #ifdef NESTED_DEBUG | ||
60 | #define nsvm_printk(fmt, args...) printk(KERN_INFO fmt, ## args) | ||
61 | #else | ||
62 | #define nsvm_printk(fmt, args...) do {} while(0) | ||
63 | #endif | ||
64 | |||
65 | static const u32 host_save_user_msrs[] = { | 56 | static const u32 host_save_user_msrs[] = { |
66 | #ifdef CONFIG_X86_64 | 57 | #ifdef CONFIG_X86_64 |
67 | MSR_STAR, MSR_LSTAR, MSR_CSTAR, MSR_SYSCALL_MASK, MSR_KERNEL_GS_BASE, | 58 | MSR_STAR, MSR_LSTAR, MSR_CSTAR, MSR_SYSCALL_MASK, MSR_KERNEL_GS_BASE, |
@@ -1540,14 +1531,12 @@ static int nested_svm_exit_handled(struct vcpu_svm *svm) | |||
1540 | } | 1531 | } |
1541 | default: { | 1532 | default: { |
1542 | u64 exit_bits = 1ULL << (exit_code - SVM_EXIT_INTR); | 1533 | u64 exit_bits = 1ULL << (exit_code - SVM_EXIT_INTR); |
1543 | nsvm_printk("exit code: 0x%x\n", exit_code); | ||
1544 | if (svm->nested.intercept & exit_bits) | 1534 | if (svm->nested.intercept & exit_bits) |
1545 | vmexit = NESTED_EXIT_DONE; | 1535 | vmexit = NESTED_EXIT_DONE; |
1546 | } | 1536 | } |
1547 | } | 1537 | } |
1548 | 1538 | ||
1549 | if (vmexit == NESTED_EXIT_DONE) { | 1539 | if (vmexit == NESTED_EXIT_DONE) { |
1550 | nsvm_printk("#VMEXIT reason=%04x\n", exit_code); | ||
1551 | nested_svm_vmexit(svm); | 1540 | nested_svm_vmexit(svm); |
1552 | } | 1541 | } |
1553 | 1542 | ||
@@ -1658,10 +1647,6 @@ static int nested_svm_vmexit(struct vcpu_svm *svm) | |||
1658 | /* Restore the original control entries */ | 1647 | /* Restore the original control entries */ |
1659 | copy_vmcb_control_area(vmcb, hsave); | 1648 | copy_vmcb_control_area(vmcb, hsave); |
1660 | 1649 | ||
1661 | /* Kill any pending exceptions */ | ||
1662 | if (svm->vcpu.arch.exception.pending == true) | ||
1663 | nsvm_printk("WARNING: Pending Exception\n"); | ||
1664 | |||
1665 | kvm_clear_exception_queue(&svm->vcpu); | 1650 | kvm_clear_exception_queue(&svm->vcpu); |
1666 | kvm_clear_interrupt_queue(&svm->vcpu); | 1651 | kvm_clear_interrupt_queue(&svm->vcpu); |
1667 | 1652 | ||
@@ -1826,25 +1811,14 @@ static bool nested_svm_vmrun(struct vcpu_svm *svm) | |||
1826 | 1811 | ||
1827 | force_new_asid(&svm->vcpu); | 1812 | force_new_asid(&svm->vcpu); |
1828 | svm->vmcb->control.int_ctl = nested_vmcb->control.int_ctl | V_INTR_MASKING_MASK; | 1813 | svm->vmcb->control.int_ctl = nested_vmcb->control.int_ctl | V_INTR_MASKING_MASK; |
1829 | if (nested_vmcb->control.int_ctl & V_IRQ_MASK) { | ||
1830 | nsvm_printk("nSVM Injecting Interrupt: 0x%x\n", | ||
1831 | nested_vmcb->control.int_ctl); | ||
1832 | } | ||
1833 | if (nested_vmcb->control.int_ctl & V_INTR_MASKING_MASK) | 1814 | if (nested_vmcb->control.int_ctl & V_INTR_MASKING_MASK) |
1834 | svm->vcpu.arch.hflags |= HF_VINTR_MASK; | 1815 | svm->vcpu.arch.hflags |= HF_VINTR_MASK; |
1835 | else | 1816 | else |
1836 | svm->vcpu.arch.hflags &= ~HF_VINTR_MASK; | 1817 | svm->vcpu.arch.hflags &= ~HF_VINTR_MASK; |
1837 | 1818 | ||
1838 | nsvm_printk("nSVM exit_int_info: 0x%x | int_state: 0x%x\n", | ||
1839 | nested_vmcb->control.exit_int_info, | ||
1840 | nested_vmcb->control.int_state); | ||
1841 | |||
1842 | svm->vmcb->control.int_vector = nested_vmcb->control.int_vector; | 1819 | svm->vmcb->control.int_vector = nested_vmcb->control.int_vector; |
1843 | svm->vmcb->control.int_state = nested_vmcb->control.int_state; | 1820 | svm->vmcb->control.int_state = nested_vmcb->control.int_state; |
1844 | svm->vmcb->control.tsc_offset += nested_vmcb->control.tsc_offset; | 1821 | svm->vmcb->control.tsc_offset += nested_vmcb->control.tsc_offset; |
1845 | if (nested_vmcb->control.event_inj & SVM_EVTINJ_VALID) | ||
1846 | nsvm_printk("Injecting Event: 0x%x\n", | ||
1847 | nested_vmcb->control.event_inj); | ||
1848 | svm->vmcb->control.event_inj = nested_vmcb->control.event_inj; | 1822 | svm->vmcb->control.event_inj = nested_vmcb->control.event_inj; |
1849 | svm->vmcb->control.event_inj_err = nested_vmcb->control.event_inj_err; | 1823 | svm->vmcb->control.event_inj_err = nested_vmcb->control.event_inj_err; |
1850 | 1824 | ||
@@ -1913,8 +1887,6 @@ static int vmsave_interception(struct vcpu_svm *svm) | |||
1913 | 1887 | ||
1914 | static int vmrun_interception(struct vcpu_svm *svm) | 1888 | static int vmrun_interception(struct vcpu_svm *svm) |
1915 | { | 1889 | { |
1916 | nsvm_printk("VMrun\n"); | ||
1917 | |||
1918 | if (nested_svm_check_permissions(svm)) | 1890 | if (nested_svm_check_permissions(svm)) |
1919 | return 1; | 1891 | return 1; |
1920 | 1892 | ||
@@ -1974,7 +1946,6 @@ static int clgi_interception(struct vcpu_svm *svm) | |||
1974 | static int invlpga_interception(struct vcpu_svm *svm) | 1946 | static int invlpga_interception(struct vcpu_svm *svm) |
1975 | { | 1947 | { |
1976 | struct kvm_vcpu *vcpu = &svm->vcpu; | 1948 | struct kvm_vcpu *vcpu = &svm->vcpu; |
1977 | nsvm_printk("INVLPGA\n"); | ||
1978 | 1949 | ||
1979 | trace_kvm_invlpga(svm->vmcb->save.rip, vcpu->arch.regs[VCPU_REGS_RCX], | 1950 | trace_kvm_invlpga(svm->vmcb->save.rip, vcpu->arch.regs[VCPU_REGS_RCX], |
1980 | vcpu->arch.regs[VCPU_REGS_RAX]); | 1951 | vcpu->arch.regs[VCPU_REGS_RAX]); |
@@ -2389,10 +2360,6 @@ static int handle_exit(struct kvm_vcpu *vcpu) | |||
2389 | svm->vmcb->control.exit_int_info, | 2360 | svm->vmcb->control.exit_int_info, |
2390 | svm->vmcb->control.exit_int_info_err); | 2361 | svm->vmcb->control.exit_int_info_err); |
2391 | 2362 | ||
2392 | nsvm_printk("nested handle_exit: 0x%x | 0x%lx | 0x%lx | 0x%lx\n", | ||
2393 | exit_code, svm->vmcb->control.exit_info_1, | ||
2394 | svm->vmcb->control.exit_info_2, svm->vmcb->save.rip); | ||
2395 | |||
2396 | vmexit = nested_svm_exit_special(svm); | 2363 | vmexit = nested_svm_exit_special(svm); |
2397 | 2364 | ||
2398 | if (vmexit == NESTED_EXIT_CONTINUE) | 2365 | if (vmexit == NESTED_EXIT_CONTINUE) |
@@ -2539,7 +2506,6 @@ static int svm_interrupt_allowed(struct kvm_vcpu *vcpu) | |||
2539 | static void enable_irq_window(struct kvm_vcpu *vcpu) | 2506 | static void enable_irq_window(struct kvm_vcpu *vcpu) |
2540 | { | 2507 | { |
2541 | struct vcpu_svm *svm = to_svm(vcpu); | 2508 | struct vcpu_svm *svm = to_svm(vcpu); |
2542 | nsvm_printk("Trying to open IRQ window\n"); | ||
2543 | 2509 | ||
2544 | nested_svm_intr(svm); | 2510 | nested_svm_intr(svm); |
2545 | 2511 | ||