public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] KVM: x86: get CPL from SS.DPL
@ 2014-05-15 16:51 Paolo Bonzini
  2014-05-15 16:51 ` [PATCH v2 1/4] KVM: x86: use new CS.RPL as CPL during task switch Paolo Bonzini
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Paolo Bonzini @ 2014-05-15 16:51 UTC (permalink / raw)
  To: linux-kernel; +Cc: jan.kiszka, kvm, gleb, avi.kivity

Another day, another CPL patch...

It turns out that the simple approach of getting CPL from SS.DPL
broke x86/taskswitch2.flat.  To fix that, already "imagine" that the
CPL is CS.RPL, or 3 for VM86 tasks, while loading segment descriptors
during task switches.  This removes the hack where task switches call
kvm_set_rflags to override the VM flag (patch 2).

While at it, add a new privilege test during task switches that is
missing.

Patch 4 is the same as before.

Paolo Bonzini (4):
  KVM: x86: use new CS.RPL as CPL during task switch
  KVM: x86: drop set_rflags callback
  KVM: x86: check CS.DPL against RPL during task switch
  KVM: x86: get CPL from SS.DPL

 arch/x86/include/asm/kvm_emulate.h |  1 -
 arch/x86/include/asm/kvm_host.h    |  1 -
 arch/x86/kvm/emulate.c             | 63 ++++++++++++++++++++++----------------
 arch/x86/kvm/svm.c                 | 35 +++++++++------------
 arch/x86/kvm/vmx.c                 | 24 +++------------
 arch/x86/kvm/x86.c                 |  6 ----
 6 files changed, 54 insertions(+), 76 deletions(-)

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 10+ messages in thread
[parent not found: <CALeycy9ZW5cwByGfdnkrm6r30Zy18aAKt3-T6fMJUMUNuHd80g@mail.gmail.com>]

end of thread, other threads:[~2014-05-26 17:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-15 16:51 [PATCH v2 0/4] KVM: x86: get CPL from SS.DPL Paolo Bonzini
2014-05-15 16:51 ` [PATCH v2 1/4] KVM: x86: use new CS.RPL as CPL during task switch Paolo Bonzini
2014-05-16 22:19   ` Paolo Bonzini
2014-05-26 16:55   ` Marcelo Tosatti
2014-05-15 16:51 ` [PATCH v2 2/4] KVM: x86: drop set_rflags callback Paolo Bonzini
2014-05-15 16:51 ` [PATCH v2 3/4] KVM: x86: check CS.DPL against RPL during task switch Paolo Bonzini
2014-05-26 17:01   ` Marcelo Tosatti
2014-05-15 16:51 ` [PATCH v2 4/4] KVM: x86: get CPL from SS.DPL Paolo Bonzini
2014-05-26 16:10   ` Marcelo Tosatti
     [not found] <CALeycy9ZW5cwByGfdnkrm6r30Zy18aAKt3-T6fMJUMUNuHd80g@mail.gmail.com>
2014-05-26  5:09 ` [PATCH v2 1/4] KVM: x86: use new CS.RPL as CPL during task switch Wei Huang

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