lkml.org 
[lkml]   [2009]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [GIT PULL] xen /proc/mtrr implementation
Andi Kleen wrote:
> Jeremy Fitzhardinge <jeremy@goop.org> writes:
>
>
>> arch/x86 already defines an mtrr_ops, which defines how to manipulate
>> the MTRR registers. There are currently several implementations of
>> that interface. In Xen the MTRR registers belong to the hypervisor,
>> but it allows a privileged kernel to modify them via hypercalls.
>>
>
> One part that's unclear to me in this discussion. Could you perhaps
> clarify Jeremy?:
>
> Even Dom0 is not continuous in physical memory, but mapped page by page
> except for swiotlb mappings. But MTRRs are fundamentally a way
> to change attributes for large physically continous mappings. How do these
> two meet?
>
> After all when you change a MTRR for a given range of memory
> linux sees as continuous it isn't necessarily in Xen.
>
> Is this new interface only defined for swiotlb or MMIO mappings?
> If yes did you check the drivers only actually set it on
> swiotlb or MMIO (that seems dubious to me)?

Really? Do we ever set unusual memory types on normal system memory?
From what I've seen, MTRRs are only ever applied to device mapped
memory (framebuffers, etc). I guess it could possibly make sense on
system memory which is being prepped for DMA (swiotlb, alloc_coherent,
etc), but dom0 would have a pseudo-phys to machine mapping for that
memory too (it would be obviously problematic if something tried to
program MTRR with pseudo-physical addresses, but Xen would/should
probably disallow it anyway).

J


\
 
 \ /
  Last update: 2009-05-20 18:43    [W:0.116 / U:1.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site