From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Hildenbrand Subject: [PATCH v3 00/24] pic/ioapic/irqchip cleanups + minor fixes Date: Fri, 7 Apr 2017 10:50:17 +0200 Message-ID: <20170407085041.5257-1-david@redhat.com> Cc: Paolo Bonzini , rkrcmar@redhat.com, Peter Xu , david@redhat.com To: kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:49614 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753281AbdDGIus (ORCPT ); Fri, 7 Apr 2017 04:50:48 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9F7928FCE2 for ; Fri, 7 Apr 2017 08:50:47 +0000 (UTC) Sender: kvm-owner@vger.kernel.org List-ID: My attempt to further cleanup pic/ioapic checks using irqchip_mode + other cleanups in that area. The goal is to only check against irqchip_mode and not to rely on vpic/vioapic variables anymore to test for existence of pic/ioapic. This will avoid any possible races when creating the kernel irqchip fails. v2 -> v3: - Added memory barriers as requested by Paolo to patch 2-4 David Hildenbrand (24): KVM: x86: race between KVM_SET_GSI_ROUTING and KVM_CREATE_IRQCHIP KVM: x86: new irqchip mode KVM_IRQCHIP_INIT_IN_PROGRESS KVM: x86: check against irqchip_mode in kvm_set_routing_entry() KVM: x86: check against irqchip_mode in pic_in_kernel() KVM: x86: check against irqchip_mode in ioapic_in_kernel() KVM: x86: get rid of pic_irqchip() KVM: x86: get rid of ioapic_irqchip() KVM: x86: use ioapic_in_kernel() to check for ioapic existence KVM: x86: remove duplicate checks for ioapic KVM: x86: convert kvm_(set|get)_ioapic() into void KVM: x86: don't take kvm->irq_lock when creating IRQCHIP KVM: x86: push usage of slots_lock down KVM: x86: KVM_IRQCHIP_PIC_MASTER only has 8 pins KVM: x86: remove all-vcpu request from kvm_ioapic_init() KVM: x86: directly call kvm_make_scan_ioapic_request() in ioapic.c KVM: x86: rename kvm_vcpu_request_scan_ioapic() KVM: x86: drop goto label in kvm_set_routing_entry() KVM: x86: cleanup return handling in setup_routing_entry() KVM: x86: simplify pic_unlock() KVM: x86: make kvm_pic_reset() static KVM: x86: drop picdev_in_range() KVM: x86: set data directly in picdev_read() KVM: x86: simplify pic_ioport_read() KVM: x86: use irqchip_kernel() to check for pic+ioapic arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/i8259.c | 72 ++++++++++++++++------------------------- arch/x86/kvm/ioapic.c | 28 ++++++---------- arch/x86/kvm/ioapic.h | 16 ++++----- arch/x86/kvm/irq.c | 2 +- arch/x86/kvm/irq.h | 32 +++++++++--------- arch/x86/kvm/irq_comm.c | 45 ++++++++++++-------------- arch/x86/kvm/x86.c | 45 +++++++++++++------------- include/linux/kvm_host.h | 4 +-- virt/kvm/eventfd.c | 4 +-- virt/kvm/irqchip.c | 11 +++---- virt/kvm/kvm_main.c | 3 ++ 12 files changed, 117 insertions(+), 146 deletions(-) -- 2.9.3