On 8/5/24 23:54, Philippe Mathieu-Daudé wrote:
On 8/5/24 19:28, Jiaxun Yang wrote:
在2024年5月8日五月 下午5:48,Philippe Mathieu-Daudé写道:
On 8/5/24 17:35, Philippe Mathieu-Daudé wrote:
On 8/5/24 11:31, Jiaxun Yang wrote:
Suspend function is emulated as what hardware actually do.
Doorbell register fields are updates to include suspend value,
suspend vector is encoded in firmware blob and fw_cfg is updated
to include S3 bits as what x86 did.

Signed-off-by: Jiaxun Yang <jiaxun.y...@flygoat.com>
---
   hw/mips/loongson3_bootp.c |  1 +
   hw/mips/loongson3_virt.c  | 19 +++++++++++++++++++
   2 files changed, 20 insertions(+)

Thanks, patch queued.

Fixed:

ERROR: use g_memdup2() instead of unsafe g_memdup()
#76: FILE: hw/mips/loongson3_virt.c:293:
+    fw_cfg_add_file(fw_cfg, "etc/system-states", g_memdup(suspend, 6), 6);

Thanks, I omitted this one as it is copied from hw/acpi/core.c

Should we fix that one as well?

Sadly for me I did the cleanup 3 years ago:
https://lore.kernel.org/qemu-devel/20210903110702.588291-10-phi...@redhat.com/
but neglected to address the comment from Eric:
https://lore.kernel.org/qemu-devel/20210903211057.kvn6r5pvx7iuw...@redhat.com/
so the patch never got merged. I might revisit...

That said it is recommended to run checkpatch.pl before posting a patch:
https://www.qemu.org/docs/master/devel/submitting-a-patch.html#use-the-qemu-coding-style
This can be automatized, see "Automate a checkpatch run on commit" in
this chapter :)


Reply via email to