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] [Fwd: [Xen-bugs] [Bug 1392] New: Problems with deno

To: "Zhang, Xiantao" <xiantao.zhang@xxxxxxxxx>
Subject: Re: [Xen-ia64-devel] [Fwd: [Xen-bugs] [Bug 1392] New: Problems with denormalized floating point numbers on XEN-virtualized Linux/IA64]
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Wed, 10 Dec 2008 14:57:53 +0900
Cc: Alex Williamson <alex.williamson@xxxxxx>, xen-ia64-devel <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 09 Dec 2008 22:00:02 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <706158FABBBA044BAD4FE898A02E4BC219C5D0C0@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1228333259.7218.24.camel@lappy> <20081204062911.GM15798%yamahata@xxxxxxxxxxxxx> <1228407048.13029.10.camel@lappy> <20081205052932.GB27247%yamahata@xxxxxxxxxxxxx> <20081205055113.GE27247%yamahata@xxxxxxxxxxxxx> <706158FABBBA044BAD4FE898A02E4BC219C5CE33@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20081205070251.GG27247%yamahata@xxxxxxxxxxxxx> <20081205075351.GH27247%yamahata@xxxxxxxxxxxxx> <706158FABBBA044BAD4FE898A02E4BC219C5D0C0@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.6i
On Sat, Dec 06, 2008 at 11:10:22AM +0800, Zhang, Xiantao wrote:
> > If we fail to get a bundle in a guest when FP trap,
> > we can't reexecute the instruction. We have to inject floating
> > point trap into guest.
> 
> For HVM, injecting  it to guest should be the right way to go.  

Another issue.
When fpswa library in xen VMM returns status > 0, 
what should we do for PV/HVM domain? 
I suppose this case hasn't been tested.
The current implementation just inject FP trap/fault into guest,
and guest calls fpswa itself.

In such a case, fpswa is called twice. I tried to revert the effect
of fpswa library call with the new patch series, but it wasn't enough.
In order to revert the effect, all the fp register must be saved
before the call. It would impose unacceptable performance overhead.

Some considerations:

- let fpswa library be called twice.
  Is it safe to call fpswa library twice? If this answer is yes,
  this option can be taken.
  However I'm not sure. the specification[1] doesn't tell much.
  Looking at the linux trap handler, might it be sufficent
  for fpswa to return error > 0 on the second call?

  [1] "Itanium Processor floating-point software assistance and 
       floating-point exception handling."

- Ignore this issue.
  Are there any applications which depend on SIGFPE process signal?
  If no, we might be able to ignore this case.
  On native Linux, SIGPFE is delivered to the process when fpswa
  returns status > 0.
  If there is no application to use SIGPFE to recover its computation,
  we might be able to ignore this issue (until an unfortunate application
  developers complains).

- save the result of fpswa call in xen VMM and return the value
  when fpswa hypercall is issued assuming the guest kernel is none
  preemptive. This is only for PV domain.
  The first thing which comes into my mind is that the guest kernel might
  be preemptive.
  The previous implementation (before my patch) assumes that
  the PV guest kernel is none preemptive, and it calls fpswa library call
  right after the fp fault/trap.
  So it saves the result of fpswa call in Xen VMM and returned
  the return values.
  The Linux fp fault/trap handler assumes not to be preempted between
  fault/trap occurrence and fpswa library call because it uses
  processor's f2-f5, f12-f127.
  As for HVM domain case, guest firmware uses its own fpswa library,
  the call isn't hooked to Xen VMM. So this isn't an option for HVM
  domain.

- abandon to handle fp trap/fault in Xen VMM.
  Always inject the fp trap/fault into a guest without calling
  fpswa library in Xen VMM. This should work and the implementation
  would become simple. But how about performance?

thanks,
-- 
yamahata

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

<Prev in Thread] Current Thread [Next in Thread>