Re: [PATCH] get rid of mmu_only parameter in emulator_write_emulated()

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

 



On 04/13/2010 10:21 AM, Gleb Natapov wrote:
May be I am missing something here, but it seams we can call
kvm_mmu_pte_write() directly from emulator_cmpxchg_emulated()
instead of passing mmu_only down to emulator_write_emulated_onepage()
and call it there.


@@ -3460,7 +3444,9 @@ static int emulator_cmpxchg_emulated(unsigned long addr,
  	if (!exchanged)
  		return X86EMUL_CMPXCHG_FAILED;

-	return __emulator_write_emulated(addr, new, bytes, vcpu, true);
+	kvm_mmu_pte_write(vcpu, gpa, new, bytes, 1);
+
+	return X86EMUL_CONTINUE;


The written range might cross a page boundary, which kvm_mmu_pte_write() is not prepared to handle.

--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.

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