From: Mukesh R <mrathor@linux.microsoft.com>
To: linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: haiyangz@microsoft.com, wei.liu@kernel.org, decui@microsoft.com,
mhkelley58@gmail.com
Subject: [PATCH] mshv: Change parameter passing to hv_call_create_partition()
Date: Fri, 6 Nov 2026 16:33:03 -0800 [thread overview]
Message-ID: <20261107003303.3897039-1-mrathor@linux.microsoft.com> (raw)
At present, mshv_ioctl_create_partition() for unknown reasons passes two
aggregate parameters by value to hv_call_create_partition(). Change that
to pass them by reference.
Signed-off-by: Mukesh R <mrathor@linux.microsoft.com>
---
drivers/hv/mshv_root.h | 4 ++--
drivers/hv/mshv_root_hv_call.c | 12 ++++++------
drivers/hv/mshv_root_main.c | 5 ++---
3 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/drivers/hv/mshv_root.h b/drivers/hv/mshv_root.h
index 1f086dcb7aa1..c61b52db7f00 100644
--- a/drivers/hv/mshv_root.h
+++ b/drivers/hv/mshv_root.h
@@ -275,8 +275,8 @@ void mshv_vp_stats_unmap(u64 partition_id, u32 vp_index,
int hv_call_withdraw_memory(u64 count, int node, u64 partition_id);
int hv_call_create_partition(u64 flags,
- struct hv_partition_creation_properties creation_properties,
- union hv_partition_isolation_properties isolation_properties,
+ struct hv_partition_creation_properties *cr_prop,
+ union hv_partition_isolation_properties *isol_prop,
u64 *partition_id);
int hv_call_initialize_partition(u64 partition_id);
int hv_call_finalize_partition(u64 partition_id);
diff --git a/drivers/hv/mshv_root_hv_call.c b/drivers/hv/mshv_root_hv_call.c
index e761addda50e..bf0f90515dad 100644
--- a/drivers/hv/mshv_root_hv_call.c
+++ b/drivers/hv/mshv_root_hv_call.c
@@ -86,8 +86,8 @@ int hv_call_withdraw_memory(u64 count, int node, u64 partition_id)
}
int hv_call_create_partition(u64 flags,
- struct hv_partition_creation_properties creation_properties,
- union hv_partition_isolation_properties isolation_properties,
+ struct hv_partition_creation_properties *cr_prop,
+ union hv_partition_isolation_properties *isol_prop,
u64 *partition_id)
{
struct hv_input_create_partition *input;
@@ -105,11 +105,11 @@ int hv_call_create_partition(u64 flags,
input->flags = flags;
input->compatibility_version = HV_COMPATIBILITY_21_H2;
- memcpy(&input->partition_creation_properties, &creation_properties,
- sizeof(creation_properties));
+ memcpy(&input->partition_creation_properties, cr_prop,
+ sizeof(*cr_prop));
- memcpy(&input->isolation_properties, &isolation_properties,
- sizeof(isolation_properties));
+ memcpy(&input->isolation_properties, isol_prop,
+ sizeof(*isol_prop));
status = hv_do_hypercall(HVCALL_CREATE_PARTITION,
input, output);
diff --git a/drivers/hv/mshv_root_main.c b/drivers/hv/mshv_root_main.c
index cc2cfce2aefd..89fe6fb9244a 100644
--- a/drivers/hv/mshv_root_main.c
+++ b/drivers/hv/mshv_root_main.c
@@ -2088,9 +2088,8 @@ mshv_ioctl_create_partition(void __user *user_arg, struct device *module_dev)
if (ret)
goto free_partition;
- ret = hv_call_create_partition(creation_flags,
- creation_properties,
- isolation_properties,
+ ret = hv_call_create_partition(creation_flags, &creation_properties,
+ &isolation_properties,
&pt_id);
if (ret)
goto cleanup_irq_srcu;
--
2.51.2.vfs.0.1
reply other threads:[~2026-11-07 0:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20261107003303.3897039-1-mrathor@linux.microsoft.com \
--to=mrathor@linux.microsoft.com \
--cc=decui@microsoft.com \
--cc=haiyangz@microsoft.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mhkelley58@gmail.com \
--cc=wei.liu@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
all inboxes | Powered by JetHome®