From patchwork Thu Nov 16 15:32:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Woods, Brian" X-Patchwork-Id: 10061403 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 0A1D5601AE for ; Thu, 16 Nov 2017 15:34:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EE8E12A6C6 for ; Thu, 16 Nov 2017 15:34:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E37FB2A6C9; Thu, 16 Nov 2017 15:34:52 +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 462772A6A0 for ; Thu, 16 Nov 2017 15:34:52 +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 1eFM9h-00021f-4x; Thu, 16 Nov 2017 15:32:41 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eFM9g-00021B-7b for xen-devel@lists.xen.org; Thu, 16 Nov 2017 15:32:40 +0000 Received: from [85.158.143.35] by server-1.bemta-6.messagelabs.com id D1/43-04165-79FAD0A5; Thu, 16 Nov 2017 15:32:39 +0000 X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-Ref: server-14.tower-21.messagelabs.com!1510846357!75652754!1 X-Originating-IP: [104.47.36.46] 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 28905 invoked from network); 16 Nov 2017 15:32:38 -0000 Received: from mail-sn1nam02on0046.outbound.protection.outlook.com (HELO NAM02-SN1-obe.outbound.protection.outlook.com) (104.47.36.46) by server-14.tower-21.messagelabs.com with AES256-SHA256 encrypted SMTP; 16 Nov 2017 15:32:38 -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=cPOY/83DXR5JsQ02uSrJzEtARzlXJpGmWGU+hqwjBs5jy1Y+7dwggtbwXEQ58D2u+UhDzgvOSQ/1EU4JmFrsCHvJNxGwGzWcfT7K3I2f/LCkljIF3Weclx4MaSuWlsAKjCMHh4njeqMUnfuFrvEybuJhIvYgKg+PYH9U35cpdJw= Received: from nikka.amd.com (165.204.78.1) by MWHPR12MB1839.namprd12.prod.outlook.com (10.175.55.150) 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 15:32:35 +0000 From: Brian Woods To: xen-devel@lists.xen.org Date: Thu, 16 Nov 2017 09:32:02 -0600 Message-Id: <20171116153203.71358-2-brian.woods@amd.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171116153203.71358-1-brian.woods@amd.com> References: <20171116153203.71358-1-brian.woods@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.78.1] X-ClientProxiedBy: MWHPR08CA0056.namprd08.prod.outlook.com (10.173.236.30) To MWHPR12MB1839.namprd12.prod.outlook.com (10.175.55.150) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7b6e8dcd-dd78-4f71-107e-08d52d074370 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(48565401081)(2017052603199); SRVR:MWHPR12MB1839; X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1839; 3:MCQ7tzI7oxziFUwGQCQbr2aqNOfT8N1hoMzhkHw8xMFYvwWDmePvjEYgW0RhNnjTHmiN2roTfg5RGXLIgGU7Q5XimLq6pxG5F99ORubuk78eILAxbvnWwww7pSx2PWdKJmW8F5I6T+riAys9+FVDiKDUyqF0CfYAW/+k/u+QbUZsx6N7852ygFXQ5XCLtgByeJRX9Iev4qfy9IWAROLx/6DiAPqWbANg9UNRaBhm0zV8z9zMzfRGuC+PxgnXcoDX; 25:4gTvRUtsOzOFsAJS0r1Q6bBlM0UDch0WJQYmh3liuX482XYVKMn+EiYO0vTuCAsIam+L+EhPwzVa53Io0jLldJc72ZbmlLSl7EvxmqXUn/eQlFeMbHZRycbKcgtBUkPnNL+1DrQ9Yv4dqInJPUdpKC5DEZNiGGALM8aandL4rf8vOrNPABmZyWjYxJsHyoQuOERsb8Xy/BvrDOQqtPyHgcUwnF1U6pzuQcEvZZeNyYaAQ+pSWUcjpHwog1seKcGr66e51b/nZVDfWuLzERCIXEDhJCgkf8HnEDZVsOGvbgC3xY5OVoJgoZgZCI8yvAWaeaiNE6g0THfe4JC+AjEluQ==; 31:UUBzqSFWN9MjIdTW121d9avfUz1VLkciA8lq+EHT+ZdQsaKdhjGTpgnpkDioDIOQa13AbhC0TQR8sFuDa3KQFqcrPQV1HTp/JWHghNpRhv00ynWxIuM1FRKQZZo4fBfoeGD3ZVFGNyk8qphtdKiGRnkwLCNc3fhP5YzFIp12yuk674VjjcMser7WXNmE3HPDcgH37hhVjGYiDdeXkIbX1BMZvTHIOWVvhg28IKdIVuw= X-MS-TrafficTypeDiagnostic: MWHPR12MB1839: X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1839; 20:9Cy3ir50Jm9WwZjlYveO/s/J/fgZRHnWMLhBky+BziHU41CM6jPKUrzSJVVe7nJW/TNw8N79t/vzrUoBYPRleKPnt0NdpDZ3rPYLhbsdIb8mJR4vHcNbC9IH+quEgh2Entc6XjuW1ArUutoHFBp/sY4k0KgFvKSdqIe7L0xiPFqfIIChcdffd6xJi5ny9hEyFDRJ/Gb58arifRY3FmegBuzQSEz7hQmtMmQkkf+g2a1hjC4zwQObGb2FECqjYqo6etQrjzISm818DqFwbrXfBwO8hswKxiAwWjIK4KVyRo/ZuA+knsq8B8FCTZ9fcPF4VrnT+bVL7Tihwe9zGF+5g5+n13rY8d9FItUzxKDvCa226d0StQNHdAvSj5cd8a2RvLYjrzcpbuaTV8qNeoMpeci+Tq4uccOQFEb1SDCvd401nKab2fGbjX7F3QcZP5FkWnOP0b2glbz1gC/bMKmLj37fKn7wS0NW/2Igr7OobPNiFnnyl2oXTbYkc4TKue0n; 4:JHDEayA4oCSSZDJ4W/kLWdF08OGxqOXfl5pnxyf4Uu2nyYX6g1IcWssHZpn3kb8pKGVF8OYd8+NThfQchkGcsRTYG1BquYPgBGDh1JwxoQum9Im4aAR+63sSt6W1KYHGqrMezZT8XChhFmjR1Yv2BSX8m3SsXBOJQJN27BR/uW8gX8f0onuz8kbDJibNBw3FV8oGY47ocufoO2g1ifisi058/b5fbYIOMJbMno0naix0ajK2Y9QNvp3Rrj7I0kS1xjfMwCLMYao9K4BO7jRCDrw2BvtgYxmNAFJAnj8GCI/hDZIcc9L4tTsytNDswPoI 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)(3231022)(10201501046)(3002001)(100000703101)(100105400095)(93006095)(93001095)(6055026)(6041248)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123562025)(20161123564025)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:MWHPR12MB1839; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:MWHPR12MB1839; X-Forefront-PRVS: 0493852DA9 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(376002)(39860400002)(346002)(199003)(189002)(6666003)(2950100002)(6916009)(106356001)(6486002)(86362001)(2351001)(2361001)(48376002)(575784001)(36756003)(68736007)(53416004)(25786009)(54906003)(8666007)(105586002)(16586007)(33646002)(50466002)(316002)(189998001)(8936002)(50226002)(5660300001)(7736002)(53936002)(5003940100001)(4326008)(97736004)(101416001)(478600001)(47776003)(2906002)(16526018)(72206003)(66066001)(81156014)(50986999)(8676002)(3846002)(76176999)(81166006)(6116002)(305945005)(1076002); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR12MB1839; 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; MWHPR12MB1839; 23:FRE0FH7A3SjYpiVAHzaWQ8TqG+ztotLVbNF5wc2Vj?= =?us-ascii?Q?mkqdM3XQcOd+UZf2Csnxai4qj8FZlJgu5G4ZetE6xZHuB7NrxM8FwGl4DJ+f?= =?us-ascii?Q?NRUKrZWuryf4p5cvBgg+fc6YAplCVCtqkOqmyYbEGSrO12CvTABjNsG8yRRL?= =?us-ascii?Q?YRDiukt7weVOqRqWjyDTO0z0SnDz3k5M3dAhtDnAZbNccdNp5GcJnis9oES5?= =?us-ascii?Q?ZAGx5XV6fh6GCnCASuGQReRTWoz+XmdK7ZHgLnMSa1t/eTXVE4j3K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microsoft-Exchange-Diagnostics: 1; MWHPR12MB1839; 20:GnkAp6cZqgocQJ4hueM/OqqgmArmUjLs4kl6I5BLN846B6LWyyZkr+a9R71Y31KZJLt0NWovrZ1EYgDwlJt0ffdjtAnT6T73+ftLvSzha3px/FfzcTlq6UXaYVrJVhUtEJat3y6sSWYWgwiGshZtExOXhD/l+ue8k28ooiEf2qb7/RKbzH3gBVRjM3r436zogMT2QRzPR3hXciMknbdvA+2ph/23fxC8gMPEikKhhOw7Yxn1AVTGTaCosFa2PNUw X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Nov 2017 15:32:35.5981 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7b6e8dcd-dd78-4f71-107e-08d52d074370 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1839 Cc: Andrew Cooper , Boris Ostrovsky , Brian Woods , Jan Beulich , Suravee Suthikulpanit Subject: [Xen-devel] [PATCH 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;