From: sashiko-bot@kernel.org
To: "Carlos López" <clopez@suse.de>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH] KVM: x86/mmu: Fix NX page unaccounting for TDP MMU pages
Date: Tue, 15 Sep 2026 20:45:22 +0000 [thread overview]
Message-ID: <20260915204522.EFB231F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260915203511.1808028-1-clopez@suse.de>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] mmu: build failure on 32-bit x86 due to undeclared KVM_TDP_MMU
--
commit c2443a58667359b4d898625aee21d7fa954accfd
Author: Carlos López <clopez@suse.de>
KVM: x86/mmu: Fix NX page unaccounting for TDP MMU pages
This commit fixes unaccounting of NX huge pages for TDP MMU pages by passing
the correct MMU type to untrack_possible_nx_huge_page() instead of always
hardcoding KVM_SHADOW_MMU.
> diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c
> index 9788ff1803740..61996669b6f6a 100644
> --- a/arch/x86/kvm/mmu/mmu.c
> +++ b/arch/x86/kvm/mmu/mmu.c
[ ... ]
> @@ -866,9 +866,11 @@ void untrack_possible_nx_huge_page(struct kvm *kvm, struct kvm_mmu_page *sp,
>
> static void unaccount_nx_huge_page(struct kvm *kvm, struct kvm_mmu_page *sp)
> {
> + enum kvm_mmu_type mmu_type = is_tdp_mmu_page(sp) ? KVM_TDP_MMU : KVM_SHADOW_MMU;
[Severity: Low]
Will this break the build on 32-bit x86 systems? KVM_TDP_MMU is only defined
when CONFIG_X86_64 is enabled. Unconditionally referencing it here in
unaccount_nx_huge_page() will result in an undeclared identifier error when
compiling KVM with CONFIG_X86_32=y.
> +
> sp->nx_huge_page_disallowed = false;
>
> - untrack_possible_nx_huge_page(kvm, sp, KVM_SHADOW_MMU);
> + untrack_possible_nx_huge_page(kvm, sp, mmu_type);
> }
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260915203511.1808028-1-clopez@suse.de?part=1
prev parent reply other threads:[~2026-09-15 20:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-15 20:35 [PATCH] KVM: x86/mmu: Fix NX page unaccounting for TDP MMU pages Carlos López
2026-09-15 20:45 ` sashiko-bot [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=20260915204522.EFB231F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=clopez@suse.de \
--cc=kvm@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.