Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp474910ybv; Wed, 19 Feb 2020 03:21:48 -0800 (PST) X-Google-Smtp-Source: APXvYqzxkR/s5k39CuV7mqHUtn1VEQ83wv+T5Iv1TqNRi6gQQ+l/BlIv8FXOA5gxoOxv9vp/vnf2 X-Received: by 2002:aca:120e:: with SMTP id 14mr4008946ois.135.1582111308656; Wed, 19 Feb 2020 03:21:48 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1582111308; cv=pass; d=google.com; s=arc-20160816; b=UtUOiBXT4ssDFeiowCHguZwZ/bnJVUa7KSpdxmWSIBQrEqxGfTYTevRyBGqQ1gTnmQ 0FITp9eEzpntv6qCL60V09L9NymBol75eCMPjOETB3Wp4312Abvq6qvFJm0SSWMCBIhZ b5shhv65KntEnwzBv+rLdL9HRUPk41gSFz/pENu8WrAmyKQrW4lUVIQ2Id7gpV8aVao8 Yg6cn7yUhzDzk62ylUvQyutpVSjjGlUWpMmtlpldNwg7e8QaX2avFR5Jc1szEZ6bfPrF jYj90YQkPi6yOq3UT3sjJVtrBmBgBZoJUx5Cg6a+Gf30JOi4qkPWEQMl4FuxmKgvnRBy BWzg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-language :content-transfer-encoding:in-reply-to:user-agent:date:message-id :from:references:cc:to:subject:dkim-signature; bh=qRqHHu/PwHfTszKwYrk3C9YVOSR4sMfgAqyS5YRtsYg=; b=bu5xYreSIpKFtzGlwxew1wVVjAmSotNWsBVQ+5l2735URjV3zM9ToRQVjhT+Illwf9 k34gcNezjGmSDiNOB8z8xC9HBJm9Q53CwLl66vv0gSzHY4CE0yhkjzSqMQY6yo+WdqsQ 7v3KK37hV26uDbWGWToj/Y7ICU+HnecdFZXZQKV4SkP0FSZwVPo602N2vGLkYJhLi4Zd dSGojjqWQi3JMm7vybu6wXrcLDMhAkk7qFH1iNDE9RF5SzauE2NvPcR1smGYy3jeCqBZ x8Z0Ma+cn+8deLaOGdfcwmygiU3x3rVautgFZ5cGHtg2Wm8RthUZHbxUXlX38gbwzHRK fXVg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@criteo.com header.s=selector1 header.b=ipVAdUY6; arc=pass (i=1 spf=pass spfdomain=criteo.com dkim=pass dkdomain=criteo.com dmarc=pass fromdomain=criteo.com); 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=criteo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y23si944127oti.65.2020.02.19.03.21.36; Wed, 19 Feb 2020 03:21:48 -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=@criteo.com header.s=selector1 header.b=ipVAdUY6; arc=pass (i=1 spf=pass spfdomain=criteo.com dkim=pass dkdomain=criteo.com dmarc=pass fromdomain=criteo.com); 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=criteo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727082AbgBSLUb (ORCPT + 99 others); Wed, 19 Feb 2020 06:20:31 -0500 Received: from mail-eopbgr60121.outbound.protection.outlook.com ([40.107.6.121]:51978 "EHLO EUR04-DB3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726514AbgBSLUa (ORCPT ); Wed, 19 Feb 2020 06:20:30 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aUUp52KxfSK4kJHsaeRgyFIwebhVKEzNY3MNJ3NzvaawOnHSGqWtN7lJ5gnlPlUVTa0k327EIFS236k6HC5Ron0ClNcCX0B/i2v+rLNuxFmQ/mZPjuZBsS/5nHcfQ9oFCNcXlNwGSKjVNZzNNQ8hQB6UD+fILPER3wLc/k6JgPqkBKC5tCGIrR4bKXwQH17ic+RhMj7Hes3O/lPdt7J7stUqPZ7/Fuh2NFKIwe2/bLMjqYD0/H1O83vByixhGWEWZ+K0nqBRYUJUUo4oWW/eeGLsPASe5TayA3uq9KAqmWY5O8EcpWNyzlQrR1RqdvA/scgDrFLR7uleZRl+gGAjBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qRqHHu/PwHfTszKwYrk3C9YVOSR4sMfgAqyS5YRtsYg=; b=bSA0jBif9tCzfTfoFFJgupWGJTEd8dOOd+J860Qetb+XQPZT1KAY5cKi5Q5/e0mE0fKTtUocMSri8yDFvwzTUloSZU/VrEdHwQavZqJguorItM0rFZWgla2OXDAYVyeRhJhlf7hJ/+XT7BmkA1ely2VcZFp9JL+z7YHRujnvXBDk7iKmP/QjEtmn7uErOTufDqJo/WC3doeXwu9+fcD7HFhaHD0HkyO4/FzMMH4MSfRySIm/EuXBnfCOVwL9wja4L+17d+KEmmEiwELaGekexEpA/u6YUqpwqXV3dYdhTTTvA8VzHpuEJi7Qttt6S8tu5cBxds/EdoP929h4742UMw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=criteo.com; dmarc=pass action=none header.from=criteo.com; dkim=pass header.d=criteo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=criteo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qRqHHu/PwHfTszKwYrk3C9YVOSR4sMfgAqyS5YRtsYg=; b=ipVAdUY6jefmr1B2Rd0GKwTCiYfdP2GmMRBbgtwdcgheGVrQCbzVmohU4OMxi3TnqZX+oyH6+RWxN84o59nk6gWVtdNCJ9UfStEzYUaA+q2y+nFZYZbr7GdHhv5GqKJR6Yr+pbTjafQ1xxagGHU8DsmLGOc58IU/ViB1reKCVzo= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=e.velu@criteo.com; Received: from VI1PR04MB4926.eurprd04.prod.outlook.com (20.177.48.80) by VI1PR04MB4112.eurprd04.prod.outlook.com (52.133.14.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2750.18; Wed, 19 Feb 2020 11:20:27 +0000 Received: from VI1PR04MB4926.eurprd04.prod.outlook.com ([fe80::99f4:5892:158f:5ae4]) by VI1PR04MB4926.eurprd04.prod.outlook.com ([fe80::99f4:5892:158f:5ae4%5]) with mapi id 15.20.2729.032; Wed, 19 Feb 2020 11:20:27 +0000 Subject: Re: [PATCH] kvm: x86: Print "disabled by bios" only once per host To: Sean Christopherson Cc: Erwan Velu , Paolo Bonzini , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20200214143035.607115-1-e.velu@criteo.com> <20200214170508.GB20690@linux.intel.com> <70b4d8fa-57c0-055b-8391-4952dec32a58@criteo.com> <20200218184802.GC28156@linux.intel.com> From: Erwan Velu Message-ID: <91db305a-1d81-61a6-125b-3094e75b4b3e@criteo.com> Date: Wed, 19 Feb 2020 12:19:01 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 In-Reply-To: <20200218184802.GC28156@linux.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-ClientProxiedBy: LNXP265CA0069.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:5d::33) To VI1PR04MB4926.eurprd04.prod.outlook.com (2603:10a6:803:51::16) MIME-Version: 1.0 Received: from [192.168.4.193] (91.199.242.236) by LNXP265CA0069.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:5d::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2750.18 via Frontend Transport; Wed, 19 Feb 2020 11:20:26 +0000 X-Originating-IP: [91.199.242.236] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: abba21ef-3c38-4858-0607-08d7b52db867 X-MS-TrafficTypeDiagnostic: VI1PR04MB4112: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-Forefront-PRVS: 0318501FAE X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4636009)(136003)(39860400002)(346002)(366004)(396003)(376002)(199004)(189003)(53546011)(4326008)(5660300002)(86362001)(31696002)(66476007)(36756003)(54906003)(316002)(956004)(66556008)(2906002)(16576012)(66946007)(478600001)(2616005)(81166006)(31686004)(7416002)(81156014)(186003)(16526019)(8676002)(52116002)(26005)(8936002)(6666004)(6486002)(6916009);DIR:OUT;SFP:1102;SCL:1;SRVR:VI1PR04MB4112;H:VI1PR04MB4926.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; Received-SPF: None (protection.outlook.com: criteo.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: f5H7+0/gn7OYIfKTJ3PQyIe0SgvtoE3t+1FC/3QEsVuHgnsYudpcGS6C3/XcZR2REUAnvLqXCes7LNO4omDJqEikBpucg6lnPUrClrQmaqU33S0OeDKNgoUwox05FMxrBf/1IqNvibu5qjXZVJBwXsn6I+EyBip514IvHaRSLyz5z2zGSI6OHGZDDKnrvW0wAxWpdUkOK+v+SA3+rqnVK+v4qSSGYBgxb6TQbLBEm5+4QN8Khzwz02HWo6zf2CcIbNYrg4G8fI+RgG5OKdGSeRX0CnSko95BZJFBDs7xWUioUnYE5cEtkYd8n8WOmaXqfSpJKMqZnxI7+JCWs4w3Trlueygi/bmahTGMNfI1Vh0ZmfgXR8PnpWKHVfEoWMQbJd+vDnoZSzfR/N2r2bDw64nfMOZDpAkhUqXlE4YVeF0gP4YRw4TyOXISx8MmErlI X-MS-Exchange-AntiSpam-MessageData: SIBKJv/EiQnkF6oqLYgfzFlyIOeNrKo8c8NqfTbulQWRk2wjyLINEGxWRQnZG6L3ta2HVuiwK0xHdwE5bEkTCAMzi0Nfa8r0hLSl5TBC3z6t7yCEF0MfIPJCe5KPZIaUp6G1MB+copy91Ip076p/Hw== X-OriginatorOrg: criteo.com X-MS-Exchange-CrossTenant-Network-Message-Id: abba21ef-3c38-4858-0607-08d7b52db867 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Feb 2020 11:20:27.0728 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 2a35d8fd-574d-48e3-927c-8c398e225a01 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: temZXt3YHMuxhuec/Aa2voDcpkwSBNWzSdjS7R4zC95/uzV9WrE6gyWWSOwAiuBysJirOqsLk6FYjt21mjPK/w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4112 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18/02/2020 19:48, Sean Christopherson wrote: [...] > Fix userspace to only do the "add" on one CPU. > > Changing kvm_arch_init() to use pr_err_once() for the disabled_by_bios() > case "works", but it's effectively a hack to workaround a flawed userspace. I'll see with the user space tool to sort this out. I'm also considering how "wrong" is what they do: udevadm trigger is generating 3500  "uevent add" on my system and I only noticed kvm to print this noisy message. So as the print once isn't that "wrong" neither, this simple patch would avoid polluting the kernel logs. So my proposal would be - have this simple patch on the kernel side to avoid having userspace apps polluting logs - contacting the udev people to see the rational & fix it too : I'll do that As you said, once probed, there is no need reprinting the same message again as the situation cannot have changed. As we are on the preliminary return code path (to make a EOPNOTSUPP), I would vote for protecting the print against multiple calls/prints. The kernel patch isn't impacting anyone (in a regular case) and just avoid pollution. Would you agree on that ? Erwan,