* [PATCH] hyperv: Add missing field to hv_output_map_device_interrupt @ 2025-08-13 18:20 Nuno Das Neves 2025-08-14 18:57 ` Michael Kelley 2025-08-14 21:28 ` Wei Liu 0 siblings, 2 replies; 6+ messages in thread From: Nuno Das Neves @ 2025-08-13 18:20 UTC (permalink / raw) To: linux-hyperv, linux-kernel Cc: kys, haiyangz, wei.liu, mhklinux, decui, Nuno Das Neves This field is unused, but the correct structure size is needed when computing the amount of space for the output argument to reside, so that it does not cross a page boundary. Signed-off-by: Nuno Das Neves <nunodasneves@linux.microsoft.com> --- include/hyperv/hvhdk_mini.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/hyperv/hvhdk_mini.h b/include/hyperv/hvhdk_mini.h index 42e7876455b5..858f6a3925b3 100644 --- a/include/hyperv/hvhdk_mini.h +++ b/include/hyperv/hvhdk_mini.h @@ -301,6 +301,7 @@ struct hv_input_map_device_interrupt { /* HV_OUTPUT_MAP_DEVICE_INTERRUPT */ struct hv_output_map_device_interrupt { struct hv_interrupt_entry interrupt_entry; + u64 ext_status_deprecated[5]; } __packed; /* HV_INPUT_UNMAP_DEVICE_INTERRUPT */ -- 2.34.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* RE: [PATCH] hyperv: Add missing field to hv_output_map_device_interrupt 2025-08-13 18:20 [PATCH] hyperv: Add missing field to hv_output_map_device_interrupt Nuno Das Neves @ 2025-08-14 18:57 ` Michael Kelley 2025-08-14 21:16 ` Wei Liu 2025-08-14 21:28 ` Wei Liu 1 sibling, 1 reply; 6+ messages in thread From: Michael Kelley @ 2025-08-14 18:57 UTC (permalink / raw) To: Nuno Das Neves, linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org Cc: kys@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org, decui@microsoft.com From: Nuno Das Neves <nunodasneves@linux.microsoft.com> Sent: Wednesday, August 13, 2025 11:21 AM > > This field is unused, but the correct structure size is needed > when computing the amount of space for the output argument to > reside, so that it does not cross a page boundary. > > Signed-off-by: Nuno Das Neves <nunodasneves@linux.microsoft.com> > --- > include/hyperv/hvhdk_mini.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/include/hyperv/hvhdk_mini.h b/include/hyperv/hvhdk_mini.h > index 42e7876455b5..858f6a3925b3 100644 > --- a/include/hyperv/hvhdk_mini.h > +++ b/include/hyperv/hvhdk_mini.h > @@ -301,6 +301,7 @@ struct hv_input_map_device_interrupt { > /* HV_OUTPUT_MAP_DEVICE_INTERRUPT */ > struct hv_output_map_device_interrupt { > struct hv_interrupt_entry interrupt_entry; > + u64 ext_status_deprecated[5]; Your email identifying the problem said that without this change, struct hv_output_map_device_interrupt is 0x10 bytes in size, which matches what I calculate from the definition. This change adds 0x28 bytes, making the struct size now 0x38 bytes. But your other email said Hyper-V expects the size to be 0x58 bytes. Is array size "5" correct, or is there some other cause of the discrepancy? Michael > } __packed; > > /* HV_INPUT_UNMAP_DEVICE_INTERRUPT */ > -- > 2.34.1 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] hyperv: Add missing field to hv_output_map_device_interrupt 2025-08-14 18:57 ` Michael Kelley @ 2025-08-14 21:16 ` Wei Liu 2025-08-15 17:11 ` Nuno Das Neves 0 siblings, 1 reply; 6+ messages in thread From: Wei Liu @ 2025-08-14 21:16 UTC (permalink / raw) To: Michael Kelley Cc: Nuno Das Neves, linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, kys@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org, decui@microsoft.com On Thu, Aug 14, 2025 at 06:57:22PM +0000, Michael Kelley wrote: > From: Nuno Das Neves <nunodasneves@linux.microsoft.com> Sent: Wednesday, August 13, 2025 11:21 AM > > > > This field is unused, but the correct structure size is needed > > when computing the amount of space for the output argument to > > reside, so that it does not cross a page boundary. > > > > Signed-off-by: Nuno Das Neves <nunodasneves@linux.microsoft.com> > > --- > > include/hyperv/hvhdk_mini.h | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/include/hyperv/hvhdk_mini.h b/include/hyperv/hvhdk_mini.h > > index 42e7876455b5..858f6a3925b3 100644 > > --- a/include/hyperv/hvhdk_mini.h > > +++ b/include/hyperv/hvhdk_mini.h > > @@ -301,6 +301,7 @@ struct hv_input_map_device_interrupt { > > /* HV_OUTPUT_MAP_DEVICE_INTERRUPT */ > > struct hv_output_map_device_interrupt { > > struct hv_interrupt_entry interrupt_entry; > > + u64 ext_status_deprecated[5]; > > Your email identifying the problem said that without this > change, struct hv_output_map_device_interrupt is 0x10 > bytes in size, which matches what I calculate from the definition. > This change adds 0x28 bytes, making the struct size now 0x38 > bytes. But your other email said Hyper-V expects the size to be > 0x58 bytes. Is array size "5" correct, or is there some other > cause of the discrepancy? > FWIW the array size 5 here is correct. Wei > Michael > > > } __packed; > > > > /* HV_INPUT_UNMAP_DEVICE_INTERRUPT */ > > -- > > 2.34.1 > > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] hyperv: Add missing field to hv_output_map_device_interrupt 2025-08-14 21:16 ` Wei Liu @ 2025-08-15 17:11 ` Nuno Das Neves 2025-08-15 20:46 ` Michael Kelley 0 siblings, 1 reply; 6+ messages in thread From: Nuno Das Neves @ 2025-08-15 17:11 UTC (permalink / raw) To: Wei Liu, Michael Kelley Cc: linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, kys@microsoft.com, haiyangz@microsoft.com, decui@microsoft.com On 8/14/2025 2:16 PM, Wei Liu wrote: > On Thu, Aug 14, 2025 at 06:57:22PM +0000, Michael Kelley wrote: >> From: Nuno Das Neves <nunodasneves@linux.microsoft.com> Sent: Wednesday, August 13, 2025 11:21 AM >>> >>> This field is unused, but the correct structure size is needed >>> when computing the amount of space for the output argument to >>> reside, so that it does not cross a page boundary. >>> >>> Signed-off-by: Nuno Das Neves <nunodasneves@linux.microsoft.com> >>> --- >>> include/hyperv/hvhdk_mini.h | 1 + >>> 1 file changed, 1 insertion(+) >>> >>> diff --git a/include/hyperv/hvhdk_mini.h b/include/hyperv/hvhdk_mini.h >>> index 42e7876455b5..858f6a3925b3 100644 >>> --- a/include/hyperv/hvhdk_mini.h >>> +++ b/include/hyperv/hvhdk_mini.h >>> @@ -301,6 +301,7 @@ struct hv_input_map_device_interrupt { >>> /* HV_OUTPUT_MAP_DEVICE_INTERRUPT */ >>> struct hv_output_map_device_interrupt { >>> struct hv_interrupt_entry interrupt_entry; >>> + u64 ext_status_deprecated[5]; >> >> Your email identifying the problem said that without this >> change, struct hv_output_map_device_interrupt is 0x10 >> bytes in size, which matches what I calculate from the definition. >> This change adds 0x28 bytes, making the struct size now 0x38 >> bytes. But your other email said Hyper-V expects the size to be >> 0x58 bytes. Is array size "5" correct, or is there some other >> cause of the discrepancy? >> Ah, it looks like the *input* struct size (0x50) plus the size of 1 cpu bank is 0x58. The output struct size should indeed be 0x38. I got them mixed up somehow when writing the email. > > FWIW the array size 5 here is correct. > > Wei > >> Michael >> >>> } __packed; >>> >>> /* HV_INPUT_UNMAP_DEVICE_INTERRUPT */ >>> -- >>> 2.34.1 >> >> ^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH] hyperv: Add missing field to hv_output_map_device_interrupt 2025-08-15 17:11 ` Nuno Das Neves @ 2025-08-15 20:46 ` Michael Kelley 0 siblings, 0 replies; 6+ messages in thread From: Michael Kelley @ 2025-08-15 20:46 UTC (permalink / raw) To: Nuno Das Neves, Wei Liu Cc: linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, kys@microsoft.com, haiyangz@microsoft.com, decui@microsoft.com From: Nuno Das Neves <nunodasneves@linux.microsoft.com> Sent: Friday, August 15, 2025 10:11 AM > > On 8/14/2025 2:16 PM, Wei Liu wrote: > > On Thu, Aug 14, 2025 at 06:57:22PM +0000, Michael Kelley wrote: > >> From: Nuno Das Neves <nunodasneves@linux.microsoft.com> Sent: Wednesday, August 13, 2025 11:21 AM > >>> > >>> This field is unused, but the correct structure size is needed > >>> when computing the amount of space for the output argument to > >>> reside, so that it does not cross a page boundary. > >>> > >>> Signed-off-by: Nuno Das Neves <nunodasneves@linux.microsoft.com> > >>> --- > >>> include/hyperv/hvhdk_mini.h | 1 + > >>> 1 file changed, 1 insertion(+) > >>> > >>> diff --git a/include/hyperv/hvhdk_mini.h b/include/hyperv/hvhdk_mini.h > >>> index 42e7876455b5..858f6a3925b3 100644 > >>> --- a/include/hyperv/hvhdk_mini.h > >>> +++ b/include/hyperv/hvhdk_mini.h > >>> @@ -301,6 +301,7 @@ struct hv_input_map_device_interrupt { > >>> /* HV_OUTPUT_MAP_DEVICE_INTERRUPT */ > >>> struct hv_output_map_device_interrupt { > >>> struct hv_interrupt_entry interrupt_entry; > >>> + u64 ext_status_deprecated[5]; > >> > >> Your email identifying the problem said that without this > >> change, struct hv_output_map_device_interrupt is 0x10 > >> bytes in size, which matches what I calculate from the definition. > >> This change adds 0x28 bytes, making the struct size now 0x38 > >> bytes. But your other email said Hyper-V expects the size to be > >> 0x58 bytes. Is array size "5" correct, or is there some other > >> cause of the discrepancy? > >> > > Ah, it looks like the *input* struct size (0x50) plus the size of > 1 cpu bank is 0x58. The output struct size should indeed be 0x38. > > I got them mixed up somehow when writing the email. > > > > FWIW the array size 5 here is correct. > > OK -- thanks. Just wanted to be sure everything was right. FWIW, Reviewed-by: Michael Kelley <mhklinux@outlook.com> ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] hyperv: Add missing field to hv_output_map_device_interrupt 2025-08-13 18:20 [PATCH] hyperv: Add missing field to hv_output_map_device_interrupt Nuno Das Neves 2025-08-14 18:57 ` Michael Kelley @ 2025-08-14 21:28 ` Wei Liu 1 sibling, 0 replies; 6+ messages in thread From: Wei Liu @ 2025-08-14 21:28 UTC (permalink / raw) To: Nuno Das Neves Cc: linux-hyperv, linux-kernel, kys, haiyangz, wei.liu, mhklinux, decui On Wed, Aug 13, 2025 at 11:20:57AM -0700, Nuno Das Neves wrote: > This field is unused, but the correct structure size is needed > when computing the amount of space for the output argument to > reside, so that it does not cross a page boundary. > > Signed-off-by: Nuno Das Neves <nunodasneves@linux.microsoft.com> There doesn't seem to be a need to rush this through hyperv-fixes. Queued into hyperv-next before Michael's patches. > --- > include/hyperv/hvhdk_mini.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/include/hyperv/hvhdk_mini.h b/include/hyperv/hvhdk_mini.h > index 42e7876455b5..858f6a3925b3 100644 > --- a/include/hyperv/hvhdk_mini.h > +++ b/include/hyperv/hvhdk_mini.h > @@ -301,6 +301,7 @@ struct hv_input_map_device_interrupt { > /* HV_OUTPUT_MAP_DEVICE_INTERRUPT */ > struct hv_output_map_device_interrupt { > struct hv_interrupt_entry interrupt_entry; > + u64 ext_status_deprecated[5]; > } __packed; > > /* HV_INPUT_UNMAP_DEVICE_INTERRUPT */ > -- > 2.34.1 > ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-08-15 20:46 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-08-13 18:20 [PATCH] hyperv: Add missing field to hv_output_map_device_interrupt Nuno Das Neves 2025-08-14 18:57 ` Michael Kelley 2025-08-14 21:16 ` Wei Liu 2025-08-15 17:11 ` Nuno Das Neves 2025-08-15 20:46 ` Michael Kelley 2025-08-14 21:28 ` Wei Liu
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox