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-ia64-devel

[Xen-ia64-devel] Faulty protection key handling

To: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-ia64-devel] Faulty protection key handling
From: Dietmar Hahn <dietmar.hahn@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 25 Apr 2007 15:36:20 +0200
Delivery-date: Wed, 25 Apr 2007 06:34:56 -0700
Domainkey-signature: s=s768; d=fujitsu-siemens.com; c=nofws; q=dns; b=lvbCw8AJJA7d2RMu5esdGi2bnmnuemOGAmDrczgORiBB5zArs7Ltz+VCLffcslukBQtppStgUMjaFWh6ylHPHV/YqW3Bmg8ajxw2mcXcG84JzSv6OH68fXFa98/RfVZz;
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.6
Hi,

I played around with the minios and protection key bit in the psr register and 
got 3 different behaviors.
1.
mov cr.ipsr = ...  (pk bit set)
...
rfi

leads to a hard reboot of the hypervisor. I looked at the rfi emulation and 
found, that the pk bit remains untouched. So the protection key stuff is 
switched on and the hypervisor and dom0 get some problems.
This seems to be a real critical case. You can test this simply with the 
minios by changing line 130 in minios/arch/ia64/ia64.S to
movl    r16=STARTUP_PSR | IA64_PSR_PK.

2.
mov r2 = ...  (pk bit set)
;;
mov psr.l = r2

Nothing happend. In the source the pk bit is ignored.

3.
ssm psr.pk

leads to a crash of the domU with illegal op which seems to be the right 
thing.

I think fixes are needed here for case 1 and 2. If the pk bit is set the 
domain should be paniced.

By the way, are there any thoughts about adding emulation of protection keys 
to the hypervisor? I know, whether the hypervisor nor dom0-linux are using 
this but we need this stuff. I would try to write a proposal and add using 
protection keys in the minios for tests. What do you think?
Thanks.

Dietmar.

_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel