Public bug reported:

---Problem 
Description----------------------------------------------------------------------------------
Adding a configured CPU to a system (LPAR, ZVM or KVM) leaves that CPU 
configured but hotplugged off.

# lscpu -e
CPU NODE DRAWER BOOK SOCKET CORE L1d:L1i:L2 ONLINE CONFIGURED POLARIZATION 
ADDRESS
  0    0      0    0      0    0 0:0:0         yes yes        horizontal   0
  1    0      0    0      1    1 1:1:1         yes yes        horizontal   1
  2    0      0    0      2    2 2:2:2         yes yes        horizontal   2
  3    0      0    0      3    3 3:3:3         yes yes        horizontal   3
  4    0      0    0      4    4 4:4:4         yes yes        horizontal   4
  5    0      0    0      5    5 5:5:5         yes yes        horizontal   5
  6    -      -    -      -    - -              no yes        horizontal   6
  7    -      -    -      -    - -              no yes        horizontal   7
 
---Debugger---
A debugger is not configured
 
Machine Type = z/VM, LPAR 
 
---uname output---
6.8.0-41-generic #41-Ubuntu SMP Fri Aug  2 19:51:49 UTC 2024 s390x s390x s390x 
GNU/Linux
 
---Steps to Reproduce---
Easiest way to reproduce is using a KVM guest to add new CPUs.

1. Before adding CPUs:

$ virsh dumpxml vm
<domain type='kvm' id='106'>
   ...
  <vcpu placement='static' current='6'>8</vcpu>
  <vcpus>
    <vcpu id='0' enabled='yes' hotpluggable='no' order='1'/>
    <vcpu id='1' enabled='yes' hotpluggable='no' order='2'/>
    <vcpu id='2' enabled='yes' hotpluggable='yes' order='3'/>
    <vcpu id='3' enabled='yes' hotpluggable='yes' order='4'/>
    <vcpu id='4' enabled='yes' hotpluggable='yes' order='5'/>
    <vcpu id='5' enabled='yes' hotpluggable='yes' order='6'/>
    <vcpu id='6' enabled='no' hotpluggable='yes'/>
    <vcpu id='7' enabled='no' hotpluggable='yes'/>

2. Attempt to add CPUs to the guest in a "running" state. 
$ virsh setvcpus vm 8 --live

3. The guest XML is updated :
   ...
  <vcpu placement='static'>8</vcpu>
  <vcpus>
    <vcpu id='0' enabled='yes' hotpluggable='no' order='1'/>
    <vcpu id='1' enabled='yes' hotpluggable='no' order='2'/>
    <vcpu id='2' enabled='yes' hotpluggable='yes' order='3'/>
    <vcpu id='3' enabled='yes' hotpluggable='yes' order='4'/>
    <vcpu id='4' enabled='yes' hotpluggable='yes' order='5'/>
    <vcpu id='5' enabled='yes' hotpluggable='yes' order='6'/>
    <vcpu id='6' enabled='yes' hotpluggable='yes' order='7'/>
    <vcpu id='7' enabled='yes' hotpluggable='yes' order='8'/>
  </vcpus>

4. But inside the guest, the CPUs are in offline state:
$ lscpu -e
CPU NODE DRAWER BOOK SOCKET CORE L1d:L1i:L2 ONLINE CONFIGURED POLARIZATION 
ADDRESS
  0    0      0    0      0    0 0:0:0         yes yes        horizontal   0
  1    0      0    0      1    1 1:1:1         yes yes        horizontal   1
  2    0      0    0      2    2 2:2:2         yes yes        horizontal   2
  3    0      0    0      3    3 3:3:3         yes yes        horizontal   3
  4    0      0    0      4    4 4:4:4         yes yes        horizontal   4
  5    0      0    0      5    5 5:5:5         yes yes        horizontal   5
  6    -      -    -      -    - -              no yes        horizontal   6
  7    -      -    -      -    - -              no yes        horizontal   7

5. Post rebooting the guest, the CPUs are  online:
$ virsh reboot vm

Inside the guest:
$ lscpu -e
CPU NODE DRAWER BOOK SOCKET CORE L1d:L1i:L2 ONLINE CONFIGURED POLARIZATION 
ADDRESS
  0    0      0    0      0    0 0:0:0         yes yes        horizontal   0
  1    0      0    0      1    1 1:1:1         yes yes        horizontal   1
  2    0      0    0      2    2 2:2:2         yes yes        horizontal   2
  3    0      0    0      3    3 3:3:3         yes yes        horizontal   3
  4    0      0    0      4    4 4:4:4         yes yes        horizontal   4
  5    0      0    0      5    5 5:5:5         yes yes        horizontal   5
  6    0      0    0      6    6 6:6:6         yes yes        horizontal   6
  7    0      0    0      7    7 7:7:7         yes yes        horizontal   7

The CPUs should be online after adding them to the system.

Other distros already have a udev rule to circumvent this under;
/etc/udev/rules.d/

The rule does a check if a newly added CPUs are configured but not online, then 
hotplugs it to make it online. If CPUs are NOT configured then they should stay 
offline.
 
Contact Information = [email protected]

** Affects: linux (Ubuntu)
     Importance: Undecided
     Assignee: Skipper Bug Screeners (skipper-screen-team)
         Status: New


** Tags: architecture-s39064 bugnameltc-208728 severity-low 
targetmilestone-inin---

** Tags added: architecture-s39064 bugnameltc-208728 severity-low
targetmilestone-inin---

** Changed in: ubuntu
     Assignee: (unassigned) => Skipper Bug Screeners (skipper-screen-team)

** Package changed: ubuntu => linux (Ubuntu)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2078347

Title:
  [UBUNTU 24.04] Udev/rules: Missing rules causes newly added CPUs to
  stay offline

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2078347/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to