From patchwork Tue Oct 31 22:03:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Woods, Brian" X-Patchwork-Id: 10035443 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 72A03602B5 for ; Tue, 31 Oct 2017 22:05:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 66A5E26E46 for ; Tue, 31 Oct 2017 22:05:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5AD3A28B14; Tue, 31 Oct 2017 22:05:51 +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 CB3D626E46 for ; Tue, 31 Oct 2017 22:05:50 +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 1e9edA-000122-2c; Tue, 31 Oct 2017 22:03:32 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e9ed8-000113-LQ for xen-devel@lists.xenproject.org; Tue, 31 Oct 2017 22:03:30 +0000 Received: from [85.158.143.35] by server-5.bemta-6.messagelabs.com id 92/BB-29911-233F8F95; Tue, 31 Oct 2017 22:03:30 +0000 X-Br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ower-21.messagelabs.com!1509487406!79813327!3 X-Originating-IP: [104.47.33.68] 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 59101 invoked from network); 31 Oct 2017 22:03:29 -0000 Received: from mail-bn3nam01on0068.outbound.protection.outlook.com (HELO NAM01-BN3-obe.outbound.protection.outlook.com) (104.47.33.68) by server-12.tower-21.messagelabs.com with AES256-SHA256 encrypted SMTP; 31 Oct 2017 22:03:29 -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=TXnrpzEWJoojwGfluOFtCDmJkPhozkIJmZX0i3UYg6o=; b=5fiy4gVTR38856O4WqlZVhfKx7GBS9EszlsIUU/bat1PiAztHXav8Fufgf+VVqcx6W7Yg9LTigZC6oAjJzSTLAAAl49mU1wsml81KbxEi+uAR9DY812E5IFqt+Skmql+7W19SpqCb++0Iz9CcM/VJBxBpzm0oD0qqiz0/2SzYMI= Received: from nikka.amd.com (165.204.77.1) by MWHPR12MB1840.namprd12.prod.outlook.com (10.175.56.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.197.13; Tue, 31 Oct 2017 22:03:26 +0000 From: brian.woods@amd.com To: xen-devel@lists.xenproject.org Date: Tue, 31 Oct 2017 17:03:07 -0500 Message-Id: <20171031220308.107679-3-brian.woods@amd.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171031220308.107679-1-brian.woods@amd.com> References: <20171031220308.107679-1-brian.woods@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: MWHPR1701CA0003.namprd17.prod.outlook.com (10.172.58.13) To MWHPR12MB1840.namprd12.prod.outlook.com (10.175.56.7) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 64ee13d7-c4f9-4832-1968-08d520ab36a4 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081)(4534020)(4602075)(2017052603238); SRVR:MWHPR12MB1840; X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1840; 3:WuGYOS2wUDYBvWZtIIldRzzN15BfTU8o98K0NqUTaY81ycMK/gty7DPoAThed12tNzMSuStV1mhbEFePJNSx52jRuqGaLjsM5GlyWgjWxCj8fdrB9TAzKC9hJ5v4w5hv+lTCRw7gRZZPLC3JHtglX9osdybKN0X3g1ii6LsHF9ATFWJLPcmyMTLbE5I9Se1nqbGF5NbW6rlt5SqQHK+D+gj2Pl8sgYDS4l0TtixlLXSRQij7WhKUow+ZC2MkPyTJ; 25:CNuPZ09B1Qr2xinCbjY0j0Umzg5xGNJuX2svA921bvk5ZUj26eHGpk1XNy6mRY5DsmlYJMMrAX5kumheFyqBfmpl71X2dYefxHT9D9U4o0sGE2TusPn/Qk/vQu7bwBHfKXQ0fxKyhOKaSFEwMQyNNqQ+W8HsBtHz4vGV9hMDZYUTCTQ1sxpFn8LWeML5AT4EVElX/FFpq7hR2eo01Le5bvC0+nDjojaK13Bw7APE8sIgRSoVG4MmNBACHGZknQ9hh6xAcAhkmnQ24/A1pMexYa4eEdYUcSupB/vYM9GGquZBYpUH3EAvaA59Nnm+EJsx/nAUhrXtvROy6fGinba2u4+xtlsN7qjfHMWjebLRQT4=; 31:SxxwfEhvSqi9k8kizwGJFkqzGQlsdmwJZPRRZ8Ry9vxbYCuy4T9Bu7FNc8cQHUBb3gGQ/nJMEUlcEbrcvHyVkQgLNfU13aU6hZ/jzjLdqQTWcVkMKXFPZd7KzSc+G2wQ3I5u9ZRZbFJcLeCaLrNIxYihC304MEADieO5O5Kf3tVooAwhLOR863VKkZDKBrzLuVYriJ78V4RXkvHGuhPv+4IMRIaw/V6lIv4rwkoNE8c= X-MS-TrafficTypeDiagnostic: MWHPR12MB1840: X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1840; 20:M5r50PzjLmklSndNzXo1WFMTmFz7V4WGjqLWhP2eJNjRRVfQb+bq5Ejf8Vh+HTC2GNP8AJT92CanFa+Wv7QoGYokcy6+wu3o5E22CuZi2eiRImcLei3WaZLDek9MGmkC8AM4wx0IpGtZj9bgcs4nNJQest2m6oOvMdXSxso6tDoxN+1x+thS8F5oi+Dt+qdYcan8tE4J7CJiZAVeao/CxWXqiV3+K3mQ5j9iui1bvPUXvCae4t/WKBvHD79Fifd47e+J5nC04qLmzRHt+XwGtXo6FlScFWbTum3yW7g2CYkoakr7j1Uk0t0PfING6KOxKSU0GLvKCdo41nwMkIYiMGBF5pCyZ/BaPwke4R5qKWNRDPMBbeOOqEKFiVW+T5JM2PwD40fzLu5fBcsV1f2H2L11qVpMM5dwpADZ4kvLHxFXT31G6oCtDeeI5LjwGEGP7p6rIMYIEXYrI2EseWKD1B0nlCCcV7NaTQ/LWuw0p8Kz6jRx1ulaIiU273O60TZd; 4:dT0UPXVmuAWi9z0WRcZbdH834D8s9N8xcrKKd4BOAWEBQKkFVHeyXF8JK9mfx78LQnSk9lx5mNMu87SCh0I8GD+5bN37np3Vv6CiZW0Kt+pKXuHwk7BRYm/n/m4Gd4s8wOxrx5PN2iUu/Ksl6wmQT/YX2VJvWy1rIK2wPfJoXD165WWRjuC45a4/7rVm27Sv7u7wDUXrTL+CU3M6RHRtdqw86zJFs3/t3/SIbtDqtKGj+E5OOwk90+3WnQuMUJNC7FykOgXHhViacx6x1kEWc+/092oEKTxZ1Aj5hJie52xW3kijLpOsPiW/8aqc7UFC X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(3231020)(3002001)(93006095)(93001095)(10201501046)(100000703101)(100105400095)(6055026)(6041248)(20161123560025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123564025)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:MWHPR12MB1840; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:MWHPR12MB1840; X-Forefront-PRVS: 04772EA191 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(346002)(39860400002)(376002)(199003)(189002)(7736002)(81166006)(66066001)(106356001)(575784001)(86362001)(6916009)(8666007)(47776003)(305945005)(68736007)(2950100002)(316002)(6486002)(33646002)(478600001)(101416001)(16586007)(189998001)(2361001)(2351001)(16526018)(36756003)(3846002)(1076002)(6116002)(53936002)(50466002)(5660300001)(97736004)(53416004)(50226002)(8936002)(72206003)(2906002)(9686003)(25786009)(6666003)(50986999)(8676002)(4326008)(76176999)(81156014)(5003940100001)(105586002)(85782001)(48376002)(85772001); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR12MB1840; H:nikka.amd.com; 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; MWHPR12MB1840; 23:e74eBbksgEHb7lpGDUnzrubJ92yuYqtmzL5C91Y+6?= =?us-ascii?Q?7y6NCYrkuv+kb6yKSmDti/9rpqWW2AKVXGK7vAHLI8u512PiyG5kruOgZPR2?= =?us-ascii?Q?joqFg8EbSwX0asW6pCQEHCQOBISmmz58c5KrpzetfbmzyhBsb5RHi3CZ9Onj?= =?us-ascii?Q?hz9VYLV6aS0qIA3FZpfoyAr+G6uA7s5RdZf8wOjdW7zJTN45pTZ049SV2WI3?= =?us-ascii?Q?2W0XvjOLCQTkxq/RVKOZWl3klOazMLRSTYh2InVc0Bz16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xI9DXmKmbdQ3NxY9+DdIF4d SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1840; 20:fh1Tj17K1Xp1wN62TUf0zE4yRLqJG1R4a4iSoQwYr+AbK3YzsOPSo3TLBg8GLF9OP9dP7Pja4dmev20q1MdXazh/D9dTQNVjJG9Eb6vJEm1rGg1EtJnYjMf4zdgkc8QtmI2ZHkUmiXarWQC7r9RNWobIIsOqvOKNOT+9WDex8W1XOswfDFMlLznaKLN7LeTGRjEJU/08WMZyVK3MsSlebuMafo6EwG1xBqnFtWfBOprorqbOwHvWOow5n2GF+Jt6 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Oct 2017 22:03:26.6169 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 64ee13d7-c4f9-4832-1968-08d520ab36a4 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1840 Cc: andrew.cooper3@citrix.com, boris.ostrovsky@oracle.com, Brian Woods , jbeulich@suse.com, suravee.suthikulpanit@amd.com Subject: [Xen-devel] [PATCH 2/3] x86/svm: add virtual VMLOAD/VMSAVE 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 From: Brian Woods Adding support for enabling the virtual VMLOAD/VMSAVE feature.. Signed-off-by: Brian Woods --- xen/include/asm-x86/hvm/svm/svm.h | 2 ++ xen/include/asm-x86/hvm/svm/vmcb.h | 1 + 2 files changed, 3 insertions(+) diff --git a/xen/include/asm-x86/hvm/svm/svm.h b/xen/include/asm-x86/hvm/svm/svm.h index 0956f860ef..4edf7b002d 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_VLOADSAVE 15 /* virtual vmload/vmsave */ #define cpu_has_svm_feature(f) test_bit(f, &svm_feature_flags) #define cpu_has_svm_npt cpu_has_svm_feature(SVM_FEATURE_NPT) @@ -74,6 +75,7 @@ extern u32 svm_feature_flags; #define cpu_has_svm_decode cpu_has_svm_feature(SVM_FEATURE_DECODEASSISTS) #define cpu_has_pause_filter cpu_has_svm_feature(SVM_FEATURE_PAUSEFILTER) #define cpu_has_tsc_ratio cpu_has_svm_feature(SVM_FEATURE_TSCRATEMSR) +#define cpu_has_svm_vloadsave cpu_has_svm_feature(SVM_FEATURE_VLOADSAVE) #define SVM_PAUSEFILTER_INIT 3000 diff --git a/xen/include/asm-x86/hvm/svm/vmcb.h b/xen/include/asm-x86/hvm/svm/vmcb.h index beec1f6c0e..1d3d45f6d7 100644 --- a/xen/include/asm-x86/hvm/svm/vmcb.h +++ b/xen/include/asm-x86/hvm/svm/vmcb.h @@ -359,6 +359,7 @@ typedef union struct { u64 lbr_enable:1; + u64 vloadsave_enable:1; } fields; } virt_ext_t;