Skip to contentSkip to conversation

Trivial patches for 2024-08-23

GIT PULL Applied Michael Tokarev 2 participants 5 messages Aug 23, 2024 – Aug 25, 2024

lore
Share & tools
lore
#0 lore raw

The following changes since commit 407f9a4b121eb65166375c410e14d7b704bc1106:

Update version for v9.1.0-rc3 release (2024-08-22 15:07:32 +1000)

are available in the Git repository at:

https://gitlab.com/mjt0k/qemu.git tags/pull-trivial-patches

for you to fetch changes up to d6192f3f7593536a4285e8ab6c6cf3f34973ce62:

hw/display/vhost-user-gpu.c: fix vhost_user_gpu_chr_read() (2024-08-23 12:10:28 +0300)

----------------------------------------------------------------
trivial patches for 2024-08-23

There are just 3 patches in here, one adding a comment (no code changes) and two fixing bugs (one is a regression bug). I think it's suitable for 9.1

----------------------------------------------------------------
Ani Sinha (1):
hw/x86: add a couple of comments explaining how the kernel image is parsed

Haoran Zhang (1):
hw/display/vhost-user-gpu.c: fix vhost_user_gpu_chr_read()

Peter Maydell (1):
system/vl.c: Print machine name, not "(null)", for unknown machine types

 hw/display/vhost-user-gpu.c | 2 +-
 hw/i386/x86-common.c        | 7 +++++--
 system/vl.c                 | 4 ++--
 3 files changed, 8 insertions(+), 5 deletions(-)
#1 lore raw

[PULL 1/3] hw/x86: add a couple of comments explaining how the kernel image is parsed

From: Ani Sinha <[email protected]>

Cosmetic: add comments in x86_load_linux() pointing to the kernel documentation so that users can better understand the code.

---
 hw/i386/x86-common.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
hw/i386/x86-common.c +5 -2
index c0c66a0eb5..992ea1f25e 100644
@@ -665,8 +665,11 @@ void x86_load_linux(X86MachineState *x86ms,
         exit(1);
     }
 
-    /* kernel protocol version */
-    if (ldl_p(header + 0x202) == 0x53726448) {
+    /*
+     * kernel protocol version.
+     * Please see https://www.kernel.org/doc/Documentation/x86/boot.txt
+     */
+    if (ldl_p(header + 0x202) == 0x53726448) /* Magic signature "HdrS" */ {
         protocol = lduw_p(header + 0x206);
     } else {
         /*
Signature · 1 line
2.39.2
#2 lore raw

[PULL 3/3] hw/display/vhost-user-gpu.c: fix vhost_user_gpu_chr_read()

In reply to Michael Tokarev

From: Haoran Zhang <[email protected]>

fix vhost_user_gpu_chr_read() where size was incorrectly passed to msg->flags.

---
 hw/display/vhost-user-gpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/display/vhost-user-gpu.c +1 -1
index 63c64ddde6..c0c66910f1 100644
@@ -390,7 +390,7 @@ vhost_user_gpu_chr_read(void *opaque)
     }
 
     msg->request = request;
-    msg->flags = size;
+    msg->flags = flags;
     msg->size = size;
 
     if (request == VHOST_USER_GPU_CURSOR_UPDATE ||
Signature · 1 line
2.39.2
#3 lore raw

[PULL 2/3] system/vl.c: Print machine name, not "(null)", for unknown machine types

In reply to Michael Tokarev

From: Peter Maydell <[email protected]>

In commit 412d294ffdc we tried to improve the error message printed when the machine type is unknown, but we used the wrong variable, resulting in:

$ ./build/x86/qemu-system-aarch64 -M bang
qemu-system-aarch64: unsupported machine type: "(null)"
Use -machine help to list supported machines

Use the right variable, so we produce more helpful output:

$ ./build/x86/qemu-system-aarch64 -M bang
qemu-system-aarch64: unsupported machine type: "bang"
Use -machine help to list supported machines

Note that we must move the qdict_del() to below the error_setg(), because machine_type points into the value of that qdict entry, and deleting it will make the pointer invalid.

Fixes 412d294ffdc ("vl.c: select_machine(): add selected machine type to error message")
---
 system/vl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
system/vl.c +2 -2
index 41d53d2456..01b8b8e77a 100644
@@ -1679,10 +1679,10 @@ static MachineClass *select_machine(QDict *qdict, Error **errp)
 
     if (machine_type) {
         machine_class = find_machine(machine_type, machines);
-        qdict_del(qdict, "type");
         if (!machine_class) {
-            error_setg(errp, "unsupported machine type: \"%s\"", optarg);
+            error_setg(errp, "unsupported machine type: \"%s\"", machine_type);
         }
+        qdict_del(qdict, "type");
     } else {
         machine_class = find_default_machine(machines);
         if (!machine_class) {
Signature · 1 line
2.39.2
#4 lore raw
In reply to Michael Tokarev
Quoted 10 lines · Michael Tokarev

The following changes since commit 407f9a4b121eb65166375c410e14d7b704bc1106:

   Update version for v9.1.0-rc3 release (2024-08-22 15:07:32 +1000)

are available in the Git repository at:

https://gitlab.com/mjt0k/qemu.git tags/pull-trivial-patches

for you to fetch changes up to d6192f3f7593536a4285e8ab6c6cf3f34973ce62:

Quoted 8 lines
   hw/display/vhost-user-gpu.c: fix vhost_user_gpu_chr_read() (2024-08-23 12:10:28 +0300)

----------------------------------------------------------------
trivial patches for 2024-08-23

There are just 3 patches in here, one adding a comment (no code changes) and two fixing bugs (one is a regression bug). I think it's suitable for 9.1

Applied, thanks. Please update https://wiki.qemu.org/ChangeLog/9.1 as appropriate.

r~