Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp781446pxb; Thu, 9 Sep 2021 11:51:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx3XH6jTjLcUeVQsjff+/xAQNTmD0qlXqAD78eotJeEs05IzD/pZZ0A+lRnbSMRIeV+QHEH X-Received: by 2002:a17:906:6547:: with SMTP id u7mr4920092ejn.544.1631213500818; Thu, 09 Sep 2021 11:51:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631213500; cv=none; d=google.com; s=arc-20160816; b=Q47WR8tsh+U9mz365RLq07IHu+aD3ZkveTQ2Rf3GjoTFS38mhOepTTMuvYwM7CHNFP /94BskvKXx9wfpXRy+pOSV1LmfXJcbazyHbU1kVJyuKjweEvYV8JREXPdY5q6Do6Sip0 udzb3Io2WhResOOjLa6qyUweAplUhJySlnaGZZvPNiPeWWH6x5Uy8AqioOIqk8MWdVxG wF/n0nCz+hkWTA7dYNko0Q/2RpVZvvSMDtId05tkaoqphX5OoAdq888AJW6RrJ3Qbr/Q M76AKl64+TKXgZlrgwhkDvt+EuMRZgiBwqiyKwxQAR1+NTl52sDpqefOWEEkhsabzPJC HbrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=dg0r0liUbOmGHsQc3vfJ9m4p0cWpSRLKqxX4E9SFtgk=; b=HGusdrD+wDrG7jwc5b0YOW6mmw+XWqoWXRWI8iUYQ7mHWfywsie09Z6Mychbv3VWeZ 4g345952i9Dm9ooaJdpyW/+aV/LAOYUlOZxTiCf106jOnK7Ylt8N2crtUO/R/bFc16RV Epu7yo3mPUo9rkKteJLV4Wcuc3Ycz59gae3sgZxihQeYU6Qsn+LJRHEV8PO3FYTEM2NQ JmxO9eLj/xxsu8ThxW9j7gWuvGcAZDxhYNiYhqnlRRdgKeqAwrJ5hPeDNo8S3ka/nM2R bzI71QNwzxBmpSjdHgt9997Avb4PVF83mT4TeKS3XJrkqllvvAPf/nBgqRGO7VLKXfW1 2INg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=g5eRKlBn; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y13si34209edm.398.2021.09.09.11.51.16; Thu, 09 Sep 2021 11:51:40 -0700 (PDT) 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=@google.com header.s=20210112 header.b=g5eRKlBn; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245195AbhIIStm (ORCPT + 99 others); Thu, 9 Sep 2021 14:49:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343552AbhIIStS (ORCPT ); Thu, 9 Sep 2021 14:49:18 -0400 Received: from mail-pg1-x531.google.com (mail-pg1-x531.google.com [IPv6:2607:f8b0:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D111C061760 for ; Thu, 9 Sep 2021 11:48:02 -0700 (PDT) Received: by mail-pg1-x531.google.com with SMTP id n18so2708361pgm.12 for ; Thu, 09 Sep 2021 11:48:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=dg0r0liUbOmGHsQc3vfJ9m4p0cWpSRLKqxX4E9SFtgk=; b=g5eRKlBnihT8ztbBDJopIavUkwhRhnlBMhe2YaN9dmHm78RIHxpFhkNoTdJPljvITL lQ2jAuzpxxk96ExS19fLwBatAsVZScrin4Io1ttgMh0B39HyeZM4PQQTA0PADA7P6/MM VARBkP9SHIt1P9CvOBYFkufdUmR4xUDlgbcd5gzvM5y/usHsu6JtRSeZOnsLVXHIfEHT jjNtZGF7IfQRgJY1tt+YfzkRjbKP3AzZIqGnFN229SqOoIYstUQaosIGLaxYzJRbjSSE U8yozCQQFwnuuEzCYQmp6zQttNwW0k4URO4HSNr1WqTKzEzR1gcp5/tBiZcaRThRil0p r4yQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=dg0r0liUbOmGHsQc3vfJ9m4p0cWpSRLKqxX4E9SFtgk=; b=c1sVu0at8d4Osuhn3aZ9hniKxd/09Mi/sJlVc498ivxRn/8lrtns5oeBiNMnu+bFpQ Hmy2Njf443tQ8WTCur8loaaC8d9iWhS+MylEpY5HRBHOrPwVTcR4jZ3xGojmfUkNlWRZ yOCb+mCXT8MQ/HE1Pl/bs/7lD58JiwRf8FoE3Ck61wojhkMTc7gJAtpsWcf2jo0nk79w eRp8dTUU4GWReAkVQY+eln1bBAWC772uA6TWUTXlzqheb5ED5Gvwj3zc7mJFJ8qy4xZW 3kNVXe5jvYF/RhQs5aD4f6o1hJN0w/u2NsOeGNIJBQi+RdJEMptCzido6QqWzPiucBD0 KHcw== X-Gm-Message-State: AOAM533Fi95+OevcBHltJaxUVlNn5+WsFLiupDGDk27ZzrkKshbUiOoW dhEuwNfZAVm1OX9gkedFtueXAQ== X-Received: by 2002:a63:d10b:: with SMTP id k11mr3996557pgg.26.1631213281422; Thu, 09 Sep 2021 11:48:01 -0700 (PDT) Received: from google.com (157.214.185.35.bc.googleusercontent.com. [35.185.214.157]) by smtp.gmail.com with ESMTPSA id e5sm2838094pjv.44.2021.09.09.11.48.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Sep 2021 11:48:00 -0700 (PDT) Date: Thu, 9 Sep 2021 18:47:56 +0000 From: Sean Christopherson To: Xiaoyao Li Cc: Chenyi Qiang , Tao Xu , pbonzini@redhat.com, vkuznets@redhat.com, wanpengli@tencent.com, jmattson@google.com, joro@8bytes.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, hpa@zytor.com, x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] KVM: VMX: Enable Notify VM exit Message-ID: References: <20210525051204.1480610-1-tao3.xu@intel.com> <080602dc-f998-ec13-ddf9-42902aa477de@intel.com> <4079f0c9-e34c-c034-853a-b26908a58182@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 07, 2021, Xiaoyao Li wrote: > On 9/3/2021 12:29 AM, Sean Christopherson wrote: > > > After syncing internally, we know that the internal threshold is not > > > architectural but a model-specific value. It will be published in some place > > > in future. > > > > Any chance it will also be discoverable, e.g. via an MSR? > > I also hope we can expose it via MSR. If not, we can maintain a table per > FMS in KVM to get the internal threshold. However, per FMS info is not > friendly to be virtualized (when we are going to enable the nested support). Yeah, FMS is awful. If the built-in buffer isn't discoverable, my vote is to assume the worst, i.e. a built-in buffer of '0', and have the notify_window param default to a safe value, e.g. 25k or maybe even 150k (to go above what the hardware folks apparently deemed safe for SPR). It's obviously not idea, but it's better than playing FMS guessing games. > I'll try to persuade internal to expose it via MSR, but I guarantee nothing. ... > > On a related topic, this needs tests. One thought would be to stop unconditionally > > intercepting #AC if NOTIFY_WINDOW is enabled, and then have the test set up the > > infinite #AC vectoring scenario. > > > > yes, we have already tested with this case with notify_window set to 0. No > false positive. Can you send a selftest or kvm-unit-test?