@samitouri / QOSamiQemu / commits / f328514305

igvm: replace raw uint32_t with igvm library types

Use IgvmVariableHeaderType and IgvmHeaderSection in QIGVMHandler and qigvm_handler() instead of plain uint32_t, so that each field's purpose is clear from its type. Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Reviewed-by: Ani Sinha <anisinha@redhat.com> Signed-off-by: Luigi Leonardi <leonardi@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Message-ID: <20260609-igvm_optional-v2-1-b1f1f08dc40e@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>

Luigi Leonardi committed Jun 9, 2026 at 14:29 UTC f3285143059400f85d70c34b62460dac6c86c8de
1 file changed +3 -3
backends/igvm.c
+3 -3
@@ -102,8 +102,8 @@ static int qigvm_initialization_guest_policy(QIgvm *ctx,
102 Error **errp);
103
104 struct QIGVMHandler {
105 - uint32_t type;
106 - uint32_t section;
105 + IgvmVariableHeaderType type;
106 + IgvmHeaderSection section;
107 int (*handler)(QIgvm *ctx, const uint8_t *header_data, Error **errp);
108 };
109
@@ -132,7 +132,7 @@ static struct QIGVMHandler handlers[] = {
132 qigvm_directive_madt },
133 };
134
135 -static int qigvm_handler(QIgvm *ctx, uint32_t type, Error **errp)
135 +static int qigvm_handler(QIgvm *ctx, IgvmVariableHeaderType type, Error **errp)
136 {
137 size_t handler;
138 IgvmHandle header_handle;