Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp3499875pxx; Mon, 2 Nov 2020 10:27:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJyK0O0X5HxKC0pq1UtrLl1Njh/848LyBV1bE8zd+vpDp4hrJWD/917RIHvPc4RjZirKv3Di X-Received: by 2002:aa7:d404:: with SMTP id z4mr18155873edq.334.1604341673800; Mon, 02 Nov 2020 10:27:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604341673; cv=none; d=google.com; s=arc-20160816; b=Ki5BuVzM1djA9DIcyXLqfAE+Efj7yITtHg2fRzpJRNn3HAiKS4g2bEMY0rkuHAhPLM w5H5JPdrN4Q1yuCAuwM4uEV5eobgbskuj3e/aBC8D0/Q1ETCTwPXftUM3Rauc1Ea5sWs A404Xjy1RP8kd6zUcKnBhYUOElz6OeKT8uaU3SjEgHeENOyEeYPDNcMGzyVQ7IEm+41r ffjhY2KM2onPthrkpG/OJd/IG/DfNNMdSIrWGc22uMD5Yw+Xn6deofR4wp6pv9+B9LcC h82V6Xjd3j5kVexRqycvmHIjreP9HRkn24UHR9DJbnWEUcnNqE8bfXQDfH9RxO3G7A09 986g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=+o/bB9EP07YOL4dqgg9GwgZ3GO1LsoTAhQkD4mTfT5A=; b=uS0isWudFdYPlL6HAZAPU2sUz1pnNqz+h8SDPnWRajGYZGWb178PcsUlzMGasvjaKA 1I7OixHEdq1eTPzAlh4gGjzI+zsE+Zeuw7vQ2rNbnTltOKBKB64UKGkMLs5YLPru9pJx 6MerHFGJrze9ggQwzqMhzKRtpObDSQebYPvtGQqjD4huypAseg8crr+Zm/FH7ch4rPjp 85Vd7mBwVg5CXnrItAwXjpU/kiCidoJuu5Vbu6MuhDYqJ5MCwLnxDHHj6sW463YQY7Oe 96kRyZhBJqWWbwl2TfdcYWt3rwYStlKYAR7/18a/vq3isXK7nToUeCSCpOYdJCN+6JNe zgbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XFm39YPx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bd20si3380488edb.98.2020.11.02.10.27.29; Mon, 02 Nov 2020 10:27:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XFm39YPx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725882AbgKBSZo (ORCPT + 99 others); Mon, 2 Nov 2020 13:25:44 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:31155 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725789AbgKBSZo (ORCPT ); Mon, 2 Nov 2020 13:25:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604341542; 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=+o/bB9EP07YOL4dqgg9GwgZ3GO1LsoTAhQkD4mTfT5A=; b=XFm39YPxMvG9kCruQQA8yurk+Bo2h2cgzsBMNu6jmPHitNbEBFaHmBwuIMKv7R3xwdUhtv N28hAWJ0OoIHzO204DsvfUlPJHNnYgHhe6G2LaD5cI5H/aE91XWbakKE/whW2ttMcrtqUz G7VTH28n7XIJXKEAPwmFqbDiqu0ZDHo= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-477-09SGemU0P7ebwOsbIodHog-1; Mon, 02 Nov 2020 13:25:41 -0500 X-MC-Unique: 09SGemU0P7ebwOsbIodHog-1 Received: by mail-wr1-f70.google.com with SMTP id q15so6739341wrw.8 for ; Mon, 02 Nov 2020 10:25:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=+o/bB9EP07YOL4dqgg9GwgZ3GO1LsoTAhQkD4mTfT5A=; b=DE1cdUQaPLDwjKv1qMHwaS2UbXlEOfIvwj49d0XAfbEJu+OsaL996GDU1ILA9+cZOy Ze9cm1hBNQ4ymNQCzH+EY73TdKftAIJbB3RaEpnlk6xj9d22eS+cE3MtRJIDGffAYnp4 9H9W8HmFK2Rc9xjBQDM43Kx8xIfHP8kaSkOhRp24NdAqtL4sGJhnvsQiUOhqtdIVmx/6 EpBp7FjOQHhHNAJUe+GN/VomKUD7e0SRKS/LETyswPYciEjooQ3OyUdp7qGGd/H5gH1B GLoVoxHvxUWj7pjYWHRkfis94yEfsl4eZERLXjejODLmTLgPpHWGW4loORUGpKYVlhx/ CVlA== X-Gm-Message-State: AOAM532riyFOeBTq9hC9aYZFhybUIyyhySvLsKNnhg0Isi3aXf2Kmixj HOxvWL+qIgMF9SombZLXIQ4oIGZbQbYFlT8DnuO7es7FlnkOalv6/1AC5/9dsNmM4c+8xBwVlQ7 tOA3o+71fr1WtoLtuS+IMChRz X-Received: by 2002:a5d:694b:: with SMTP id r11mr22204584wrw.104.1604341539803; Mon, 02 Nov 2020 10:25:39 -0800 (PST) X-Received: by 2002:a5d:694b:: with SMTP id r11mr22204561wrw.104.1604341539641; Mon, 02 Nov 2020 10:25:39 -0800 (PST) Received: from ?IPv6:2001:b07:6468:f312:c8dd:75d4:99ab:290a? ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id y20sm279284wma.15.2020.11.02.10.25.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 02 Nov 2020 10:25:38 -0800 (PST) Subject: Re: [PATCH] KVM: VMX: Enable Notify VM exit To: Andy Lutomirski , Sean Christopherson Cc: Tao Xu , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , X86 ML , kvm list , LKML , Xiaoyao Li References: <20201102061445.191638-1-tao3.xu@intel.com> <20201102173130.GC21563@linux.intel.com> From: Paolo Bonzini Message-ID: <8e41101c-6278-3773-8754-ffe0763eaeea@redhat.com> Date: Mon, 2 Nov 2020 19:25:37 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/11/20 19:01, Andy Lutomirski wrote: > What's the point? Surely the kernel should reliably mitigate the > flaw, and the kernel should decide how to do so. There is some slowdown in trapping #DB and #AC unconditionally. Though for these two cases nobody should care so I agree with keeping the code simple and keeping the workaround. Also, why would this trigger after more than a few hundred cycles, something like the length of the longest microcode loop? HZ*10 seems like a very generous estimate already. Paolo >>> I also think you should print a loud warning >> I'm not so sure on this one, e.g. userspace could just spin up a new instance >> if its malicious guest and spam the kernel log. > pr_warn_once()? If this triggers, it's a *bug*, right? Kernel or CPU. >