Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752735AbbFKLBd (ORCPT ); Thu, 11 Jun 2015 07:01:33 -0400 Received: from mga11.intel.com ([192.55.52.93]:24448 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751526AbbFKLB0 (ORCPT ); Thu, 11 Jun 2015 07:01:26 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,594,1427785200"; d="scan'208";a="741394063" From: Feng Wu To: kvm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: pbonzini@redhat.com, mtosatti@redhat.com, alex.williamson@redhat.com, eric.auger@linaro.org, feng.wu@intel.com Subject: [v4 00/16] Add VT-d Posted-Interrupts support Date: Thu, 11 Jun 2015 18:51:36 +0800 Message-Id: <1434019912-15423-1-git-send-email-feng.wu@intel.com> X-Mailer: git-send-email 2.1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3516 Lines: 75 VT-d Posted-Interrupts is an enhancement to CPU side Posted-Interrupt. With VT-d Posted-Interrupts enabled, external interrupts from direct-assigned devices can be delivered to guests without VMM intervention when guest is running in non-root mode. You can find the VT-d Posted-Interrtups Spec. in the following URL: http://www.intel.com/content/www/us/en/intelligent-systems/intel-technology/vt-directed-io-spec.html This series was part of http://thread.gmane.org/gmane.linux.kernel.iommu/7708. To make things clear, send out IOMMU part here. This patch-set is based on the lastest x86/apic branch of tip tree. Divide the whole series which contain multiple components into three parts: - Prerequisite changes to irq subsystem (already merged in tip/x86/apic) - IOMMU part (about to be merged in merged in tip/x86/apic), here is the latest version: https://lkml.org/lkml/2015/6/9/22 - KVM and VFIO parts (this series) Patch 8, 9, and 10 are from Eric Auger, there are some common VFIO APIs defined in them. I integrate them in this series and use the APIs in my patches. v4: * For lowest-priority interrupt, only support single-CPU destination interrupts at the current stage, more common lowest priority support will be added later. * Accoring to Marcelo's suggestion, when vCPU is blocked, we handle the posted-interrupts in the HLT emulation path. * Some small changes (coding style, typo, add some code comments) Eric Auger (3): KVM: kvm-vfio: User API for IRQ forwarding VFIO: external user API for interaction KVM: kvm-vfio: wrappers to VFIO external API device helpers Feng Wu (13): KVM: Extend struct pi_desc for VT-d Posted-Interrupts KVM: Add some helper functions for Posted-Interrupts KVM: Define a new interface kvm_intr_is_single_vcpu() KVM: Get Posted-Interrupts descriptor address from struct kvm_vcpu KVM: Add interfaces to control PI outside vmx KVM: Make struct kvm_irq_routing_table accessible KVM: make kvm_set_msi_irq() public KVM: kvm-vfio: User API for VT-d Posted-Interrupts KVM: kvm-vfio: implement the VFIO skeleton for VT-d Posted-Interrupts KVM: x86: kvm-vfio: VT-d posted-interrupts setup KVM: Update Posted-Interrupts Descriptor when vCPU is preempted KVM: Update Posted-Interrupts Descriptor when vCPU is blocked KVM: Warn if 'SN' is set during posting interrupts by software Documentation/virtual/kvm/devices/vfio.txt | 43 ++++- arch/x86/include/asm/kvm_host.h | 16 ++ arch/x86/kvm/Makefile | 3 +- arch/x86/kvm/irq_comm.c | 28 ++- arch/x86/kvm/kvm_vfio_x86.c | 85 +++++++++ arch/x86/kvm/vmx.c | 278 ++++++++++++++++++++++++++++- arch/x86/kvm/x86.c | 42 +++-- drivers/vfio/vfio.c | 24 +++ include/linux/kvm_host.h | 40 +++++ include/linux/vfio.h | 3 + include/uapi/linux/kvm.h | 14 ++ virt/kvm/irqchip.c | 11 -- virt/kvm/kvm_main.c | 3 + virt/kvm/vfio.c | 200 +++++++++++++++++++++ 14 files changed, 758 insertions(+), 32 deletions(-) create mode 100644 arch/x86/kvm/kvm_vfio_x86.c -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/