Re: [PATCH v1 0/2] KVM: VMX: require EPTP WB (write-back) support

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

 



2017-08-10 16:25+0200, David Hildenbrand:
> On 10.08.2017 16:23, Radim Krčmář wrote:
> > 2017-08-10 15:35+0200, David Hildenbrand:
> >> I also have a patch that allows VMX and nVMX to use the UC (unchached)
> >> memory type.
> >> .
> >> However I am not sure if we have to take care of anything special in that
> >> case? Any insights?
> > 
> > We're modifying the EPT structure through cache in root mode and I think
> > the cache would have to be manually flushed before entering non-root
> > mode.
> > 
> > And UC accesses are going to be slower, so I don't see the benefits for
> > VMX.  We can allow UC in nVMX as it will make no difference.
> > 
> 
> That would mean, even fake it's existence but always create EPTP with WB
> for nVMX?

Yes, although I just realized a case where I can't find any code nor
hardware guarantees that handle it:

KVM allows UC access to a page that the guest wanted as UC if
kvm_arch_has_noncoherent_dma().  The guest can bypass the cache when
accessing EPT pages, set UC in EPTP and expect it to work, but KVM would
access the EPT pages through cache and might therefore shadow stale
data.



[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