From patchwork Tue Aug 23 18:52:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Suthikulpanit, Suravee" X-Patchwork-Id: 74513 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp2246975qga; Tue, 23 Aug 2016 11:57:43 -0700 (PDT) X-Received: by 10.98.129.5 with SMTP id t5mr12164038pfd.162.1471978663190; Tue, 23 Aug 2016 11:57:43 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v12si5077280pfi.276.2016.08.23.11.57.42; Tue, 23 Aug 2016 11:57:43 -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 S1754389AbcHWS5k (ORCPT + 27 others); Tue, 23 Aug 2016 14:57:40 -0400 Received: from mail-cys01nam02on0077.outbound.protection.outlook.com ([104.47.37.77]:42336 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751568AbcHWS5f (ORCPT ); Tue, 23 Aug 2016 14:57:35 -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=QAuMD0ckFyPKGhqM02yb1WUQo692Bbl9DXGFQQCYG8c=; b=Ul3elQGpK/NMH9JsDtmDiujnISW25+kKwSrJMRaylcPoiAW9IGt23TkbB5ABr0TZp1x7IeVqDFhxMzPv40wk7Zspv4j6Z6t7L7e6+wbQP+pujyufJpvDg8rjOkOq40sxosoX5XbK2ZUHrPqRYluw308GJucKpSIuuxjnrsMqpTE= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Suravee.Suthikulpanit@amd.com; Received: from localhost.localdomain (114.109.128.54) by DM5PR12MB1452.namprd12.prod.outlook.com (10.172.38.141) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.557.21; Tue, 23 Aug 2016 18:53:36 +0000 From: Suravee Suthikulpanit To: , , , CC: , , , Suravee Suthikulpanit Subject: [PART2 PATCH v7 09/12] iommu/amd: Enable vAPIC interrupt remapping mode by default Date: Tue, 23 Aug 2016 13:52:40 -0500 Message-ID: <1471978363-13756-10-git-send-email-Suravee.Suthikulpanit@amd.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1471978363-13756-1-git-send-email-Suravee.Suthikulpanit@amd.com> References: <1471978363-13756-1-git-send-email-Suravee.Suthikulpanit@amd.com> MIME-Version: 1.0 X-Originating-IP: [114.109.128.54] X-ClientProxiedBy: KL1PR02CA0053.apcprd02.prod.outlook.com (10.167.54.21) To DM5PR12MB1452.namprd12.prod.outlook.com (10.172.38.141) X-MS-Office365-Filtering-Correlation-Id: 90afb832-4ce2-454d-f8d0-08d3cb86cb92 X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1452; 2:n+l2vs03hl1Hcr5sBp1jDmakBHCeb2Bjx9mOmVi2RLuXmMa0CYUiU9RgBLOxEaqTn2ztngqfMtW/7fkQou2MLfbasNT0Sr4MyW2OyOPaGPbZBGD0PQu29uNR7kVizeKphjExlEc5VeMuG7+/tUM2eGCUxuLIYW4A73OxbiHs+v9/X0F1bqGN0y/f27Otw7PN; 3:lL6NBplxpxLRJ/iCbznBjdQh1/EGMYtsfDQ7+cNDdDophhs3lPyM9+jtqnGeTh2G6S84vAlPGrw4YJhojgn2rNQVwpbLwGbbTiOXEhWFZ2eX+0ltnJUvbYJOJARheng4 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM5PR12MB1452; X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1452; 25:R3P9emuDXfWcOo7s+HVItgizRR2UW+knHEhsJjHGVygG5ZfkK2XR9EIDWl0R5HzOme2sjJwO7k+QE+dBAT29DWAFX8I2+XcJr0vwNRbkKsGoBeMNQvacxrLJrGR6NgygZTooth/NRsVPx7ZSyxvmWm3y2AYnBquhbPT/6jqtYDQdvjvnW5XSqO0w3iv6PFgqHJwXjjn/Zhiv696BzIqqcfW1zVay8FMaB/OONmLUm5hGuFtpFWv2DgEJ7mDb2uPRv4zeV9PTN8SQaLJsUok0QyL9dTNOkoY4F3Qj+yc6U3qUXi0mpAkASWxufteJDWtlLwNdOA49RLIQB+ij5+v2rcSVz2PBlpwen/va6SdCL3y8RBb6RB4VAUFVFnjKgf9Sj5/ynLC5weaohEqqolanFP47vkkCf40g/481A4S4qdhg9DjvtDSD1HPiRLkMPX7YRL5hPCznKSKNVXFGEAM0S05SB3i72Ag3iWyIRtoEidMZFScle579U1h/1IZTR0yXm88e+Q1fPXMnI/RrfUHYEBtig256oZ4L2ciBllvj9O6vBW/rKj0hM2P3/x2L+YMhaSeGJ9Hg1ehIsinJMTPDz8jbXq0BcdRaygslWgp1S6zL/MXReUIhScZnQQPKdVF652ef45T/VPkZryRUEHyBZt7kScuzsY2nQK7IBC81y0OyM+V1BVg1aO68KGC0AFu6pVVoZztsC76SKJ5eTuko0kydaorav8wwjMTid+33R0hCkNDozFAleaxiNF31s7h7/I9Ht5zC4N2lshGXstoxdg== X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1452; 31:lXoOexaFl07r0h9/dzgbsiTv7BmcOTlVtTVLGUN4r7cuog+8tsSCdZ1A/UexQXPs61+jsf1QgZPnkWi3G70trl6nMZROYvtQcf2cpkn4gdSiDQeEqyBw/jhecZyn0hcTQ2YXx4OjIRXNXfm30sS9aTNid9yikp7xSBEGJ+xh1l9wBGM2/mDNEAuB0dsPa2E5DbjZHuaoiVlFmf27ceteFg9WL4769ML/lqJlgNbgGR4=; 20:stq+amacltZaUB9CLIRvR3iDkAnNg7eG955wFiVqfTWYvIvwE0MbwjLR+wOOeCxJ/FSrs3gvD21yPMiO7jpf1cX6V8h/IG1HqPIgeU+1Cz2LX4c4gd5ozeO0boGJU8Om0Iv+XyZZpSVAl7x0cvo42pEKtdvYdb0das4ZHsbmWj2IUjCSNYQJXNTm0UthTdg9bdeLIEtPoMFvCty5MgH19qGH6Q6+53fMDqGjdgIGHE5vwzZqBpKXjJGeE5MXXP5rhDLn+4e2Zo91gLo0PaXXRXLP0KYAGsPBz2meoW+ZfXcoU4BBaVAu/xQh9yvF5QPRAp/kpSPNzzmM3Y/BbBnlBkBABGOAnsJIxns0kg2wjw74t0PDCUpXNzVoYHQME/XIkvZASlPKnr2zgqJbE5Nva//DpnDvayhCa3smGmdfB3cltMOtFH9w1HTzNa5G9nuCZDenGGdy0Io6utMTavg++XexRcX3+5aFkgKGj6oNGPB1wQl4/jLCdPsHZIdC9l67 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6055026); SRVR:DM5PR12MB1452; BCL:0; PCL:0; RULEID:; SRVR:DM5PR12MB1452; X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1452; 4:YFUe9AoAZJ5TS2NwDN0k+H+QRhEXShRkpU3zfoXk35ak7RfreKE24LTxR4/vovw0L8Vr4iJCDJYvcmNiA/8E+pkejLijOMggMZfWWPGtqNkhmM2tajCpZTdtvpYocnbJmwA7sqDGR8SUrwcHCW5IndCNhzihGg11hTd1upioREiDfhvDJV3mjGXXi/e9ccOd/TLRo4NH4BOImah7Dhxmdvk7HlKawPaExKRW0ZlVgFVBEwTmGbDBci+Dk84l+H+3L38tSVe3AH7UHKxhIbhH0THssLHfLugYKYM+4ReCkgJFBdD5gGr2XJUeRWioVtdBfBmrFDKsbr6B0XaW1d7pzhj/sFPebweSvAvTlznuO5jaVIenzubHtxveykVKyeyTWwh4q6dOuIwXLReNG8coRE+EtRY+H+WKi6mtHoVppt+yymnlkWMOx2/7NJTNmKlm X-Forefront-PRVS: 004395A01C X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(7916002)(199003)(189002)(42186005)(76176999)(101416001)(48376002)(50466002)(77096005)(5890100001)(5660300001)(575784001)(92566002)(105586002)(5003940100001)(36756003)(86362001)(106356001)(66066001)(50986999)(5001770100001)(19580395003)(19580405001)(50226002)(97736004)(189998001)(229853001)(3846002)(2950100001)(47776003)(8676002)(7736002)(6116002)(586003)(81156014)(68736007)(4326007)(2201001)(81166006)(305945005)(7846002)(2906002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR12MB1452; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX: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; DM5PR12MB1452; 23:unfpvwKAkDw9ypmXFK0rtBV+3rFs9+/Mxw5ZUPRAw?= =?us-ascii?Q?UnjrdMvlwElEp/+3lWa6ZyVeum9Me3L3dlyVlavxTakCkIfEFpqodaPV7vis?= =?us-ascii?Q?0G/zt5pI59g46fT3q0qNtEanF3Wuhmw/CtiKU5/CSKxGewMWdeuxI18B+HhE?= =?us-ascii?Q?bk15xa38w3ZmK9JBTd4jCuSvRgNcgJTru1h1yM+nD/XmatPSsOJfnZXmWqqx?= =?us-ascii?Q?VuE7bsjjQGVOD9ef++1X5rAoM25AE3RZ5JgXf/SPYrRtSbLU26ZZfxSChtl0?= =?us-ascii?Q?7iP6K0wmchE5rOhdWxDNiVrzST7TcSAv/aVr982pQ7gwA4tcSxy+QxbiW6k+?= =?us-ascii?Q?VkLQ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uP8VC6No3/4FkWk4CmiPFDCpDArMvjEdA58fbFApVwHAichrhcpJiX3banaxRs74BO5G/sve9DJVyLggz61o6QZ4bZIkkHNSwWfDm7TwGJ7Eb X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2016 18:53:36.1750 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1452 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Suravee Suthikulpanit Introduce struct iommu_dev_data.use_vapic flag, which IOMMU driver uses to determine if it should enable vAPIC support, by setting the ga_mode bit in the device's interrupt remapping table entry. Currently, it is enabled for all pass-through device if vAPIC mode is enabled. Signed-off-by: Suravee Suthikulpanit --- drivers/iommu/amd_iommu.c | 44 +++++++++++++++++++++++++++++++++-------- drivers/iommu/amd_iommu_init.c | 12 ++++++++++- drivers/iommu/amd_iommu_types.h | 2 +- 3 files changed, 48 insertions(+), 10 deletions(-) -- 1.9.1 diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index 7aa0c08..8f9e534 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -105,6 +105,7 @@ struct iommu_dev_data { bool pri_tlp; /* PASID TLB required for PPR completions */ u32 errata; /* Bitmap for errata to apply */ + bool use_vapic; /* Enable device to use vapic mode */ }; /* @@ -3211,6 +3212,12 @@ static void amd_iommu_detach_device(struct iommu_domain *dom, if (!iommu) return; +#ifdef CONFIG_IRQ_REMAP + if (AMD_IOMMU_GUEST_IR_VAPIC(amd_iommu_guest_ir) && + (dom->type == IOMMU_DOMAIN_UNMANAGED)) + dev_data->use_vapic = 0; +#endif + iommu_completion_wait(iommu); } @@ -3236,6 +3243,15 @@ static int amd_iommu_attach_device(struct iommu_domain *dom, ret = attach_device(dev, domain); +#ifdef CONFIG_IRQ_REMAP + if (AMD_IOMMU_GUEST_IR_VAPIC(amd_iommu_guest_ir)) { + if (dom->type == IOMMU_DOMAIN_UNMANAGED) + dev_data->use_vapic = 1; + else + dev_data->use_vapic = 0; + } +#endif + iommu_completion_wait(iommu); return ret; @@ -3983,7 +3999,7 @@ static void free_irte(u16 devid, int index) static void irte_prepare(void *entry, u32 delivery_mode, u32 dest_mode, - u8 vector, u32 dest_apicid) + u8 vector, u32 dest_apicid, int devid) { union irte *irte = (union irte *) entry; @@ -3997,13 +4013,14 @@ static void irte_prepare(void *entry, static void irte_ga_prepare(void *entry, u32 delivery_mode, u32 dest_mode, - u8 vector, u32 dest_apicid) + u8 vector, u32 dest_apicid, int devid) { struct irte_ga *irte = (struct irte_ga *) entry; + struct iommu_dev_data *dev_data = search_dev_data(devid); irte->lo.val = 0; irte->hi.val = 0; - irte->lo.fields_remap.guest_mode = 0; + irte->lo.fields_remap.guest_mode = dev_data ? dev_data->use_vapic : 0; irte->lo.fields_remap.int_type = delivery_mode; irte->lo.fields_remap.dm = dest_mode; irte->hi.fields.vector = vector; @@ -4057,11 +4074,14 @@ static void irte_ga_set_affinity(void *entry, u16 devid, u16 index, u8 vector, u32 dest_apicid) { struct irte_ga *irte = (struct irte_ga *) entry; + struct iommu_dev_data *dev_data = search_dev_data(devid); - irte->hi.fields.vector = vector; - irte->lo.fields_remap.destination = dest_apicid; - irte->lo.fields_remap.guest_mode = 0; - modify_irte_ga(devid, index, irte, NULL); + if (!dev_data || !dev_data->use_vapic) { + irte->hi.fields.vector = vector; + irte->lo.fields_remap.destination = dest_apicid; + irte->lo.fields_remap.guest_mode = 0; + modify_irte_ga(devid, index, irte, NULL); + } } #define IRTE_ALLOCATED (~1U) @@ -4204,7 +4224,7 @@ static void irq_remapping_prepare_irte(struct amd_ir_data *data, data->irq_2_irte.index = index + sub_handle; iommu->irte_ops->prepare(data->entry, apic->irq_delivery_mode, apic->irq_dest_mode, irq_cfg->vector, - irq_cfg->dest_apicid); + irq_cfg->dest_apicid, devid); switch (info->type) { case X86_IRQ_ALLOC_TYPE_IOAPIC: @@ -4404,6 +4424,14 @@ static int amd_ir_set_vcpu_affinity(struct irq_data *data, void *vcpu_info) struct amd_ir_data *ir_data = data->chip_data; struct irte_ga *irte = (struct irte_ga *) ir_data->entry; struct irq_2_irte *irte_info = &ir_data->irq_2_irte; + struct iommu_dev_data *dev_data = search_dev_data(irte_info->devid); + + /* Note: + * This device has never been set up for guest mode. + * we should not modify the IRTE + */ + if (!dev_data || !dev_data->use_vapic) + return 0; pi_data->ir_data = ir_data; diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c index 156ab4b..cd17136 100644 --- a/drivers/iommu/amd_iommu_init.c +++ b/drivers/iommu/amd_iommu_init.c @@ -146,7 +146,7 @@ struct ivmd_header { bool amd_iommu_dump; bool amd_iommu_irq_remap __read_mostly; -int amd_iommu_guest_ir; +int amd_iommu_guest_ir = AMD_IOMMU_GUEST_IR_VAPIC; static bool amd_iommu_detected; static bool __initdata amd_iommu_disabled; @@ -2019,6 +2019,11 @@ static void early_enable_iommus(void) iommu_enable(iommu); iommu_flush_all_caches(iommu); } + +#ifdef CONFIG_IRQ_REMAP + if (AMD_IOMMU_GUEST_IR_VAPIC(amd_iommu_guest_ir)) + amd_iommu_irq_ops.capability |= (1 << IRQ_POSTING_CAP); +#endif } static void enable_iommus_v2(void) @@ -2044,6 +2049,11 @@ static void disable_iommus(void) for_each_iommu(iommu) iommu_disable(iommu); + +#ifdef CONFIG_IRQ_REMAP + if (AMD_IOMMU_GUEST_IR_VAPIC(amd_iommu_guest_ir)) + amd_iommu_irq_ops.capability &= ~(1 << IRQ_POSTING_CAP); +#endif } /* diff --git a/drivers/iommu/amd_iommu_types.h b/drivers/iommu/amd_iommu_types.h index f10b429..ba0de70 100644 --- a/drivers/iommu/amd_iommu_types.h +++ b/drivers/iommu/amd_iommu_types.h @@ -816,7 +816,7 @@ struct amd_ir_data { }; struct amd_irte_ops { - void (*prepare)(void *, u32, u32, u8, u32); + void (*prepare)(void *, u32, u32, u8, u32, int); void (*activate)(void *, u16, u16); void (*deactivate)(void *, u16, u16); void (*set_affinity)(void *, u16, u16, u8, u32);