Re: freezes when not emulating CPU

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


Whoops, sent this to just Stas the first time ... sorry, Stas!

On Mon, Sep 14, 2009 at 11:26 AM, Stas Sergeev <stsp@xxxxxxxx> wrote:
> Hello.
> Bart Oldeman wrote:

>> The fpu save/restore operations aren't cheap, so perhaps one could
>> only use them around the sound code instead of for every vm86 call.
>> Though that could be messy.
> Indeed - so what was the problem with fninit/ldmxcsr then?
> Looks like it would load only the control/status word, so
> that might not be as expensive as the full reload?
> Also, I think fxrstor doesn't wait for completion, so
> the careful implementation may not be too expensive.
> There are also some tricks possible, like, for example, set
> FPU to something that will SIGFPE on any FP, and initialize
> it properly in a signal handler, but I guess this would
> be an overkill.

Well, I believe that's essentially what Intel suggests OSes do on
task-switch -- leave some flag set/cleared that will cause the next FP
operation to give an exception so that it can switch the FP registers
at that time. Whether or not this would be a good idea for DOSEMU
depends on how often you do a vm86 call vs how often the FP registers
are needed, and on how expensive it is to actually enter a state from
which the next FP access will cause a signal compared to just doing
the reload each time.
To unsubscribe from this list: send the line "unsubscribe linux-msdos" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at

[Index of Archives]     [Linux Console]     [Linux Audio]     [Linux for Hams]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite Camping]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Samba]     [Linux Media]     [Fedora Users]

  Powered by Linux