On 05/30/2015 06:59 PM, Xiao Guangrong wrote: > Currently guest MTRR is completely prohibited if cache snoop is supported on > IOMMU (!noncoherent_dma) and host does the emulation based on the knowledge > from host side, however, host side is not the good point to know > what the purpose of guest is. A good example is that pass-throughed VGA > frame buffer is not always UC as host expected > > Besides that, there is a bugs in current code if noncoherent_dma is detected: > KVM still uses hugepage even if the 4K pages in that ranges span between > on different memory types and uses the cache type of first page to do memory > mapping > > This patchset enables full MTRR virtualization and currently only works on > Intel EPT architecture > > There is the code will be attached in this thread is used to check the effect > of this patchset: > [12834.843439] __INIT__. > [12835.909109] Running in preload MTRR_TYPE_UNCACHABLE 4753900 ns. > [12835.915232] Running in MTRR_TYPE_UNCACHABLE 5257522 ns. > [12838.083948] Running in preload MTRR_TYPE_WRBACK 13266 ns. > [12838.084998] Running in MTRR_TYPE_WRBACK 13099 ns. > Has been attached in this mail.