All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Michael Kelley <mhklinux@outlook.com>,
	Nuno Das Neves <nunodasneves@linux.microsoft.com>,
	Wei Liu <wei.liu@kernel.org>, Sasha Levin <sashal@kernel.org>,
	kys@microsoft.com, haiyangz@microsoft.com, decui@microsoft.com,
	tglx@linutronix.de, mingo@redhat.com, bp@alien8.de,
	dave.hansen@linux.intel.com, x86@kernel.org,
	linux-hyperv@vger.kernel.org
Subject: [PATCH AUTOSEL 6.13 08/16] x86/hyperv: Fix output argument to hypercall that changes page visibility
Date: Mon, 17 Mar 2025 12:37:17 -0400	[thread overview]
Message-ID: <20250317163725.1892824-8-sashal@kernel.org> (raw)
In-Reply-To: <20250317163725.1892824-1-sashal@kernel.org>

From: Michael Kelley <mhklinux@outlook.com>

[ 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>
---
 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 60fc3ed728304..aa8befc4d9013 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))
-- 
2.39.5


  parent reply	other threads:[~2025-03-17 16:37 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-17 16:37 [PATCH AUTOSEL 6.13 01/16] x86/hyperv/vtl: Stop kernel from probing VTL0 low memory Sasha Levin
2025-03-17 16:37 ` [PATCH AUTOSEL 6.13 02/16] ASoC: codecs: wsa884x: report temps to hwmon in millidegree of Celsius Sasha Levin
2025-03-17 16:37 ` [PATCH AUTOSEL 6.13 03/16] ASoC: cs42l43: Add jack delay debounce after suspend Sasha Levin
2025-03-17 16:37 ` [PATCH AUTOSEL 6.13 04/16] ASoC: rt1320: set wake_capable = 0 explicitly Sasha Levin
2025-03-17 16:37 ` [PATCH AUTOSEL 6.13 05/16] wifi: mac80211: flush the station before moving it to UN-AUTHORIZED state Sasha Levin
2025-03-17 16:37 ` [PATCH AUTOSEL 6.13 06/16] wifi: mac80211: fix SA Query processing in MLO Sasha Levin
2025-03-17 16:37 ` [PATCH AUTOSEL 6.13 07/16] locking/semaphore: Use wake_q to wake up processes outside lock critical section Sasha Levin
2025-03-17 16:37 ` Sasha Levin [this message]
2025-03-17 16:37 ` [PATCH AUTOSEL 6.13 09/16] x86/sgx: Warn explicitly if X86_FEATURE_SGX_LC is not enabled Sasha Levin
2025-03-17 16:37 ` [PATCH AUTOSEL 6.13 10/16] drm/xe/guc_pc: Retry and wait longer for GuC PC start Sasha Levin
2025-03-17 16:37 ` [PATCH AUTOSEL 6.13 11/16] nvme-pci: fix stuck reset on concurrent DPC and HP Sasha Levin
2025-03-17 16:37 ` [PATCH AUTOSEL 6.13 12/16] drm/amd: Keep display off while going into S4 Sasha Levin
2025-03-17 16:37 ` [PATCH AUTOSEL 6.13 13/16] net: devmem: do not WARN conditionally after netdev_rx_queue_restart() Sasha Levin
2025-03-17 16:37 ` [PATCH AUTOSEL 6.13 14/16] platform/surface: aggregator_registry: Add Support for Surface Pro 11 Sasha Levin
2025-03-17 16:37 ` [PATCH AUTOSEL 6.13 15/16] selftests: netfilter: skip br_netfilter queue tests if kernel is tainted Sasha Levin
2025-03-17 16:37 ` [PATCH AUTOSEL 6.13 16/16] ALSA: hda/realtek: Add mute LED quirk for HP Pavilion x360 14-dy1xxx Sasha Levin

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=20250317163725.1892824-8-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=decui@microsoft.com \
    --cc=haiyangz@microsoft.com \
    --cc=kys@microsoft.com \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhklinux@outlook.com \
    --cc=mingo@redhat.com \
    --cc=nunodasneves@linux.microsoft.com \
    --cc=stable@vger.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 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.