aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2024-08-24 08:09:26 +1000
committerRichard Henderson <richard.henderson@linaro.org>2024-08-24 08:09:27 +1000
commitf259e4cb8a8b4ef5463326fc214a7d8d7703d5de (patch)
treebb02ce9d553a435a9dd50fd378ca3a7e034fc8a4
parent407f9a4b121eb65166375c410e14d7b704bc1106 (diff)
parentd6192f3f7593536a4285e8ab6c6cf3f34973ce62 (diff)
Merge tag 'pull-trivial-patches' of https://gitlab.com/mjt0k/qemu into staging
trivial patches for 2024-08-23 # -----BEGIN PGP SIGNATURE----- # # iQEzBAABCAAdFiEEe3O61ovnosKJMUsicBtPaxppPlkFAmbImVIACgkQcBtPaxpp # PllP3wf/TaYAQs0HkQRQ62/2wqnfABpZYft/g6EhHveZ/04pJ/eNIIiVqqUg4DGs # i8fENABRlRPoeK5HtGVhHYbOg6tzje7MR0qdSmWaKb2R5pPqkLHZ6NTtQlINLpOb # O8Nh1c5/qDW/pDPCWVLkEMTqKhtGfINr0pHSlTfOr0W9FrU1I6srvr6AZtrTORlL # 5b79j5IZGQSj5zR3ViuKyEPdA5NRSeTOewg8WCKGSxZGk4OlVPevrEAGOyQReOuN # HTfNi8KQH/pPzl6+f+THkgKmYYfUAlPvzkJDndV9vcPFLPI8ZncZ1o1Kmog6UERc # s5J2vTcir/ReEukApRRsZkKHLAoYdQ== # =Srl8 # -----END PGP SIGNATURE----- # gpg: Signature made Sat 24 Aug 2024 12:14:42 AM AEST # gpg: using RSA key 7B73BAD68BE7A2C289314B22701B4F6B1A693E59 # gpg: Good signature from "Michael Tokarev <mjt@tls.msk.ru>" [full] # gpg: aka "Michael Tokarev <mjt@debian.org>" [full] # gpg: aka "Michael Tokarev <mjt@corpit.ru>" [full] * tag 'pull-trivial-patches' of https://gitlab.com/mjt0k/qemu: hw/display/vhost-user-gpu.c: fix vhost_user_gpu_chr_read() system/vl.c: Print machine name, not "(null)", for unknown machine types hw/x86: add a couple of comments explaining how the kernel image is parsed Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
-rw-r--r--hw/display/vhost-user-gpu.c2
-rw-r--r--hw/i386/x86-common.c7
-rw-r--r--system/vl.c4
3 files changed, 8 insertions, 5 deletions
diff --git a/hw/display/vhost-user-gpu.c b/hw/display/vhost-user-gpu.c
index 63c64ddde6..c0c66910f1 100644
--- a/hw/display/vhost-user-gpu.c
+++ b/hw/display/vhost-user-gpu.c
@@ -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 ||
diff --git a/hw/i386/x86-common.c b/hw/i386/x86-common.c
index c0c66a0eb5..992ea1f25e 100644
--- a/hw/i386/x86-common.c
+++ b/hw/i386/x86-common.c
@@ -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 {
/*
diff --git a/system/vl.c b/system/vl.c
index 41d53d2456..01b8b8e77a 100644
--- a/system/vl.c
+++ b/system/vl.c
@@ -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) {