From: Fiona Ebner <f.ebner@proxmox.com>
To: Dominik Csapak <d.csapak@proxmox.com>, pve-devel@lists.proxmox.com
Subject: Re: [PATCH qemu-server v3 6/8] hotplug: fix vm_deviceplug call for 'tablet' and 'keyboard' on aarch64
Date: Tue, 20 Oct 2026 17:12:06 +0200 [thread overview]
Message-ID: <1fa4b989-6074-4f1e-819e-e0e17b7064d2@proxmox.com> (raw)
In-Reply-To: <20261007142145.984970-7-d.csapak@proxmox.com>
Am 07.10.26 um 4:22 PM schrieb Dominik Csapak:
> vm_deviceplug has a 'device' parameter between 'deviceid' and 'arch',
> but this was overlooked at these two callsites. This means that the
> calls would give the 'machine_type' as 'arch'. On x86 this is harmless,
> but on aarch64 systems these failed.
>
> Fix this by simply adding 'undef' as device, since it's not used in
> those cases anyway.
>
> Modify the relevant test that highlighted this problem.
>
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> src/PVE/QemuServer.pm | 18 ++++++++++++------
> src/test/hotplug/aarch64/tablet-enable.conf | 2 --
> .../aarch64/tablet-enable.conf.expected | 3 ++-
> 3 files changed, 14 insertions(+), 9 deletions(-)
>
> diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm
> index 055f5d78..203c42aa 100644
> --- a/src/PVE/QemuServer.pm
> +++ b/src/PVE/QemuServer.pm
> @@ -4695,9 +4695,12 @@ sub vmconfig_hotplug_pending {
> } elsif ($opt eq 'tablet') {
> die "skip\n" if !$hotplug_features->{usb};
> if ($defaults->{tablet}) {
> - vm_deviceplug($storecfg, $conf, $vmid, 'tablet', $arch, $machine_type->());
> - vm_deviceplug($storecfg, $conf, $vmid, 'keyboard', $arch, $machine_type->())
> - if $arch eq 'aarch64';
> + vm_deviceplug(
> + $storecfg, $conf, $vmid, 'tablet', undef, $arch, $machine_type->(),
> + );
> + vm_deviceplug(
> + $storecfg, $conf, $vmid, 'keyboard', undef, $arch, $machine_type->(),
> + ) if $arch eq 'aarch64';
Style nit: multiline post-if
> } else {
> vm_deviceunplug($vmid, $conf, 'tablet');
> vm_deviceunplug($vmid, $conf, 'keyboard') if $arch eq 'aarch64';
> @@ -4766,9 +4769,12 @@ sub vmconfig_hotplug_pending {
> } elsif ($opt eq 'tablet') {
> die "skip\n" if !$hotplug_features->{usb};
> if ($value == 1) {
> - vm_deviceplug($storecfg, $conf, $vmid, 'tablet', $arch, $machine_type->());
> - vm_deviceplug($storecfg, $conf, $vmid, 'keyboard', $arch, $machine_type->())
> - if $arch eq 'aarch64';
> + vm_deviceplug(
> + $storecfg, $conf, $vmid, 'tablet', undef, $arch, $machine_type->(),
> + );
> + vm_deviceplug(
> + $storecfg, $conf, $vmid, 'keyboard', undef, $arch, $machine_type->(),
> + ) if $arch eq 'aarch64';
Same here
> } elsif ($value == 0) {
> vm_deviceunplug($vmid, $conf, 'tablet');
> vm_deviceunplug($vmid, $conf, 'keyboard') if $arch eq 'aarch64';
> diff --git a/src/test/hotplug/aarch64/tablet-enable.conf b/src/test/hotplug/aarch64/tablet-enable.conf
> index 443cae77..bb523819 100644
> --- a/src/test/hotplug/aarch64/tablet-enable.conf
> +++ b/src/test/hotplug/aarch64/tablet-enable.conf
> @@ -1,7 +1,5 @@
> # TEST: enabling the tablet device on aarch64 hotplugs tablet and keyboard
> # HOST_ARCH: aarch64
> -# EXPECTED_ERROR: tablet: hotplug problem - Too few arguments for subroutine 'PVE::QemuServer::QMPHelpers::qemu_deviceadd' (got 1; expected 2)
> -# STAYS_PENDING: 1
> arch: aarch64
> bios: ovmf
> bootdisk: scsi0
> diff --git a/src/test/hotplug/aarch64/tablet-enable.conf.expected b/src/test/hotplug/aarch64/tablet-enable.conf.expected
> index 800f9296..7200f76b 100644
> --- a/src/test/hotplug/aarch64/tablet-enable.conf.expected
> +++ b/src/test/hotplug/aarch64/tablet-enable.conf.expected
> @@ -1 +1,2 @@
> -hmp device_add driver=usb-tablet,id=tablet,bus=uhci.0,port=1
> +hmp device_add driver=usb-tablet,id=tablet,bus=ehci.0,port=1
> +hmp device_add driver=usb-kbd,id=keyboard,bus=ehci.0,port=2
next prev parent reply other threads:[~2026-10-20 15:12 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-07 14:17 [PATCH qemu-server v3 0/8] add hotplug tests and fix uncovered bugs Dominik Csapak
2026-10-07 14:17 ` [PATCH qemu-server v3 1/8] tests: hotplug: add initial hotplug test harness Dominik Csapak
2026-10-20 15:02 ` Fiona Ebner
2026-10-07 14:17 ` [PATCH qemu-server v3 2/8] tests: hotplug: add some test cases Dominik Csapak
2026-10-07 14:17 ` [PATCH qemu-server v3 3/8] tests: hotplug: add test case for adding scsi14 on qemu 11.1 Dominik Csapak
2026-10-07 14:17 ` [PATCH qemu-server v3 4/8] tests: hotplug: add cases for known defects Dominik Csapak
2026-10-07 14:17 ` [PATCH qemu-server v3 5/8] hotplug: fix hot unplugging tablet on aarch64 Dominik Csapak
2026-10-07 14:17 ` [PATCH qemu-server v3 6/8] hotplug: fix vm_deviceplug call for 'tablet' and 'keyboard' " Dominik Csapak
2026-10-20 15:12 ` Fiona Ebner [this message]
2026-10-07 14:17 ` [PATCH qemu-server v3 7/8] hotplug: remove iothread if adding drive device failed Dominik Csapak
2026-10-07 14:18 ` [PATCH qemu-server v3 8/8] hotplug: name the missing bridge in the error message Dominik Csapak
2026-10-20 15:23 ` applied: " Fiona Ebner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1fa4b989-6074-4f1e-819e-e0e17b7064d2@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=d.csapak@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox