Re: [PATCH 3/3] KVM: Cache pdptrs

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

 



Joerg Roedel wrote:
On Tue, Jun 02, 2009 at 12:09:17PM +0300, Avi Kivity wrote:
Joerg Roedel wrote:
On Mon, Jun 01, 2009 at 04:22:03PM +0300, Avi Kivity wrote:
+static void svm_cache_reg(struct kvm_vcpu *vcpu, enum kvm_reg reg)
+{
+	switch (reg) {
+	case VCPU_EXREG_PDPTR:
+		BUG_ON(!npt_enabled);
+		load_pdptrs(vcpu, vcpu->arch.cr3);
+		break;
+	default:
+		BUG();
+	}
+}
Don't we need to check for the return value of load_pdptrs() here and inject
a #GP it it fails?
We're after some random exit, the guest won't be expecting a #GP in some random instruction.

The only options are ignore and triple fault.

Thats not different from PAE with NPT anyways. With NPT the hardware
does not load all four pdptrs on cr3 switch time, only when they
are used.

That will at least cause a page fault on a related instruction. But we can't #GP on a random exit.

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