[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] IA64: make the fpswa emulation keep the previous behaviour.
# HG changeset patch # User Isaku Yamahata <yamahata@xxxxxxxxxxxxx> # Date 1229045758 -32400 # Node ID 05b293d7fbb7ef4505793410f370b951a6d8804c # Parent 9e0f8f78d37a6c80339ed30b64099515211b5ebd IA64: make the fpswa emulation keep the previous behaviour. When fpswa library return statue > 0, keep the previous behavior. This case should be addressed somehow later, but it seems somewhat difficult to resolve, so keep the previous behavor for now. It is assumed that a guest kernel calls fpswa library without preemption. This assumption breaks if a guest kernel is preemptive. Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx> --- xen/arch/ia64/xen/faults.c | 2 ++ xen/arch/ia64/xen/hypercall.c | 7 +++++++ xen/include/asm-ia64/domain.h | 1 + 3 files changed, 10 insertions(+) diff -r 9e0f8f78d37a -r 05b293d7fbb7 xen/arch/ia64/xen/faults.c --- a/xen/arch/ia64/xen/faults.c Fri Dec 12 10:34:18 2008 +0900 +++ b/xen/arch/ia64/xen/faults.c Fri Dec 12 10:35:58 2008 +0900 @@ -337,6 +337,7 @@ handle_fpu_swa(int fp_fault, struct pt_r rc = IA64_RETRY; } if (rc == IA64_RETRY) { + PSCBX(current, fpswa_ret) = (fpswa_ret_t){IA64_RETRY, 0, 0, 0}; gdprintk(XENLOG_DEBUG, "%s(%s): floating-point bundle at 0x%lx not mapped\n", __FUNCTION__, fp_fault ? "fault" : "trap", fault_ip); @@ -347,6 +348,7 @@ handle_fpu_swa(int fp_fault, struct pt_r &isr, ®s->pr, ®s->cr_ifs, regs); if (ret.status) { + PSCBX(current, fpswa_ret) = ret; printk("%s(%s): fp_emulate() returned %ld\n", __FUNCTION__, fp_fault ? "fault" : "trap", ret.status); } diff -r 9e0f8f78d37a -r 05b293d7fbb7 xen/arch/ia64/xen/hypercall.c --- a/xen/arch/ia64/xen/hypercall.c Fri Dec 12 10:34:18 2008 +0900 +++ b/xen/arch/ia64/xen/hypercall.c Fri Dec 12 10:35:58 2008 +0900 @@ -164,6 +164,13 @@ fw_hypercall_fpswa (struct vcpu *v, stru struct page_info *hp_page = NULL; struct page_info *hv_page = NULL; XEN_EFI_RR_DECLARE(rr6, rr7); + + if (unlikely(PSCBX(v, fpswa_ret).status != 0 && + PSCBX(v, fpswa_ret).status != IA64_RETRY)) { + ret = PSCBX(v, fpswa_ret); + PSCBX(v, fpswa_ret) = (fpswa_ret_t){0, 0, 0, 0}; + return ret; + } if (!fpswa_interface) goto error; diff -r 9e0f8f78d37a -r 05b293d7fbb7 xen/include/asm-ia64/domain.h --- a/xen/include/asm-ia64/domain.h Fri Dec 12 10:34:18 2008 +0900 +++ b/xen/include/asm-ia64/domain.h Fri Dec 12 10:35:58 2008 +0900 @@ -288,6 +288,7 @@ struct arch_vcpu { char irq_new_condition; // vpsr.i/vtpr change, check for pending VHPI char hypercall_continuation; + fpswa_ret_t fpswa_ret; /* save return values of FPSWA emulation */ struct timer hlt_timer; struct arch_vmx_struct arch_vmx; /* Virtual Machine Extensions */ _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |