From patchwork Wed Jul 13 13:20:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Suthikulpanit, Suravee" X-Patchwork-Id: 71935 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp1078722qga; Wed, 13 Jul 2016 09:00:27 -0700 (PDT) X-Received: by 10.98.2.208 with SMTP id 199mr4678086pfc.80.1468425623583; Wed, 13 Jul 2016 09:00:23 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k69si1939689pfa.207.2016.07.13.09.00.21; Wed, 13 Jul 2016 09:00:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751599AbcGMP7Q (ORCPT + 30 others); Wed, 13 Jul 2016 11:59:16 -0400 Received: from mail-sn1nam01on0066.outbound.protection.outlook.com ([104.47.32.66]:16310 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750990AbcGMP7M (ORCPT ); Wed, 13 Jul 2016 11:59:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=iCjMO+xtlnE4027ZTUKhrbxVGsYQn8cJgZUptS3+gDI=; b=M8HHlIxdRLBa4Y3g2ozGfY5LhHmv3parjTZDEFtgkMKaOWBlcAabtMgkGEXlyDczHglNH4ajRypf5qApC9aHHyEMvUm8ngn0xYSWItLeMRj859E/MJiQqdR4iaNEcibYuxHIzQayzPV9xE/4OwT6znvauhzu4HOf14kN0lrVZCE= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Suravee.Suthikulpanit@amd.com; Received: from localhost.localdomain (114.109.128.54) by SN1PR12MB0445.namprd12.prod.outlook.com (10.162.105.139) with Microsoft SMTP Server (TLS) id 15.1.534.14; Wed, 13 Jul 2016 13:21:52 +0000 From: Suravee Suthikulpanit To: , , , CC: , , , Suravee Suthikulpanit Subject: [PART2 PATCH v4 11/11] svm: Implements update_pi_irte hook to setup posted interrupt Date: Wed, 13 Jul 2016 08:20:32 -0500 Message-ID: <1468416032-7692-12-git-send-email-suravee.suthikulpanit@amd.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1468416032-7692-1-git-send-email-suravee.suthikulpanit@amd.com> References: <1468416032-7692-1-git-send-email-suravee.suthikulpanit@amd.com> MIME-Version: 1.0 X-Originating-IP: [114.109.128.54] X-ClientProxiedBy: SIXPR04CA0024.apcprd04.prod.outlook.com (10.162.171.14) To SN1PR12MB0445.namprd12.prod.outlook.com (10.162.105.139) X-MS-Office365-Filtering-Correlation-Id: c22987ef-2864-4910-5177-08d3ab20a90a X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0445; 2:GbMOa4lpzzcIWRi4K3LdxluQJHoJ0rP1JTqbx7C2lyLhgP0hbwztEdjBuqhHeCpn3chTul58MI211TsSwBZQp8G6Zc3wjA9fAV31KzUR7IxinAGyObfaNx1cJrIa8GFzWy5AwHxrbh+h3HLeIYxeKCG5Bd8JXubDNMpw9Pm0q21sRTSCswHXV1DempttWepM; 3:NTzViFK1a77TjOZFU+i+xDTtWLGsFOt0vd4YwFLwdMakMh8Ds/hiDFUzrISNGdQzUvtETFk0LOEKdeBzyUX1zQSQmDwPf+rZv9eqvPU1s7Gtj7sfZm33gCgiw8+AnWTd; 25:guLIG6+48NBvwSPZ6srHDbVWGrZIWnTd+KKLUzjIojMVyicK6TDT/kj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gUrJ5ycwdQx9AekRPTcFmMbKX5EJkMklO5ZH+3P8sbnVaHWe7wq8uTBl8bK5XzAInW5JghkvEDcjeiI8JDrWM68Ceqslh4SP0PyDXiOpVNGVNEtgO6MaEym2PEdT; 4:2IGToaWrOLb/xLEA3xziP+3DEdVVoQsEuFoc4eAdG4Vft0vkNLCoW2elq8q0HYM0zKkNpK4oOhWOhxRt/pgSxytpJ6SaKNMkEQgqcko2BeaQlt3ulc1b/3kVW2Q0MaAsEtdG9B9TGBEDYE3Rt6Xfrxktof8S9/7gvYbHHNEQIWMkmOao83NKldRCxq3Vjh6i8+IM5ALLVNL///5xVc7GDHEQsryMQEfVsvA+t9kPePQR3vKzfzUaTnrOHfetf2FIsi4HJxDV89FWIpZniHcOBiS5k62aGGsn4/uuDWwma3NJboGf/3NKF+R/pqWTAtMVs/vbpK6gqvAtJqvjF5Swo4hgRdfS7vTJLf1ceE0mu5hZziTjQQdl0K4hqRoFvUCjN7fXUqTTkBalxRvo17BFDsPM7gxBVKRiFufkPW60f5k= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026); SRVR:SN1PR12MB0445; BCL:0; PCL:0; RULEID:; SRVR:SN1PR12MB0445; X-Forefront-PRVS: 000227DA0C X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(7916002)(189002)(199003)(229853001)(101416001)(77096005)(8676002)(6116002)(2950100001)(42186005)(586003)(81156014)(81166006)(2201001)(3846002)(50986999)(4326007)(76176999)(50466002)(36756003)(15650500001)(5003940100001)(68736007)(105586002)(305945005)(47776003)(66066001)(86362001)(7846002)(50226002)(2906002)(48376002)(92566002)(106356001)(19580405001)(7736002)(33646002)(97736004)(189998001)(5001770100001)(19580395003); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR12MB0445; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR12MB0445; 23:KvMSDqdjsaYz59uvcglCN8FWdxx+WtVBWn35SGTme?= =?us-ascii?Q?eoiNmZUPN4+LUMDvlzGToV4qnqP8fKFQf1cuh6xeEVkBlty1FIhM9CDd5PLW?= =?us-ascii?Q?Jo/Qixwct8Uo6ohKu8Ntk9yb4y0hnpqwA17yToAGf2xKAlm1UHkdWuPpOPxv?= =?us-ascii?Q?PeSgDU3SxnK9Mnwxg25noy7RkA8F9xyzdTRqQvXnEmVNWx+pnSnbGLqNh5wX?= =?us-ascii?Q?ZHP6zRz1s+0dxDDxGfW5OoOLuOZJflnw0hS6Q8TbNvP3r/Dsvz6zy3MLMd2Y?= =?us-ascii?Q?ynpVcJquXaNeb52HzlJBw0Shv3OlYXdgYZglpp4QA85ruo6gbz4Yp1vRgtAz?= =?us-ascii?Q?fO0t6V+vg1utsn6osa35Cp2PNekZUxxJgpJY8UFeLeYxpEVakXs4nw5tqLjL?= =?us-ascii?Q?7zAvW9VIVe9QID99aGjCOHFGVQPE7mFjeCgEYZ4jOEi49TyCRqfMYBzTew4y?= =?us-ascii?Q?U6uckUSJf5SyaA2auAA5xfDU+kQHCH61V1YyBNbPJvkXjCvM5RwNh07nxyU+?= =?us-ascii?Q?PUqvazkeMYAJCFj5WkVUOHzMbQu4DBimwuAWmxuWvGjAosBvy9jmmD9eoEfR?= =?us-ascii?Q?H9/f6kW1ofKrmmhVefhRmTCmqfINCis4CbhjXdvM+10YhsnZJI4nV4FK7QNu?= =?us-ascii?Q?ovvztj3lHewwoDFKxiJ2AtTXK3ZR5Vzp4e/5zLFeq3yBNXW8Zo+F2FTxllgF?= =?us-ascii?Q?/tc1qDK3OMg+nJAlqBl4+UPXgJ9C4k0m0hNmp/sjaHX+ij96t1i1jfyjTGMf?= =?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8jg1nKOmPKOtznMkL5cU4o205IGSWkHjfueooyhFUqJgJHXeMUzIk=; 7:Hx32/yNdgoiP7Idrh+7n27EduObkM83O9dCLgA+QNtdSruJLBGsSHZS3Sf7e3D/SlRja9AdkQnmMtI26maoKHkS4mIGaH/5vngaVU8dZk05wMXRc+9NUYjxotfV5kGzQZPcMNpz0AySpB7rwBF8kmsw+bitYpLYZYkCgI+tj/8Dhb/6KS8Hsnmx7iKqBP+mzxNEb7jJ8RZDkWO0UOu371XteSiYx8Re81duYx9rQ3Q99kpNi3K7lyWFVuKFKNX53 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0445; 20:NpFUSC/ruwztUw8qVFox1hMg58fXLwD+zhKzDTfDlHRCgK3uP2CyohwMLkmTkuwaEF0tiNf0GErNoY6EEL5GB6faORRfRoT+TswJ9/ETkzDxowIBPn05cUQwaVSUwKL5leynkzifDLelpzfY54N04UiHNB4Ggz6pxB66wD0BsM958NdKZZV75Ci2g2F+R3uNyvCI1fbTlBQipxc/0CXHfgRify5e53/ixGp56LAD12hwuRFCQjzqBJfwTfCyXzRk X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2016 13:21:52.7518 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR12MB0445 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Suravee Suthikulpanit This patch implements update_pi_irte function hook to allow SVM communicate to IOMMU driver regarding how to set up IRTE for handling posted interrupt. In case AVIC is enabled, during vcpu_load/unload, SVM needs to update IOMMU IRTE with appropriate host physical APIC ID. Also, when vcpu_blocking/unblocking, SVM needs to update the is-running bit in the IOMMU IRTE. Both are achieved via calling amd_iommu_update_ga(). However, if GA mode is not enabled for the pass-through device, IOMMU driver will simply just return when calling amd_iommu_update_ga. Signed-off-by: Suravee Suthikulpanit --- arch/x86/kvm/svm.c | 137 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 135 insertions(+), 2 deletions(-) -- 1.9.1 diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 1d9f2f6..28f4efe 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -43,6 +43,7 @@ #include #include #include +#include #include #include "trace.h" @@ -1349,6 +1350,13 @@ static void avic_vm_destroy(struct kvm *kvm) spin_unlock_irqrestore(&svm_vm_data_hash_lock, flags); } +static atomic_t avic_vm_id_gen = ATOMIC_INIT(0); + +static inline u32 avic_get_next_vm_id(void) +{ + return atomic_inc_return(&avic_vm_id_gen); +} + static int avic_vm_init(struct kvm *kvm) { unsigned long flags; @@ -1373,6 +1381,8 @@ static int avic_vm_init(struct kvm *kvm) if (!l_page) goto free_avic; + vm_data->avic_vm_id = avic_get_next_vm_id(); + vm_data->avic_logical_id_table_page = l_page; clear_page(page_address(l_page)); @@ -1387,6 +1397,18 @@ free_avic: return err; } +static inline int +avic_update_iommu(struct kvm_vcpu *vcpu, int cpu, phys_addr_t pa, bool r) +{ + struct kvm_arch *vm_data = &vcpu->kvm->arch; + + if (!kvm_arch_has_assigned_device(vcpu->kvm)) + return 0; + + return amd_iommu_update_ga(vcpu->vcpu_id, cpu, vm_data->avic_vm_id, + (pa & AVIC_HPA_MASK), r); +} + /** * This function is called during VCPU halt/unhalt. */ @@ -1409,9 +1431,16 @@ static void avic_set_running(struct kvm_vcpu *vcpu, bool is_run) WARN_ON(is_run == !!(entry & AVIC_PHYSICAL_ID_ENTRY_IS_RUNNING_MASK)); entry &= ~AVIC_PHYSICAL_ID_ENTRY_IS_RUNNING_MASK; - if (is_run) + if (is_run) { entry |= AVIC_PHYSICAL_ID_ENTRY_IS_RUNNING_MASK; - WRITE_ONCE(*(svm->avic_physical_id_cache), entry); + WRITE_ONCE(*(svm->avic_physical_id_cache), entry); + avic_update_iommu(vcpu, h_physical_id, + page_to_phys(svm->avic_backing_page), 1); + } else { + avic_update_iommu(vcpu, h_physical_id, + page_to_phys(svm->avic_backing_page), 0); + WRITE_ONCE(*(svm->avic_physical_id_cache), entry); + } } static void avic_vcpu_load(struct kvm_vcpu *vcpu, int cpu) @@ -1438,6 +1467,9 @@ static void avic_vcpu_load(struct kvm_vcpu *vcpu, int cpu) entry |= AVIC_PHYSICAL_ID_ENTRY_IS_RUNNING_MASK; WRITE_ONCE(*(svm->avic_physical_id_cache), entry); + avic_update_iommu(vcpu, h_physical_id, + page_to_phys(svm->avic_backing_page), + svm->avic_is_running); } static void avic_vcpu_put(struct kvm_vcpu *vcpu) @@ -1449,6 +1481,10 @@ static void avic_vcpu_put(struct kvm_vcpu *vcpu) return; entry = READ_ONCE(*(svm->avic_physical_id_cache)); + if (entry & AVIC_PHYSICAL_ID_ENTRY_IS_RUNNING_MASK) + avic_update_iommu(vcpu, -1, + page_to_phys(svm->avic_backing_page), 0); + entry &= ~AVIC_PHYSICAL_ID_ENTRY_IS_RUNNING_MASK; WRITE_ONCE(*(svm->avic_physical_id_cache), entry); } @@ -4310,6 +4346,102 @@ static void svm_deliver_avic_intr(struct kvm_vcpu *vcpu, int vec) kvm_vcpu_wake_up(vcpu); } +/* + * svm_update_pi_irte - set IRTE for Posted-Interrupts + * + * @kvm: kvm + * @host_irq: host irq of the interrupt + * @guest_irq: gsi of the interrupt + * @set: set or unset PI + * returns 0 on success, < 0 on failure + */ +static int svm_update_pi_irte(struct kvm *kvm, unsigned int host_irq, + uint32_t guest_irq, bool set) +{ + struct kvm_kernel_irq_routing_entry *e; + struct kvm_irq_routing_table *irq_rt; + struct kvm_lapic_irq irq; + struct kvm_vcpu *vcpu = NULL; + struct vcpu_data vcpu_info; + int idx, ret = -EINVAL; + struct vcpu_svm *svm; + struct amd_iommu_pi_data pi_data; + + if (!kvm_arch_has_assigned_device(kvm) || + !irq_remapping_cap(IRQ_POSTING_CAP)) + return 0; + + pr_debug("SVM: %s: host_irq=%#x, guest_irq=%#x, set=%#x\n", + __func__, host_irq, guest_irq, set); + + idx = srcu_read_lock(&kvm->irq_srcu); + irq_rt = srcu_dereference(kvm->irq_routing, &kvm->irq_srcu); + WARN_ON(guest_irq >= irq_rt->nr_rt_entries); + + hlist_for_each_entry(e, &irq_rt->map[guest_irq], link) { + if (e->type != KVM_IRQ_ROUTING_MSI) + continue; + + /** + * Note: + * The HW cannot support posting multicast/broadcast + * interrupts to a vCPU. So, we still use interrupt + * remapping for these kind of interrupts. + * + * For lowest-priority interrupts, we only support + * those with single CPU as the destination, e.g. user + * configures the interrupts via /proc/irq or uses + * irqbalance to make the interrupts single-CPU. + */ + kvm_set_msi_irq(e, &irq); + if (kvm_intr_is_single_vcpu(kvm, &irq, &vcpu)) { + svm = to_svm(vcpu); + vcpu_info.pi_desc_addr = page_to_phys(svm->avic_backing_page); + vcpu_info.vector = irq.vector; + + trace_kvm_pi_irte_update(vcpu->vcpu_id, host_irq, e->gsi, + vcpu_info.vector, + vcpu_info.pi_desc_addr, set); + + pi_data.vcpu_id = vcpu->vcpu_id; + + pr_debug("SVM: %s: use GA mode for irq %u\n", __func__, + irq.vector); + } else { + set = false; + + pr_debug("SVM: %s: use legacy intr remap mode for irq %u\n", + __func__, irq.vector); + } + + /** + * Note: + * When AVIC is disabled, we fall-back to setup + * IRTE w/ legacy mode + */ + if (set && kvm_vcpu_apicv_active(&svm->vcpu)) { + /* Enable GA mode in IRTE */ + pi_data.vm_id = kvm->arch.avic_vm_id; + pi_data.vcpu_data = &vcpu_info; + ret = irq_set_vcpu_affinity(host_irq, &pi_data); + } else { + /* Use legacy mode in IRTE */ + pi_data.vcpu_data = NULL; + ret = irq_set_vcpu_affinity(host_irq, &pi_data); + } + + if (ret < 0) { + pr_err("%s: failed to update PI IRTE\n", __func__); + goto out; + } + } + + ret = 0; +out: + srcu_read_unlock(&kvm->irq_srcu, idx); + return ret; +} + static int svm_nmi_allowed(struct kvm_vcpu *vcpu) { struct vcpu_svm *svm = to_svm(vcpu); @@ -5136,6 +5268,7 @@ static struct kvm_x86_ops svm_x86_ops = { .pmu_ops = &amd_pmu_ops, .deliver_posted_interrupt = svm_deliver_avic_intr, + .update_pi_irte = svm_update_pi_irte, }; static int __init svm_init(void)