Received: by 10.223.176.5 with SMTP id f5csp2878192wra; Mon, 5 Feb 2018 11:26:58 -0800 (PST) X-Google-Smtp-Source: AH8x227mGimoX5DsersXjOYvuUWhvWUGAYwo1RIGee3NKdmxg37rXEy85citD6PnoDfBOcyPDtwo X-Received: by 10.101.80.69 with SMTP id k5mr28008669pgo.443.1517858817913; Mon, 05 Feb 2018 11:26:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517858817; cv=none; d=google.com; s=arc-20160816; b=F55y0lhCacDWXaXIcuF5czKvmTktZFuapIjECaWFXRhUUCVykddKcoot4hWzm1ypOK ziasqEc6Xkn6Ewf2qg7BAf1tpBU7cWJcR3i0VvUdZAa6ZbkNOXgOgibWxsK1soor3J3e 4nqC+7HBjRw4ndc6S2m4JZlpNggoJkVQIe1Oydi0Nb8SlOKRGShN4syFvArf6mKCyjJL +whDnSMZktDs5sfW4bGjobu/16EIkqTRBvTc0TVUHTstlKg4Ep4IKO95Jv7CAVrNhfBo wu44wxgTuERzcNazA60+O6OmuXBZth+pRrJVQEnBaUFHjT3GCkDxiBMUgZs076BEVajX xZTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature:arc-authentication-results; bh=SVy9WhOUbAUXvq8AyOe8+KLU7UpNv0qW8UA1JlPZI34=; b=Xx/fNYbx4oBtVEXTAMASkkudJtNm9IHh5OmBisml7vsCFy7tInMkKcj5ziBJghKoSr QCCdle4aFJo/CLeKJTGwZ13FpefvAw4sBH3jbQVaZwzd0M6mFFB3gvf1JUWRbM3AF+5r Zd8MAwmObYa0kMkqpWzLHgLXPjzoT9IagYBDgfeFMIk9Y2B4SiCSNsc+sLZ99115mclJ NtC8pJwpPmXum+5Q5kt+yywK8vqbnHL1kSJKqmoAkd8XEkxeji9edmNCo8Xth89tpFyc Iw5QCO9no6L3pEM9iLecy3vpury8JvafADdJj6cLi7ozsqYG0sIiZKSBoRKbbgooVgA+ PyxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=nf8ZqRP0; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a3si170781pgn.429.2018.02.05.11.26.43; Mon, 05 Feb 2018 11:26:57 -0800 (PST) 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 header.s=selector1-amd-com header.b=nf8ZqRP0; 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 S1751986AbeBETZy (ORCPT + 99 others); Mon, 5 Feb 2018 14:25:54 -0500 Received: from mail-bn3nam01on0087.outbound.protection.outlook.com ([104.47.33.87]:43952 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751655AbeBETZY (ORCPT ); Mon, 5 Feb 2018 14:25:24 -0500 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=SVy9WhOUbAUXvq8AyOe8+KLU7UpNv0qW8UA1JlPZI34=; b=nf8ZqRP0GKuEeGVLNEc84b6rpVJcyY0iv/K1+dN+Wu/YVLSwZZp7kB/0LKnqSgpOYb5rnD5H/S8DB8h/+FhaLbaPCnJxlLYi1APUGqAmBvc3Ip9Xec8G9JoLxqoRDG8z6KpSH+DndkTu/+EYnvvLzrlS/H1gAqHWGgs0I9eI3pU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Janakarajan.Natarajan@amd.com; Received: from gi-joe.amd.com (165.204.77.1) by DM5PR12MB1370.namprd12.prod.outlook.com (10.168.238.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.464.11; Mon, 5 Feb 2018 19:25:19 +0000 From: Janakarajan Natarajan To: kvm@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org Cc: Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , Paolo Bonzini , Radim Krcmar , Len Brown , Borislav Petkov , Kyle Huey , Tom Lendacky , Janakarajan Natarajan Subject: [PATCH v5 3/3] x86/kvm: Expose AMD Core Perf Extension flag to guests Date: Mon, 5 Feb 2018 13:24:53 -0600 Message-Id: <220fdc3767d991c2ff5c32267b166bfecf25334c.1517850303.git.Janakarajan.Natarajan@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: CO1PR15CA0095.namprd15.prod.outlook.com (10.175.177.15) To DM5PR12MB1370.namprd12.prod.outlook.com (10.168.238.21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 35934753-872a-48f5-ad90-08d56cce3296 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020);SRVR:DM5PR12MB1370; X-Microsoft-Exchange-Diagnostics: 1;DM5PR12MB1370;3:vDT4Czkd1A4sM0PCaPFApuk20HeamoiJgU3635JtdoHONVDaA8x5rUkiytzXA3dIpOHFQp0WKkvKOhEYJmpQMdeFFKmQOXSklkebHTKkj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S5hypykgBQErnAo/vWb2Y+WQe2AV+94V+BEOby7ttP8IUpxugC7aQiUN81k1XsufkUQNUue7M5fuFlh/sgpPGxcpuAgSfn0gle/P27HWEdzHU7wMmBdpt+PW4Zw7Ef0epjotUcTxDWd7PRPZhEkE8PfMWflezJah+KkMaE3gpArf2Nkv3+ZeOMelua4sXAqnFgSg2kWhEwhanoxuH3f6iCMkfrU27ECeV6s3dMpxE1UkilK1Ij;4:AUQQhCLpEf/2ygTV7gZKOY7u7Nqc4fwB/7s5XWf9KaVSZv+ay8EoSsM+1+EMeqZNePwXoJkG6V5cW7uTsdzJIntpNEd8FSG1tphauNDr5ONjwL2UFBaGtH4E/Z+6zT909j9ktViwEkYoAb9Os0rJAJmOpXh89FKzW8UZuIotXb6s9aROJZJKBGl6VmRwv4AWMGqEYoL44CguDKWliegokmjm8ghoYxdlzA4aqUPTGqQyR29J0kgo0F4fpqX7kzxuMVvkhknea265EzJwD+i0TkZ2wOBBhdTqMMJGRqw5PGaqofm6t/G59av64h8uDU9u X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040501)(2401047)(8121501046)(5005006)(3231101)(2400082)(944501161)(10201501046)(3002001)(93006095)(93001095)(6055026)(6041288)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123558120)(6072148)(201708071742011);SRVR:DM5PR12MB1370;BCL:0;PCL:0;RULEID:;SRVR:DM5PR12MB1370; X-Forefront-PRVS: 0574D4712B X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(366004)(396003)(346002)(39380400002)(376002)(39860400002)(189003)(199004)(48376002)(68736007)(7416002)(7696005)(50226002)(5660300001)(52116002)(2950100002)(6486002)(6666003)(186003)(305945005)(47776003)(76176011)(66066001)(59450400001)(4326008)(81156014)(50466002)(8676002)(97736004)(53936002)(51416003)(105586002)(53416004)(81166006)(386003)(7736002)(8936002)(25786009)(72206003)(26005)(478600001)(118296001)(86362001)(106356001)(16586007)(54906003)(6116002)(3846002)(316002)(36756003)(16526019)(2906002);DIR:OUT;SFP:1101;SCL:1;SRVR:DM5PR12MB1370;H:gi-joe.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;DM5PR12MB1370;23:jUbN2x2vDOna0uamT/JtRw1ueK4FpdTcqQoWQHVkV?= =?us-ascii?Q?j3Cz6mQVT4HBCUltXRqGnQGpjYTmJfzhVNMeiLO2e2y2P4C826cto9+o8wwm?= =?us-ascii?Q?DtLhOwTXV8WzcBrSs7FEvPncwVKbxrGia1fycpLIgyaDyB/DmJP8slPmXZwc?= =?us-ascii?Q?9Ukotq7s31K4pjqID7BNzB91o+s/5KQCVlW22YoTLPz9ATTR4p7Ibeg9MA35?= =?us-ascii?Q?Ta1Et11i7ms3LNrCSU3253kpibyoiGCgQRgygdSxe0YKkl4yKFSEy7fw39Po?= =?us-ascii?Q?wOtFXWEIpaLBtEtUWF8scIijukhgmaCpIITq9fjqEPQDANk2sJFABha2L8VE?= =?us-ascii?Q?4WA7n+NscBGPVn6J87SBleupVwqD5UgiMs4WJukV8OFQ/vRBuTFoyHfcU1kL?= =?us-ascii?Q?42wRcz5pjOF0zaAhlDI35xqTjUI3CcOItRI+GvQ3bxFLJYhDNyHwxlBtJaxG?= =?us-ascii?Q?PXdgDIcZraBHGDOiM0kKxlnyQh1SoliJjdreGWNifxNYKe/TshfEdZzjTZ4z?= =?us-ascii?Q?1DC2FKwp2QcWpv5tkzkSIDjJdoCbspbd/SMTBfQWI6DsA3R8K92kF6LJQ1oN?= =?us-ascii?Q?/k1WRVVqfQrsB5REPzn17+anCgmOqh8Aiq0zV1la1j/5AVdFKBQKG4H6Hbo2?= =?us-ascii?Q?TCzzIpVAe7SPxOE+SEX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/nK++v6S+f8tfcoR02vxFe+jQHgpYT5x7KPZCJ0V6EdKr81x0lTRxwNPUXf3wNUCC+ta1XJsY29Xqr9YYAaRBuIK5iObUVSYHx9gN/54iR5mZt6r+qQKvZky5tUgJDp+0V12+JfUF8LG0L4JrcM1Zs65vV7n2rxzoU=;24:xjJqDxnGHm8u42tnMOdg5PYBWxmMJRoRDr2VHNY0S5fXNPdoKXNOL45JiaaXMKR2Wggn11u9IArwS6yuWAE7JDHOCGw4JiJEEpqeNZew868=;7:g00sfrOKhasaO6wo+1/xkUBKyj+UaxCme5+m8rGihqhMPKVGAIIGOKEcRd2NXd0knm7Jklmo8cMJTRYxQWoFxbWhWTTOwudeFfTvuKThv/f4pb5RRKRtFLLBNExv4R9kp3f+HbZ0AsJIbsjH0cAwlVae/M+QKs2SUQ8hH5JELi4Dn50kEoc43CCW/27MB9VIvgPlgp7WTEWluHMvxozai8OIEF2i+as4npp6dV2CUthG9P381DWxLMP8MIHtd2rC SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;DM5PR12MB1370;20:vykuh6qOD/nSFdYnvEULymESf8rp4Efla0CYInPUKoirrWR3ZPh9pYUdUCP5zD97UK1BqdkxFp/XUPELgIYA4jtrrSOsKNQh8RwYl/yWlWXnr16gRZGhLb0L//1wPu1yAI2Gj3jfeCB0VJ3T+hSTgQ/5wB8YB3Va9HCS3tpSLA2DcgieFXWYFQRkw5931O88itTAgHxPrOo54Dh9Tt/8ZBjqUR5kXnpa1PPgYukvmqEwcmhcIoYTAtk2cOugGXcr X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Feb 2018 19:25:19.0122 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 35934753-872a-48f5-ad90-08d56cce3296 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1370 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Expose the AMD Core Perf Extension flag to the guests. Signed-off-by: Janakarajan Natarajan --- arch/x86/kvm/cpuid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c index 0099e10..de561d4 100644 --- a/arch/x86/kvm/cpuid.c +++ b/arch/x86/kvm/cpuid.c @@ -365,7 +365,7 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function, F(LAHF_LM) | F(CMP_LEGACY) | 0 /*SVM*/ | 0 /* ExtApicSpace */ | F(CR8_LEGACY) | F(ABM) | F(SSE4A) | F(MISALIGNSSE) | F(3DNOWPREFETCH) | F(OSVW) | 0 /* IBS */ | F(XOP) | - 0 /* SKINIT, WDT, LWP */ | F(FMA4) | F(TBM); + 0 /* SKINIT, WDT, LWP */ | F(FMA4) | F(TBM) | F(PERFCTR_CORE); /* cpuid 0xC0000001.edx */ const u32 kvm_cpuid_C000_0001_edx_x86_features = -- 2.7.4