Skip to content

Commit 1605d58

Browse files
committed
bump qemu-server to 8.3.0+port2
jiangcuo#135
1 parent 09cb364 commit 1605d58

3 files changed

Lines changed: 78 additions & 0 deletions

File tree

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
From 5dd2dcf088141ac471037dfcf0607b5968742b8d Mon Sep 17 00:00:00 2001
2+
From: jiangcuo <jiangcuo@bingsin.com>
3+
Date: Mon, 9 Dec 2024 16:33:51 +0800
4+
Subject: [PATCH] fix usb hotplug issue
5+
6+
https://github.com/jiangcuo/Proxmox-Port/issues/135
7+
---
8+
PVE/QemuServer/USB.pm | 22 +++++++++++++++++-----
9+
debian/changelog | 6 ++++++
10+
2 files changed, 23 insertions(+), 5 deletions(-)
11+
12+
diff --git a/PVE/QemuServer/USB.pm b/PVE/QemuServer/USB.pm
13+
index 4e900d79..b2daab25 100644
14+
--- a/PVE/QemuServer/USB.pm
15+
+++ b/PVE/QemuServer/USB.pm
16+
@@ -131,6 +131,12 @@ sub get_usb_controllers {
17+
18+
my $use_qemu_xhci = min_version($machine_version, 7, 1)
19+
&& defined($ostype) && ($ostype eq 'l26' || windows_version($ostype) > 7);
20+
+
21+
+ # We use qemu_xhci only for !x86_64 device
22+
+ if ($arch ne 'x86_64'){
23+
+ $use_qemu_xhci = 1;
24+
+ }
25+
+
26+
my $is_q35 = PVE::QemuServer::Machine::machine_type_is_q35($conf);
27+
28+
if ($arch ne 'x86_64') {
29+
@@ -162,11 +168,17 @@ sub get_usb_controllers {
30+
}
31+
32+
$pciaddr = print_pci_addr("xhci", $bridges, $arch, $machine);
33+
- if ($use_qemu_xhci && $any_usb) {
34+
- push @$devices, '-device', print_qemu_xhci_controller($pciaddr);
35+
- } elsif ($use_usb3) {
36+
- push @$devices, '-device', "nec-usb-xhci,id=xhci$pciaddr";
37+
- }
38+
+
39+
+ if ($arch ne 'x86_64') {
40+
+ # Create the usb controller on first boot so that we don't need to hot-plug the device later.
41+
+ push @$devices, '-device', print_qemu_xhci_controller($pciaddr);
42+
+ }else{
43+
+ if ($use_qemu_xhci && $any_usb) {
44+
+ push @$devices, '-device', print_qemu_xhci_controller($pciaddr);
45+
+ } elsif ($use_usb3) {
46+
+ push @$devices, '-device', "nec-usb-xhci,id=xhci$pciaddr";
47+
+ }
48+
+ }
49+
50+
return @$devices;
51+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
From 5dd2dcf088141ac471037dfcf0607b5968742b8d Mon Sep 17 00:00:00 2001
2+
From: jiangcuo <jiangcuo@bingsin.com>
3+
Date: Mon, 9 Dec 2024 16:33:51 +0800
4+
Subject: [PATCH] fix usb hotplug issue
5+
6+
https://github.com/jiangcuo/Proxmox-Port/issues/135
7+
---
8+
PVE/QemuServer/USB.pm | 22 +++++++++++++++++-----
9+
debian/changelog | 6 ++++++
10+
2 files changed, 23 insertions(+), 5 deletions(-)
11+
12+
diff --git a/debian/changelog b/debian/changelog
13+
index 39ee0d12..4e9a4824 100644
14+
--- a/debian/changelog
15+
+++ b/debian/changelog
16+
@@ -1,3 +1,9 @@
17+
+qemu-server (8.3.0+port2) bookworm; urgency=medium
18+
+
19+
+ * Fix usb hotplug error
20+
+
21+
+ -- Jiangcuo <jiangcuo@bingsin.com> Mon, 09 Dec 2024 16:30:48 +0800
22+
+
23+
qemu-server (8.3.0+port1) bookworm; urgency=medium
24+
25+
* Fix cpu type on loongarch64

‎packages/qemu-server/series‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
patches/001-port.patch
22
patches/changelog/001-update-to8.3.0+port1.patch
3+
patches/002-fix-usb-hotplug.patch
4+
patches/changelog/002-update-to8.3.0+port2.patch

0 commit comments

Comments
 (0)