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 <[email protected]>
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/[email protected]?part=3
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.