>From: Tristan Gingold
>Sent: 2006?4?18? 16:44
>Correct, but this doesn't happen in the mmio case, because fp_reg_disabled is
>tested before doing the memory access.
I didn't find where fp_reg_disabled is tested:-)
If we only emulate stf.spill and stf8, yes fp fault doesn't happen.
But if we need to emulate ldf, definitely fp fault will happen,
The sequence of emulating ldf maybe,
Mmio_access( , , , , ,IOREQ_READ)
Vcpu_set_fpreg( )
Mmio_access will cause domain_switch,
When switch back, psr.dfh is set,
Then when executing vcpu_set_fpreg, fp fault happens.
And I had found Xwindow use ldfp8 instruction to access frame buffer.
BTW, Where did you find stf.spill and stf8 are used to access mmio?
Can we address this issue like below?
#ifdef XEN
#define ia64_fph_enable()
#define ia64_fph_disable()
#else
#define ia64_fph_enable() do { ia64_rsm(IA64_PSR_DFH); ia64_srlz_d(); }
while (0)
#define ia64_fph_disable() do { ia64_ssm(IA64_PSR_DFH); ia64_srlz_d(); }
while (0)
#endif //XEN
This makes sure there is no fp fault happening within xen.
Yes later on if we want to use lazy fp algorithm within xen,
we should revisit this.
Thanks,
Anthony
>Tristan.
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
|