[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-ia64-devel] Re: [patch 14/15] ia64: kexec: Only map PAL when making EFI, PAL or SAL calls



Hi Yamahata-san

What do you think about the following?

/* rr7 (and rr6) may already be set to XEN_EFI_RR, which
 * would indicate a nested EFI, SAL or PAL call, such
 * as from an MCA. This may have occured during a call
 * to set_one_rr_efi(). To be safe, repin everything anyway.
 */

#define XEN_EFI_RR_ENTER(rr6, rr7) do {                 \
        rr6 = ia64_get_rr(6UL << 61);                   \
        rr7 = ia64_get_rr(7UL << 61);                   \
        set_one_rr_efi(6UL << 61, XEN_EFI_RR);          \
        set_one_rr_efi(7UL << 61, XEN_EFI_RR);          \
        efi_map_pal_code();                             \
} while (0)

/* There is no need to do anything if the saved rr7 (and rr6)
 * is XEN_EFI_RR, as it would just switch them from XEN_EFI_RR to XEN_EFI_RR
 * Furthermore, if this is a nested call it is important not
 * to unpin efi_unmap_pal_code() until the outermost call is finished
 */

#define XEN_EFI_RR_LEAVE(rr6, rr7) do {                 \
        if (rr7 != XEN_EFI_RR) {                        \
                efi_unmap_pal_code();                   \
                set_one_rr_efi(6UL << 61, rr6);         \
                set_one_rr_efi(7UL << 61, rr7);         \
        }                                               \
} while (0)


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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.