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

RE: [Xen-ia64-devel] Floating-point software assist (FPSWA) onXen-ia64

To: "Magenheimer, Dan \(HP Labs Fort Collins\)" <dan.magenheimer@xxxxxx>, "Yang, Fred" <fred.yang@xxxxxxxxx>, <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-ia64-devel] Floating-point software assist (FPSWA) onXen-ia64
From: "Xu, Anthony" <anthony.xu@xxxxxxxxx>
Date: Mon, 6 Feb 2006 11:22:16 +0800
Delivery-date: Mon, 06 Feb 2006 03:32:58 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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
Thread-index: AcYinhwrA1UUeVLVRiGZfdIw20ns8wAIYPwwAAIHYQAABJ1c0AAIHdegAAMRSAAAiWBnwAFn/CFQ
Thread-topic: [Xen-ia64-devel] Floating-point software assist (FPSWA) onXen-ia64
Dan/Fred,

I don't think it is the correct way to call FPSWA.efi inside xen.

The main reason is, according to chapter 1.2 of Itanium Processor 
Floating-point Software Assistance and Floating-point Exception Handling, 
application can handle SWA fault itself in such as high performance computation 
application, it can register its own FPSWA function, if FPSWA.efi find handler 
registered from application, it will ask for help from guest FPSWA. It seems 
there is no interface to register application SWA handler.

The second reason is, as Tony said, in some environments linux kernel will send 
signal to guest application in native machine, which is not easy to implement 
if FPSWA.efi is called in xen.

BTW, in xen/ia64(VTI) domain SWA fault should be handled by FPSWA.efi, whose 
entry point is delivered to VTIdomain by elilo, rather than guest firmware 
floating point handler, I guess which only handles SWA fault before control 
being transferred to linux.

I propose, SWA fault is handled as native linux.
So for domain0, as Dan said, xen can deliver the entry point of FPSWA.efi in 
disk to domain0 through boot_parameter due to mpa equal to pa.

For domainU, Xen need to load FPSWA.efi for domainU, and pass the entry point 
to domainU


Thanks,
-Anthony

>-----Original Message-----
>From: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
>[mailto:xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Magenheimer,
>Dan (HP Labs Fort Collins)
>Sent: 2006年1月30日 8:37
>To: Yang, Fred; xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
>Subject: RE: [Xen-ia64-devel] Floating-point software assist (FPSWA)
>onXen-ia64
>
>> Subject: RE: [Xen-ia64-devel] Floating-point software assist
>> (FPSWA) on Xen-ia64
>>
>> My speculation calling FPSWA within Xen will lead to
>> 1. Set FPSR accordingly to Domain kernel with Xen, and then
>> Save and restore domain FP registers before/after calling FPSWA in Xen
>> 2. ready to handle FP exceptions caused by FPSWA execution.
>> Note Domain application can't be trusted so it can likely
>> incure FP exception.  Xen FP exception must also able to
>> distinguish exception source in order to unwind stack to
>> deliver to domain handler.   Will one domain impact Xen stability?
>> 3. If domains doesn't got passed with FPSWA info, can its FP
>> handler able to handle exception delivered from Xen?
>> 4. FP opcode fetch must be performed within Xen (likely
>> within FPSWA) to get from domain application base on IIP.
>> TLB miss may likely happen and Xen can't handle it.
>> 5. Domain FPSWA usage time is charged to Xen in stead of itself
>> Xen may not able to handle above issues cleanly :-)
>
>You may be right, but it seems like the exact code that Linux
>uses should work, except that where Linux passes a signal to
>the application, Xen would instead reflect the fp assist
>fault.  If I have a chance, I may prototype this just to
>see if it works... FPSWA isn't very high priority, but it
>would be nice to pass LTP if it is easy to fix.
>
>> To minic native behavior, can we provide a single physical
>> copy of FPSWA for whole system without coping for each new
>> domain created?  That is, each domain will be given extra,
>> other than domain memory, physical block that contains the
>> same FPSWA.  The memory is then exported to domains through
>> EFI descriptor or ELILO (Whatever the native method is) with
>> guest physical.  For P2M, domains will map the FPSWA using
>> exported guest physical and then Xen will instead map with
>> the same machine physical block for all the domains.
>>
>> The assumption here is domains won't write to FPSWA to
>> clobber it otherwise Xen has to change mapping attribute.
>> Domain destroy may need to perform special handling on this
>> machine block, but it should be easy once we have page
>> reference count implemented.
>
>This can probably be done also but should wait until after
>the physical/machine memory work is redone as otherwise it
>might have to be done twice.
>
>If the easy solution (above) doesn't work, we should probably
>put it off until later.
>
>Dan
>
>_______________________________________________
>Xen-ia64-devel mailing list
>Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
>http://lists.xensource.com/xen-ia64-devel

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

<Prev in Thread] Current Thread [Next in Thread>
  • RE: [Xen-ia64-devel] Floating-point software assist (FPSWA) onXen-ia64, Xu, Anthony <=