qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PULL for-9.1 0/3] Trivial patches for 2024-08-23
@ 2024-08-23 14:15 Michael Tokarev
  2024-08-23 14:15 ` [PULL 1/3] hw/x86: add a couple of comments explaining how the kernel image is parsed Michael Tokarev
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Michael Tokarev @ 2024-08-23 14:15 UTC (permalink / raw)
  To: qemu-devel; +Cc: Michael Tokarev, qemu-trivial

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(-)


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PULL 1/3] hw/x86: add a couple of comments explaining how the kernel image is parsed
  2024-08-23 14:15 [PULL for-9.1 0/3] Trivial patches for 2024-08-23 Michael Tokarev
@ 2024-08-23 14:15 ` Michael Tokarev
  2024-08-23 14:15 ` [PULL 2/3] system/vl.c: Print machine name, not "(null)", for unknown machine types Michael Tokarev
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Michael Tokarev @ 2024-08-23 14:15 UTC (permalink / raw)
  To: qemu-devel; +Cc: Ani Sinha, qemu-trivial, Michael Tokarev

From: Ani Sinha <anisinha@redhat.com>

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

CC: qemu-trivial@nongnu.org
Signed-off-by: Ani Sinha <anisinha@redhat.com>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 hw/i386/x86-common.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

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 {
         /*
-- 
2.39.2



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PULL 2/3] system/vl.c: Print machine name, not "(null)", for unknown machine types
  2024-08-23 14:15 [PULL for-9.1 0/3] Trivial patches for 2024-08-23 Michael Tokarev
  2024-08-23 14:15 ` [PULL 1/3] hw/x86: add a couple of comments explaining how the kernel image is parsed Michael Tokarev
@ 2024-08-23 14:15 ` Michael Tokarev
  2024-08-23 14:15 ` [PULL 3/3] hw/display/vhost-user-gpu.c: fix vhost_user_gpu_chr_read() Michael Tokarev
  2024-08-25  0:56 ` [PULL for-9.1 0/3] Trivial patches for 2024-08-23 Richard Henderson
  3 siblings, 0 replies; 5+ messages in thread
From: Michael Tokarev @ 2024-08-23 14:15 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, qemu-trivial, qemu-stable, Michael Tokarev

From: Peter Maydell <peter.maydell@linaro.org>

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.

Cc: qemu-stable@nongnu.org
Fixes: 412d294ffdc ("vl.c: select_machine(): add selected machine type to error message")
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 system/vl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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) {
-- 
2.39.2



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PULL 3/3] hw/display/vhost-user-gpu.c: fix vhost_user_gpu_chr_read()
  2024-08-23 14:15 [PULL for-9.1 0/3] Trivial patches for 2024-08-23 Michael Tokarev
  2024-08-23 14:15 ` [PULL 1/3] hw/x86: add a couple of comments explaining how the kernel image is parsed Michael Tokarev
  2024-08-23 14:15 ` [PULL 2/3] system/vl.c: Print machine name, not "(null)", for unknown machine types Michael Tokarev
@ 2024-08-23 14:15 ` Michael Tokarev
  2024-08-25  0:56 ` [PULL for-9.1 0/3] Trivial patches for 2024-08-23 Richard Henderson
  3 siblings, 0 replies; 5+ messages in thread
From: Michael Tokarev @ 2024-08-23 14:15 UTC (permalink / raw)
  To: qemu-devel; +Cc: Haoran Zhang, qemu-trivial, Michael Tokarev

From: Haoran Zhang <wh1sper@zju.edu.cn>

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

Fixes: 267f664658 ("hw/display: add vhost-user-vga & gpu-pci")
Signed-off-by: Haoran Zhang <wh1sper@zju.edu.cn>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 hw/display/vhost-user-gpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 ||
-- 
2.39.2



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PULL for-9.1 0/3] Trivial patches for 2024-08-23
  2024-08-23 14:15 [PULL for-9.1 0/3] Trivial patches for 2024-08-23 Michael Tokarev
                   ` (2 preceding siblings ...)
  2024-08-23 14:15 ` [PULL 3/3] hw/display/vhost-user-gpu.c: fix vhost_user_gpu_chr_read() Michael Tokarev
@ 2024-08-25  0:56 ` Richard Henderson
  3 siblings, 0 replies; 5+ messages in thread
From: Richard Henderson @ 2024-08-25  0:56 UTC (permalink / raw)
  To: Michael Tokarev, qemu-devel; +Cc: qemu-trivial

On 8/24/24 00:15, Michael Tokarev wrote:
> 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


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

r~


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-08-25  0:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-23 14:15 [PULL for-9.1 0/3] Trivial patches for 2024-08-23 Michael Tokarev
2024-08-23 14:15 ` [PULL 1/3] hw/x86: add a couple of comments explaining how the kernel image is parsed Michael Tokarev
2024-08-23 14:15 ` [PULL 2/3] system/vl.c: Print machine name, not "(null)", for unknown machine types Michael Tokarev
2024-08-23 14:15 ` [PULL 3/3] hw/display/vhost-user-gpu.c: fix vhost_user_gpu_chr_read() Michael Tokarev
2024-08-25  0:56 ` [PULL for-9.1 0/3] Trivial patches for 2024-08-23 Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).