From: mhkelley58@gmail.com
To: kys@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org,
decui@microsoft.com, tglx@linutronix.de, mingo@redhat.com,
bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com,
lpieralisi@kernel.org, kw@linux.com,
manivannan.sadhasivam@linaro.org, robh@kernel.org,
bhelgaas@google.com, arnd@arndb.de
Cc: x86@kernel.org, linux-hyperv@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
linux-arch@vger.kernel.org
Subject: [PATCH 1/7] x86/hyperv: Fix output argument to hypercall that changes page visibility
Date: Wed, 26 Feb 2025 12:06:06 -0800 [thread overview]
Message-ID: <20250226200612.2062-2-mhklinux@outlook.com> (raw)
In-Reply-To: <20250226200612.2062-1-mhklinux@outlook.com>
From: Michael Kelley <mhklinux@outlook.com>
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>
---
I have not provided a "Fixes:" tag because the error causes no impact.
There's no value in backporting the fix.
arch/x86/hyperv/ivm.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/x86/hyperv/ivm.c b/arch/x86/hyperv/ivm.c
index dd68d9ad9b22..ec7880271cf9 100644
--- a/arch/x86/hyperv/ivm.c
+++ b/arch/x86/hyperv/ivm.c
@@ -464,7 +464,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;
@@ -493,7 +492,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))
--
2.25.1
next prev parent reply other threads:[~2025-02-26 20:06 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-26 20:06 [PATCH 0/7] hyperv: Introduce new way to manage hypercall args mhkelley58
2025-02-26 20:06 ` mhkelley58 [this message]
2025-02-26 22:59 ` [PATCH 1/7] x86/hyperv: Fix output argument to hypercall that changes page visibility Nuno Das Neves
2025-03-10 0:22 ` Wei Liu
2025-02-26 20:06 ` [PATCH 2/7] Drivers: hv: Introduce hv_hvcall_*() functions for hypercall arguments mhkelley58
2025-02-27 0:14 ` Nuno Das Neves
2025-02-27 1:50 ` Michael Kelley
2025-02-27 20:09 ` Nuno Das Neves
2025-02-26 20:06 ` [PATCH 3/7] x86/hyperv: Use hv_hvcall_*() to set up hypercall arguments -- part 1 mhkelley58
2025-02-27 21:07 ` Nuno Das Neves
2025-02-28 0:50 ` Michael Kelley
2025-02-26 20:06 ` [PATCH 4/7] x86/hyperv: Use hv_hvcall_*() to set up hypercall arguments -- part 2 mhkelley58
2025-02-26 20:06 ` [PATCH 5/7] Drivers: hv: Use hv_hvcall_*() to set up hypercall arguments mhkelley58
2025-02-26 20:06 ` [PATCH 6/7] PCI: " mhkelley58
2025-02-27 20:29 ` Bjorn Helgaas
2025-03-05 17:24 ` Wei Liu
2025-02-26 20:06 ` [PATCH 7/7] Drivers: hv: Replace hyperv_pcpu_input/output_arg with hyperv_pcpu_arg mhkelley58
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=20250226200612.2062-2-mhklinux@outlook.com \
--to=mhkelley58@gmail.com \
--cc=arnd@arndb.de \
--cc=bhelgaas@google.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=decui@microsoft.com \
--cc=haiyangz@microsoft.com \
--cc=hpa@zytor.com \
--cc=kw@linux.com \
--cc=kys@microsoft.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=mhklinux@outlook.com \
--cc=mingo@redhat.com \
--cc=robh@kernel.org \
--cc=tglx@linutronix.de \
--cc=wei.liu@kernel.org \
--cc=x86@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).