From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 978C98E293 for ; Thu, 10 Nov 2022 18:03:26 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 749852AC32 for ; Thu, 10 Nov 2022 18:02:56 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Thu, 10 Nov 2022 18:02:55 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id D9D6E439C8 for ; Thu, 10 Nov 2022 18:02:54 +0100 (CET) Message-ID: <145676d3-eed1-e4aa-a2fd-fca339bd0e40@proxmox.com> Date: Thu, 10 Nov 2022 18:02:53 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:107.0) Gecko/20100101 Thunderbird/107.0 Content-Language: en-GB To: Proxmox VE development discussion , Dominik Csapak References: <20221110143600.258897-1-d.csapak@proxmox.com> From: Thomas Lamprecht In-Reply-To: <20221110143600.258897-1-d.csapak@proxmox.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.033 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] applied-series: [PATCH qemu-server/pve-manager] use qemu-xhci for new guests X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Nov 2022 17:03:26 -0000 Am 10/11/2022 um 15:35 schrieb Dominik Csapak: > qemu-xhci is to be preferred to nec-usb-xhci, but for compatibility > reasons, only use it for machine types >= 7.1 and ostypes l26 and > windows > 7 (older os' don't support it) > (depending on that machine version should be ok as long as we don't > roll out qemu 7.1 before applying this series) > > With that controller we can specify how many ports we want (we chose 15, > the maximum) and for those guests we now set the usb devices on fixed > ports (usb0 gets port 1 and so on) so that we can enable hotplugging > too. Lastly, since we set the maximum of 15 ports, we can safely > use up to 14 of them (without qemu plugging a usb-hub in between) > > For hotplugging we check the actual running qemu machine version, but > the gui only uses a heuristic based on the config (still good enough > since it allows more than the back end) > > For guests with older machine types or other ostypes, the current > behaviour remains > > Note: patch 1,2 of qemu-server are only cleanups/refactor that could be > applied independently (no behaviour change intended) > patch 1 of pve-manager could be squashed into 2, but if we decide > not to use that heuristic in the gui, can be applied separately > > qemu-server: > > Dominik Csapak (7): > print_tabletdevice_full: make use of $q35 variable > move 'windows_version' to Helpers > USB: print_usbdevice_full: error out on invalid configuration > USB: use machine_type_is_q35 instead of regex > fix #4324: USB: use qemu-xhci for machine versions >= 7.1 > USB: increase max usb devices to 14 for newer machine version and > ostype > fix #3271: USB: allow usb hotplugging for modern guests > > PVE/API2/Qemu.pm | 2 +- > PVE/QemuServer.pm | 134 ++++++++++++++++------------ > PVE/QemuServer/Cloudinit.pm | 3 +- > PVE/QemuServer/Helpers.pm | 19 ++++ > PVE/QemuServer/USB.pm | 94 ++++++++++++++----- > test/cfg2cmd/qemu-xhci-7.1.conf | 12 +++ > test/cfg2cmd/qemu-xhci-7.1.conf.cmd | 34 +++++++ > 7 files changed, 220 insertions(+), 78 deletions(-) > create mode 100644 test/cfg2cmd/qemu-xhci-7.1.conf > create mode 100644 test/cfg2cmd/qemu-xhci-7.1.conf.cmd > > pve-manager: > > Dominik Csapak (2): > ui: USBInputPanel: use correct maximum usb index > ui: qemu: increase available usb ports depending on machine and ostype > > www/manager6/Utils.js | 53 ++++++++++++++++++++++++++++++- > www/manager6/qemu/HardwareView.js | 7 +++- > www/manager6/qemu/USBEdit.js | 7 +++- > 3 files changed, 64 insertions(+), 3 deletions(-) > applied, with a bit of code cleanup as talked off-list, thanks!