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

Re: [Xen-devel] deleting mtrrs in dom0




On 24 Mar 2005, at 18:06, Kurt Garloff wrote:

I seem to be undable to delete MTRRs in domain0:

root@tpkurt:~ [0]# cat /proc/mtrr
reg00: base=0x00000000 (   0MB), size= 512MB: write-back, count=0
reg01: base=0x1ff80000 ( 511MB), size= 512KB: uncachable, count=0
reg02: base=0xe0000000 (3584MB), size=  32MB: write-combining, count=0
reg03: base=0xd0000000 (3328MB), size= 256MB: write-combining, count=0
root@tpkurt:~ [0]# echo "disable=1" /proc/mtrr
disable=1 /proc/mtrr
root@tpkurt:~ [0]# echo "disable=1" >/proc/mtrr
root@tpkurt:~ [1]# cat /proc/mtrr
reg00: base=0x00000000 (   0MB), size= 512MB: write-back, count=0
reg01: base=0x1ff80000 ( 511MB), size= 512KB: uncachable, count=0
reg02: base=0xe0000000 (3584MB), size=  32MB: write-combining, count=0
reg03: base=0xd0000000 (3328MB), size= 256MB: write-combining, count=0

Isn't this supposed to work?

It's been hacked just enough to get X working, but the /proc semantics haven't been given much thought. The problem is that reading /proc/mtrr tells you what the real physical MTRRs contain, but these registers weren't initialised by domain0 but by Xen, during SMP bootstrap. So when you attempt to delete them you will probably find error messages in /var/log/messages saying 'reg1 has count=0'.

There are a few possible fixes, one being to let domain0 get staright at the MTRRs after it has booted, but this needs great care -- the registers have to be carefully synchronised across all physical CPUs to avoid memory deadlocks.

Better might be to have a low-level stateless interface exported by Xen, and have domain0 read the MTRR state during boot and set its refcnt to one for each MTRR that is initialised and in use.

 -- Keir



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.