From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AA042C388F7 for ; Tue, 10 Nov 2020 20:37:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 417192063A for ; Tue, 10 Nov 2020 20:37:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="EatpexV/" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730618AbgKJUhl (ORCPT ); Tue, 10 Nov 2020 15:37:41 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:24579 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726179AbgKJUhk (ORCPT ); Tue, 10 Nov 2020 15:37:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605040659; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=86E1PiwpTATAQtderrQWGZYhJziSfrLmfv7s2P36MyY=; b=EatpexV/NwS2/g4QcIp62FdQTYoYh+2mXkQrBnPDlRGJkGM4tG3RhJJ/UMfHWYcKI8k6rs uzwqRzATJ7CigCcIK1YuqzQUptg1NKQ4DKkSH+ib4nyedePQ8iFmZjIkl4vv0tikCrSo63 z016iJnGvQZ9l2qygKMNoGVTLer8KVY= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-85-l5q6OnrpN7OlAOAAlhBjmg-1; Tue, 10 Nov 2020 15:37:38 -0500 X-MC-Unique: l5q6OnrpN7OlAOAAlhBjmg-1 Received: by mail-wr1-f71.google.com with SMTP id f4so3081588wru.21 for ; Tue, 10 Nov 2020 12:37:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:references:from:subject:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=86E1PiwpTATAQtderrQWGZYhJziSfrLmfv7s2P36MyY=; b=EECOYYxHcXSPyT0oxPX2yxLMHLrB7QJBTs3HSk2IoDenN3aS2m99Scac3FfEb8/PJk mWVr7+ZGS8MI76oFzin1eR8+hnQsADI4ag3P1pp4dbzOyIyXa1BG0kAJMxB4LhvyAx0p 0degrbOiD9kAdEU2A3SZi/RSNkkQFbvTJ2u+H1C3Z8edY+NUamuqp4ybInwoUj8VMGUm BVn3ZFChU0hj6JbQgJCq1sXrgxtBm3SS5KReyswt3cK3PNKWnoK1etgERwl2xV8t8ME4 3C5nkqD4YAn3Jtj+UYT/kzfFWGlts1uICDgGehBekEdFlsJQEsgbVbwYsomORTm3HM7a T1BQ== X-Gm-Message-State: AOAM533FzrxKOeh8CWTAKe8R3noXvQ/YJyIeg9iYj2He5pNnqxAOj0Fx gevHnvkh+VWhMZVqW53bh2gISF9M/yX8tU7uw2T2AMTUelaxpo4E1TKT9ICa3RGNnKtIUD6qjqB I8SMVuStqbQaBjNTXvwox/gsY X-Received: by 2002:a5d:6744:: with SMTP id l4mr24886220wrw.378.1605040656862; Tue, 10 Nov 2020 12:37:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJw1TcLE86QgwB8CSzyVPHmo0gyCUPTPLnWMfxW3NiNpbb9kz55y3L1GCvdcftAsFMgZJiLBMg== X-Received: by 2002:a5d:6744:: with SMTP id l4mr24886197wrw.378.1605040656635; Tue, 10 Nov 2020 12:37:36 -0800 (PST) Received: from ?IPv6:2001:b07:6468:f312:5e2c:eb9a:a8b6:fd3e? ([2001:b07:6468:f312:5e2c:eb9a:a8b6:fd3e]) by smtp.gmail.com with ESMTPSA id g131sm4181864wma.35.2020.11.10.12.37.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 10 Nov 2020 12:37:35 -0800 (PST) To: "Luck, Tony" , Borislav Petkov Cc: Jim Mattson , Qian Cai , "linux-kernel@vger.kernel.org" , "linux-tip-commits@vger.kernel.org" , x86 , "kvm@vger.kernel.org" References: <160431588828.397.16468104725047768957.tip-bot2@tip-bot2> <3f863634cd75824907e8ccf8164548c2ef036f20.camel@redhat.com> <20201109232402.GA25492@agluck-desk2.amr.corp.intel.com> <20201110063151.GB7290@nazgul.tnic> <094c2395-b1b3-d908-657c-9bd4144e40ac@redhat.com> <20201110095615.GB9450@nazgul.tnic> <20201110155013.GE9857@nazgul.tnic> <1b587b45-a5a8-2147-ae53-06d1b284ea11@redhat.com> From: Paolo Bonzini Subject: Re: [PATCH] x86/mce: Check for hypervisor before enabling additional error logging Message-ID: <7bd98718-f800-02ef-037a-4dfc5a7d1a54@redhat.com> Date: Tue, 10 Nov 2020 21:37:34 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/11/20 18:52, Luck, Tony wrote: > Look at what it is trying to do ... change the behavior of the platform w.r.t. logging > of memory errors. How does that make any sense for a guest ... Logging of memory errors certainly makes sense for a guest, KVM already does MCE forwarding as you probably know. The exact set of information that MSR_ERROR_CONTROL[1] adds may not make much sense in the case of KVM, but it may make sense for other hypervisors that do nothing but partition the host. (Difficult for me to say since the relevant part of the SDM might as well be written in Klingon :)). In any case, checking HYPERVISOR is not enough because having it clear is a valid configuration. So you would still have to switch to {rd,wr}msrl_safe, and then checking HYPERVISOR is pointless. Paolo > that doesn't even > know what memory is present on the platform. Or have guarantees that what it sees > as memory address 0x12345678 maps to the same set of cells in a DRAM from one > second to the next?