From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 949811FF0AA for ; Tue, 20 Oct 2026 17:12:13 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id D7FAD2161F; Tue, 20 Oct 2026 17:12:11 +0200 (CEST) Message-ID: <1fa4b989-6074-4f1e-819e-e0e17b7064d2@proxmox.com> Date: Tue, 20 Oct 2026 17:12:06 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH qemu-server v3 6/8] hotplug: fix vm_deviceplug call for 'tablet' and 'keyboard' on aarch64 To: Dominik Csapak , pve-devel@lists.proxmox.com References: <20261007142145.984970-1-d.csapak@proxmox.com> <20261007142145.984970-7-d.csapak@proxmox.com> Content-Language: en-US From: Fiona Ebner In-Reply-To: <20261007142145.984970-7-d.csapak@proxmox.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1792509126396 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.350 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: KAEFZDG6VK7WLYDMK42PJIDRM5PGGGF6 X-Message-ID-Hash: KAEFZDG6VK7WLYDMK42PJIDRM5PGGGF6 X-MailFrom: f.ebner@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 > --- > 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