Question on handle_exit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, everyone,
I'm reading kvm-5 source code (very old but good enough to learn svm). Inside svm.c, there is a function called handle_exit:
static int handle_exit(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run){    u32 exit_code = vcpu->svm->vmcb->control.exit_code;
    kvm_run->exit_type = KVM_EXIT_TYPE_VM_EXIT;
    if (is_external_interrupt(vcpu->svm->vmcb->control.exit_int_info) &&        exit_code != SVM_EXIT_EXCP_BASE + PF_VECTOR)        printk(KERN_ERR "%s: unexpected exit_ini_info 0x%x " ******    ****}
Here I have a question, the first check is to see whether the exit_code, which is actually the interrupt vector number, is page fault. But page fault should be an exception, instead of an external interrupt. Why the condition is is_external_interrupt && exit_code is not page_fault ?
According to the AMD SVM Reference Manual, the exit_int_info type should be 3 (Exception), am I wrong ?
Thanks very much.
Nathan
 		 	   		  --
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux