On 07/11/2010 10:38 PM, Alex Williamson wrote:

What
about page attributes?

There are two cases:

- snoop capable iommu - can use write-backed RAM, but need to enable
snoop.  BARs still need to respect page attributes.
- older mmu - need to respect guest memory type; probably cannot be done
without kvm.

If the guest maps a BAR or RAM using write-combine memory type, can we
reflect that?  This may provide a considerable performance benefit.
Do we do anything about this today in kvm device assignment?  Maybe it's
buried in the kernel side bits and I've missed it.  I would expect that
WC mappings in the guest carry through to host virtual mappings, but
maybe we can only do that with kvm.

Yes, see arch/x86/kvm/mmu.c, set_spte() calling ->get_mt_mask().

Strangely, it's qualified with tdp. Perhaps because of all of the scary errata regarding mismatching memory types for a page.

The processor side mappings are
independent of the iommu mappings since devices don't care about such
things.  Thanks,

Yeah.

--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.


Reply via email to