Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp279171pxb; Mon, 2 Nov 2020 22:14:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJzpCf9L5Nf+mtSBUa0Sa8/IrNzCcCdBLsHVdz6XE5+gbX9QkPMnbD0O/CFVtnR48bR2PU1f X-Received: by 2002:a17:906:bce6:: with SMTP id op6mr9280318ejb.2.1604384086725; Mon, 02 Nov 2020 22:14:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604384086; cv=none; d=google.com; s=arc-20160816; b=GUDpjDD0KpHeOFf6Uwu8OurDV+2hNhRY12praY78L+s1L6SLTPTHVIUu0h7SN+wGN+ AyAgPDjhFenBQ2Qxhha6ZlPbUU30s0Sx7Jgo6+88UwlQW+dATkjtWoOiFN5MpAtAGCw+ ZWOehrsRf1qRzSnd4NnJIG1TJSPLSNozrIZBW1dR5ftSLIs7ukejng1EtOF0OJuKuCTn 8LDTSarQjywPdCoUn2Bk6VJCptinCd9OROhzQ5XRBBFkl/cdw9LjhKTe1blXVQSJztS3 Zljng37BND4I7dzf+Xo3GLHy402brLSOW733TvHQVb890OxSDtUnaB9rqpFBiT3FGgRx MeIg== 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:ironport-sdr:ironport-sdr; bh=l+t2RumYz4/+RVHvMgbJr3dt+Lh+ZClQ+7zXvwj0ADw=; b=tJmgp7pi9+/L+4l9bn/4jn7PVUbrMQX2yp6t3fYOJl54mbQ2AbHtF0dcz/RbXn1wK9 1Vd1V9KbPrq8KFEXnjAft8nxlJUqvSibPi2lkHxBLRcTTOTgffQphSFGfqXcQN20OhuN syXFZq6pL5gUmzo8aMowXEPHw+V+/JXwT17B16/7bk0dgYSUeqaIzKiq61N0TqJHEUw4 ISURKbmNaMLte+u5myzQvwRrSVcN85UX9Ewgwdd/nCPEJlPhcDG9QJExJ18sKEzfSYR6 qbFAK3LX/uGvTHGxjmNz2ZqFKw28lFa+OmhrdOaaRKLCisDKzQvOL5KsGXn6svoYbg63 z7eA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v21si10591830ejw.553.2020.11.02.22.14.23; Mon, 02 Nov 2020 22:14:46 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727300AbgKCGMr (ORCPT + 99 others); Tue, 3 Nov 2020 01:12:47 -0500 Received: from mga18.intel.com ([134.134.136.126]:42433 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725958AbgKCGMr (ORCPT ); Tue, 3 Nov 2020 01:12:47 -0500 IronPort-SDR: jESKfE7+rU7U9IVR1F60q5nifyN4rCL+8w7GYh2/zqfm+1Qct23J2JxY9joSiT3a76W5f1LycO RWGRdBkk7ndQ== X-IronPort-AV: E=McAfee;i="6000,8403,9793"; a="156784134" X-IronPort-AV: E=Sophos;i="5.77,447,1596524400"; d="scan'208";a="156784134" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2020 22:12:46 -0800 IronPort-SDR: xNIyDGLfoFK7i4p3oARDq1lrrWYtrHxt+zWGPYWrnjYPZMV0pMjBM4ajqmiHH9yNMOpDWTq8NO fl+0TvZJdMpg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,447,1596524400"; d="scan'208";a="353094900" Received: from shzintpr02.sh.intel.com (HELO [0.0.0.0]) ([10.109.19.68]) by fmsmga004.fm.intel.com with ESMTP; 02 Nov 2020 22:12:43 -0800 Subject: Re: [PATCH] KVM: VMX: Enable Notify VM exit To: Jim Mattson Cc: Paolo Bonzini , Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Joerg Roedel , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H . Peter Anvin" , the arch/x86 maintainers , kvm list , LKML , Xiaoyao Li References: <20201102061445.191638-1-tao3.xu@intel.com> From: Tao Xu Message-ID: Date: Tue, 3 Nov 2020 14:12:42 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/3/20 6:53 AM, Jim Mattson wrote: > On Sun, Nov 1, 2020 at 10:14 PM Tao Xu wrote: >> >> There are some cases that malicious virtual machines can cause CPU stuck >> (event windows don't open up), e.g., infinite loop in microcode when >> nested #AC (CVE-2015-5307). No event window obviously means no events, >> e.g. NMIs, SMIs, and IRQs will all be blocked, may cause the related >> hardware CPU can't be used by host or other VM. >> >> To resolve those cases, it can enable a notify VM exit if no >> event window occur in VMX non-root mode for a specified amount of >> time (notify window). >> >> Expose a module param for setting notify window, default setting it to >> the time as 1/10 of periodic tick, and user can set it to 0 to disable >> this feature. >> >> TODO: >> 1. The appropriate value of notify window. >> 2. Another patch to disable interception of #DB and #AC when notify >> VM-Exiting is enabled. >> >> Co-developed-by: Xiaoyao Li >> Signed-off-by: Tao Xu >> Signed-off-by: Xiaoyao Li > > Do you have test cases? > Not yet, because we are waiting real silicon to do some test. I should add RFC next time before I test it in hardware.