All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/9] KVM: PPC: Reduce races, fix code
@ 2010-01-08  1:58 ` Alexander Graf
  0 siblings, 0 replies; 44+ messages in thread
From: Alexander Graf @ 2010-01-08  1:58 UTC (permalink / raw)
  To: kvm; +Cc: kvm-ppc, Benjamin Herrenschmidt

We've been a bit lax with how we use fields in the PACA so far. Most of
the time we just overwrote random fields that another interrupt handler
would have used as well.

That is racy.

We also jumped over to real mode from IR=1 using RFI. Unfortunately,
we need 3 operations to do that transitions which need to be fully atomic,
as any interrupt coming in between those instructions can possibly break
us.

That is racy too.

So let's get rid of all the racy code and clean up some pieces along the way.

Alexander Graf (9):
  KVM: PPC: Use accessor functions for GPR access
  KVM: PPC: Add helpers for CR, XER
  KVM: PPC: Use PACA backed shadow vcpu
  KVM: PPC: Implement 'skip instruction' mode
  KVM: PPC: Get rid of unnecessary RFI
  KVM: PPC: Call SLB patching code in interrupt safe manner
  KVM: PPC: Emulate trap SRR1 flags properly
  KVM: PPC: Fix HID5 setting code
  KVM: PPC: Pass program interrupt flags to the guest

 arch/powerpc/include/asm/kvm_asm.h           |    6 +
 arch/powerpc/include/asm/kvm_book3s.h        |    4 +
 arch/powerpc/include/asm/kvm_book3s_64_asm.h |   18 ++
 arch/powerpc/include/asm/kvm_host.h          |    6 +-
 arch/powerpc/include/asm/kvm_ppc.h           |   76 ++++++++-
 arch/powerpc/include/asm/paca.h              |    5 +
 arch/powerpc/include/asm/reg.h               |    4 +
 arch/powerpc/kernel/asm-offsets.c            |   34 ++++-
 arch/powerpc/kvm/44x_emulate.c               |   25 ++--
 arch/powerpc/kvm/44x_tlb.c                   |   20 ++-
 arch/powerpc/kvm/book3s.c                    |   35 +++--
 arch/powerpc/kvm/book3s_64_emulate.c         |   77 +++++----
 arch/powerpc/kvm/book3s_64_exports.c         |    1 +
 arch/powerpc/kvm/book3s_64_interrupts.S      |  242 +++++++++-----------------
 arch/powerpc/kvm/book3s_64_rmhandlers.S      |   85 +++++++---
 arch/powerpc/kvm/book3s_64_slb.S             |  158 +++++++++++-------
 arch/powerpc/kvm/booke.c                     |   27 ++--
 arch/powerpc/kvm/booke_emulate.c             |  107 ++++++------
 arch/powerpc/kvm/e500_emulate.c              |   95 ++++++-----
 arch/powerpc/kvm/e500_tlb.c                  |    4 +-
 arch/powerpc/kvm/emulate.c                   |  112 +++++++------
 arch/powerpc/kvm/powerpc.c                   |   21 ++-
 22 files changed, 672 insertions(+), 490 deletions(-)


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

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

Thread overview: 44+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-08  1:58 [PATCH 0/9] KVM: PPC: Reduce races, fix code Alexander Graf
2010-01-08  1:58 ` Alexander Graf
2010-01-08  1:58 ` [PATCH 2/9] KVM: PPC: Add helpers for CR, XER Alexander Graf
2010-01-08  1:58   ` Alexander Graf
2010-01-08  1:58 ` [PATCH 6/9] KVM: PPC: Call SLB patching code in interrupt safe manner Alexander Graf
2010-01-08  1:58   ` Alexander Graf
2010-01-08  1:58 ` [PATCH 7/9] KVM: PPC: Emulate trap SRR1 flags properly Alexander Graf
2010-01-08  1:58   ` Alexander Graf
2010-01-08 19:29   ` Hollis Blanchard
2010-01-08 19:29     ` Hollis Blanchard
2010-01-11  6:58     ` Liu Yu-B13201
2010-01-11  6:58       ` Liu Yu-B13201
     [not found]       ` <0A1FE637C2C7E148B9573BB60CC630E56C3F11-bKEhWGtIRUJ4Lp7cDGe+DVjVikpgYyvb5NbjCUgZEJk@public.gmane.org>
2010-01-12  0:08         ` Alexander Graf
2010-01-12  0:08           ` Alexander Graf
     [not found]           ` <375F3E96-79CD-4451-B984-7CC896C2FA5A-l3A5Bk7waGM@public.gmane.org>
2010-01-12  9:08             ` Liu Yu-B13201
2010-01-12  9:08               ` Liu Yu-B13201
     [not found]     ` <fb412d761001081129q26d7fdcj9d1a26184127d002-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-01-08 19:32       ` Alexander Graf
2010-01-08 19:32         ` Alexander Graf
     [not found]         ` <1FB2DDB0-F72E-437C-BEC5-8E1AEE5FBCC7-l3A5Bk7waGM@public.gmane.org>
2010-01-08 19:35           ` Hollis Blanchard
2010-01-08 19:35             ` Hollis Blanchard
2010-01-08 19:37             ` Alexander Graf
2010-01-08 19:37               ` Alexander Graf
2010-01-10 12:34               ` Avi Kivity
2010-01-10 12:34                 ` Avi Kivity
     [not found]                 ` <4B49C959.8040900-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-01-10 12:48                   ` Alexander Graf
2010-01-10 12:48                     ` Alexander Graf
2010-01-10 12:58                     ` Avi Kivity
2010-01-10 12:58                       ` Avi Kivity
2010-01-21  8:09       ` Liu Yu-B13201
2010-01-21  8:09         ` Liu Yu-B13201
2010-01-21 12:12         ` Alexander Graf
2010-01-21 12:12           ` Alexander Graf
     [not found] ` <1262915889-11526-1-git-send-email-agraf-l3A5Bk7waGM@public.gmane.org>
2010-01-08  1:58   ` [PATCH 1/9] KVM: PPC: Use accessor functions for GPR access Alexander Graf
2010-01-08  1:58     ` Alexander Graf
2010-01-08  1:58   ` [PATCH 3/9] KVM: PPC: Use PACA backed shadow vcpu Alexander Graf
2010-01-08  1:58     ` Alexander Graf
2010-01-08  1:58   ` [PATCH 4/9] KVM: PPC: Implement 'skip instruction' mode Alexander Graf
2010-01-08  1:58     ` Alexander Graf
2010-01-08  1:58   ` [PATCH 5/9] KVM: PPC: Get rid of unnecessary RFI Alexander Graf
2010-01-08  1:58     ` Alexander Graf
2010-01-08  1:58   ` [PATCH 8/9] KVM: PPC: Fix HID5 setting code Alexander Graf
2010-01-08  1:58     ` Alexander Graf
2010-01-08  1:58   ` [PATCH 9/9] KVM: PPC: Pass program interrupt flags to the guest Alexander Graf
2010-01-08  1:58     ` Alexander Graf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.