diff options
author | Shameer Kolothum <shameerali.kolothum.thodi@huawei.com> | 2024-12-03 13:18:06 +0000 |
---|---|---|
committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-12-31 21:21:34 +0100 |
commit | 5a7b6029c1e26c3bb171050938757e048398c576 (patch) | |
tree | 08b29c51df77397c9c96d9069c1acb36d0be11ee /rust/qemu-api | |
parent | 0798e09f3badf25a5b490ab0146b0d41ae78a798 (diff) | |
download | qemu-5a7b6029c1e26c3bb171050938757e048398c576.zip qemu-5a7b6029c1e26c3bb171050938757e048398c576.tar.gz qemu-5a7b6029c1e26c3bb171050938757e048398c576.tar.bz2 |
fw_cfg: Don't set callback_opaque NULL in fw_cfg_modify_bytes_read()
On arm/virt platform, Chen Xiang reported a Guest crash while
attempting the below steps,
1. Launch the Guest with nvdimm=on
2. Hot-add a NVDIMM dev
3. Reboot
4. Guest boots fine.
5. Reboot again.
6. Guest boot fails.
QEMU_EFI reports the below error:
ProcessCmdAddPointer: invalid pointer value in "etc/acpi/tables"
OnRootBridgesConnected: InstallAcpiTables: Protocol Error
Debugging shows that on first reboot(after hot adding NVDIMM),
Qemu updates the etc/table-loader len,
qemu_ram_resize()
fw_cfg_modify_file()
fw_cfg_modify_bytes_read()
And in fw_cfg_modify_bytes_read() we set the "callback_opaque" for
the key entry to NULL. Because of this, on the second reboot,
virt_acpi_build_update() is called with a NULL "build_state" and
returns without updating the ACPI tables. This seems to be
upsetting the firmware.
To fix this, don't change the callback_opaque in fw_cfg_modify_bytes_read().
Fixes: bdbb5b1706d165 ("fw_cfg: add fw_cfg_machine_reset function")
Reported-by: chenxiang <chenxiang66@hisilicon.com>
Acked-by: Igor Mammedov <imammedo@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
Message-ID: <20241203131806.37548-1-shameerali.kolothum.thodi@huawei.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Diffstat (limited to 'rust/qemu-api')
0 files changed, 0 insertions, 0 deletions