ia64/xen-unstable

changeset 18137:c587457f6916

[IA64] fix fpswa mapping which was broken by EFI mapping.

This patch fixes the following panic reported by Kusamura when xen
VMM tries to use fpswa.
With the EFI mapping patch, all the firmware call is done in
the dedicated address space.
fpswa is EFI driver so that the address space must be switched
before/after calling fpswa.

> (XEN) $$$$$ PANIC in domain 2 (k6=0xf0000004f25e8000): *** xen_handle_domain_access: exception table lookup failed, iip=0xf40000000408cc30,
> addr=0xe0000004ffe62050, spinning...
> (XEN) d 0xf000000004138080 domid 2
> (XEN) vcpu 0xf0000004f25e8000 vcpu 0
> (XEN)
> (XEN) CPU 5
> (XEN) psr : 0000121008226038 ifs : 8000000000000716 ip : [<f40000000408cc31>]
> (XEN) ip is at handle_fpu_swa+0x3c1/0x510
...

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author Isaku Yamahata <yamahata@valinux.co.jp>
date Mon Jul 28 17:29:09 2008 +0900 (2008-07-28)
parents bfddf170cef9
children e9706492e960
files xen/arch/ia64/xen/faults.c
line diff
     1.1 --- a/xen/arch/ia64/xen/faults.c	Mon Jul 28 17:29:09 2008 +0900
     1.2 +++ b/xen/arch/ia64/xen/faults.c	Mon Jul 28 17:29:09 2008 +0900
     1.3 @@ -274,6 +274,7 @@ fp_emulate(int fp_fault, void *bundle, u
     1.4  {
     1.5  	fp_state_t fp_state;
     1.6  	fpswa_ret_t ret;
     1.7 +	XEN_EFI_RR_DECLARE(rr6, rr7);
     1.8  
     1.9  	if (!fpswa_interface)
    1.10  		return (fpswa_ret_t) {-1, 0, 0, 0};
    1.11 @@ -299,8 +300,10 @@ fp_emulate(int fp_fault, void *bundle, u
    1.12  	 *      unsigned long    *pifs,
    1.13  	 *      void             *fp_state);
    1.14  	 */
    1.15 +	XEN_EFI_RR_ENTER(rr6, rr7);
    1.16  	ret = (*fpswa_interface->fpswa) (fp_fault, bundle,
    1.17  	                                 ipsr, fpsr, isr, pr, ifs, &fp_state);
    1.18 +	XEN_EFI_RR_LEAVE(rr6, rr7);
    1.19  
    1.20  	return ret;
    1.21  }