all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Alexandre Derumier <aderumier@odiso.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH qemu-server] Fix: cpu hotplug feature can't be changed online
Date: Tue, 10 Oct 2023 17:37:17 +0200	[thread overview]
Message-ID: <20231010153717.2282543-1-aderumier@odiso.com> (raw)

The cpus are passed as devices with specific id only when cpu hotplug is enable
at start.
We can't enable/disable it online or vcpu hotplug api will thrown errors
not finding core id.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
---
 PVE/QemuServer.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 2895675..22d1c71 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -4961,7 +4961,7 @@ sub vmconfig_hotplug_pending {
 	my $force = $pending_delete_hash->{$opt}->{force};
 	eval {
 	    if ($opt eq 'hotplug') {
-		die "skip\n" if ($conf->{hotplug} =~ /memory/);
+		die "skip\n" if ($conf->{hotplug} =~ /(cpu|memory)/);
 	    } elsif ($opt eq 'tablet') {
 		die "skip\n" if !$hotplug_features->{usb};
 		if ($defaults->{tablet}) {
@@ -5022,6 +5022,7 @@ sub vmconfig_hotplug_pending {
 	eval {
 	    if ($opt eq 'hotplug') {
 		die "skip\n" if ($value =~ /memory/) || ($value !~ /memory/ && $conf->{hotplug} =~ /memory/);
+		die "skip\n" if ($value =~ /cpu/) || ($value !~ /cpu/ && $conf->{hotplug} =~ /cpu/);
 	    } elsif ($opt eq 'tablet') {
 		die "skip\n" if !$hotplug_features->{usb};
 		if ($value == 1) {
-- 
2.39.2




             reply	other threads:[~2023-10-10 15:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-10 15:37 Alexandre Derumier [this message]
2023-10-11 12:30 ` Fiona Ebner
2023-10-23 21:51   ` DERUMIER, Alexandre
2023-10-24  9:47 ` [pve-devel] applied: " Thomas Lamprecht

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=20231010153717.2282543-1-aderumier@odiso.com \
    --to=aderumier@odiso.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal