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.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS, USER_AGENT_MUTT autolearn=ham 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 7AA30C10F14 for ; Mon, 8 Apr 2019 14:01:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3A1EB214C6 for ; Mon, 8 Apr 2019 14:01:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554732098; bh=XvdAqtBmBNriaYmPymkZBiecg+xnC65hXpVT5DwGyt8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=YpZn/gxAWvHnEEr5Cm7+YKJNIQ1hBsPUEJbGLUFLU1RBZFkWGkfMI/lr5dJI1XupC fQjnXvv5HM+zzsG/IIZ1xBL9Y1l/O47QHd+fWsuz3jycJyJ71HJNNHwq15yWOiDfVz hOrdnaSOgokEP5Nc21OpAJ/9uJ121paOjjyd4Nrk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726918AbfDHOBh (ORCPT ); Mon, 8 Apr 2019 10:01:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:59332 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726721AbfDHOBg (ORCPT ); Mon, 8 Apr 2019 10:01:36 -0400 Received: from localhost (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5F09021874; Mon, 8 Apr 2019 14:01:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554732095; bh=XvdAqtBmBNriaYmPymkZBiecg+xnC65hXpVT5DwGyt8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=SYTweqF7YCDFqBWr5geO7ZyaDJ0jztlwMZltLTsvZfZNnpXa4jBCJGfdpOS568iQO bDNdsIKfpV3Mtqgh/nKlZR7UzLjRzOtwJCZa8mCtfFoMwaMeW5d3R95MK/KUi6rQL8 fMY+wDQbMNRlWyBPek1TIfFFG8LHPDOA0WIXAqAs= Date: Mon, 8 Apr 2019 10:01:34 -0400 From: Sasha Levin To: Mark Mielke Cc: stable@vger.kernel.org, Jim Mattson Subject: Re: [stable-4.19] kvm: nVMX: NMI-window and interrupt-window exiting should wake L2 from HLT Message-ID: <20190408140134.GA4689@sasha-vm> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Sat, Apr 06, 2019 at 07:43:45PM -0400, Mark Mielke wrote: >This commit was first released with 5.0: > >commit 9ebdfe5230f2e50e3ba05c57723a06e90946815a >Author: Jim Mattson >Date: Mon Nov 26 11:22:32 2018 -0800 > > kvm: nVMX: NMI-window and interrupt-window exiting should wake L2 from HLT > > According to the SDM, "NMI-window exiting" VM-exits wake a logical > processor from the same inactive states as would an NMI and > "interrupt-window exiting" VM-exits wake a logical processor from the > same inactive states as would an external interrupt. Specifically, they > wake a logical processor from the shutdown state and from the states > entered using the HLT and MWAIT instructions. > > Fixes: 6dfacadd5858 ("KVM: nVMX: Add support for activity state HLT") > Signed-off-by: Jim Mattson > Reviewed-by: Peter Shier > Suggested-by: Sean Christopherson > [Squashed comments of two Jim's patches and used the simplified code > hunk provided by Sean. - Radim] > Signed-off-by: Radim Krčmář > >This commit does not apply clean to 4.19, only due to restructuring >that split out a portion of arch/x86/kvm/vmx.c into >arch/x86/kvm/vmx/nested.c. > >The following procedure can be followed to allow the patch to apply >clean to 4.19: > >git checkout linux-4.19.y >git format-patch -1 9ebdfe5230f2e50e3ba05c57723a06e90946815a >perl -pi -e 's[arch/x86/kvm/vmx/nested.c][arch/x86/kvm/vmx.c]g' >0001-kvm-nVMX-NMI-window-and-interrupt-window-exiting-sho.patch >git am 0001-kvm-nVMX-NMI-window-and-interrupt-window-exiting-sho.patch > >I have been using this patch in our own 4.19-based production >environment (which heavily uses nested KVM for product simulation) >since January, 2019, along with several other nVMX patches. All of the >other nVMX patches have since made it into 4.19 except for this one. I >expect this one did not make the stable list because it did not apply >cleanly without help. > >I don't have a specific test to reproduce the problem that this fix >addresses. I had specific problems that were addressed by other nVMX >patches, but this was one I chose to add as a preventative measure >based upon the description and the likelihood that the problem might >impact us. > >Please consider including this patch into 4.19. I don't mind >maintaining it local if there is some reason it doesn't qualify for >stable. But, if this could help others, I'm happy to share the above >method of getting it into 4.19 safely. I've queued it for 4.19, thank you. -- Thanks, Sasha