kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] KVM: cleanups around memory barriers and irqchip_in_kernel
@ 2015-07-29 13:28 Paolo Bonzini
  2015-07-29 13:28 ` [PATCH 1/4] KVM: x86: remove unnecessary memory barriers for shared MSRs Paolo Bonzini
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Paolo Bonzini @ 2015-07-29 13:28 UTC (permalink / raw)
  To: linux-kernel, kvm; +Cc: mtosatti, srutherford, rkrcmar

I took a look at memory barriers in KVM and there are a few that are
unjustified, underdocumented or wrong.  While looking at irqchip_in_kernel
uses (to understand the memory barriers) I also noticed one case where it
is unnecessary to check for irqchip_in_kernel (patch 3).

Most of the users of irqchip_in_kernel do not need the barrier and they
could check vcpu->arch.apic instead of vcpu->kvm->arch.pic.  I plan to
change that by introducing lapic_in_kernel(struct kvm_vcpu *), after
the split irqchip patches are in which will make irqchip_in_kernel more
expensive.

Paolo

Paolo Bonzini (4):
  KVM: x86: remove unnecessary memory barriers for shared MSRs
  KVM: document memory barriers for kvm->vcpus/kvm->online_vcpus
  KVM: i8254: remove unnecessary irqchip_in_kernel check
  KVM: x86: clean/fix memory barriers in irqchip_in_kernel

 arch/x86/kvm/i8254.c     |  2 +-
 arch/x86/kvm/i8259.c     | 15 +++++----------
 arch/x86/kvm/irq.h       |  8 ++++----
 arch/x86/kvm/x86.c       | 21 +++++++--------------
 include/linux/kvm_host.h |  4 ++++
 virt/kvm/kvm_main.c      |  2 ++
 6 files changed, 23 insertions(+), 29 deletions(-)

-- 
1.8.3.1

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

end of thread, other threads:[~2015-07-30 14:05 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-29 13:28 [PATCH 0/4] KVM: cleanups around memory barriers and irqchip_in_kernel Paolo Bonzini
2015-07-29 13:28 ` [PATCH 1/4] KVM: x86: remove unnecessary memory barriers for shared MSRs Paolo Bonzini
2015-07-29 13:28 ` [PATCH 2/4] KVM: document memory barriers for kvm->vcpus/kvm->online_vcpus Paolo Bonzini
2015-07-30 11:40   ` Christian Borntraeger
2015-07-30 12:46     ` Paolo Bonzini
2015-07-30 13:57       ` Christian Borntraeger
2015-07-30 14:02         ` Paolo Bonzini
2015-07-30 14:05           ` Christian Borntraeger
2015-07-29 13:28 ` [PATCH 3/4] KVM: i8254: remove unnecessary irqchip_in_kernel check Paolo Bonzini
2015-07-30  4:36   ` Steve Rutherford
2015-07-30  7:25     ` Paolo Bonzini
2015-07-29 13:28 ` [PATCH 4/4] KVM: x86: clean/fix memory barriers in irqchip_in_kernel Paolo Bonzini
2015-07-30  3:32   ` Steve Rutherford
2015-07-30  7:26     ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).