All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Vitaly Kuznetsov" <vkuznets@redhat.com>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH 3/4] KVM: selftests: Adapt to the updated VMPTRST behavior when eVMCS is used
Date: Fri, 14 Aug 2026 16:31:16 +0000	[thread overview]
Message-ID: <20260814163116.74F2B1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260814162221.2144473-4-vkuznets@redhat.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The helper function `evmcs_vmptrst` became completely unused after this patch removed its only caller in `vmptrst()`, but its definition was left behind.
--

--- Patch [3]: [PATCH 3/4] KVM: selftests: Adapt to the updated VMPTRST behavior when eVMCS is used ---
commit 18309c20d40234d7991916df5f035584459347c3
Author: Vitaly Kuznetsov <vkuznets@redhat.com>

KVM: selftests: Adapt to the updated VMPTRST behavior when eVMCS is used

This commit updates selftests to stop mocking VMPTRST behavior with eVMCS,
adjusting them to match genuine Hyper-V behavior. It removes the
eVMCS-specific branch from vmptrst() and modifies the eVMCS test expectations.

> diff --git a/tools/testing/selftests/kvm/include/x86/vmx.h b/tools/testing/selftests/kvm/include/x86/vmx.h
> --- a/tools/testing/selftests/kvm/include/x86/vmx.h
> +++ b/tools/testing/selftests/kvm/include/x86/vmx.h
> @@ -341,9 +341,6 @@ static inline int vmptrst(u64 *value)
>  	u64 tmp;
>  	u8 ret;
>  
> -	if (enable_evmcs)
> -		return evmcs_vmptrst(value);
> -

[Severity: Low]
Does this leave evmcs_vmptrst() as unused dead code?

Since this was the only caller, the definition in 
tools/testing/selftests/kvm/include/x86/evmcs.h is left behind:

static inline int evmcs_vmptrst(u64 *value)
{
	*value = current_vp_assist->current_nested_vmcs &
		~HV_X64_MSR_VP_ASSIST_PAGE_ENABLE;

	return 0;
}

Could this definition be removed as well to keep the header clean?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260814162221.2144473-1-vkuznets@redhat.com?part=3

  reply	other threads:[~2026-08-14 16:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-14 16:22 [PATCH 0/4] KVM: nVMX: Adjust VMPTRLD/VMPTRST behavior with active eVMCS Vitaly Kuznetsov
2026-08-14 16:22 ` [PATCH 1/4] KVM: nVMX: Make VMPTRLD result in #UD when eVMCS is used Vitaly Kuznetsov
2026-08-14 16:31   ` sashiko-bot
2026-08-14 16:43     ` Sean Christopherson
2026-08-14 16:22 ` [PATCH 2/4] KVM: nVMX: Make VMPTRST return eVMCS GPA when it " Vitaly Kuznetsov
2026-08-14 16:32   ` sashiko-bot
2026-08-14 16:44     ` Sean Christopherson
2026-08-14 16:22 ` [PATCH 3/4] KVM: selftests: Adapt to the updated VMPTRST behavior when eVMCS " Vitaly Kuznetsov
2026-08-14 16:31   ` sashiko-bot [this message]
2026-08-14 16:22 ` [PATCH 4/4] KVM: selftests: Check VMPTRLD with active eVMCS Vitaly Kuznetsov
2026-08-14 16:31   ` sashiko-bot

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=20260814163116.74F2B1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=vkuznets@redhat.com \
    /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.