merge from port

This commit is contained in:
jiangcuo 2025-01-03 13:22:23 +08:00
commit fbd222c3fd
25 changed files with 350 additions and 331 deletions

@ -1 +1 @@
Subproject commit 8fa42d60d06f447c2b0bbd2222722797a7b01ad3
Subproject commit 8b85d6ebcc150775a682886a6c34e33d10af1429

View File

@ -0,0 +1,13 @@
diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js
index bd5f2c89..dde4d24e 100644
--- a/www/manager6/Utils.js
+++ b/www/manager6/Utils.js
@@ -491,7 +491,7 @@ Ext.define('PVE.Utils', {
render_qemu_bios: function(value) {
if (!value) {
- return Proxmox.Utils.defaultText + ' (SeaBIOS)';
+ return "OVMF (UEFI)";
} else if (value === 'seabios') {
return "SeaBIOS";
} else if (value === 'ovmf') {

View File

@ -1,8 +1,21 @@
diff --git a/debian/changelog b/debian/changelog
index a5426d9f..8c985cb0 100644
index f290c69e..782af9b6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+pve-manager (8.3.2+port) bookworm; urgency=medium
+
+ * ui: ovmf as default bios
+
+ -- Jiangcuo <jiangcuo@lierfang.com> Fri, 27 Dec 2024 05:23:21 +0800
+
pve-manager (8.3.2) bookworm; urgency=medium
* api: network: add return schema for interface listing
@@ -15,6 +21,12 @@ pve-manager (8.3.2) bookworm; urgency=medium
-- Proxmox Support Team <support@proxmox.com> Mon, 16 Dec 2024 17:52:29 +0100
+pve-manager (8.3.1+port1) bookworm; urgency=medium
+
+ * Fix pveport.list on loongarch64 and arm64
@ -12,7 +25,7 @@ index a5426d9f..8c985cb0 100644
pve-manager (8.3.1) bookworm; urgency=medium
* ui: sdn firewall: add online help reference
@@ -497,6 +503,14 @@ pve-manager (8.1.4) bookworm; urgency=medium
@@ -514,6 +526,14 @@ pve-manager (8.1.4) bookworm; urgency=medium
-- Proxmox Support Team <support@proxmox.com> Thu, 14 Dec 2023 15:20:06 +0100

@ -1 +1 @@
Subproject commit fb48e850ef9dde2726668ec1db0a605dcd5b7b22
Subproject commit 883af414a9bbd772baee510e027f1ae1767f9e53

View File

@ -5,8 +5,9 @@ patches/006-remove-qxl-and-add-ramfb.patch
patches/007-remove-amd64-config.patch
patches/008-add-arm64-config.patch
patches/009-remove-other-ostype.patch
patches/changelog/004-add-changelog-8.3.1+port1.patch
patches/010-set-architecture-to-any.patch
patches/pxcloud/001-add-pxcloud-support.patch
patches/pxcloud/002-add-pxcloud-maintainer.patch
patches/pxcloud/003-set-pxcloud-mirror.patch
patches/changelog/004-add-changelog-8.3.2+port.patch
patches/011-set-default-bios-type-to-OVMF.patch

@ -1 +1 @@
Subproject commit 74466103898a3df6d343b22660474c18b6e930ac
Subproject commit c4efa30b307fc15df5c00f353494d1aec1702680

View File

@ -1,38 +0,0 @@
diff --git a/Makefile b/Makefile
index 758463c..aea517d 100644
--- a/Makefile
+++ b/Makefile
@@ -5,8 +5,9 @@ BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION)
DSC=$(PACKAGE)_$(DEB_VERSION).dsc
GITVERSION:=$(shell git rev-parse HEAD)
+ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
-DEB=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION)_all.deb
+DEB=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION)_$(ARCH).deb
all:
diff --git a/debian/control b/debian/control
index e04fad0..f7a202c 100644
--- a/debian/control
+++ b/debian/control
@@ -21,15 +21,15 @@ Standards-Version: 4.6.2
Homepage: https://www.proxmox.com
Package: libpve-storage-perl
-Architecture: all
+Architecture: any
Breaks: libpve-guest-common-perl (<< 4.0-3),
libpve-http-server-perl (<< 4.0-3),
pve-container (<< 3.1-2),
pve-manager (<< 5.2-12),
qemu-server (<< 6.1-14),
Depends: bzip2,
- ceph-common (>= 12.2~),
- ceph-fuse,
+ ceph-common [arm64 amd64],
+ ceph-fuse [arm64 amd64],
cifs-utils,
cstream,
glusterfs-client (>= 3.4.0-2),

@ -1 +1 @@
Subproject commit 39fd552d14c075a9760fcdbbecd207b8c8028731
Subproject commit e5f4af47d08322dd6d9b9c71cae24a9eb89e8756

View File

@ -1 +0,0 @@
patches/other/001-remove-ceph-fuse-for-loongarch-and-riscv.patch

View File

@ -63,10 +63,10 @@ index afb535c2..db6c3d80 100644
};
die "could not load supported machine versions - $@\n" if $@;
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 2046a7c5..a958eb77 100644
index 5cde94a1..6f0d41fc 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -98,11 +98,40 @@ my $OVMF = {
@@ -98,11 +98,73 @@ my $OVMF = {
],
},
aarch64 => {
@ -96,18 +96,51 @@ index 2046a7c5..a958eb77 100644
+ "$EDK2_FW_BASE/LOONGARCH64_VIRT_CODE.fd",
+ "$EDK2_FW_BASE/LOONGARCH64_VIRT_VARS.fd",
+ ],
+ '4m-no-smm' => [
+ "$EDK2_FW_BASE/LOONGARCH64_VIRT_CODE.fd",
+ "$EDK2_FW_BASE/LOONGARCH64_VIRT_VARS.fd",
+ ],
+ '4m-no-smm-ms' => [
+ "$EDK2_FW_BASE/LOONGARCH64_VIRT_CODE.fd",
+ "$EDK2_FW_BASE/LOONGARCH64_VIRT_VARS.fd",
+ ],
+ '4m' => [
+ "$EDK2_FW_BASE/LOONGARCH64_VIRT_CODE.fd",
+ "$EDK2_FW_BASE/LOONGARCH64_VIRT_VARS.fd",
+ ],
+ '4m-ms' => [
+ "$EDK2_FW_BASE/LOONGARCH64_VIRT_CODE.fd",
+ "$EDK2_FW_BASE/LOONGARCH64_VIRT_VARS.fd",
+ ],
+ },
+ riscv64 => {
+ default => [
+ "$EDK2_FW_BASE/RISCV_VIRT_CODE.fd",
+ "$EDK2_FW_BASE/RISCV_VIRT_VARS.fd",
+ ],
+ '4m-no-smm' => [
+ "$EDK2_FW_BASE/RISCV_VIRT_CODE.fd",
+ "$EDK2_FW_BASE/RISCV_VIRT_VARS.fd",
+ ],
+ '4m-no-smm-ms' => [
+ "$EDK2_FW_BASE/RISCV_VIRT_CODE.fd",
+ "$EDK2_FW_BASE/RISCV_VIRT_VARS.fd",
+ ],
+ '4m' => [
+ "$EDK2_FW_BASE/RISCV_VIRT_CODE.fd",
+ "$EDK2_FW_BASE/RISCV_VIRT_VARS.fd",
+ ],
+ '4m-ms' => [
+ "$EDK2_FW_BASE/RISCV_VIRT_CODE.fd",
+ "$EDK2_FW_BASE/RISCV_VIRT_VARS.fd",
+ ],
+
+ },
+
};
my $cpuinfo = PVE::ProcFSTools::read_cpuinfo();
@@ -185,7 +214,7 @@ my $vga_fmt = {
@@ -185,7 +247,7 @@ my $vga_fmt = {
default => 'std',
optional => 1,
default_key => 1,
@ -116,17 +149,6 @@ index 2046a7c5..a958eb77 100644
},
memory => {
description => "Sets the VGA memory (in MiB). Has no effect with serial display.",
@@ -398,8 +427,8 @@ my $confdesc = {
optional => 1,
type => 'string',
description => "SCSI controller model",
- enum => [qw(lsi lsi53c810 virtio-scsi-pci virtio-scsi-single megasas pvscsi)],
- default => 'lsi',
+ enum => [qw(virtio-scsi-pci virtio-scsi-single)],
+ default => 'virtio-scsi-pci',
},
description => {
optional => 1,
@@ -606,9 +634,9 @@ EODESCR
},
cdrom => {
@ -139,7 +161,7 @@ index 2046a7c5..a958eb77 100644
},
cpu => {
optional => 1,
@@ -653,7 +681,7 @@ EODESCR
@@ -653,7 +714,7 @@ EODESCR
description => "Virtual processor architecture. Defaults to the host.",
optional => 1,
type => 'string',
@ -148,7 +170,7 @@ index 2046a7c5..a958eb77 100644
},
smbios1 => {
description => "Specify SMBIOS type 1 fields.",
@@ -1376,11 +1404,14 @@ sub print_tabletdevice_full {
@@ -1376,11 +1437,14 @@ sub print_tabletdevice_full {
# we use uhci for old VMs because tablet driver was buggy in older qemu
my $usbbus;
@ -166,7 +188,7 @@ index 2046a7c5..a958eb77 100644
return "usb-tablet,id=tablet,bus=$usbbus.0,port=1";
}
@@ -1388,7 +1419,7 @@ sub print_tabletdevice_full {
@@ -1388,7 +1452,7 @@ sub print_tabletdevice_full {
sub print_keyboarddevice_full {
my ($conf, $arch) = @_;
@ -175,7 +197,7 @@ index 2046a7c5..a958eb77 100644
return "usb-kbd,id=keyboard,bus=ehci.0,port=2";
}
@@ -1782,15 +1813,19 @@ my $vga_map = {
@@ -1797,15 +1861,19 @@ my $vga_map = {
'std' => 'VGA',
'vmware' => 'vmware-svga',
'virtio' => 'virtio-vga',
@ -198,7 +220,7 @@ index 2046a7c5..a958eb77 100644
}
my $vgamem_mb = $vga->{memory};
@@ -1842,7 +1877,7 @@ sub print_vga_device {
@@ -1857,7 +1925,7 @@ sub print_vga_device {
}
if ($vga->{type} eq 'virtio-gl') {
@ -207,7 +229,7 @@ index 2046a7c5..a958eb77 100644
die "missing libraries for '$vga->{type}' detected! Please install 'libgl1' and 'libegl1'\n"
if !-e "${base}EGL.so.1" || !-e "${base}GL.so.1";
@@ -3185,7 +3220,14 @@ sub add_tpm_device {
@@ -3211,7 +3279,14 @@ sub add_tpm_device {
push @$devices, "-chardev", "socket,id=tpmchar,path=$paths->{socket}";
push @$devices, "-tpmdev", "emulator,id=tpmdev,chardev=tpmchar";
@ -222,7 +244,7 @@ index 2046a7c5..a958eb77 100644
}
sub start_swtpm {
@@ -3281,6 +3323,8 @@ sub get_vm_arch {
@@ -3309,6 +3384,8 @@ sub get_vm_arch {
my $default_machines = {
x86_64 => 'pc',
aarch64 => 'virt',
@ -231,16 +253,16 @@ index 2046a7c5..a958eb77 100644
};
sub get_installed_machine_version {
@@ -3326,7 +3370,7 @@ sub get_vm_machine {
@@ -3354,7 +3431,7 @@ sub get_vm_machine {
if (windows_version($conf->{ostype})) {
$machine = windows_get_pinned_machine_version($machine, '5.1', $kvmversion);
}
- $arch //= 'x86_64';
+ $arch //= get_host_arch();
$machine ||= $default_machines->{$arch};
if ($add_pve_version) {
my $pvever = PVE::QemuServer::Machine::get_pve_version($kvmversion);
@@ -3355,13 +3399,9 @@ sub get_ovmf_files($$$) {
my $pvever = PVE::QemuServer::Machine::get_pve_version($kvmversion);
$machine .= "+pve$pvever";
@@ -3381,13 +3458,9 @@ sub get_ovmf_files($$$) {
or die "no OVMF images known for architecture '$arch'\n";
my $type = 'default';
@ -257,7 +279,7 @@ index 2046a7c5..a958eb77 100644
}
my ($ovmf_code, $ovmf_vars) = $types->{$type}->@*;
@@ -3374,6 +3414,8 @@ sub get_ovmf_files($$$) {
@@ -3400,6 +3473,8 @@ sub get_ovmf_files($$$) {
my $Arch2Qemu = {
aarch64 => '/usr/bin/qemu-system-aarch64',
x86_64 => '/usr/bin/qemu-system-x86_64',
@ -266,7 +288,7 @@ index 2046a7c5..a958eb77 100644
};
sub get_command_for_arch($) {
my ($arch) = @_;
@@ -3414,8 +3456,8 @@ sub query_supported_cpu_flags {
@@ -3440,8 +3515,8 @@ sub query_supported_cpu_flags {
# FIXME: Once this is merged, the code below should work for ARM as well:
# https://lists.nongnu.org/archive/html/qemu-devel/2019-06/msg04947.html
@ -277,7 +299,7 @@ index 2046a7c5..a958eb77 100644
my $kvm_supported = defined(kvm_version());
my $qemu_cmd = get_command_for_arch($arch);
@@ -3434,7 +3476,8 @@ sub query_supported_cpu_flags {
@@ -3460,7 +3535,8 @@ sub query_supported_cpu_flags {
'-chardev', "socket,id=qmp,path=/var/run/qemu-server/$fakevmid.qmp,server=on,wait=off",
'-mon', 'chardev=qmp,mode=control',
'-pidfile', $pidfile,
@ -287,7 +309,7 @@ index 2046a7c5..a958eb77 100644
];
if (!$kvm) {
@@ -3562,7 +3605,7 @@ my sub get_vga_properties {
@@ -3585,7 +3661,7 @@ my sub get_vga_properties {
$vga->{type} = 'qxl' if $qxlnum;
if (!$vga->{type}) {
@ -296,26 +318,19 @@ index 2046a7c5..a958eb77 100644
$vga->{type} = 'virtio';
} elsif (min_version($machine_version, 2, 9)) {
$vga->{type} = (!$winversion || $winversion >= 6) ? 'std' : 'cirrus';
@@ -3722,8 +3765,16 @@ sub config_to_command {
@@ -3697,7 +3773,10 @@ sub config_to_command {
my ($code_drive_str, $var_drive_str) =
print_ovmf_drive_commandlines($conf, $storecfg, $vmid, $arch, $q35, $version_guard);
- push $cmd->@*, '-drive', $code_drive_str;
- push $cmd->@*, '-drive', $var_drive_str;
+ if ($arch eq 'loongarch64') {
+ push $cmd->@*, '-bios','/usr/share/pve-edk2-firmware//LOONGARCH64_VIRT_CODE.fd';
+ }elsif ($arch eq 'riscv64') {
+ push @$cmd, '-bios','/usr/share/pve-edk2-firmware//fw_dynamic.bin';
+ push @$cmd, '-drive', $code_drive_str;
+ }else{
+ push $cmd->@*, '-drive', $code_drive_str;
+ push $cmd->@*, '-drive', $var_drive_str;
+ }
+
}
push @$cmd, '-name', "$vmname,debug-threads=on";
if ($q35) { # tell QEMU to load q35 config early
@@ -3735,11 +3786,12 @@ sub config_to_command {
- push @$cmd, '-no-shutdown';
+ # fix nvram poweroff issue on loongarch
+ if ( $arch ne 'loongarch64'){
+ push @$cmd, '-no-shutdown';
+ }
my $use_virtio = 0;
@@ -3756,11 +3835,12 @@ sub config_to_command {
}
}
@ -329,7 +344,7 @@ index 2046a7c5..a958eb77 100644
push @$devices, '-device', 'vmgenid,guid='.$conf->{vmgenid};
}
@@ -3787,7 +3839,7 @@ sub config_to_command {
@@ -3808,7 +3888,7 @@ sub config_to_command {
# On aarch64, serial0 is the UART device. QEMU only allows
# connecting UART devices via the '-serial' command line, as
# the device has a fixed slot on the hardware...
@ -338,7 +353,13 @@ index 2046a7c5..a958eb77 100644
push @$devices, '-serial', "chardev:serial$i";
} else {
push @$devices, '-device', "isa-serial,chardev=serial$i";
@@ -3853,9 +3905,12 @@ sub config_to_command {
@@ -3869,14 +3949,17 @@ sub config_to_command {
push @$cmd, '-boot', "menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg";
- push $machineFlags->@*, 'acpi=off' if defined($conf->{acpi}) && $conf->{acpi} == 0;
+ push $machineFlags->@*, 'acpi=off' if defined($conf->{acpi}) && $conf->{acpi} == 0 && $arch ne 'loongarch64';
push @$cmd, '-no-reboot' if defined($conf->{reboot}) && $conf->{reboot} == 0;
if ($vga->{type} && $vga->{type} !~ m/^serial\d+$/ && $vga->{type} ne 'none'){
@ -354,7 +375,7 @@ index 2046a7c5..a958eb77 100644
push @$cmd, '-display', 'egl-headless,gl=core' if $vga->{type} eq 'virtio-gl'; # VIRGL
my $socket = PVE::QemuServer::Helpers::vnc_socket($vmid);
@@ -4151,14 +4206,19 @@ sub config_to_command {
@@ -4172,14 +4255,19 @@ sub config_to_command {
if ($k == 2 && $legacy_igd) {
$k_name = "$k-igd";
}
@ -381,10 +402,10 @@ index 2046a7c5..a958eb77 100644
}
if (!$kvm) {
@@ -4172,20 +4232,18 @@ sub config_to_command {
$machine_type_min =~ s/\+pve\d+$//;
$machine_type_min .= "+pve$required_pve_version";
}
@@ -4191,20 +4279,18 @@ sub config_to_command {
my $machine_type_min = $machine_type;
$machine_type_min =~ s/\+pve\d+$//;
$machine_type_min .= "+pve$required_pve_version";
- push @$machineFlags, "type=${machine_type_min}";
-
- PVE::QemuServer::Machine::assert_valid_machine_property($conf, $machine_conf);
@ -411,7 +432,7 @@ index 2046a7c5..a958eb77 100644
push @$devices, '-object', get_amd_sev_object($conf->{'amd-sev'}, $conf->{bios});
push @$machineFlags, 'confidential-guest-support=sev0';
}
@@ -4359,6 +4417,10 @@ sub vm_deviceplug {
@@ -4378,6 +4464,10 @@ sub vm_deviceplug {
my $machine_type = PVE::QemuServer::Machine::qemu_machine_pxe($vmid, $conf);
my $machine_version = PVE::QemuServer::Machine::extract_version($machine_type);
@ -422,7 +443,7 @@ index 2046a7c5..a958eb77 100644
my $use_old_bios_files = undef;
($use_old_bios_files, $machine_type) = qemu_use_old_bios_files($machine_type);
@@ -5049,10 +5111,10 @@ sub vmconfig_hotplug_pending {
@@ -5068,10 +5158,10 @@ sub vmconfig_hotplug_pending {
if ($defaults->{tablet}) {
vm_deviceplug($storecfg, $conf, $vmid, 'tablet', $arch, $machine_type);
vm_deviceplug($storecfg, $conf, $vmid, 'keyboard', $arch, $machine_type)
@ -435,7 +456,7 @@ index 2046a7c5..a958eb77 100644
}
} elsif ($opt =~ m/^usb(\d+)$/) {
my $index = $1;
@@ -5114,10 +5176,10 @@ sub vmconfig_hotplug_pending {
@@ -5133,10 +5223,10 @@ sub vmconfig_hotplug_pending {
if ($value == 1) {
vm_deviceplug($storecfg, $conf, $vmid, 'tablet', $arch, $machine_type);
vm_deviceplug($storecfg, $conf, $vmid, 'keyboard', $arch, $machine_type)
@ -738,7 +759,7 @@ index e65d8c26..c229c35f 100644
die "unsupported architecture '$arch'\n";
}
diff --git a/PVE/QemuServer/PCI.pm b/PVE/QemuServer/PCI.pm
index 491ba078..98141516 100644
index d758ae9d..15c18691 100644
--- a/PVE/QemuServer/PCI.pm
+++ b/PVE/QemuServer/PCI.pm
@@ -14,6 +14,7 @@ our @EXPORT_OK = qw(
@ -1204,11 +1225,19 @@ index 491ba078..98141516 100644
$pciaddr = print_pci_addr($pci_name, $bridges, $arch, $machine_type);
}
diff --git a/PVE/QemuServer/USB.pm b/PVE/QemuServer/USB.pm
index 017ef9c0..4e900d79 100644
index 017ef9c0..b2daab25 100644
--- a/PVE/QemuServer/USB.pm
+++ b/PVE/QemuServer/USB.pm
@@ -133,9 +133,13 @@ sub get_usb_controllers {
@@ -131,11 +131,21 @@ sub get_usb_controllers {
my $use_qemu_xhci = min_version($machine_version, 7, 1)
&& defined($ostype) && ($ostype eq 'l26' || windows_version($ostype) > 7);
+
+ # We use qemu_xhci only for !x86_64 device
+ if ($arch ne 'x86_64'){
+ $use_qemu_xhci = 1;
+ }
+
my $is_q35 = PVE::QemuServer::Machine::machine_type_is_q35($conf);
- if ($arch eq 'aarch64') {
@ -1223,7 +1252,7 @@ index 017ef9c0..4e900d79 100644
} elsif (!$is_q35) {
$pciaddr = print_pci_addr("piix3", $bridges, $arch, $machine);
push @$devices, '-device', "piix3-usb-uhci,id=uhci$pciaddr.0x2";
@@ -152,7 +156,7 @@ sub get_usb_controllers {
@@ -152,17 +162,23 @@ sub get_usb_controllers {
$use_usb2 = 1 if !$d->{usb3};
}
@ -1232,11 +1261,32 @@ index 017ef9c0..4e900d79 100644
# include usb device config if still on x86 before-xhci machines and if USB 3 is not used
push @$devices, '-readconfig', '/usr/share/qemu-server/pve-usb.cfg';
}
$pciaddr = print_pci_addr("xhci", $bridges, $arch, $machine);
- if ($use_qemu_xhci && $any_usb) {
- push @$devices, '-device', print_qemu_xhci_controller($pciaddr);
- } elsif ($use_usb3) {
- push @$devices, '-device', "nec-usb-xhci,id=xhci$pciaddr";
- }
+
+ if ($arch ne 'x86_64') {
+ # Create the usb controller on first boot so that we don't need to hot-plug the device later.
+ push @$devices, '-device', print_qemu_xhci_controller($pciaddr);
+ }else{
+ if ($use_qemu_xhci && $any_usb) {
+ push @$devices, '-device', print_qemu_xhci_controller($pciaddr);
+ } elsif ($use_usb3) {
+ push @$devices, '-device', "nec-usb-xhci,id=xhci$pciaddr";
+ }
+ }
return @$devices;
}
diff --git a/debian/changelog b/debian/changelog
index e686bac4..9e7f8d2c 100644
index 8a19bf70..1439b7f3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -195,6 +195,20 @@ qemu-server (8.1.2) bookworm; urgency=medium
@@ -224,6 +224,20 @@ qemu-server (8.1.2) bookworm; urgency=medium
-- Proxmox Support Team <support@proxmox.com> Fri, 19 Apr 2024 16:09:18 +0200
@ -1257,7 +1307,7 @@ index e686bac4..9e7f8d2c 100644
qemu-server (8.1.1) bookworm; urgency=medium
* config: pending network: avoid undef-warning on old/new comparison
@@ -247,6 +261,12 @@ qemu-server (8.1.0) bookworm; urgency=medium
@@ -276,6 +290,12 @@ qemu-server (8.1.0) bookworm; urgency=medium
-- Proxmox Support Team <support@proxmox.com> Fri, 08 Mar 2024 15:00:25 +0100
@ -1270,7 +1320,7 @@ index e686bac4..9e7f8d2c 100644
qemu-server (8.0.10) bookworm; urgency=medium
* sdn: pass vmid and hostname to allow requesting a new mapping
@@ -265,6 +285,16 @@ qemu-server (8.0.9) bookworm; urgency=medium
@@ -294,6 +314,16 @@ qemu-server (8.0.9) bookworm; urgency=medium
-- Proxmox Support Team <support@proxmox.com> Tue, 21 Nov 2023 15:40:27 +0100
@ -1288,7 +1338,7 @@ index e686bac4..9e7f8d2c 100644
* fix #2816: restore: remove timeout when allocating disks
diff --git a/debian/control b/debian/control
index 0dcd3b30..7e79ee09 100644
index 81f0fad6..f4e95b71 100644
--- a/debian/control
+++ b/debian/control
@@ -20,6 +20,7 @@ Build-Depends: debhelper-compat (= 13),
@ -1299,14 +1349,19 @@ index 0dcd3b30..7e79ee09 100644
pve-firewall,
pve-ha-manager <!nocheck>,
pve-qemu-kvm (>= 7.1~),
@@ -49,6 +50,7 @@ Depends: dbus,
@@ -49,9 +50,11 @@ Depends: dbus,
# TODO: make legacy edk2 optional (suggests) for PVE 9 and warn explicitly about it
pve-edk2-firmware-legacy | pve-edk2-firmware (<< 4~),
pve-edk2-firmware-ovmf | pve-edk2-firmware (>= 3.20210831-1),
+ pve-edk2-firmware-aarch64,
+ pve-edk2-firmware-loongarch64 [loong64],
pve-firewall (>= 5.0.4),
pve-ha-manager (>= 3.0-9),
pve-qemu-kvm (>= 7.1~),
- pve-qemu-kvm (>= 7.1~),
+ pve-qemu-kvm (>= 9.0~),
socat,
swtpm,
swtpm-tools,
diff --git a/qemu-configs/Makefile b/qemu-configs/Makefile
index f55e9bef..bccbc7e4 100644
--- a/qemu-configs/Makefile

View File

@ -0,0 +1,29 @@
diff --git a/debian/changelog b/debian/changelog
index 1439b7f3..0b93b9e8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -27,6 +27,24 @@ qemu-server (8.3.1) bookworm; urgency=medium
-- Proxmox Support Team <support@proxmox.com> Thu, 05 Dec 2024 12:38:12 +0100
+qemu-server (8.3.0+port3) bookworm; urgency=medium
+
+ * Add loongarch efi_vars support
+
+ -- Jiangcuo <jiangcuo@lierfang.com> Wed, 11 Dec 2024 13:44:37 +0800
+
+qemu-server (8.3.0+port2) bookworm; urgency=medium
+
+ * Fix usb hotplug error
+
+ -- Jiangcuo <jiangcuo@bingsin.com> Mon, 09 Dec 2024 16:30:48 +0800
+
+qemu-server (8.3.0+port1) bookworm; urgency=medium
+
+ * Fix cpu type on loongarch64
+
+ -- Jiangcuo <jiangcuo@bingsin.com> Thu, 05 Dec 2024 14:16:44 +0800
+
qemu-server (8.3.0) bookworm; urgency=medium
* api: import working storage: improve error message

View File

@ -1,51 +0,0 @@
From 5dd2dcf088141ac471037dfcf0607b5968742b8d Mon Sep 17 00:00:00 2001
From: jiangcuo <jiangcuo@bingsin.com>
Date: Mon, 9 Dec 2024 16:33:51 +0800
Subject: [PATCH] fix usb hotplug issue
https://github.com/jiangcuo/Proxmox-Port/issues/135
---
PVE/QemuServer/USB.pm | 22 +++++++++++++++++-----
debian/changelog | 6 ++++++
2 files changed, 23 insertions(+), 5 deletions(-)
diff --git a/PVE/QemuServer/USB.pm b/PVE/QemuServer/USB.pm
index 4e900d79..b2daab25 100644
--- a/PVE/QemuServer/USB.pm
+++ b/PVE/QemuServer/USB.pm
@@ -131,6 +131,12 @@ sub get_usb_controllers {
my $use_qemu_xhci = min_version($machine_version, 7, 1)
&& defined($ostype) && ($ostype eq 'l26' || windows_version($ostype) > 7);
+
+ # We use qemu_xhci only for !x86_64 device
+ if ($arch ne 'x86_64'){
+ $use_qemu_xhci = 1;
+ }
+
my $is_q35 = PVE::QemuServer::Machine::machine_type_is_q35($conf);
if ($arch ne 'x86_64') {
@@ -162,11 +168,17 @@ sub get_usb_controllers {
}
$pciaddr = print_pci_addr("xhci", $bridges, $arch, $machine);
- if ($use_qemu_xhci && $any_usb) {
- push @$devices, '-device', print_qemu_xhci_controller($pciaddr);
- } elsif ($use_usb3) {
- push @$devices, '-device', "nec-usb-xhci,id=xhci$pciaddr";
- }
+
+ if ($arch ne 'x86_64') {
+ # Create the usb controller on first boot so that we don't need to hot-plug the device later.
+ push @$devices, '-device', print_qemu_xhci_controller($pciaddr);
+ }else{
+ if ($use_qemu_xhci && $any_usb) {
+ push @$devices, '-device', print_qemu_xhci_controller($pciaddr);
+ } elsif ($use_usb3) {
+ push @$devices, '-device', "nec-usb-xhci,id=xhci$pciaddr";
+ }
+ }
return @$devices;
}

View File

@ -1,106 +0,0 @@
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index a958eb77..514d52ec 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -124,12 +124,45 @@ my $OVMF = {
"$EDK2_FW_BASE/LOONGARCH64_VIRT_CODE.fd",
"$EDK2_FW_BASE/LOONGARCH64_VIRT_VARS.fd",
],
+ '4m-no-smm' => [
+ "$EDK2_FW_BASE/LOONGARCH64_VIRT_CODE.fd",
+ "$EDK2_FW_BASE/LOONGARCH64_VIRT_VARS.fd",
+ ],
+ '4m-no-smm-ms' => [
+ "$EDK2_FW_BASE/LOONGARCH64_VIRT_CODE.fd",
+ "$EDK2_FW_BASE/LOONGARCH64_VIRT_VARS.fd",
+ ],
+ '4m' => [
+ "$EDK2_FW_BASE/LOONGARCH64_VIRT_CODE.fd",
+ "$EDK2_FW_BASE/LOONGARCH64_VIRT_VARS.fd",
+ ],
+ '4m-ms' => [
+ "$EDK2_FW_BASE/LOONGARCH64_VIRT_CODE.fd",
+ "$EDK2_FW_BASE/LOONGARCH64_VIRT_VARS.fd",
+ ],
},
riscv64 => {
default => [
"$EDK2_FW_BASE/RISCV_VIRT_CODE.fd",
"$EDK2_FW_BASE/RISCV_VIRT_VARS.fd",
],
+ '4m-no-smm' => [
+ "$EDK2_FW_BASE/RISCV_VIRT_CODE.fd",
+ "$EDK2_FW_BASE/RISCV_VIRT_VARS.fd",
+ ],
+ '4m-no-smm-ms' => [
+ "$EDK2_FW_BASE/RISCV_VIRT_CODE.fd",
+ "$EDK2_FW_BASE/RISCV_VIRT_VARS.fd",
+ ],
+ '4m' => [
+ "$EDK2_FW_BASE/RISCV_VIRT_CODE.fd",
+ "$EDK2_FW_BASE/RISCV_VIRT_VARS.fd",
+ ],
+ '4m-ms' => [
+ "$EDK2_FW_BASE/RISCV_VIRT_CODE.fd",
+ "$EDK2_FW_BASE/RISCV_VIRT_VARS.fd",
+ ],
+
},
};
@@ -3719,7 +3752,10 @@ sub config_to_command {
push @$cmd, '-name', "$vmname,debug-threads=on";
- push @$cmd, '-no-shutdown';
+ # fix nvram poweroff issue on loongarch
+ if ( $arch ne 'loongarch64'){
+ push @$cmd, '-no-shutdown';
+ }
my $use_virtio = 0;
@@ -3765,16 +3801,8 @@ sub config_to_command {
my ($code_drive_str, $var_drive_str) =
print_ovmf_drive_commandlines($conf, $storecfg, $vmid, $arch, $q35, $version_guard);
- if ($arch eq 'loongarch64') {
- push $cmd->@*, '-bios','/usr/share/pve-edk2-firmware//LOONGARCH64_VIRT_CODE.fd';
- }elsif ($arch eq 'riscv64') {
- push @$cmd, '-bios','/usr/share/pve-edk2-firmware//fw_dynamic.bin';
- push @$cmd, '-drive', $code_drive_str;
- }else{
- push $cmd->@*, '-drive', $code_drive_str;
- push $cmd->@*, '-drive', $var_drive_str;
- }
-
+ push $cmd->@*, '-drive', $code_drive_str;
+ push $cmd->@*, '-drive', $var_drive_str;
}
if ($q35) { # tell QEMU to load q35 config early
@@ -3900,7 +3928,7 @@ sub config_to_command {
push @$cmd, '-boot', "menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg";
- push $machineFlags->@*, 'acpi=off' if defined($conf->{acpi}) && $conf->{acpi} == 0;
+ push $machineFlags->@*, 'acpi=off' if defined($conf->{acpi}) && $conf->{acpi} == 0 && $arch ne 'loongarch64';
push @$cmd, '-no-reboot' if defined($conf->{reboot}) && $conf->{reboot} == 0;
diff --git a/debian/control b/debian/control
index 7e79ee09..94995a68 100644
--- a/debian/control
+++ b/debian/control
@@ -51,9 +51,10 @@ Depends: dbus,
pve-edk2-firmware-legacy | pve-edk2-firmware (<< 4~),
pve-edk2-firmware-ovmf | pve-edk2-firmware (>= 3.20210831-1),
pve-edk2-firmware-aarch64,
+ pve-edk2-firmware-loongarch64 [loong64],
pve-firewall (>= 5.0.4),
pve-ha-manager (>= 3.0-9),
- pve-qemu-kvm (>= 7.1~),
+ pve-qemu-kvm (>= 9.0~),
socat,
swtpm,
swtpm-tools,

View File

@ -0,0 +1,16 @@
diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index db356b7e..e1dc3e7e 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -1223,6 +1223,11 @@ __PACKAGE__->register_method({
);
$conf->{$_} = $created_opts->{$_} for keys $created_opts->%*;
+ # set default bios to ovmf
+ if (!$conf->{bios}){
+ $conf->{bios} = 'ovmf';
+ }
+
if (!$conf->{boot}) {
my $devs = PVE::QemuServer::get_default_bootdevices($conf);
$conf->{boot} = PVE::QemuServer::print_bootorder($devs);

View File

@ -0,0 +1,12 @@
diff --git a/PVE/QemuServer/CPUConfig.pm b/PVE/QemuServer/CPUConfig.pm
index c229c35f..f5344716 100644
--- a/PVE/QemuServer/CPUConfig.pm
+++ b/PVE/QemuServer/CPUConfig.pm
@@ -168,6 +168,7 @@ my $cpu_vendor_list = {
'rv64' => 'default',
'la464' => 'default',
'la132' => 'default',
+ 'Kunpeng-920' => 'default',
};
my @supported_cpu_flags = (

View File

@ -0,0 +1,19 @@
diff --git a/debian/changelog b/debian/changelog
index 0b93b9e8..dbb548be 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -18,6 +18,14 @@ qemu-server (8.3.2) bookworm; urgency=medium
-- Proxmox Support Team <support@proxmox.com> Mon, 09 Dec 2024 10:08:14 +0100
+qemu-server (8.3.1+port) bookworm; urgency=medium
+
+ * Set default bios type to ovmf when vm create
+
+ * Add Kunpeng920 cpu model.
+
+ -- Jiangcuo <Jiangcuo@lierfang.com> Thu, 26 Dec 2024 11:22:33 +0800
+
qemu-server (8.3.1) bookworm; urgency=medium
* api: clone vm: make error for unsupported volumes appear in a

View File

@ -0,0 +1,17 @@
diff --git a/debian/changelog b/debian/changelog
index dbb548be..afdaaa98 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,6 +12,12 @@ qemu-server (8.3.3) bookworm; urgency=medium
-- Proxmox Support Team <support@proxmox.com> Sun, 15 Dec 2024 14:26:32 +0100
+qemu-server (8.3.2+port) bookworm; urgency=medium
+
+ * Add port verison
+
+ -- Jiangcuo <Jiangcuo@lierfang.com> Thu, 26 Dec 2024 11:28:33 +0800
+
qemu-server (8.3.2) bookworm; urgency=medium
* use image format from storage layer for PVE-managed volumes

View File

@ -0,0 +1,23 @@
diff --git a/debian/changelog b/debian/changelog
index afdaaa98..87012a2a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+qemu-server (8.3.3+port) bookworm; urgency=medium
+
+ * Add port version
+
+ -- Jiangcuo <Jiangcuo@lierfang.com> Thu, 26 Dec 2024 12:13:33 +0800
+
qemu-server (8.3.3) bookworm; urgency=medium
* fix #5980: import disk: fix spurious warning if no target disk is defined
@@ -14,7 +20,7 @@ qemu-server (8.3.3) bookworm; urgency=medium
qemu-server (8.3.2+port) bookworm; urgency=medium
- * Add port verison
+ * Add port version
-- Jiangcuo <Jiangcuo@lierfang.com> Thu, 26 Dec 2024 11:28:33 +0800

View File

@ -0,0 +1,53 @@
diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index e1dc3e7e..d21fb6ed 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -684,6 +684,7 @@ my $generaloptions = {
'name' => 1,
'onboot' => 1,
'ostype' => 1,
+ 'gicversion' =>1,
'protection' => 1,
'reboot' => 1,
'startdate' => 1,
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 6f0d41fc..d351dfbc 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -420,6 +420,12 @@ my $confdesc = {
type => 'string',
description => "Memory properties.",
format => $PVE::QemuServer::Memory::memory_fmt
+ },
+ gicversion => {
+ optional => 1,
+ type => 'string',
+ description => "Set virt gic-version",
+ enum => [qw(host 2 3 4 max)],
},
'amd-sev' => {
description => "Secure Encrypted Virtualization (SEV) features by AMD CPUs",
@@ -4279,14 +4285,17 @@ sub config_to_command {
my $machine_type_min = $machine_type;
$machine_type_min =~ s/\+pve\d+$//;
$machine_type_min .= "+pve$required_pve_version";
+
+
+ my $gicv = $kvm ? 'host' : 'max';
+ if ( $conf->{gicversion} ) {
+ $gicv = $conf->{gicversion};
+ }
+
if ($arch eq 'aarch64'){
- if (!$kvm){
- push @$machineFlags, "type=${machine_type_min}";
- }else{
- push @$machineFlags, "type=${machine_type_min},gic-version=host";
- }
+ push @$machineFlags, "type=${machine_type_min},gic-version=${gicv}";
}else{
- push @$machineFlags, "type=${machine_type_min}";
+ push @$machineFlags, "type=${machine_type_min}";
}
# This method is prevented from being executed on the Port branch.

View File

@ -0,0 +1,14 @@
diff --git a/debian/changelog b/debian/changelog
index 87012a2a..caf93620 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+qemu-server (8.3.3+port2) bookworm; urgency=medium
+
+ * Add 'gicversion' param.
+
+ -- Jiangcuo <Jiangcuo@lierfang.com> Thu, 26 Dec 2024 12:28:33 +0800
+
qemu-server (8.3.3+port) bookworm; urgency=medium
* Add port version

View File

@ -1,14 +0,0 @@
diff --git a/debian/changelog b/debian/changelog
index 9e7f8d2c..39ee0d12 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+qemu-server (8.3.0+port1) bookworm; urgency=medium
+
+ * Fix cpu type on loongarch64
+
+ -- Jiangcuo <jiangcuo@bingsin.com> Thu, 05 Dec 2024 14:16:44 +0800
+
qemu-server (8.3.0) bookworm; urgency=medium
* api: import working storage: improve error message

View File

@ -1,25 +0,0 @@
From 5dd2dcf088141ac471037dfcf0607b5968742b8d Mon Sep 17 00:00:00 2001
From: jiangcuo <jiangcuo@bingsin.com>
Date: Mon, 9 Dec 2024 16:33:51 +0800
Subject: [PATCH] fix usb hotplug issue
https://github.com/jiangcuo/Proxmox-Port/issues/135
---
PVE/QemuServer/USB.pm | 22 +++++++++++++++++-----
debian/changelog | 6 ++++++
2 files changed, 23 insertions(+), 5 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 39ee0d12..4e9a4824 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+qemu-server (8.3.0+port2) bookworm; urgency=medium
+
+ * Fix usb hotplug error
+
+ -- Jiangcuo <jiangcuo@bingsin.com> Mon, 09 Dec 2024 16:30:48 +0800
+
qemu-server (8.3.0+port1) bookworm; urgency=medium
* Fix cpu type on loongarch64

View File

@ -1,14 +0,0 @@
diff --git a/debian/changelog b/debian/changelog
index 4e9a4824..f9f1f392 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+qemu-server (8.3.0+port3) bookworm; urgency=medium
+
+ * Add loongarch efi_vars support
+
+ -- Jiangcuo <jiangcuo@lierfang.com> Wed, 11 Dec 2024 13:44:37 +0800
+
qemu-server (8.3.0+port2) bookworm; urgency=medium
* Fix usb hotplug error

@ -1 +1 @@
Subproject commit 7547eb37a96a648a7946c584400295eab23f594e
Subproject commit 6b2091da7fcf2000234ed1cdbb7ea22fd093b271

View File

@ -1,8 +1,11 @@
patches/001-port.patch
patches/002-fix-usb-hotplug.patch
patches/003-fix-loongarch-nvram-and-acpi-issue.patch
patches/changelog/001-update-to8.3.0+port1.patch
patches/changelog/002-update-to8.3.0+port2.patch
patches/changelog/003-update-to8.3.0+port3.patch
patches/001-init-for-port.patch
patches/002-add-port-changelog.patch
patches/003-set-default-bios-to-ovmf-when-vm-create.diff
patches/004-add-Kunpeng-920-cpu-model.patch
patches/005-bump-version-to-8.3.2.patch
patches/006-bump-qemu-server-to-8.3.2+port.patch
patches/007-bump-version-to-8.3.3+port.patch
patches/009-add-gicversion-param.patch
patches/010-bump-version-to-8.3.3+port2.patch
patches/pxcloud/001-add-microvm-pxcloud.patch
patches/pxcloud/002-add-api-permission.patch