> On 25 May 2026, at 5:26 PM, Luigi Leonardi <leonardi@redhat.com> wrote:
>
> 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.
>
> Signed-off-by: Luigi Leonardi <leonardi@redhat.com>
Reviewed-by: Ani Sinha <anisinha@redhat.com>
> ---
> backends/igvm.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/backends/igvm.c b/backends/igvm.c
> index c347d0c17e..8bb5750768 100644
> --- a/backends/igvm.c
> +++ b/backends/igvm.c
> @@ -102,8 +102,8 @@ static int qigvm_initialization_guest_policy(QIgvm *ctx,
> Error **errp);
>
> struct QIGVMHandler {
> - uint32_t type;
> - uint32_t section;
> + IgvmVariableHeaderType type;
> + IgvmHeaderSection section;
> int (*handler)(QIgvm *ctx, const uint8_t *header_data, Error **errp);
> };
>
> @@ -132,7 +132,7 @@ static struct QIGVMHandler handlers[] = {
> qigvm_directive_madt },
> };
>
> -static int qigvm_handler(QIgvm *ctx, uint32_t type, Error **errp)
> +static int qigvm_handler(QIgvm *ctx, IgvmVariableHeaderType type, Error **errp)
> {
> size_t handler;
> IgvmHandle header_handle;
>
> ---
> base-commit: cbf877d67a812be17a9ce404a589e1bdf722c1f6
> change-id: 20260525-igvm_types-4b24d233e6bb
>
> Best regards,
> --
> Luigi Leonardi <leonardi@redhat.com>
>