Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 172303
b: refs/heads/master
c: d36f19e
h: refs/heads/master
i:
  172301: 1731c2d
  172299: fb61899
  172295: 75852ba
  172287: f95a71c
v: v3
  • Loading branch information
Joerg Roedel authored and Avi Kivity committed Dec 3, 2009
1 parent 3bcec47 commit 2cec686
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 35 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 532a46b98963f110e9425a251e127d6537915dde
refs/heads/master: d36f19e9ecd22dc035ef4cc6361b564be650f8e7
34 changes: 0 additions & 34 deletions trunk/arch/x86/kvm/svm.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,6 @@ MODULE_LICENSE("GPL");

#define DEBUGCTL_RESERVED_BITS (~(0x3fULL))

/* Turn on to get debugging output*/
/* #define NESTED_DEBUG */

#ifdef NESTED_DEBUG
#define nsvm_printk(fmt, args...) printk(KERN_INFO fmt, ## args)
#else
#define nsvm_printk(fmt, args...) do {} while(0)
#endif

static const u32 host_save_user_msrs[] = {
#ifdef CONFIG_X86_64
MSR_STAR, MSR_LSTAR, MSR_CSTAR, MSR_SYSCALL_MASK, MSR_KERNEL_GS_BASE,
Expand Down Expand Up @@ -1540,14 +1531,12 @@ static int nested_svm_exit_handled(struct vcpu_svm *svm)
}
default: {
u64 exit_bits = 1ULL << (exit_code - SVM_EXIT_INTR);
nsvm_printk("exit code: 0x%x\n", exit_code);
if (svm->nested.intercept & exit_bits)
vmexit = NESTED_EXIT_DONE;
}
}

if (vmexit == NESTED_EXIT_DONE) {
nsvm_printk("#VMEXIT reason=%04x\n", exit_code);
nested_svm_vmexit(svm);
}

Expand Down Expand Up @@ -1658,10 +1647,6 @@ static int nested_svm_vmexit(struct vcpu_svm *svm)
/* Restore the original control entries */
copy_vmcb_control_area(vmcb, hsave);

/* Kill any pending exceptions */
if (svm->vcpu.arch.exception.pending == true)
nsvm_printk("WARNING: Pending Exception\n");

kvm_clear_exception_queue(&svm->vcpu);
kvm_clear_interrupt_queue(&svm->vcpu);

Expand Down Expand Up @@ -1826,25 +1811,14 @@ static bool nested_svm_vmrun(struct vcpu_svm *svm)

force_new_asid(&svm->vcpu);
svm->vmcb->control.int_ctl = nested_vmcb->control.int_ctl | V_INTR_MASKING_MASK;
if (nested_vmcb->control.int_ctl & V_IRQ_MASK) {
nsvm_printk("nSVM Injecting Interrupt: 0x%x\n",
nested_vmcb->control.int_ctl);
}
if (nested_vmcb->control.int_ctl & V_INTR_MASKING_MASK)
svm->vcpu.arch.hflags |= HF_VINTR_MASK;
else
svm->vcpu.arch.hflags &= ~HF_VINTR_MASK;

nsvm_printk("nSVM exit_int_info: 0x%x | int_state: 0x%x\n",
nested_vmcb->control.exit_int_info,
nested_vmcb->control.int_state);

svm->vmcb->control.int_vector = nested_vmcb->control.int_vector;
svm->vmcb->control.int_state = nested_vmcb->control.int_state;
svm->vmcb->control.tsc_offset += nested_vmcb->control.tsc_offset;
if (nested_vmcb->control.event_inj & SVM_EVTINJ_VALID)
nsvm_printk("Injecting Event: 0x%x\n",
nested_vmcb->control.event_inj);
svm->vmcb->control.event_inj = nested_vmcb->control.event_inj;
svm->vmcb->control.event_inj_err = nested_vmcb->control.event_inj_err;

Expand Down Expand Up @@ -1913,8 +1887,6 @@ static int vmsave_interception(struct vcpu_svm *svm)

static int vmrun_interception(struct vcpu_svm *svm)
{
nsvm_printk("VMrun\n");

if (nested_svm_check_permissions(svm))
return 1;

Expand Down Expand Up @@ -1974,7 +1946,6 @@ static int clgi_interception(struct vcpu_svm *svm)
static int invlpga_interception(struct vcpu_svm *svm)
{
struct kvm_vcpu *vcpu = &svm->vcpu;
nsvm_printk("INVLPGA\n");

trace_kvm_invlpga(svm->vmcb->save.rip, vcpu->arch.regs[VCPU_REGS_RCX],
vcpu->arch.regs[VCPU_REGS_RAX]);
Expand Down Expand Up @@ -2389,10 +2360,6 @@ static int handle_exit(struct kvm_vcpu *vcpu)
svm->vmcb->control.exit_int_info,
svm->vmcb->control.exit_int_info_err);

nsvm_printk("nested handle_exit: 0x%x | 0x%lx | 0x%lx | 0x%lx\n",
exit_code, svm->vmcb->control.exit_info_1,
svm->vmcb->control.exit_info_2, svm->vmcb->save.rip);

vmexit = nested_svm_exit_special(svm);

if (vmexit == NESTED_EXIT_CONTINUE)
Expand Down Expand Up @@ -2539,7 +2506,6 @@ static int svm_interrupt_allowed(struct kvm_vcpu *vcpu)
static void enable_irq_window(struct kvm_vcpu *vcpu)
{
struct vcpu_svm *svm = to_svm(vcpu);
nsvm_printk("Trying to open IRQ window\n");

nested_svm_intr(svm);

Expand Down

0 comments on commit 2cec686

Please sign in to comment.