Re: [PATCH 10/27] nVMX: Implement VMCLEAR

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

 



 On 10/17/2010 03:25 PM, Nadav Har'El wrote:
On Sun, Oct 17, 2010, Avi Kivity wrote about "Re: [PATCH 10/27] nVMX: Implement VMCLEAR":
>  >+	vmcs12 = kmap(page);
>
>  kmap_atomic() please (better, kvm_write_guest(), but can defer that for
>  later)

Sorry about my ignorance, but why is kmap_atomic() better here than kmap()?
While handling an exit (caused by a guest running VMCLEAR instruction), we
aren't in atomic context, aren't we?

kmap() is unloved since it is deadlock-prone in some circumstances, and also much slower than kmap_atomic(), since it needs global tlb synchronization.

If I use kmap_atomic() here I'll need to kunmap_atomic() below which will
break the newly combined kunmap&  nested_release_page function ;-)

>  >+	vmcs12->launch_state = 0;
>  >+	kunmap(page);
>  >+	nested_release_page(page);


Is something preventing you from changing all kmap()s to kmap_atomic()s (like guest memory access in the mapped section)?

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