Commit c1914d626f for qemu.org

commit c1914d626f1a4a7a9815706c6885f057eb636d42
Author: Magnus Kulke <magnuskulke@linux.microsoft.com>
Date:   Wed Jul 1 15:42:14 2026 +0200

    target/i386/mshv: zero-init msr hvcall args

    In the current code we leave the argument arrays for the get/set hvcall
    unitialized, setting only individual fields. some fields will be
    populated during the hvcall, but in any case the arg arrays will contain
    unitialized data (e.g. in reserved fields), to which static analysis
    objects to.

    Fixes: c38eb12c85
    Signed-off-by: Magnus Kulke <magnuskulke@linux.microsoft.com>
    Reviewed-by: Doru Blânzeanu <dblanzeanu@linux.microsoft.com>
    Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>

diff --git a/target/i386/mshv/msr.c b/target/i386/mshv/msr.c
index d3788d7715..96bd552916 100644
--- a/target/i386/mshv/msr.c
+++ b/target/i386/mshv/msr.c
@@ -328,7 +328,7 @@ int mshv_get_msrs(CPUState *cpu)
 {
     int ret = 0;
     size_t n_assocs = MSHV_MSR_TOTAL_COUNT;
-    struct hv_register_assoc assocs[MSHV_MSR_TOTAL_COUNT];
+    struct hv_register_assoc assocs[MSHV_MSR_TOTAL_COUNT] = { 0 };
     size_t i, j;
     uint32_t name;
     X86CPU *x86cpu = X86_CPU(cpu);
@@ -409,7 +409,7 @@ static void load_from_env(const CPUState *cpu, struct hv_register_assoc *assocs,
 int mshv_set_msrs(const CPUState *cpu)
 {
     size_t n_assocs = MSHV_MSR_TOTAL_COUNT;
-    struct hv_register_assoc assocs[MSHV_MSR_TOTAL_COUNT];
+    struct hv_register_assoc assocs[MSHV_MSR_TOTAL_COUNT] = { 0 };
     int ret;
     size_t i, j;
     X86CPU *x86cpu = X86_CPU(cpu);