Kernel KVM-PPC virtualization development
 help / color / mirror / Atom feed
* [PATCH 0/6] KVM: PPC: FPU/Altivec/VSX bringup
@ 2010-01-15 13:49 Alexander Graf
  2010-01-15 13:49 ` [PATCH 2/6] KVM: PPC: Add helper functions to call real mode loaders Alexander Graf
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Alexander Graf @ 2010-01-15 13:49 UTC (permalink / raw)
  To: kvm-ppc; +Cc: KVM General

Right now the code to use external providers (FPU/Altivec/FSX) is rather hacky.

We just set the respective feature bit in the guest MSR when the guest requests
it and declare it as good. Now, Linux wants to mess around there too, so
whenever a process switch occurs, it saves the external provider state and
reloads the current thread ones'.

Unfortunately, we didn't tell Linux about our guest state. So Linux doesn't even
get the chance to swap any of our registers around which means it ends up
restoring registers from random processes - and we lose all state.

This patchset makes at least FPU and Altivec work. I don't have a VSX machine to
test that extension on. While at it, it also fixes some issues I've stumbled
across during debug.

The basic ideas on how this should work come from Benjamin Herrenschmidt.
Thanks a lot for giving input on this one (and all the other times)!

Alexander Graf (6):
  KVM: PPC: Export __giveup_vsx
  KVM: PPC: Add helper functions to call real mode loaders
  KVM: PPC: Add support for FPU/Altivec/VSX
  KVM: PPC: Fix initial GPR settings
  KVM: PPC: Keep SRR1 flags around in shadow_msr
  KVM: PPC: Move Shadow MSR calculation to function

 arch/powerpc/include/asm/kvm_book3s.h   |    4 +-
 arch/powerpc/include/asm/kvm_host.h     |   15 ++-
 arch/powerpc/include/asm/kvm_ppc.h      |   10 +-
 arch/powerpc/kernel/asm-offsets.c       |    1 +
 arch/powerpc/kernel/ppc_ksyms.c         |    1 +
 arch/powerpc/kvm/book3s.c               |  223 +++++++++++++++++++++++++++++--
 arch/powerpc/kvm/book3s_64_exports.c    |    7 +
 arch/powerpc/kvm/book3s_64_interrupts.S |    2 +-
 arch/powerpc/kvm/book3s_64_rmhandlers.S |   34 +++++
 9 files changed, 280 insertions(+), 17 deletions(-)


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-01-17 12:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-15 13:49 [PATCH 0/6] KVM: PPC: FPU/Altivec/VSX bringup Alexander Graf
2010-01-15 13:49 ` [PATCH 2/6] KVM: PPC: Add helper functions to call real mode loaders Alexander Graf
2010-01-15 13:49 ` [PATCH 5/6] KVM: PPC: Keep SRR1 flags around in shadow_msr Alexander Graf
     [not found] ` <1263563354-11075-1-git-send-email-agraf-l3A5Bk7waGM@public.gmane.org>
2010-01-15 13:49   ` [PATCH 1/6] KVM: PPC: Export __giveup_vsx Alexander Graf
2010-01-15 13:49   ` [PATCH 3/6] KVM: PPC: Add support for FPU/Altivec/VSX Alexander Graf
2010-01-15 13:49   ` [PATCH 4/6] KVM: PPC: Fix initial GPR settings Alexander Graf
2010-01-15 13:49   ` [PATCH 6/6] KVM: PPC: Move Shadow MSR calculation to function Alexander Graf
2010-01-17 12:33   ` [PATCH 0/6] KVM: PPC: FPU/Altivec/VSX bringup Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox