From patchwork Thu Nov 16 22:11:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Woods, Brian" X-Patchwork-Id: 10062151 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 AADB8604D4 for ; Thu, 16 Nov 2017 22:14:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9EC462AB20 for ; Thu, 16 Nov 2017 22:14:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 936312AC0F; Thu, 16 Nov 2017 22:14:09 +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 2EC7C2AC08 for ; Thu, 16 Nov 2017 22:14: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 1eFSNh-000236-EG; Thu, 16 Nov 2017 22:11:33 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eFSNg-00022e-Dz for xen-devel@lists.xen.org; Thu, 16 Nov 2017 22:11:32 +0000 Received: from [85.158.139.211] by server-5.bemta-5.messagelabs.com id EF/92-17228-31D0E0A5; Thu, 16 Nov 2017 22:11:31 +0000 X-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.com X-Msg-Ref: server-12.tower-206.messagelabs.com!1510870288!71280992!2 X-Originating-IP: [104.47.37.66] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 60179 invoked from network); 16 Nov 2017 22:11:30 -0000 Received: from mail-cys01nam02on0066.outbound.protection.outlook.com (HELO NAM02-CY1-obe.outbound.protection.outlook.com) (104.47.37.66) by server-12.tower-206.messagelabs.com with AES256-SHA256 encrypted SMTP; 16 Nov 2017 22:11:30 -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=ndwqyxhMaGpwGV+EMwwoJ1aT4pRUO0OiTTT1VpzfMRY=; b=mCC6LGdJalq4ckoroFbZoF5iPGgX9+aFas6BDoqFJd4laOuhjurd+XaOUmY7Eed1dFlVULak38nszyTbD0R+X1PmiwdmTWotFak4MNw/roIqifibpKHcWKZPvELemzKsU7dndWRxkHGkP0ZEUbriKm1p/lbBNzjvImM6uNNFD7c= Received: from nikka.amd.com (165.204.78.1) by CY4PR12MB1830.namprd12.prod.outlook.com (10.175.81.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.239.5; Thu, 16 Nov 2017 22:11:27 +0000 From: Brian Woods To: xen-devel@lists.xen.org Date: Thu, 16 Nov 2017 16:11:14 -0600 Message-Id: <20171116221115.98954-2-brian.woods@amd.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171116221115.98954-1-brian.woods@amd.com> References: <20171116221115.98954-1-brian.woods@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.78.1] X-ClientProxiedBy: MWHPR12CA0045.namprd12.prod.outlook.com (10.172.49.31) To CY4PR12MB1830.namprd12.prod.outlook.com (10.175.81.148) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5c830993-e925-4003-8eff-08d52d3efc1f X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603199); SRVR:CY4PR12MB1830; X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1830; 3:bxw9Ttl3XX2PIUDvw/MjuToEki0WzglxRxgAoQktYvMeZ5slzOgJqFnxCOdqbuSINhE75fiwjGInEAbtiMq/R9DoVC40eCQaZccqo3Kkbe6/rfvdlgn51EVoNrNAyh4ouKV18Oh6V1JK13v+Pj8V/ek0eJ3gpz28KtNQ2AXB9WuljXh03ot7FMw+fLzDGGmJ2gQ1QomZaum9LDj1Lsb/BuSE99OtuRRKUyXsPiwN+pjZsuyTseNMvOWnCBE1RPHN; 25:UONyFJPYD+CK8DtahzNFITnQZGeqNcGspksj+ktIyYkbTYdF2SJrc+3SX603aqcIng+x+LiLMc2IS6AQ6zLiL22UnQ7i/27HMA+e3JSwgoqABf4yvhL6l2B9fQP15gccu7xy2KItJ5asZXVYTLkTb+04krpbmRNUWKtH6In0EMzjLxXKsSJgPSEaTzE72duGBZpOVgmT33M5OwfYOrKXNevpQrNovUCt+RS3wS6+ImDO7gDCcgMw28RXpMZYFBfwD0VVa8VOsuwNBnc/AapKfRQPbHd03JGXY2EOh25xYLfJ4wc7XP2rDTEw35Q6yt3ae0AqofENlfE3lxyKYI3qAQ==; 31:Gpn8hS/rB/sJtyWyG0jw1OY3Vw3Cv0WwqYTkaMkPQjmTvmkUIVZFVlTf6X9NWcTknCTVDswa3ynS3VuQPZ5BL1YY07SVPDembE/dcVXK+ZAzSV0REAchXyTYaO6tYjrQxZxowXs0coFoD+h54WaGknwbcBRUqMJE/XIkCTgUUs9uhNwhrM2gjyhkRAVHRl6O4idZWZTSYDuCVCg9dU2OHEQscTRbZNq5WZa7vijvedw= X-MS-TrafficTypeDiagnostic: CY4PR12MB1830: X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1830; 20:3IfXpmGN7c1OaBpFTqL9/mxw45nhvmshyynJjJscoEdCVY2nT12lYyQzE/nTI57hRiLrdMyj6ytwZ1MRq+P+xhup5MMQaj1ecc2VnFigXsK/BjS6FahaJMN7H6bdX5cReM6P7AYIIAWZurL0X+2ndP7FriujfHOEHRqtaA1ZI9yvGUkyX2dc/SyWByPhjDcwtT2Mgw5wpwFXWDoU6T6/cxnf7ZWsB+ZKukZibvSQ5S7sv8gv5PhtpoqS4+nxfYgZoCErYLFFn/HjddgLFe2oz5iBqdH6viJe9EcD9ZIbo13ZYvqBm6vNK9j1Lc+GZ/GpHDH1feP+I7Y+KU1I7XzbzzmxmY0ngucWxuePQcPlba5IHjVtFOrVPZhSclXLCzzpWsinVivzJ2o5+8YsRltOsvuNO2IRLEgrMX+78JsDQEEKrVmVgz5oHW6wOmFalspr8/KahxgV6qqhE0UmhOOBuoVAMkj5ciEQTywqBcDB0F9j9ZmSOxKCp/yDRslxvQAP; 4:vp2LExT3miQ1oSDNbE4jrhM+WBcLY1JiX3kitzKxtB7eQEEWMEDTErzyJeTSNVIrGeiZ6I7chdfy6QiI7axzBVfx87jzAFwd6/EX9bfmtHm8J0iW3ceWeATpaIacakXlUWqIxCjoxOEv3Ve/OZ9NyUNrV3pniwm1Zer1KQyhLrpNW1ZpwpWyQjFJyR6GwfeBjNlUb1ue4YBatSYAdD8LMKIi3tnwE+eM8KMTOY3G1HqqB/H4nO/7oL46DoJMchMJLqx2MSlVWzgvtoOFCcQVCUvZgRkVzTekMc7m+jcGbmCOvIKjke6C7gZXtgBvxGb0 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(100000703101)(100105400095)(93006095)(93001095)(3002001)(10201501046)(3231022)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123558100)(20161123562025)(20161123560025)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY4PR12MB1830; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY4PR12MB1830; X-Forefront-PRVS: 0493852DA9 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(39860400002)(346002)(376002)(189002)(199003)(3846002)(6486002)(53416004)(72206003)(53936002)(2906002)(6116002)(76176999)(50986999)(1076002)(25786009)(101416001)(8936002)(36756003)(5660300001)(6666003)(2950100002)(478600001)(6916009)(4326008)(48376002)(8676002)(50466002)(54906003)(189998001)(8666007)(66066001)(47776003)(16586007)(305945005)(16526018)(81156014)(97736004)(81166006)(316002)(50226002)(7736002)(105586002)(5003940100001)(2361001)(575784001)(106356001)(33646002)(68736007)(2351001)(86362001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR12MB1830; H:nikka.amd.com; 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; CY4PR12MB1830; 23:D2Jlw63ZY4VRrQ0IimNvghXDYAaNZci/Y576xcD/w?= =?us-ascii?Q?u9HKAb+1T2hofQ13pxLAy+ZF4mihMEMzlz0x9UH/UU/vPBSLF65SxzrbDPdB?= =?us-ascii?Q?2/HyiWYVnnBjK1l+n4l5OxQkpzJWS4HW9g9fTpa8OHEoa3q8xP+uCsXUtEKn?= =?us-ascii?Q?cm3q1bRQY7+KyNnctIPGjRxXmwC4RekYddEma5nzFplpu2Pcp5qtS/bObUT3?= =?us-ascii?Q?Chqz2sZPbebWJ1Ut6zWlgTiPxkEwZJhdiNzt2w3L7LgotE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jIIiGJpnPy4eajssonS/I7M1dydixhn3vrzWsUDF/67fvI/rXZC?= =?us-ascii?Q?uYdsdJGtUU2o/Z3U2MJnffsUqXgqF6f5bL6?= X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1830; 6:Za2tNy68yxrJ20JY9P/N3ZNbATUF9lspXa2hER8o5Ayu+56MR76KiRF25M9jEHmvubON3AAEoEEdd88L3tViEr3+FNPCc3C7XcOTcIMzjuAglr90jZu3I5SIyrJXQgKWcoF5m6l+yq+VeG7Ai8IkCViPas5ziVRvhfMAkvULU7UD1EdTNqKRB8DRxNn6risexGNaFUaT6mkFGWrFBUadSnFMmIPiGeVtz11Nz3aoFXLi6bFQFbVops+aVxL0ICLft21b5XdqUTibL24oApK43bKRH96vqE7ms28i1YS9FiZ7+WljI21e72wia32IPkY6bhx0vlQ09CFpOs9OZ/fPOP94p68CKft3DHiNeJBMrsM=; 5:hUS1HkoVrZwCNDwQtl2pDLCpCsY+r6m2U7el4fNfMpZAzUhEDzI5h67RwManmXKREmGyhyPJfIzqv/TJNeddKCHe2TmJMtN+Ade6qc+mOS1Pjmcxnh8Ppgl2H85V5aftF/r/9Op/wQEL7KELqSMgtzveW3k2fMl3ZprVQXHDoDs=; 24:MqTbctpOBh8sOfMB77e7A1M//J7SyotrylubsmXYM+mLHnisXFyTNtS1EbVqd9KCe5b5UrpjV6K/biOT/ivIy6JqixX2BDLeily0K8jGSmU=; 7:JvH2LnridvE3vCD8IrPDo61g5o2xUKvK47fIk8xk5NrsjSSAWXYR3H7gfFmuN6mddkOfSy3+XykwzBN1MXCqIva8zP6WbwU7bOlKwM1O+TVy8hFa7n/H5zZ5N4YvUNeefMwqqe7rvfC4CQnuRDKII1im4CVt0d1J1cqg1vjycvGgqoRJlm0W6JFSMRdAqo7KDULNeWuaLOAcvfUBqkoxTBsYdUlJgOxexxlCSCx+7czfQ6buIsI0ODZmaywPYAc9 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1830; 20:HF9mmIvR5ir0+kWmEOtb9TxPI75pkWNpXLygcv3duHu1qPJAnJsVdAm80CpklE/XAoj+xeFoWTjIy/2VcvomjAVrOKd8SKD2fT+nrPzSV1JDrXLi+urIh5KtkBomF5l/+gql6LmBaepw00LRPuHHKMiWz2cGrZLtVBS2/cUIi5LvSFapIZ7bs+bdCtOEZChWMdcjSQz5j4qjAYJlWKDC20GwWhpy+KxPaKkEdscmLKvoCjrfkJdsDtlqxyyFmCXz X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Nov 2017 22:11:27.5973 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5c830993-e925-4003-8eff-08d52d3efc1f X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1830 Cc: Andrew Cooper , Boris Ostrovsky , Brian Woods , Jan Beulich , Suravee Suthikulpanit Subject: [Xen-devel] [PATCH v3 1/2] x86/svm: Add virtual GIF feature definition 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 Add support for enabling the virtual GIF feature. Signed-off-by: Brian Woods --- xen/include/asm-x86/hvm/svm/svm.h | 2 ++ xen/include/asm-x86/hvm/svm/vmcb.h | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/xen/include/asm-x86/hvm/svm/svm.h b/xen/include/asm-x86/hvm/svm/svm.h index 0956f860ef..ec1eda6a3e 100644 --- a/xen/include/asm-x86/hvm/svm/svm.h +++ b/xen/include/asm-x86/hvm/svm/svm.h @@ -64,6 +64,7 @@ extern u32 svm_feature_flags; #define SVM_FEATURE_FLUSHBYASID 6 /* TLB flush by ASID support */ #define SVM_FEATURE_DECODEASSISTS 7 /* Decode assists support */ #define SVM_FEATURE_PAUSEFILTER 10 /* Pause intercept filter support */ +#define SVM_FEATURE_VGIF 16 /* Virtual GIF */ #define cpu_has_svm_feature(f) test_bit(f, &svm_feature_flags) #define cpu_has_svm_npt cpu_has_svm_feature(SVM_FEATURE_NPT) @@ -72,6 +73,7 @@ extern u32 svm_feature_flags; #define cpu_has_svm_nrips cpu_has_svm_feature(SVM_FEATURE_NRIPS) #define cpu_has_svm_cleanbits cpu_has_svm_feature(SVM_FEATURE_VMCBCLEAN) #define cpu_has_svm_decode cpu_has_svm_feature(SVM_FEATURE_DECODEASSISTS) +#define cpu_has_svm_vgif cpu_has_svm_feature(SVM_FEATURE_VGIF) #define cpu_has_pause_filter cpu_has_svm_feature(SVM_FEATURE_PAUSEFILTER) #define cpu_has_tsc_ratio cpu_has_svm_feature(SVM_FEATURE_TSCRATEMSR) diff --git a/xen/include/asm-x86/hvm/svm/vmcb.h b/xen/include/asm-x86/hvm/svm/vmcb.h index 01ce20b0bd..595cfcf57b 100644 --- a/xen/include/asm-x86/hvm/svm/vmcb.h +++ b/xen/include/asm-x86/hvm/svm/vmcb.h @@ -325,12 +325,14 @@ typedef union { u64 tpr: 8; u64 irq: 1; - u64 rsvd0: 7; + u64 vgif: 1; + u64 rsvd0: 6; u64 prio: 4; u64 ign_tpr: 1; u64 rsvd1: 3; u64 intr_masking: 1; - u64 rsvd2: 7; + u64 vgif_enable: 1; + u64 rsvd2: 6; u64 vector: 8; u64 rsvd3: 24; } fields;