[PATCH 0/4] KVM: cleanups around memory barriers and irqchip_in_kernel

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

 



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

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux