kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Xiaoyao Li <xiaoyao.li@intel.com>
To: Tao Xu <tao3.xu@intel.com>, Jim Mattson <jmattson@google.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Sean Christopherson <sean.j.christopherson@intel.com>,
	Vitaly Kuznetsov <vkuznets@redhat.com>,
	Wanpeng Li <wanpengli@tencent.com>,
	Joerg Roedel <joro@8bytes.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	"H . Peter Anvin" <hpa@zytor.com>,
	the arch/x86 maintainers <x86@kernel.org>,
	kvm list <kvm@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] KVM: VMX: Enable Notify VM exit
Date: Tue, 3 Nov 2020 14:24:22 +0800	[thread overview]
Message-ID: <24fd6383-2360-8a1a-3c4c-1a3ee1b1db1c@intel.com> (raw)
In-Reply-To: <d4388899-665f-8012-c609-8162fa7015ae@intel.com>

On 11/3/2020 2:12 PM, Tao Xu wrote:
> 
> 
> On 11/3/20 6:53 AM, Jim Mattson wrote:
>> On Sun, Nov 1, 2020 at 10:14 PM Tao Xu <tao3.xu@intel.com> 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 <xiaoyao.li@intel.com>
>>> Signed-off-by: Tao Xu <tao3.xu@intel.com>
>>> Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
>>
>> Do you have test cases?
>>

yes we have. The nested #AC (CVE-2015-5307) is a known test case, though 
we need to tweak KVM to disable interception #AC for it.

> Not yet, because we are waiting real silicon to do some test. I should 
> add RFC next time before I test it in hardware.


      reply	other threads:[~2020-11-03  6:24 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-02  6:14 [PATCH] KVM: VMX: Enable Notify VM exit Tao Xu
2020-11-02 16:43 ` Andy Lutomirski
2020-11-02 17:31   ` Sean Christopherson
2020-11-02 18:01     ` Andy Lutomirski
2020-11-02 18:25       ` Paolo Bonzini
2020-11-03  6:39         ` Xiaoyao Li
2020-11-02 18:33       ` Sean Christopherson
2021-05-17  7:20         ` Xiaoyao Li
2021-05-17  8:55           ` Xiaoyao Li
2020-11-03  5:35     ` Tao Xu
2020-11-03  6:08   ` Tao Xu
2020-11-03  7:29     ` Xiaoyao Li
2020-11-02 17:32 ` Sean Christopherson
2020-11-03  5:36   ` Tao Xu
2020-11-02 22:53 ` Jim Mattson
2020-11-03  6:12   ` Tao Xu
2020-11-03  6:24     ` Xiaoyao Li [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=24fd6383-2360-8a1a-3c4c-1a3ee1b1db1c@intel.com \
    --to=xiaoyao.li@intel.com \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=jmattson@google.com \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=sean.j.christopherson@intel.com \
    --cc=tao3.xu@intel.com \
    --cc=tglx@linutronix.de \
    --cc=vkuznets@redhat.com \
    --cc=wanpengli@tencent.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).