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.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 178DEC34049 for ; Tue, 18 Feb 2020 17:47:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E61FF21D56 for ; Tue, 18 Feb 2020 17:47:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726703AbgBRRr1 (ORCPT ); Tue, 18 Feb 2020 12:47:27 -0500 Received: from mga12.intel.com ([192.55.52.136]:6857 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726521AbgBRRr0 (ORCPT ); Tue, 18 Feb 2020 12:47:26 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Feb 2020 09:47:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,456,1574150400"; d="scan'208";a="235606998" Received: from sjchrist-coffee.jf.intel.com (HELO linux.intel.com) ([10.54.74.202]) by orsmga003.jf.intel.com with ESMTP; 18 Feb 2020 09:47:25 -0800 Date: Tue, 18 Feb 2020 09:47:25 -0800 From: Sean Christopherson To: Sasha Levin Cc: gregkh@linuxfoundation.org, pbonzini@redhat.com, stable@vger.kernel.org Subject: Re: FAILED: patch "[PATCH] KVM: x86/mmu: Fix struct guest_walker arrays for 5-level" failed to apply to 5.4-stable tree Message-ID: <20200218174725.GB28156@linux.intel.com> References: <1581966871164161@kroah.com> <20200218174451.GT1734@sasha-vm> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200218174451.GT1734@sasha-vm> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Tue, Feb 18, 2020 at 12:44:51PM -0500, Sasha Levin wrote: > On Mon, Feb 17, 2020 at 08:14:31PM +0100, gregkh@linuxfoundation.org wrote: > > > >The patch below does not apply to the 5.4-stable tree. > >If someone wants it applied there, or to any other stable or longterm > >tree, then please email the backport, including the original git commit > >id to . > > > >thanks, > > > >greg k-h > > > >------------------ original commit in Linus's tree ------------------ > > > >From f6ab0107a4942dbf9a5cf0cca3f37e184870a360 Mon Sep 17 00:00:00 2001 > >From: Sean Christopherson > >Date: Fri, 7 Feb 2020 09:37:42 -0800 > >Subject: [PATCH] KVM: x86/mmu: Fix struct guest_walker arrays for 5-level > >paging > > > >Define PT_MAX_FULL_LEVELS as PT64_ROOT_MAX_LEVEL, i.e. 5, to fix shadow > >paging for 5-level guest page tables. PT_MAX_FULL_LEVELS is used to > >size the arrays that track guest pages table information, i.e. using a > >"max levels" of 4 causes KVM to access garbage beyond the end of an > >array when querying state for level 5 entries. E.g. FNAME(gpte_changed) > >will read garbage and most likely return %true for a level 5 entry, > >soft-hanging the guest because FNAME(fetch) will restart the guest > >instead of creating SPTEs because it thinks the guest PTE has changed. > > > >Note, KVM doesn't yet support 5-level nested EPT, so PT_MAX_FULL_LEVELS > >gets to stay "4" for the PTTYPE_EPT case. > > > >Fixes: 855feb673640 ("KVM: MMU: Add 5 level EPT & Shadow page table support.") > >Cc: stable@vger.kernel.org > >Signed-off-by: Sean Christopherson > >Signed-off-by: Paolo Bonzini > > File name is different in 5.4 and 4.19. Fixed and queued up for both. Thanks! Backporting the non-trivial conflicts is on my todo list, unfortunately my todo list is rather long right now...