Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752582AbdLFQj5 (ORCPT ); Wed, 6 Dec 2017 11:39:57 -0500 Received: from mail-eopbgr00117.outbound.protection.outlook.com ([40.107.0.117]:19264 "EHLO EUR02-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751208AbdLFQjz (ORCPT ); Wed, 6 Dec 2017 11:39:55 -0500 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=jan.dakinevich@virtuozzo.com; Date: Wed, 6 Dec 2017 19:39:46 +0300 From: Jan Dakinevich To: Konrad Rzeszutek Wilk Cc: linux-kernel@vger.kernel.org, "Denis V . Lunev" , Roman Kagan , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Thomas Gleixner , "H. Peter Anvin" , x86@kernel.org, Paolo Bonzini , Radim =?UTF-8?B?S3LEjW3DocWZ?= , Andi Kleen , Kan Liang , Colin King , Stephane Eranian , Sebastian Andrzej Siewior , Greg Kroah-Hartman , Jin Yao , kvm@vger.kernel.org Subject: Re: [PATCH RFC 0/2] ignore LBR-related MSRs Message-ID: <20171206193946.23e360cb@virtuozzo.com> In-Reply-To: <20171206150648.GF28074@char.us.oracle.com> References: <1512560585-27263-1-git-send-email-jan.dakinevich@virtuozzo.com> <20171206150648.GF28074@char.us.oracle.com> Organization: Virtuozzo X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: HE1P192CA0006.EURP192.PROD.OUTLOOK.COM (10.171.121.144) To DB5PR0801MB2742.eurprd08.prod.outlook.com (10.166.176.26) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a2ffbbb4-cbe9-44e9-1118-08d53cc7f80b X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(4534020)(4602075)(7168020)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603286);SRVR:DB5PR0801MB2742; X-Microsoft-Exchange-Diagnostics: 1;DB5PR0801MB2742;3:AO76OuV6ZUO4OtIM0+sKQ4C2XN+xvxqfSRFgYwwAGRczGYAAL6GetKCSEHDKi7q88UqlHggpJPJ0Y2UzexTjU1FFBqAP+c0wWJoglO0FTsf1f4+saqatSnSURCUohabjrNnpqr7wVsUMxjBbLbCGObc56LgIhCN25v9f4+RGnTdAh6QrfnNFRxixEz54kl2KilCufmzedS9WqFcy/W7FYk9EH8gCnPCimg+zvjL4tHKUuzsbid05GbaZcpQZgDig;25:T3xkp7De6EhGNeF6nHlx0oLSmHmKP7EiwKYg+rClqKvdGFTXa6o6zEf/Ryd6LDFBTd2HS3MZ+SQsL+qc7RX2Igq/CMJBnF3nmtLF7X7iinbITALlzufgCgC/ZGv0TBtyJ2pZ7V/GykamahC1snXzz8Qd6XIKNj34i8qpzairN12TGwTiifuoAIbQ2rLII2dSBddzl1XTOrAsSSXPUqGTRo49fuA9yDzhIkWvpypVSA4lSOS+RfMITHd+3Pa0qhEtTHW4gHjFSQF6vandxeAANbETtcok2Nx4YUbRjNn8ueBK39J3WZKHKDyJKrvG90YCsxUHqxgDosAfWnI5Km4T3Q==;31:ltDzb7lz6KGou4om63h1vl4MPUxDA71tb7+mZwy9dUiw87qeTmSzY4isrlCuGtqJcD6G4xEfJkPOOmVw+VY4OcDK/WffLbA9l12Pc/lhnno2ZtekxkEoStJZFobbycYWj6bwCpVZhp0+rhUaRTxQWtczm+VWORizZlTaelGlNDS6EaXkdMoTuvXaZdarOGK2kIkTESP1FE5hmeYeg/FOpmWb8g6SBEZMP5GgIIfJQSE= X-MS-TrafficTypeDiagnostic: DB5PR0801MB2742: X-Microsoft-Exchange-Diagnostics: 1;DB5PR0801MB2742;20:kZAm+kdEZp4h89aUxt7zE9ym0arbyOg8BYVONQxYAI7vsRs7vOwYRMKXPfAHIXx1kBwr2Z0JBhF3+LSO1M5qE6O3HDQwQaGk9NFPTzLliXvEvZwX1Tnea2c55wCBvtHcLeBMFvtQL1tq2hqfBirmF4TCfj+sgpx5+5bqqKvQINCDqNVYQsMu5ycgspmBTLReoHflCVfn9ciKWeARSPzCBhsvhdhNIEHUeO1LWPctFgZLQdFB6+JPsRFij98aCcHRYtJ0UT8aSE6T5lEVWQ4Cn/z0Tk6HRjEm85lq5sa0Lm/NDEvBHVzbEerA4jkr2dKQg2vo+xSy9iZ1cjY2aHPTY3ZDFecrUUAMxcoIouhHRqrrnOP/AkwRaWosG5QItF4A0oavxkam53MlVUjibxux5FKyUqhGRwvPEICnpRat+Y4=;4:S4hpGnL49jT9WXylZO26nCa0hVb95Ahmh5OLc0M3K5MluFMrIn8jlgqyXPlZGVCUbnm6e73bb6BGCQr37qlTBfZY/fyCuO0HCiptMBP/g94xllUzZc5eWYVx6s9dhMuja7DfNWsjFXslmQ8bkieyfwk5fLUxJP+kQVp/9otsHNBL7YJSoZWobDJScs/owl3sRX3h9TrpyV9TFuLDfZfv7w2NnH2F6aHjVkmpk+7yupgqwNkau7JzTyFGuX+VH7I95KUImrgENhn8b2E5nWcK42BKrbEAwLZPyRErFCmC02l1Q882DtOLTVKGdHxL+0/l X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(146099531331640); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040450)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231022)(3002001)(10201501046)(6041248)(20161123562025)(20161123555025)(20161123564025)(20161123558100)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:DB5PR0801MB2742;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:DB5PR0801MB2742; X-Forefront-PRVS: 05134F8B4F X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6069001)(366004)(346002)(376002)(24454002)(199004)(189003)(2950100002)(25786009)(55236003)(8676002)(81166006)(7736002)(76176011)(52116002)(305945005)(6486002)(6496006)(36916002)(81156014)(478600001)(229853002)(68736007)(5660300001)(97736004)(101416001)(7416002)(2906002)(47776003)(66066001)(316002)(16526018)(8936002)(6916009)(230700001)(53936002)(50466002)(106356001)(54906003)(33646002)(105586002)(76506005)(6246003)(50226002)(1076002)(23726003)(4326008)(6116002)(86362001)(3846002)(36756003)(39210200001)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DB5PR0801MB2742;H:localhost;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DB5PR0801MB2742;23:rJFHglbIFbbvlZ/n8V51IusMUIYy0cT0xwl5yBC?= =?us-ascii?Q?6P8gX1A+xB2a3p3zuBjdaOQkZagkfqNrD1WoK329UbFJW3nAoRzvq0pocRmf?= =?us-ascii?Q?n+OSBHTEcLMK7qQ6Ul5q9FOSNX/OyTnpC2snBy5q8IDGenRjhIURudlc4EdE?= =?us-ascii?Q?nTIFyfkbaeNV0ZoWM3oWiDPLuQ3uIFwbRz2bvj9omcwVQ0o4V8wANCwUk1St?= =?us-ascii?Q?+HzXyQvnXGjwNi+rgOdhO0nAplOia+AAFPnzeB5u+V5BZ8DnDBudCLVCqrb3?= =?us-ascii?Q?/1Tf0VGn7Y9bmPPEOPlYf9vC7FtgWmVZsCdhd2s3g24B+zoY2+aFldIZiZcY?= =?us-ascii?Q?WQpwLxUk0ICQWKAY+doxjvbVh3pZ0/aJ6nUcfU0HUOPOqEfBITCG9oQntEyA?= =?us-ascii?Q?ZekG0UDSiNbhRMC30kOeWlH4v7v14JmW8k2sU4EsWBZO2PuU5iV1zs6I5Z+4?= =?us-ascii?Q?ecaPWJ4Ab9/jDwM13q2a2RVlmtjrHfQA1j3o0Vs+paBEJ2Xm79BXbbMaJ+iq?= =?us-ascii?Q?XuU3+MWNlFeqIpXCE+KYC76T8Qn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MXdFI1SjZJTdbGHvNmGfy6bxUKT+NrMN1OpqVBQci7QSYgkkUQFbp06h4vHFnpSjyx0EUvux/3f7rD3sWcTYnf450WRH+24BJcxtsF1gbxMKwyzRm06hEGvf3kOnjLFfQzsIfgumLlC/BAz+UH5EUt9J19UPI50dSyBWDnVPxB3Vr6Irktv/EGvkEBx1NLi3O+z+nM=;5:DjPujBbxzgi4aqHiNC3ozYD0MHi3fNqRpR0dFhOY2jx7zKRN2FOzaQ0g2XBmLKaHtqqvhmWB5kCRIOYdvIxBtVoZDLOaLU/hEHa8HrNDJChs2hcoL7FCrHwvM9P+xulEJvQiOajUA2bvw5dcSHza4YcE6m00DZaOrc8rm+zoTNY=;24:FmNH3eRNJEuRsVCreTcldNhOclKQ8x14hYPWKVvA9F6ctugx57jkFNbMLDIUyF37ZRbKrwD655QngFN2jzq2dyCWgPT04LPEuY6Nvm2rixQ=;7:GI8M9Nwd4r/QYEIeY78LX/Pn9aciXsCZ5IaHRZ615wTzwoZgjfe1+JtGRZ2riAXswTDn4IenK3vbnhVHlv9x9b2rYg7fnuc8YVMMinSREkzjDxTuFNdSumJ4BAuCZgYRhqk91eFhX7wUhglClxc1Rv7R+c+ISe6TYFakyg0aQiwO9GFF1VgpcYSuwS4CAi5ANWluGISAbbKQZdrtKhWcsBjg/42w8RepmvQoZAuVxrmTJHf2GWriKhhjkpNxm1xP SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;DB5PR0801MB2742;20:GGzooZrVNwodDHw0aDxhHjHC7iANuSeevsNaYwdsY7tteEQBiC0+g8nsJly9KJme7Lcu7JWbshC+BUtKHBbppulMyNsbQp19rUqWIvrWjTuKhQ849DhhxwahtoorjQcZEHmr1RcT+fNYuGCiaaggFJ9NsMFS67zSghQJGKtaFts= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Dec 2017 16:39:48.0425 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a2ffbbb4-cbe9-44e9-1118-08d53cc7f80b X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR0801MB2742 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1460 Lines: 44 On Wed, 6 Dec 2017 10:06:48 -0500 Konrad Rzeszutek Wilk wrote: > On Wed, Dec 06, 2017 at 02:43:01PM +0300, Jan Dakinevich wrote: > > w2k16 essentials fails to boot if underlying hypervisor lacks of > > support for LBR MSRs. To workaround the issue, it suggessted to > > ignore these MSRs (but not all). > > This is without any hyperv enablement? Meaning normal stock guest? > Yes, it is normal guest. No hyperv enlightenments were enabled, and "-cpu host" was specified in QEMU command line. > > > > The information, which MSRs are supported for specific platform is > > taken from perf, it is the subject of the first patch. The second > > patch adds ignoring for these MSRs to pmu_intel code of KVM. > > > > TODO: use MSR load/store areas to make full support of LBR debug. > > > > Jan Dakinevich (2): > > perf/x86/intel: make reusable LBR initialization code > > KVM: x86/vPMU: ignore access to LBR-related MSRs > > > > arch/x86/events/core.c | 8 +- > > arch/x86/events/intel/core.c | 59 +++------ > > arch/x86/events/intel/lbr.c | 272 > > +++++++++++++++++++++++++------------- > > arch/x86/events/perf_event.h | 27 +--- > > arch/x86/include/asm/kvm_host.h | 2 + > > arch/x86/include/asm/perf_event.h | 11 ++ > > arch/x86/kvm/pmu_intel.c | 33 +++++ 7 files changed, 250 > > insertions(+), 162 deletions(-) > > > > -- > > 2.1.4 > > -- Best regards Jan Dakinevich