Re: [patch 1/2] KVM: x86: handle double and triple faults for every exception

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

 




Another micro difference is this:

@@ -184,24 +196,6 @@ void kvm_inject_page_fault(struct kvm_vc
  {
  	++vcpu->stat.pf_guest;

-	if (vcpu->arch.exception.pending) {
-		switch(vcpu->arch.exception.nr) {
-		case DF_VECTOR:
-			/* triple fault ->  shutdown */
-			set_bit(KVM_REQ_TRIPLE_FAULT,&vcpu->requests);
-			return;
-		case PF_VECTOR:
-			vcpu->arch.exception.nr = DF_VECTOR;
-			vcpu->arch.exception.error_code = 0;
-			return;
-		default:
-			/* replace previous exception with a new one in a hope
-			   that instruction re-execution will regenerate lost
-			   exception */
-			vcpu->arch.exception.pending = false;
-			break;
-		}
-	}
  	vcpu->arch.cr2 = addr;
  	kvm_queue_exception_e(vcpu, PF_VECTOR, error_code);
  }
So far cr2 was not touched on DF, now it is.
Yep. The PF was overwritten with DF, which means the cr2 value will not
be interpreted by the guest?

The note under interrupt 14 documentation in 5.15 indicates that cr2 is updated when the page fault is detected, not delivered, so it is correct to update cr2 immediately.

--
error compiling committee.c: too many arguments to function

--
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