summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Kelley <mhklinux@outlook.com>2025-02-26 12:06:06 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-04-10 14:39:31 +0200
commiteafd7ec55b1de96478bddf52de3cc7ac0d71a599 (patch)
treede7d8a83fcb19fabfc46aa0c000cf145090f6998
parentddf40162ac79acd0d3882501e3de48db6ed008da (diff)
x86/hyperv: Fix output argument to hypercall that changes page visibility
[ Upstream commit 09beefefb57bbc3a06d98f319d85db4d719d7bcb ] The hypercall in hv_mark_gpa_visibility() is invoked with an input argument and an output argument. The output argument ostensibly returns the number of pages that were processed. But in fact, the hypercall does not provide any output, so the output argument is spurious. The spurious argument is harmless because Hyper-V ignores it, but in the interest of correctness and to avoid the potential for future problems, remove it. Signed-off-by: Michael Kelley <mhklinux@outlook.com> Reviewed-by: Nuno Das Neves <nunodasneves@linux.microsoft.com> Link: https://lore.kernel.org/r/20250226200612.2062-2-mhklinux@outlook.com Signed-off-by: Wei Liu <wei.liu@kernel.org> Message-ID: <20250226200612.2062-2-mhklinux@outlook.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--arch/x86/hyperv/ivm.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/x86/hyperv/ivm.c b/arch/x86/hyperv/ivm.c
index 60fc3ed72830..aa8befc4d901 100644
--- a/arch/x86/hyperv/ivm.c
+++ b/arch/x86/hyperv/ivm.c
@@ -465,7 +465,6 @@ static int hv_mark_gpa_visibility(u16 count, const u64 pfn[],
enum hv_mem_host_visibility visibility)
{
struct hv_gpa_range_for_visibility *input;
- u16 pages_processed;
u64 hv_status;
unsigned long flags;
@@ -494,7 +493,7 @@ static int hv_mark_gpa_visibility(u16 count, const u64 pfn[],
memcpy((void *)input->gpa_page_list, pfn, count * sizeof(*pfn));
hv_status = hv_do_rep_hypercall(
HVCALL_MODIFY_SPARSE_GPA_PAGE_HOST_VISIBILITY, count,
- 0, input, &pages_processed);
+ 0, input, NULL);
local_irq_restore(flags);
if (hv_result_success(hv_status))