From patchwork Tue Jul 19 19:58:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Jones X-Patchwork-Id: 9238227 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 1666360574 for ; Tue, 19 Jul 2016 19:59:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0769F205A8 for ; Tue, 19 Jul 2016 19:59:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EFEC22756B; Tue, 19 Jul 2016 19:59:40 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6A195205A8 for ; Tue, 19 Jul 2016 19:59:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751940AbcGST7K (ORCPT ); Tue, 19 Jul 2016 15:59:10 -0400 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:50994 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751557AbcGST7I (ORCPT ); Tue, 19 Jul 2016 15:59:08 -0400 Received: from pps.filterd (m0044008.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id u6JJuN6c031271; Tue, 19 Jul 2016 12:59:06 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fb.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=facebook; bh=8RJU2TacQy6HYXmtdG7hYc3hPcDtRUrzuUhuZpE0qjA=; b=PqIxPtIvqw2e3J6UHVvV0FJImehRZc2+PThC5Wc3+J4I2qo5kx3/4nlSSK6jvawNdkz1 gPxI2itkVHeVrTtL7PTSpGmvroWhUr2zprfli4rx87zVyIjjZ2XYbW1pSxpRX2nrr9wv 7QmS01WKgvdUjIVNmbhp9Nik80nY8AcEIN8= Received: from maileast.thefacebook.com ([199.201.65.23]) by mx0a-00082601.pphosted.com with ESMTP id 249rkmh3ad-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 19 Jul 2016 12:59:06 -0700 Received: from NAM01-SN1-obe.outbound.protection.outlook.com (192.168.183.28) by o365-in.thefacebook.com (192.168.177.24) with Microsoft SMTP Server (TLS) id 14.3.294.0; Tue, 19 Jul 2016 15:59:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.onmicrosoft.com; s=selector1-fb-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=rXTTbjJNjivo1Wg79wg7uHdvaq1jM3agg3aLA/pwaUA=; b=VmzRXdUoUrx7RlH5BAZOYxGBN5b6VgDbn92kXtIwIdcfBkhRrxLK41qNOqqKpGnUnUCxGxN3GwhQKD2xgIV8aZ3eVqfqH7DArTms14Elzz3zR/YOEHdV+MIkZx1YUeI54QTt6lELo326/4kMQR3x2bs0ZFzDVpmUMfxAeCZo6/I= Received: from fb.com (2620:10d:c091:200::1:7e8b) by BY1PR15MB0054.namprd15.prod.outlook.com (10.161.97.14) with Microsoft SMTP Server (TLS) id 15.1.539.14; Tue, 19 Jul 2016 19:59:02 +0000 Date: Tue, 19 Jul 2016 15:58:56 -0400 From: Dave Jones To: Paolo Bonzini CC: Linux Kernel , Radim =?utf-8?B?S3LEjW3DocWZ?= , Subject: Re: RFC: silencing kvm unimplemented msr spew. Message-ID: <20160719195856.GA31453@fb.com> Mail-Followup-To: Dave Jones , Paolo Bonzini , Linux Kernel , Radim =?utf-8?B?S3LEjW3DocWZ?= , kvm@vger.kernel.org References: <20160715192729.GA4712@fb.com> <110045299.8101686.1468855610053.JavaMail.zimbra@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <110045299.8101686.1468855610053.JavaMail.zimbra@redhat.com> User-Agent: Mutt/1.6.0 (2016-04-01) X-Originating-IP: [2620:10d:c091:200::1:7e8b] X-ClientProxiedBy: SN1PR0701CA0070.namprd07.prod.outlook.com (10.163.126.38) To BY1PR15MB0054.namprd15.prod.outlook.com (10.161.97.14) X-MS-Office365-Filtering-Correlation-Id: 55d3c010-a2c1-499b-ec31-08d3b00f223a X-Microsoft-Exchange-Diagnostics: 1; BY1PR15MB0054; 2:N/zyeo4RXeCpEfv4ZjOtuUIEo5XxmNPVFg5GuuWJB6C9QWe45RraF299X3x30USOt96I/bwHedOGGEGEjZqAY67UJsT0AZgq/yehcNfIMwXPZIIzVELJf/Mvug+/i2hw+uq9e61owBGJZbrD9ltPed66mupe/5+Wra3rujDk38W825OoHYaCCwMjP9CCrEBz; 3:1R+Z/TOHWcxZS8REX2PbYj4bBw+ayrKyLuqLFiF9tlq67t/Qekxs/wBb+ciUS6PvmxZqZ4DO9UlOtXKZ1dB2X/wqsSiIKcyu8KZlOkZ5bzuWXIuWY/0CGDBAB9mBuvoz; 25:F7tB+ufcmAJ/V9GHPibrAMjU4QtKRWyDXJmEyqvS9eYt9BimXp3fcaH+oHom21yrTkVq3l4lwmVnE7bNh7nSXlR+3DZi7YNVCuuHv566vg5/ud1Uk+1aWSKCvg7hkRji+3nX3DqJFk+/nREcW0QIMf5mCpPf35ondQyNsUH9O1vy8yKw8yhL00Vl6zeQWKMJpBJiX5wltMT+hRuD0QLEfrHp+2pOpJWrtzHx1pAJzemJgmP8Cz8irbpGnVKTDhLPocPutilI0q5waE0tzl86cuN/rR+A60N5WK/Z4U6l/KSaIDZoSzzdA+l/vv0RObjYrLU1pLL96Rmii4jxBCeFVJ+sQUcGh/f70P/OuE8GITD9kGkMqc0W3E66Q8v7qpBUJWQl3gpW3RGVcWdotnvRwDTKIyiavQD87ep0vfn/t68=; 31:fqbv0xCDtcXmjz90S415gi3hwDcBAB1Czk/aAL0R1OfSmXGs/5jLuhEGw6kWADNBxE7kfnPJuLCtRDChJXQeyecVnicDQ6gQy9a3+OvlIhRczeHCHbYP9u+Up9OnOCLqknmo64EmboB44OGypT9gH/bCp8L1knTvTywnjRifAgbBZiA6N5S El0A7SN8yKwWMkKO08fCwYHMBTPT2OqMJRA== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY1PR15MB0054; X-Microsoft-Exchange-Diagnostics: 1; BY1PR15MB0054; 20:laPIcVF9IPirMbnTyymusQLm4Bf8rBGfvjG3AMScyc/yvHnuNSuE4qNRUPyTaBPxaY+/xXUTCyfCkJuGK0fLBABpyNs9sMuhDRppZobfec/ZNiWpBw78cVaQ8fMG2zD0gkLTFGfpof1r6LB618NlQJUURbyFj5yQoqHDcF1fBwo=; 4:HhVgqdBJCcuzsKSil3Jt0xdI/NDDFP/69GrnASDuOfq9uQSv6064Za4kEKj+TLe4KgzoGd5BHdyqfgC2/1podsfHu0guczNgwPXoKEdGI8KIjbpfKrK3l87cEyILjWNeK+temjZ2SRHn7zQfU7GOlgp+Z3U7TkQa42EwHuCOhVJfMQotBr+33Fwnb5NnHfJKVjCest/cpP2bwAiTQSzMpwp08/TwErgKPO3lMQbdY8DCV7OrV+buqXPGybDC3Dw1bZKCwgmhwa2EGjvhU3H8ZoUzV1rPC3MjouVAC984i3U659IeC+lrR4hc/hAUr41GdJTzpUKEFq4PUOvRQauTs+H2XEg3TSzBk19gPCRGiAp/OAslzBV8Vqbw4B5P3kvR X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001); SRVR:BY1PR15MB0054; BCL:0; PCL:0; RULEID:; SRVR:BY1PR15MB0054; X-Forefront-PRVS: 000800954F X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(7916002)(199003)(189002)(24454002)(42186005)(81166006)(50466002)(97736004)(110136002)(68736007)(305945005)(106356001)(105586002)(76176999)(54356999)(81156014)(77096005)(83506001)(46406003)(97756001)(36756003)(7736002)(101416001)(7846002)(23726003)(21086003)(92566002)(4001350100001)(8676002)(2950100001)(86362001)(575784001)(47776003)(189998001)(586003)(33656002)(1076002)(50986999)(4326007)(6116002)(2906002)(18370500001)(51496004)(44646005)(3826002)(42262002); DIR:OUT; SFP:1102; SCL:1; SRVR:BY1PR15MB0054; H:fb.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: fb.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY1PR15MB0054; 23:L9f4YwKnDSRrZD5Dvx0UcfdS8+KT+oPKdLbti09Yg?= =?us-ascii?Q?8SjRKlyH5CJ14E0Piy+aSqKWI9NZjQbg/xJ8eaBQEsBo6B7znsfy0pkfAME2?= =?us-ascii?Q?wnUiyTxct+PAb8i8AkYjkdmSSXz1pxEAs33/4kA8iUbqGAkYkbO+81cK4h39?= =?us-ascii?Q?xD40EHFcu5JgxMmR3VuoCVBb7GjkKdpd9eq/iXskNZJr/f/BOSljbAOoQGSi?= =?us-ascii?Q?kxSRv01faS0uTn7JPjayDQGVis16c84o3aMo4AUNMLSNFn8+/NRVYkTPSHEd?= =?us-ascii?Q?oes5QqP5brCjXsw7gNmH9tVDf1lJoRM/WNDnpwRkODC2GAnIxg9W+MXpC7a/?= =?us-ascii?Q?4c+m8z0fyl7RX2THEUyR9RXtI7iG/9cR8FHOJ7WShIXcoRdVdOLK3PwGn9vw?= =?us-ascii?Q?skHc1dXqHxrcQMTWQOyjzNSxyUGq2qK1oypR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KBq9inmMJw/f/8vCo7eIyp7ihzHaqUxV/YG7MxLo+S97Z2XtN431NFiOOZONOdI+B2bR+z90XuSl2PFEpWOMczegJmZoiiq1VCD9Th2odSLaQkPHPBgNJVfARKq6hbpS2gW7stw0Gi2LDHVH6BJKprqklgMEOm+wg3mKjkk3adZQjn6PtJkqcFyWygI3jEkXOXFx8r2Qhp0rY1E7atTktLPCVoyrrkLgU=; 5:yesaNrSm3MC/VXPfmWGpBOXsFoGM9i6mVNbtzaD5vp7x2gnEesQI33QLsYg+hDXRhLJs6B15UfNlW2Xva9EwlM/rWTBXemw3QYpH1eXPhUlEmiCZIiNghnfgRpjQL8rVJ/dqiWKWgZbx06LJgpuTAg==; 24:mKykwtL4m0NyTAoAhZRVIGdg5GQW2Zk9dc7Wug1v+8NcQVdfP7BToQOCEOwIW5rm+5hd4i4ETBLXG9UsTBj459KfCDXykbMaArDcOsfvN2o=; 7:9U5d5vBkDMNgV475q5zH2U4J5qLWVxyjwaWuH1vn5RgZtODaKGU3h2hD03nrDjWDjI0fx5hYETmS7zNPePd4mnQI9tTG+Ua9JXWy1dg7P7mQeATw00liVYqckQfa4wV51li+vOBeq045DgNVAaXpUlgf2PSAaW87iZj05O8xVfXl2z8wCjk18440twHMdZ9rxgmUdW4qLND3fBdsfrGn2nhTfM2x+BWpi6N5xQyFMOYTYtEN7Z+KDgexlIkI7tfU SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY1PR15MB0054; 20:NN0ERBt+7LHxFPp8veQAQ6Ayw8pfdgRSebLfVyLgDHQKIaxDbVL+WKqSqeGLuzOAgDCLzU8N1kKLnOHGadFfUk4GuFklW2ztdErX9lsTVWnRJZe54sVerpYH5sXlbQqGasr4pfmNJsGOUv0YWggGVGW4rDyMHzIRjR3W6Funs40= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jul 2016 19:59:02.6790 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR15MB0054 X-OriginatorOrg: fb.com X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2016-07-19_13:, , signatures=0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Mon, Jul 18, 2016 at 11:26:50AM -0400, Paolo Bonzini wrote: > > > kvm is pretty noisy when you have guests poking at MSRs that the kernel > > doesn't implement. The conveniently named 'ignore_msrs' option initially > > seemed > > like it was what I was looking for, but it changes the printk instead > > of eliding it. > > > > Untested patch below converts ignore_msrs to a bitmask and adds an option to > > be > > completely silent. The idea being if after testing, things still work and you > > don't care about those messages, you can deploy in production with the > > silence option. > > > > Would something like this be acceptable ? > > Indeed, ignore_msrs does a completely different thing. It suppresses > general protection faults in the guest. It is related to behavior that > KVM injects in the guests, not to the things that KVM spews in the host. > > What about just downgrading the printf to KERN_DEBUG? You could simply > change from vcpu_unimpl to vcpu_debug, but it's probably a good idea to > keep the ratelimiting; there's a kvm_pr_unimpl, so maybe add a new > kvm_pr_debug and vcpu_pr_debug. Hm, we've certainly got a lot of options in terms of print primitives these days. We could just do this... Which I think would have the desired effect, and also gets us dynamic debug support for free. Thoughts ? Dave --- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 1c9c973a7dd9..a80b9a0a5f8c 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h @@ -423,7 +423,7 @@ struct kvm { #define kvm_debug(fmt, ...) \ pr_debug("kvm [%i]: " fmt, task_pid_nr(current), ## __VA_ARGS__) #define kvm_pr_unimpl(fmt, ...) \ - pr_err_ratelimited("kvm [%i]: " fmt, \ + pr_debug_ratelimited("kvm [%i]: " fmt, \ task_tgid_nr(current), ## __VA_ARGS__) /* The guest did something we don't support. */