WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] deleting mtrrs in dom0

To: Kurt Garloff <kurt@xxxxxxxxxx>
Subject: Re: [Xen-devel] deleting mtrrs in dom0
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Thu, 24 Mar 2005 18:26:44 +0000
Cc: Xen development list <xen-devel@xxxxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 24 Mar 2005 18:25:32 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20050324180634.GV12479@xxxxxxxxxxxxxxxxx>
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
References: <20050324180634.GV12479@xxxxxxxxxxxxxxxxx>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx

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

<Prev in Thread] Current Thread [Next in Thread>