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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2687ECA0FEC for ; Fri, 1 Sep 2023 18:43:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350620AbjIASnI (ORCPT ); Fri, 1 Sep 2023 14:43:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229647AbjIASnI (ORCPT ); Fri, 1 Sep 2023 14:43:08 -0400 Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 017F51BF for ; Fri, 1 Sep 2023 11:43:04 -0700 (PDT) Received: by mail-yb1-xb49.google.com with SMTP id 3f1490d57ef6-d7e7e70fa52so909909276.0 for ; Fri, 01 Sep 2023 11:43:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1693593783; x=1694198583; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:from:to:cc:subject:date:message-id :reply-to; bh=v5dtrH/QRuYrVKE5hX6k22Sthf/F5kmL32WEpHVMHJY=; b=zRk/k9a9OaUXNF1GbfWUwJPJJSfqD5Dg7v3GOwuiUVgompMiwcl9gQYzotcRhdfN3l HQI+XSOFIJ+Gb9240KeflBIBELZguPqaTmOlsqvPCTXV7c0X/vY+bb1++wsB7QM+NjJm t/7BEZEjODiCVSNFdJpDR7OGZhHAVvuuQUrBaquv6iK5Mso/ru+q41GEKxc3s+hwf2OR va1eQUTSBvPazpLcU6ZkYUxS3O8VySAh49YnahRm2Tihc4izB94UbFuYZnli0P5B1s2i rhmQO5av38XhPPSVQjKfDvL4R7G/s6qxgleqOHUfjtZzgLzXquxMg6vlqfo/1d+37X8m rTew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693593783; x=1694198583; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=v5dtrH/QRuYrVKE5hX6k22Sthf/F5kmL32WEpHVMHJY=; b=dJ+AoLPXl6sMfQBszHr7ijCCi74FWRusVCbL9WYX/eNQAuGBXG52WJmtT6qDjTmMZ7 jhthgEltuoggKZ8dNZKnBNxTagN25pNJkyxmw+h5R1zyNwZe3Exr6FH7etNl6D9Men2x Sy/CCEnwqTifUQR3/4O/TfRzR9H6Xf/XBQC0iu4LLHEPCfITqImAWFxZ21LcT8mvZASR W+1PQokSIcURc8fgwRMLGD70XLZY/4amonBGGtYO3tkzzyzJNE+FQ669nCf0WN3cL8ws vfDSxOrnodf3FBdDLaxU5QQUVtoyhNA/SWRIznukx+arxWQ4UwKOz+Whb/xKxj2b/4wS VdPQ== X-Gm-Message-State: AOJu0YxnVg/zshBAcfC2vxGp/bPgaUYiuMwv8gGlEvIHsNv6EEfTQkGl CyQ6MaqNJF5lb0zjgb1GD0ewLx5c7i8= X-Google-Smtp-Source: AGHT+IG0qM0//cDkf/PDSLBNEX67DkbSxG0HWR/mCMySifwiXVav3TtewhTE0SusOybsTBXYZMGnO7ZhBoA= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a25:3056:0:b0:d7b:92d7:5629 with SMTP id w83-20020a253056000000b00d7b92d75629mr98185ybw.8.1693593783142; Fri, 01 Sep 2023 11:43:03 -0700 (PDT) Date: Fri, 1 Sep 2023 11:43:01 -0700 In-Reply-To: Mime-Version: 1.0 References: <20230830000633.3158416-1-seanjc@google.com> <20230830000633.3158416-4-seanjc@google.com> Message-ID: Subject: Re: [GIT PULL] KVM: x86: MMU changes for 6.6 From: Sean Christopherson To: Paolo Bonzini Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Like Xu Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 31, 2023, Paolo Bonzini wrote: > On Thu, Aug 31, 2023 at 7:27=E2=80=AFPM Sean Christopherson wrote: > > > > +Like > > > > On Tue, Aug 29, 2023, Sean Christopherson wrote: > > > Please pull MMU changes for 6.6, with a healthy dose of KVMGT cleanup= s mixed in. > > > The other highlight is finally purging the old MMU_DEBUG code and rep= lacing it > > > with CONFIG_KVM_PROVE_MMU. > > > > > > All KVMGT patches have been reviewed/acked and tested by KVMGT folks.= A *huge* > > > thanks to them for all the reviews and testing, and to Yan in particu= lar. > > > > FYI, Like found a brown paper bag bug[*] that causes selftests that mov= e memory > > regions to fail when compiled with CONFIG_KVM_EXTERNAL_WRITE_TRACKING= =3Dy. I'm > > redoing testing today with that forced on, but barring more falling, th= e fix is: >=20 > Ok, I'll apply these by hand. In case you haven't taken care of this already, here's an "official" tested= fix. Like, if you can give your SoB, I'd rather give you full author credit and = sub me out entirely. -- From: Sean Christopherson Date: Fri, 1 Sep 2023 16:55:56 +0000 Subject: [PATCH] KVM: x86/mmu: Fix inverted check when detecting external p= age tracker(s) When checking for the presence of external users of page write tracking, check that the list of external trackers is NOT empty. Fixes: aa611a99adb4 ("KVM: x86: Reject memslot MOVE operations if KVMGT is = attached") Reported-by: Like Xu Signed-off-by: Sean Christopherson --- arch/x86/kvm/mmu/page_track.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/mmu/page_track.h b/arch/x86/kvm/mmu/page_track.h index 62f98c6c5af3..d4d72ed999b1 100644 --- a/arch/x86/kvm/mmu/page_track.h +++ b/arch/x86/kvm/mmu/page_track.h @@ -32,7 +32,7 @@ void kvm_page_track_delete_slot(struct kvm *kvm, struct k= vm_memory_slot *slot); =20 static inline bool kvm_page_track_has_external_user(struct kvm *kvm) { - return hlist_empty(&kvm->arch.track_notifier_head.track_notifier_list); + return !hlist_empty(&kvm->arch.track_notifier_head.track_notifier_list); } #else static inline int kvm_page_track_init(struct kvm *kvm) { return 0; } base-commit: 22a1c60f8beca52229911b5133d010ff76588921 --=20