[PATCH] spufs-prevent-sdr1-access

Geoff Levand geoffrey.levand at am.sony.com
Thu Jan 26 09:38:06 EST 2006


Olof Johansson wrote:
> On Wed, Jan 25, 2006 at 10:25:58AM -0800, Geoff Levand wrote:
> 
>>spufs-prevent-sdr1-access.patch:
>>
>>SDR1 is a hypervisor resource.  It is not accessible when
>>kernel is on LPAR.
> 
> 
> I apologize if this is a stupid question since I don't know all the
> spufs and cell details...
> 
> Don't you still need to set that SPU side register, or does the
> hypervisor do it?  What stops a partition from setting it itself
> and override whatever hypervisor setting there is, thus breaking the
> partition isolation, etc?
> 

It seems that for current hypervisor designs just ignoring this
operation is enough since the hypervisor manages those details
of the SPU.  This fix just follows the method of testing
platform_is_lpar() before accessing SPRN_SDR1 as done in
arch/powerpc/mm/hash_utils_64.c.

Those PPE side SPU registers are privlege 1 registers, so only
accessable by the hypervisor.  Access to those by code executing
in a partition will trap into the hypervisor.  spu_mfc_sdr_set()
is a hypervisor specific wrapper and needs to be coded to do the
right thing.

Anyone interested in details of the PPE side SPU registers can check
the Cell Architecture Manual here: http://cell.scei.co.jp/e_download.html

-Geoff




More information about the Linuxppc64-dev mailing list