Port-xen archive

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

use of MI "pcu" code for x86 FPU, allocate FPU context dynamically

Hi -

The x86 FPU/NPX code isn't quite fit for the needs of modern processors.
There is no support for AVX and later multimedia/vector extensions yet,
and it is impossible to use the FPU in the kernel, which would be
useful for IPSEC (the AES instructions, SHA is announced).

This could certainly be fixed within the MD i386/amd64 code (there is
not much shared currently), adding even mode MD code.
I've tried to adopt the "pcu" framework instead which is already used on
arm, mips and ppc. This doesn't solve the problems mentioned above
automatically, but it reduces the amount of MD code massively.
The first patch (x86_use_pcu) implements this. It is well tested
for native code, on amd64 with and without xen, and on i386. There
might be flaws in emulation code, I just didn't test this yet.

The other patch (amd64_dynfpustate) moves the FPU state from the PCB
into a dynamically allocated object. This would allow to grow
the save area as needed by modern CPUs, without growing the PCB
for everyone.
This is strictly a POC - it builds only in amd64 and it contains some
hacks which break binary emulation. Nevertheless it works, and
didn't any harm to my test system yet.
Obviously, there might be performance implications, and possibly
problems on memory shortage.

As said, this doesn't add new features yet, but it would make
work on features much easier.
It would be nice if people with some understanding of the matter
could have a look at this and comment.

The patches (~50kB) can be downloaded from:

best regards

Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt

Das Forschungszentrum oeffnet seine Tueren am Sonntag, 29. September, von 10:00 
bis 17:00 Uhr: http://www.tagderneugier.de

Home | Main Index | Thread Index | Old Index