From: Nuno Das Neves <nunodasneves@linux.microsoft.com>
To: Stanislav Kinsburskii <skinsburskii@linux.microsoft.com>
Cc: linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org,
prapal@linux.microsoft.com, easwar.hariharan@linux.microsoft.com,
tiala@microsoft.com, anirudh@anirudhrb.com,
paekkaladevi@linux.microsoft.com, kys@microsoft.com,
haiyangz@microsoft.com, wei.liu@kernel.org, decui@microsoft.com
Subject: Re: [PATCH v3 2/5] mshv: Add the HVCALL_GET_PARTITION_PROPERTY_EX hypercall
Date: Fri, 19 Sep 2025 15:30:39 -0700 [thread overview]
Message-ID: <350e4429-46e5-4011-89c5-85de442e8ddb@linux.microsoft.com> (raw)
In-Reply-To: <aMxS7Wh67SuF4LV2@skinsburskii.localdomain>
On 9/18/2025 11:43 AM, Stanislav Kinsburskii wrote:
> On Tue, Sep 16, 2025 at 04:44:19PM -0700, Nuno Das Neves wrote:
>
> <snip>
>
>> diff --git a/include/hyperv/hvhdk.h b/include/hyperv/hvhdk.h
>> index b4067ada02cf..b91358b9c929 100644
>> --- a/include/hyperv/hvhdk.h
>> +++ b/include/hyperv/hvhdk.h
>> @@ -376,6 +376,46 @@ struct hv_input_set_partition_property {
>> u64 property_value;
>> } __packed;
>>
>> +union hv_partition_property_arg {
>> + u64 as_uint64;
>> + struct {
>> + union {
>> + u32 arg;
>> + u32 vp_index;
>> + };
>> + u16 reserved0;
>> + u8 reserved1;
>> + u8 object_type;
>> + };
>> +} __packed;
>
> Shouldn't the struct be "packed" instead?
>
Indeed, I'll fix it, thanks.
>> +
>> +struct hv_input_get_partition_property_ex {
>> + u64 partition_id;
>> + u32 property_code; /* enum hv_partition_property_code */
>> + u32 padding;
>> + union {
>> + union hv_partition_property_arg arg_data;
>> + u64 arg;
>> + };
>> +} __packed;
>> +
>> +/*
>> + * NOTE: Should use hv_input_set_partition_property_ex_header to compute this
>> + * size, but hv_input_get_partition_property_ex is identical so it suffices
>> + */
>> +#define HV_PARTITION_PROPERTY_EX_MAX_VAR_SIZE \
>> + (HV_HYP_PAGE_SIZE - sizeof(struct hv_input_get_partition_property_ex))
>> +
>> +union hv_partition_property_ex {
>> + u8 buffer[HV_PARTITION_PROPERTY_EX_MAX_VAR_SIZE];
>> + struct hv_partition_property_vmm_capabilities vmm_capabilities;
>> + /* More fields to be filled in when needed */
>> +} __packed;
>
> Packing a union is redundant.
>
> Thanks,
> Stanislav
next prev parent reply other threads:[~2025-09-19 22:30 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-16 23:44 [PATCH v3 0/5] mshv: Fixes for stats and vp state page mappings Nuno Das Neves
2025-09-16 23:44 ` [PATCH v3 1/5] mshv: Only map vp->vp_stats_pages if on root scheduler Nuno Das Neves
2025-09-18 18:38 ` Stanislav Kinsburskii
2025-09-16 23:44 ` [PATCH v3 2/5] mshv: Add the HVCALL_GET_PARTITION_PROPERTY_EX hypercall Nuno Das Neves
2025-09-18 18:43 ` Stanislav Kinsburskii
2025-09-19 22:30 ` Nuno Das Neves [this message]
2025-09-16 23:44 ` [PATCH v3 3/5] mshv: Get the vmm capabilities offered by the hypervisor Nuno Das Neves
2025-09-18 18:50 ` Stanislav Kinsburskii
2025-09-19 22:37 ` Nuno Das Neves
2025-09-16 23:44 ` [PATCH v3 4/5] mshv: Allocate vp state page for HVCALL_MAP_VP_STATE_PAGE on L1VH Nuno Das Neves
2025-09-18 18:58 ` Stanislav Kinsburskii
2025-09-23 8:13 ` Anirudh Rayabharam
2025-09-16 23:44 ` [PATCH v3 5/5] mshv: Introduce new hypercall to map stats page for L1VH partitions Nuno Das Neves
2025-09-18 19:53 ` Stanislav Kinsburskii
2025-09-19 22:44 ` Nuno Das Neves
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=350e4429-46e5-4011-89c5-85de442e8ddb@linux.microsoft.com \
--to=nunodasneves@linux.microsoft.com \
--cc=anirudh@anirudhrb.com \
--cc=decui@microsoft.com \
--cc=easwar.hariharan@linux.microsoft.com \
--cc=haiyangz@microsoft.com \
--cc=kys@microsoft.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paekkaladevi@linux.microsoft.com \
--cc=prapal@linux.microsoft.com \
--cc=skinsburskii@linux.microsoft.com \
--cc=tiala@microsoft.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