From patchwork Tue Jan 17 02:22:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suravee Suthikulpanit X-Patchwork-Id: 9519805 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9C5D5601C3 for ; Tue, 17 Jan 2017 02:25:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8922226E54 for ; Tue, 17 Jan 2017 02:25:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7ACA7281C3; Tue, 17 Jan 2017 02:25:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 72A9F26E54 for ; Tue, 17 Jan 2017 02:25:09 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cTJPx-0005cJ-BA; Tue, 17 Jan 2017 02:22:37 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cTJPv-0005cD-Ty for xen-devel@lists.xen.org; Tue, 17 Jan 2017 02:22:36 +0000 Received: from [85.158.139.211] by server-15.bemta-5.messagelabs.com id 8D/FF-06501-BEF7D785; Tue, 17 Jan 2017 02:22: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d.com X-Msg-Ref: server-16.tower-206.messagelabs.com!1484619752!64375884!1 X-Originating-IP: [104.47.38.84] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.1.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 12461 invoked from network); 17 Jan 2017 02:22:33 -0000 Received: from mail-bl2nam02on0084.outbound.protection.outlook.com (HELO NAM02-BL2-obe.outbound.protection.outlook.com) (104.47.38.84) by server-16.tower-206.messagelabs.com with AES256-SHA256 encrypted SMTP; 17 Jan 2017 02:22:33 -0000 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=Gd4hySYNuFneJ0kSlXIrKItfzLEv1yHQ7SRmPPlI5+A=; b=FPdq1H6YeEHAzf4Ep5m99ZnMe5GWdkY7qHghpC3vSoB8TGPGbqKjVgrxi8x7uxL9O5LZa9x9Uuc9o8iNbfknFs8oPinTGbBxQvl7XH4mapGnjYopdGQwlAtzZeFrPiJ6NwyJ5X+vcEZqTBx5np9pegiLdf8WQDEs38vzF5HNo5c= Received: from Suravees-MacBook-Pro.local (115.87.78.204) by DM5PR12MB1449.namprd12.prod.outlook.com (10.172.38.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.845.12; Tue, 17 Jan 2017 02:22:28 +0000 To: References: <1484618950-785-1-git-send-email-suravee.suthikulpanit@amd.com> From: Suravee Suthikulpanit Message-ID: <8cedc7d9-662b-202c-ebd5-379be452487d@amd.com> Date: Tue, 17 Jan 2017 09:22:14 +0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <1484618950-785-1-git-send-email-suravee.suthikulpanit@amd.com> X-Originating-IP: [115.87.78.204] X-ClientProxiedBy: HKXPR03CA0068.apcprd03.prod.outlook.com (10.163.104.26) To DM5PR12MB1449.namprd12.prod.outlook.com (10.172.38.138) X-MS-Office365-Filtering-Correlation-Id: ff423ea9-ddc1-4727-a2ca-08d43e7fb061 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:DM5PR12MB1449; X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1449; 3:A8Ce3EPO2AsI1jFRtSPrlqm3bOOv9L7MdvVmSRPPxxnpjuIASBAmQKKkNapQmsDEIdahy0Yrr5oCbZSrRIr8DOgvi+brwyq5BXSzmg4US0PP4Op8ULWjDNUyBGhzZm+AUffTLgegnKe//zAqhSr/0nIuEr+jlm9QuOa79KJEoxIeFocSFA28NZs76hsNcGOaNbMrD0ueS6wQwXOcl8lJjApmEyG08HBMMIkFypVLH6IP6wb8GC6Uzo6dWFspLLwHXL0EbahRxy58+/F3am4QgA==; 25:X81uByEejAY6iY5OkqjYBtISfhg1HXuc5y+KwgKzROdCVhJSbGg19a6nIyGsZxLkKVl2qA5vQ3fPvHzw5wEXDai6Xa9BsJvFCj8KWz+iXESR6nTy8M1LbC58Q7I7tJqO8fabXZsKUmOJqg3gvIVAHYUheip5302Kq3BN+3CCgoTHJB7bawQuN6rnQPXYfJg4UfZ5W1w8gaX3XHkNV2Zw9kMad2FpRnzSt2S+W4UcfR5oaDuiYWWSOJlj/9JDbN9GE3VJULk4qELMqPXPSu751s4weC07p0L/bve70Z9WIrAFn4EFbvBbGHzZBjzXNp/6x34yd5A1X7hhx7ENmn2fs1Pa98EG8001ylnMTc8MywHaG6ETvGpS/hbtlDc0sLhZbpHr7vHXHVGlBIm+/OBzoKSz+WyMGpZ3t4hmsiOMmbeokBzQspw63z7l/pYc3WY1Gt8ngI7706/U2Y/tRj7t7w== X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1449; 31:U0buPfUdPr1b0VgHajpA5A93bLwAZebCzJ07Wru0OiXzki9Zu0bVw99GFRYYmjScmt6xVfgBL16x6D1RHIBzRI2vB4hv2LRKuWw/iZNCODOuZP/nOmLLkU7K1Ezcq5aNS8oHco6YAZjH180kHOn7fqFh6U8dArdD6PVtZItAHo+BvB9CjWs7vW4qWNliJo8mbIiHOKD5GXyNxeCuwlwRhBpuyvwh7946GH52tF0ZJC8yJkaN/TXDz+BhSFkYh36ka5Tqk2duwNk/bSZS/UlJWJ163mpxRy7YuRcD4bn2aT8=; 20:NzJ5kJg6mR1QCbvLpyX2fTy7bfdmd7+p7CZfti9zqfYco3Kq2mHpoOzwnMqmSjXNci24Y8lAT/mX9JArBa43XeJv7ItNXiNroe8C+2FSrKmU/rHknEvmVkdSCQUL6DyzFuK2SLXBn0QDTbvRkWFT/9M2UKNKdEnKamapELyBsJVurV8trEO6xQj15dWxqi4CjrUwUPZKQQYDHq30cOtatxNO8kNI/BJS58gOw5tfjkwIz8e45vM/kKJEXZG8MDO8BqjjhuAG+TrSHK/qj/uhwqqrolMicoci9r4OvJLqVjEZN6HrDMyd+AgaIlJVQ7ANWb8PLxgzXTmGdqedQwoOpbEQBmTGIhru589dCiNiAcseaiudl7z2ki+dbZc3hvOKSaRyLMHQcktib5xkhdzo2Qmv2kHw8FAAcbTSPYEtluJ/FluCkJQQzl67K6M6fm9iisjkaijgLvMs++ks0uhDF6K3HohzZDgY1D9I6BeC1AxFKykUgvlafLVIvjcknErh X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110)(70601490899591)(146099531331640)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026)(6041248)(20161123560025)(20161123555025)(20161123558021)(20161123564025)(20161123562025)(6072148); SRVR:DM5PR12MB1449; BCL:0; PCL:0; RULEID:; SRVR:DM5PR12MB1449; X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1449; 4:1hvp73AY/nl2XTzmUxPQrCEh5orgHsGnbSpf6ZVdTEiy3YmWnyQu4Gp14b2VmIzjkVCY5ZhtKQzRUVD2Nkd1e+tmgvloXIwTMRpND0Z93t4kCYzewi13pWaoPPoPm5DmmSfsNfrU8Ovas3wim+ekO/uk8nYvQjzFGx1eKXycyC61LNvP1r4n2TlwKbVVvCT8rAVO5547jQms+Z8R16fj+g6b+4fGWxHjm5yBfUOfRdDzTWEMGrDoMiuLHE+Edts5IZ3IgjXrEFjmRfjSc/pWkgPZKL4sjL005gjPa2TmoB78Z8lefK1Egkl111wJv3ftY9y1qK1qJ5R3qQg5TtI214SktJZzmcNUP1udZ6NoBoZsPSJHHTFJt3nO8OlSnH5dBs1IKOcoi6hOO0cW8T+Ll542ch8FDWdyPkN++HtJEHieBoKhYS0fyWmfWa/1Snhn8oGGhVa5HZTypKkzGkok1IlGvvNyUGMZZy9OT5bTZlVzkx0dq9brggowFDtJuG74VEXwTP7Io/Udsq8MdvqvD0d2CcPJVCfjW/1BzqNVoHfgGwkl2wu3bZX9W0onIjEozMOgIZGpLEeAtmKp+s8ieTh96uw5tWSbXcCruqdl63RPT7OnlZ8pLo2kxb6M5MVOJPPRkNrMO2cC8hcAcab2pZ9ep5FBfqRo/KSJSGljbXaaN4C65bQaG8ixCvCI8YGNLSF/A1+IlBT25gOLHZ4BatDX0CoEcMBAZl1tYjappheXgVKwDFjdzDc5SKqI80w+YLukZ4jPwuvUWePE2A+FPg== X-Forefront-PRVS: 01901B3451 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(39450400003)(39410400002)(39850400002)(39860400002)(39840400002)(189002)(199003)(52084003)(64126003)(5660300001)(230700001)(83506001)(31686004)(6666003)(92566002)(50466002)(6916009)(54906002)(8666007)(33646002)(189998001)(6506006)(229853002)(6486002)(110136003)(25786008)(38730400001)(2950100002)(65826007)(76176999)(50986999)(97736004)(2351001)(8676002)(81166006)(7736002)(305945005)(101416001)(54356999)(86362001)(575784001)(42186005)(4001350100001)(68736007)(31696002)(23746002)(3846002)(6116002)(66066001)(106356001)(105586002)(81156014)(36756003)(47776003)(4326007)(65956001)(65806001)(6512007)(2906002)(30001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR12MB1449; H:Suravees-MacBook-Pro.local; 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: =?Windows-1252?Q?1; DM5PR12MB1449; 23:f+DobCODm1YW19XeKHgAEJhMDqDwR8jSOBpco?= =?Windows-1252?Q?BAhiGicX0E9Xld3kZw4jDCvJIhP7e3peSWZPpDJCviD5zDdx1PsFis1I?= =?Windows-1252?Q?Es7BLJkDeb6v5/4WeCELNy3gqmeoQ4PH3oeWQjejLjjRg2ozpzY3PEe0?= =?Windows-1252?Q?unYMfQDc/FYpY06yVNDnG0aDb/S+qG4Gaz6Lt9CMjtTVm0Kjfmcv52Uv?= =?Windows-1252?Q?uw4Uge8kNDAhyxT6kdlDW+WZ4L4WcxZ3x2w93yPTqJnXqSO0DQvKpDH+?= =?Windows-1252?Q?4sXvhJJLuVbBUfVwRiiJeO6dc0KmLloza83QBb9ImLnABFQ638cifT2J?= =?Windows-1252?Q?JuWV2N+/laLRf5bfiOHS5xObLbYy+uDsX73qMa9uYFRBRSRwF7g0Wbs7?= =?Windows-1252?Q?PiV/9czXaL3RgasmrahUbpzsNIwtBAGPi6TBSPdNhR/uqPmx4P9BkE5C?= =?Windows-1252?Q?p1KCZCrW+HZKPLKo3rbBPtSDGQKRlk1OMcHruPLlDtunvtPdmkiQgPeS?= =?Windows-1252?Q?427ahu+cVOvIDqniFZjCvHRBXvWNs3nr3T0veBv8Idkdx5Lib2viHWwX?= =?Windows-1252?Q?qMXjN77htgQn3ue3YlYIsPRR/hYFLrohbqoF2Yd7cvhYhXI7zCHB1Uev?= =?Windows-1252?Q?vOZVGCK6pkpmf9XyzAstuFRmdHpm1b6vbtRrGBMWYCdlELHInMP1q5T9?= =?Windows-1252?Q?m/X8sqg4MW9RIcuLcawCNsHLR0c5KxfiS4WN8I+LgtV8ei6nAGj9bPmY?= =?Windows-1252?Q?BHKyz5C6z0VIf2LVBFwUMaEzFiNUn71eq+GPGwW6UmlzQFwshprQ3de9?= =?Windows-1252?Q?ubHA0pjapxrxPKC32uRFjr4SPgUp3jkBT3fSu71WfuQvWOmrbGyDW3xB?= =?Windows-1252?Q?vd+F+hhobMEwZHB97m+X4EiXydDfC01c6uT4g3OixIMRH7Qou+7k3OBc?= =?Windows-1252?Q?L+nchlSj+0+dLqFzz9UnKD7NKD8jM7KhNOYXV6ZRc8cyI0snFX7mO2oV?= =?Windows-1252?Q?xCV4IMokb9YHozjxQOQ6H4ujxvw/UKIK2+E95jJFwiF5kRaVsibMYDuN?= =?Windows-1252?Q?eCK6QsxO9cVWy2YxZe80t9zuVmWn49Hk42t4IlQiGJN7EDlqgshVvlHn?= =?Windows-1252?Q?Jfitryff4h9weTEdvf0YHCvbUyNCwpzTinYfNh2URAAQn2I502vwiutM?= =?Windows-1252?Q?bFBFUMC8OiGjIYa6Ky8UQYNqFarFzsP95IySe0FFhZOYh14l2vE+pcjl?= =?Windows-1252?Q?BxKB8GN87ZTRnCnKN+3P7nDFj0Wyu+iOQOx0Dax2UONJUSR9FZhTbFkT?= =?Windows-1252?Q?TxEmxZ9B1pO6BIdqhM8Ef85u2hkmaAzMxkl/Ip4IDcW2oKeF/J5UXVOe?= =?Windows-1252?Q?w95mQJ1lnbGQbYZBMV+R89CqahFE2jije7ZsQ7GFByWpBXfObbnq9YpI?= =?Windows-1252?Q?UedTxkXdM10BtTKKL40zTdljqzaDSSiO628sBOQGRbZgJgPBSdDlDxMF?= =?Windows-1252?Q?YL6HwkGmwnuaUinhDAna3JLFAMi9EBWSEBdx387kxMcOqkW9SF1Gl+UF?= =?Windows-1252?Q?kC8MmxLureNvX4509N6l8uXtQ1ounbYNg/LfESuCpgDZCN4IIxCF9jEW?= =?Windows-1252?Q?/lqUgyclpS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chBZMcLH2aNLPzsF/EUkIRUk7umbVoiZn3W8R9va4JAj0EFMDbjDjPdF4sYX9nc9yZ3qaJQJjHJAy0LQYdWfAI6a5hq7Hz0kSLQzb58YFnO3Se3B7dRRkmbWfX0GD5E6038HcXKQDJX/XEDuNfxPcaovydpHO2ZtAsCT6bmtGHnn2zrbWMe2Ci63GVNHDe68MMJGWmHq2UZIhvLlmB6ywF3oR97qXg7olkb7zPeKU07tg/UZdEGWuZRX4bgBIG70JXtnaZXltWpaW3hE0yfio3Aihw9Nj0/Cwcc5NEDyWg==; 20:PVtxcdiJrobk5lRhwNDNRoQo178s8JOqgoSQ47Xpu9jnTD90YI21r5swkbykf2SQge6iNkomGLo4pID/n6+YTvW3aZBRwXCNmMu+t1d8/s6PO7aHSFFNTTNSzPPaFBZkOEdD8mWRAxvjsEUFetGqd8gWxMWfXOGHu1zihmAEzc2JTy93SRLle5rFTIVX2P44iUqGcNlHKm/5M20t0bGNW3frr3+v2JS5/49WegFMXVIxAss958qHudsvGYKfOzfQ X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jan 2017 02:22:28.0998 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1449 Cc: kevin.tian@intel.com, Jun Nakajima , konrad.wilk@oracle.com, andrew.cooper3@citrix.com, JBeulich@suse.com, sherry.hurwitz@amd.com, Boris Ostrovsky Subject: Re: [Xen-devel] [PATCH V4] x86/HVM: Introduce struct hvm_pi_ops (RESEND) X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP From 2b8e159039e3e70414d49932e558b0d26b44be11 Mon Sep 17 00:00:00 2001 From: Suravee Suthikulpanit Date: Sat, 17 Sep 2016 01:19:49 -0500 Subject: [PATCH V4] x86/HVM: Introduce struct hvm_pi_ops The current function pointers in struct vmx_domain for managing hvm posted interrupt can be used also by SVM AVIC. Therefore, this patch introduces the struct hvm_pi_ops in the struct hvm_domain to hold them. Signed-off-by: Suravee Suthikulpanit Cc: Andrew Cooper Cc: Konrad Rzeszutek Wilk Cc: Boris Ostrovsky Cc: Jan Beulich Cc: Jun Nakajima Cc: Kevin Tian --- RESENDING NOTE: * Sorry, I forgot to fix the stray blanks in struct hvm_pi_ops declaration. Changes in V4: * Re-word comments for the struct hvm_pi_ops. * Move the comment for VMX per Kevin's request. xen/arch/x86/hvm/vmx/vmx.c | 75 ++++++++++++++++++++++++++++++-------- xen/include/asm-x86/hvm/domain.h | 29 +++++++++++++++ xen/include/asm-x86/hvm/hvm.h | 4 +- xen/include/asm-x86/hvm/vmx/vmcs.h | 59 ------------------------------ 4 files changed, 90 insertions(+), 77 deletions(-) diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c index 7b2c50c..3db4ed9 100644 --- a/xen/arch/x86/hvm/vmx/vmx.c +++ b/xen/arch/x86/hvm/vmx/vmx.c @@ -198,18 +198,61 @@ static void vmx_pi_do_resume(struct vcpu *v) spin_unlock_irqrestore(pi_blocking_list_lock, flags); } +/* + * To handle posted interrupts correctly, we need to set the following + * state: + * + * * The PI notification vector (NV) + * * The PI notification destination processor (NDST) + * * The PI "suppress notification" bit (SN) + * * The vcpu pi "blocked" list + * + * VMX implements the runstate transitions as the following: + * + * A: ... -> running + * - SN = 0 + * - NDST = v->processor + * If a VM is currently running, we want the PI delivered to the guest vcpu + * on the proper pcpu. + * + * B: running -> ... + * - SN = 1 + * + * C: ... -> blocked + * - SN = 0 + * - NV = pi_wakeup_vector + * - Add vcpu to blocked list + * If the vm is blocked, we want the PI delivered to Xen so that it can + * wake it up. + * + * D: ... -> vmentry + * - SN = 0 + * - NV = posted_intr_vector + * - Take vcpu off blocked list + * + * If the VM is currently either preempted or offline (i.e., not running + * because of some reason other than blocking waiting for an interrupt), + * there's nothing Xen can do -- we want the interrupt pending bit set in + * the guest, but we don't want to bother Xen with an interrupt (SN clear). + * + * There's a brief window of time between vmx_intr_assist() and checking + * softirqs where if an interrupt comes in it may be lost; so we need Xen + * to get an interrupt and raise a softirq so that it will go through the + * vmx_intr_assist() path again (SN clear, NV = posted_interrupt). + */ + /* This function is called when pcidevs_lock is held */ void vmx_pi_hooks_assign(struct domain *d) { if ( !iommu_intpost || !has_hvm_container_domain(d) ) return; - ASSERT(!d->arch.hvm_domain.vmx.vcpu_block); + ASSERT(!d->arch.hvm_domain.pi_ops.vcpu_block); - d->arch.hvm_domain.vmx.vcpu_block = vmx_vcpu_block; - d->arch.hvm_domain.vmx.pi_switch_from = vmx_pi_switch_from; - d->arch.hvm_domain.vmx.pi_switch_to = vmx_pi_switch_to; - d->arch.hvm_domain.vmx.pi_do_resume = vmx_pi_do_resume; + d->arch.hvm_domain.pi_ops.vcpu_block = vmx_vcpu_block; + d->arch.hvm_domain.pi_ops.switch_from = vmx_pi_switch_from; + d->arch.hvm_domain.pi_ops.switch_to = vmx_pi_switch_to; + d->arch.hvm_domain.pi_ops.do_resume = vmx_pi_do_resume; } /* This function is called when pcidevs_lock is held */ @@ -218,12 +261,12 @@ void vmx_pi_hooks_deassign(struct domain *d) if ( !iommu_intpost || !has_hvm_container_domain(d) ) return; - ASSERT(d->arch.hvm_domain.vmx.vcpu_block); + ASSERT(d->arch.hvm_domain.pi_ops.vcpu_block); - d->arch.hvm_domain.vmx.vcpu_block = NULL; - d->arch.hvm_domain.vmx.pi_switch_from = NULL; - d->arch.hvm_domain.vmx.pi_switch_to = NULL; - d->arch.hvm_domain.vmx.pi_do_resume = NULL; + d->arch.hvm_domain.pi_ops.vcpu_block = NULL; + d->arch.hvm_domain.pi_ops.switch_from = NULL; + d->arch.hvm_domain.pi_ops.switch_to = NULL; + d->arch.hvm_domain.pi_ops.do_resume = NULL; } static int vmx_domain_initialise(struct domain *d) @@ -901,8 +944,8 @@ static void vmx_ctxt_switch_from(struct vcpu *v) vmx_restore_host_msrs(); vmx_save_dr(v); - if ( v->domain->arch.hvm_domain.vmx.pi_switch_from ) - v->domain->arch.hvm_domain.vmx.pi_switch_from(v); + if ( v->domain->arch.hvm_domain.pi_ops.switch_from ) + v->domain->arch.hvm_domain.pi_ops.switch_from(v); } static void vmx_ctxt_switch_to(struct vcpu *v) @@ -916,8 +959,8 @@ static void vmx_ctxt_switch_to(struct vcpu *v) vmx_restore_guest_msrs(v); vmx_restore_dr(v); - if ( v->domain->arch.hvm_domain.vmx.pi_switch_to ) - v->domain->arch.hvm_domain.vmx.pi_switch_to(v); + if ( v->domain->arch.hvm_domain.pi_ops.switch_to ) + v->domain->arch.hvm_domain.pi_ops.switch_to(v); } @@ -3963,8 +4006,8 @@ void vmx_vmenter_helper(const struct cpu_user_regs *regs) struct hvm_vcpu_asid *p_asid; bool_t need_flush; - if ( curr->domain->arch.hvm_domain.vmx.pi_do_resume ) - curr->domain->arch.hvm_domain.vmx.pi_do_resume(curr); + if ( curr->domain->arch.hvm_domain.pi_ops.do_resume ) + curr->domain->arch.hvm_domain.pi_ops.do_resume(curr); if ( !cpu_has_vmx_vpid ) goto out; diff --git a/xen/include/asm-x86/hvm/domain.h b/xen/include/asm-x86/hvm/domain.h index f34d784..de1f930 100644 --- a/xen/include/asm-x86/hvm/domain.h +++ b/xen/include/asm-x86/hvm/domain.h @@ -72,6 +72,33 @@ struct hvm_ioreq_server { bool_t bufioreq_atomic; }; +/* + * This structure defines function hooks to support hardware-assisted + * virtual interrupt delivery to guest. (e.g. VMX PI and SVM AVIC). + * + * These hooks are defined by the underlying arch-specific code + * as needed. For example: + * - When the domain is enabled with virtual IPI delivery + * - When the domain is enabled with virtual I/O int delivery + * and actually has a physical device assigned . + */ +struct hvm_pi_ops { + /* Hook into ctx_switch_from. */ + void (*switch_from) (struct vcpu *v); + + /* Hook into ctx_switch_to */ + void (*switch_to) (struct vcpu *v); + + /* + * Hook into arch_vcpu_block(), which is called + * from vcpu_block() and vcpu_do_poll(). + */ + void (*vcpu_block) (struct vcpu *); + + /* Hook into the vmentry path. */ + void (*do_resume) (struct vcpu *v); +}; + struct hvm_domain { /* Guest page range used for non-default ioreq servers */ struct { @@ -148,6 +175,8 @@ struct hvm_domain { struct list_head list; } write_map; + struct hvm_pi_ops pi_ops; + union { struct vmx_domain vmx; struct svm_domain svm; diff --git a/xen/include/asm-x86/hvm/hvm.h b/xen/include/asm-x86/hvm/hvm.h index 7e7462e..b1e4c75 100644 --- a/xen/include/asm-x86/hvm/hvm.h +++ b/xen/include/asm-x86/hvm/hvm.h @@ -638,8 +638,8 @@ unsigned long hvm_cr4_guest_reserved_bits(const struct vcpu *v, bool_t restore); struct vcpu *v_ = (v); \ struct domain *d_ = v_->domain; \ if ( has_hvm_container_domain(d_) && \ - (cpu_has_vmx && d_->arch.hvm_domain.vmx.vcpu_block) ) \ - d_->arch.hvm_domain.vmx.vcpu_block(v_); \ + (d_->arch.hvm_domain.pi_ops.vcpu_block) ) \ + d_->arch.hvm_domain.pi_ops.vcpu_block(v_); \ }) #endif /* __ASM_X86_HVM_HVM_H__ */ diff --git a/xen/include/asm-x86/hvm/vmx/vmcs.h b/xen/include/asm-x86/hvm/vmx/vmcs.h index 997f4f5..4ec8b08 100644 --- a/xen/include/asm-x86/hvm/vmx/vmcs.h +++ b/xen/include/asm-x86/hvm/vmx/vmcs.h @@ -77,65 +77,6 @@ struct vmx_domain { unsigned long apic_access_mfn; /* VMX_DOMAIN_* */ unsigned int status; - - /* - * To handle posted interrupts correctly, we need to set the following - * state: - * - * * The PI notification vector (NV) - * * The PI notification destination processor (NDST) - * * The PI "suppress notification" bit (SN) - * * The vcpu pi "blocked" list - * - * If a VM is currently running, we want the PI delivered to the guest vcpu - * on the proper pcpu (NDST = v->processor, SN clear). - * - * If the vm is blocked, we want the PI delivered to Xen so that it can - * wake it up (SN clear, NV = pi_wakeup_vector, vcpu on block list). - * - * If the VM is currently either preempted or offline (i.e., not running - * because of some reason other than blocking waiting for an interrupt), - * there's nothing Xen can do -- we want the interrupt pending bit set in - * the guest, but we don't want to bother Xen with an interrupt (SN clear). - * - * There's a brief window of time between vmx_intr_assist() and checking - * softirqs where if an interrupt comes in it may be lost; so we need Xen - * to get an interrupt and raise a softirq so that it will go through the - * vmx_intr_assist() path again (SN clear, NV = posted_interrupt). - * - * The way we implement this now is by looking at what needs to happen on - * the following runstate transitions: - * - * A: runnable -> running - * - SN = 0 - * - NDST = v->processor - * B: running -> runnable - * - SN = 1 - * C: running -> blocked - * - NV = pi_wakeup_vector - * - Add vcpu to blocked list - * D: blocked -> runnable - * - NV = posted_intr_vector - * - Take vcpu off blocked list - * - * For transitions A and B, we add hooks into vmx_ctxt_switch_{from,to} - * paths. - * - * For transition C, we add a new arch hook, arch_vcpu_block(), which is - * called from vcpu_block() and vcpu_do_poll(). - * - * For transition D, rather than add an extra arch hook on vcpu_wake, we - * add a hook on the vmentry path which checks to see if either of the two - * actions need to be taken. - * - * These hooks only need to be called when the domain in question actually - * has a physical device assigned to it, so we set and clear the callbacks - * as appropriate when device assignment changes. - */ - void (*vcpu_block) (struct vcpu *); - void (*pi_switch_from) (struct vcpu *v); - void (*pi_switch_to) (struct vcpu *v); - void (*pi_do_resume) (struct vcpu *v); }; struct pi_desc {