[PATCH] hw/uefi: fix properties list definition

xpahos@gmail.com posted 1 patch 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20251012-pvvars-fix-props-v1-1-6ca31af626e0@gmail.com
Maintainers: Gerd Hoffmann <kraxel@redhat.com>
hw/uefi/var-service-sysbus.c | 1 +
1 file changed, 1 insertion(+)
[PATCH] hw/uefi: fix properties list definition
Posted by xpahos@gmail.com 1 month ago
From: Alexander Gryanko <xpahos@gmail.com>

Added DEFINE_PROP_END_OF_LIST() to the Property structure definition.
This fixes the device_class_set_legacy_reset error when accessing
the prop->info field.

Signed-off-by: Alexander Gryanko <xpahos@gmail.com>
---
 hw/uefi/var-service-sysbus.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/uefi/var-service-sysbus.c b/hw/uefi/var-service-sysbus.c
index a5aa218e26..a19591b1c3 100644
--- a/hw/uefi/var-service-sysbus.c
+++ b/hw/uefi/var-service-sysbus.c
@@ -39,6 +39,7 @@ static const Property uefi_vars_sysbus_properties[] = {
                      state.disable_custom_mode, false),
     DEFINE_PROP_BOOL("use-pio", uefi_vars_sysbus_state,
                      state.use_pio, false),
+    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void uefi_vars_sysbus_init(Object *obj)

---
base-commit: f3f2ad119347e8c086b72282febcaac5d731b343
change-id: 20251012-pvvars-fix-props-5a8509b47420

Best regards,
-- 
Alexander Gryanko <xpahos@gmail.com>
Re: [PATCH] hw/uefi: fix properties list definition
Posted by Michael Tokarev 1 month ago
On 10/13/25 01:36, xpahos@gmail.com wrote:
> From: Alexander Gryanko <xpahos@gmail.com>
> 
> Added DEFINE_PROP_END_OF_LIST() to the Property structure definition.
> This fixes the device_class_set_legacy_reset error when accessing
> the prop->info field.

Please show the context where this is a problem, which error
are you seeing.

> --- a/hw/uefi/var-service-sysbus.c
> +++ b/hw/uefi/var-service-sysbus.c
> @@ -39,6 +39,7 @@ static const Property uefi_vars_sysbus_properties[] = {
>                        state.disable_custom_mode, false),
>       DEFINE_PROP_BOOL("use-pio", uefi_vars_sysbus_state,
>                        state.use_pio, false),
> +    DEFINE_PROP_END_OF_LIST(),

Which qemu version is it?

See commit 5fcabe628b8140691dab834a22be549d242b24bd which is in 10.0.
This symbol (DEFINE_PROP_END_OF_LIST) is not defined (and not used)
in current qemu.

So it looks like this patch isn't needed.

Thanks,

/mjt
Re: [PATCH] hw/uefi: fix properties list definition
Posted by Alexander Gryanko 4 weeks ago
Hello Michael,

> On 14 Oct 2025, at 16:26, Michael Tokarev <mjt@tls.msk.ru> wrote:
> 
> On 10/13/25 01:36, xpahos@gmail.com wrote:
>> From: Alexander Gryanko <xpahos@gmail.com>
>> Added DEFINE_PROP_END_OF_LIST() to the Property structure definition.
>> This fixes the device_class_set_legacy_reset error when accessing
>> the prop->info field.
> 
> Please show the context where this is a problem, which error
> are you seeing.
> 
>> --- a/hw/uefi/var-service-sysbus.c
>> +++ b/hw/uefi/var-service-sysbus.c
>> @@ -39,6 +39,7 @@ static const Property uefi_vars_sysbus_properties[] = {
>>                       state.disable_custom_mode, false),
>>      DEFINE_PROP_BOOL("use-pio", uefi_vars_sysbus_state,
>>                       state.use_pio, false),
>> +    DEFINE_PROP_END_OF_LIST(),
> 
> Which qemu version is it?
> 
> See commit 5fcabe628b8140691dab834a22be549d242b24bd which is in 10.0.
> This symbol (DEFINE_PROP_END_OF_LIST) is not defined (and not used)
> in current qemu.
> 
> So it looks like this patch isn't needed.

Sorry, while I was trying to figure out what was going on, I discovered that I had started fuzzing on the backported branch.

Thank you.

> 
> Thanks,
> 
> /mjt