Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-92781

Memory hot plug udev rule is disabled for s390x

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: Generate New Ti...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • rhel-10.1, rhel-9.7
    • systemd
    • None
    • rhel-systemd
    • ssg_core_services
    • 2
    • False
    • False
    • Hide

      None

      Show
      None
    • Yes
    • None
    • None
    • None
    • Known Issue
    • Hide
      .Hot-plugged memory is not available to VMs running on IBM Z by default

      RHEL provides default udev rules that automatically configure memory onlining when you hot plug memory to virtual machines (VMs) with `virtio-mem`. However, current udev rules do not include VMs running on IBM Z. As a consequence, after hot-plugging memory to VMs running on IBM Z with `virtio-mem`, the memory is not immediately available in the VM.

      To work around this problem, set the `memhp_default_state=online` kernel parameter in the VM and reboot it. For example:

      [subs="+quotes,attributes"]
      ----
      # *grubby --update-kernel=ALL --args=memhp_default_state=online*
      ----

      As a result, the hot-plugged memory is available in the VM.
      Show
      .Hot-plugged memory is not available to VMs running on IBM Z by default RHEL provides default udev rules that automatically configure memory onlining when you hot plug memory to virtual machines (VMs) with `virtio-mem`. However, current udev rules do not include VMs running on IBM Z. As a consequence, after hot-plugging memory to VMs running on IBM Z with `virtio-mem`, the memory is not immediately available in the VM. To work around this problem, set the `memhp_default_state=online` kernel parameter in the VM and reboot it. For example: [subs="+quotes,attributes"] ---- # *grubby --update-kernel=ALL --args=memhp_default_state=online* ---- As a result, the hot-plugged memory is available in the VM.
    • Done
    • Unspecified
    • Unspecified
    • Unspecified
    • s390x
    • None

      What were you trying to do that didn't work?

      1. For rhel10,  in /lib/udev/rules.d/40-redhat-hotplug.rules, memory hotplug rule is disabled for s390x:
      #Memory hotadd request
      SUBSYSTEM!="memory", GOTO="memory_hotplug_end"
      ACTION!="add", GOTO="memory_hotplug_end"
      CONST{arch}=="s390*", GOTO="memory_hotplug_end"

            2. For rhel9.7,  in /lib/udev/rules.d/40-redhat.rules, memory hotplug rule is disabled for s390x:

      #Memory hotadd request
      SUBSYSTEM!="memory", GOTO="memory_hotplug_end"
      ACTION!="add", GOTO="memory_hotplug_end"
      CONST{arch}=="s390*", GOTO="memory_hotplug_end"

       

      So if hotplug a virtio-mem to guest, the hotplug memory is offline:
      # lsmem
      RANGE                                 SIZE   STATE REMOVABLE BLOCK
      0x0000000000000000-0x000000003fffffff   1G  online       yes   0-7
      0x0000000040000000-0x000000007fffffff   1G offline            8-15

       

      Please provide the package NVR for which the bug is seen:

      for rhel9.7: 

      # rpm -q systemd
      systemd-252-53.el9.s390x

      for rhel10.1:

      # rpm -q systemd
      systemd-257-11.el10.s390x

      How reproducible is this bug?: 100%

      Steps to reproduce

      1.  Start a domain with below xml:
        <maxMemory unit='KiB'>10485760</maxMemory>
          <memory unit='KiB'>1048576</memory>
          <currentMemory unit='KiB'>1048576</currentMemory>
      2. Hot plug a virtio-mem memory device to the guest:
      # cat virtio-mem.xml 
      <memory model='virtio-mem'>
          <target>
            <size unit='KiB'>2097152</size>
            <block unit='KiB'>1024</block>
            <requested unit='KiB'>1048576</requested>
          </target>
        </memory>
      
      
      # virsh attach-device avocado-vt-vm1 virtio-mem.xml
      Device attached successfully

            3. Check the domain config xml for virtio-mem device:

      # virsh dumpxml avocado-vt-vm1 --xpath //devices/memory
      <memory model="virtio-mem">
        <target>
          <size unit="KiB">2097152</size>
          <block unit="KiB">1024</block>
          <requested unit="KiB">1048576</requested>
          <current unit="KiB">1048576</current>
          <address base="0x40000000"/>
        </target>
        <alias name="virtiomem0"/>
        <address type="ccw" cssid="0xfe" ssid="0x0" devno="0x0009"/>
      </memory>

            4. Check memory info by cmd lsmem in guest, and find out newly hotplug memory is offline. 

      # lsmem
      RANGE                                 SIZE   STATE REMOVABLE BLOCK
      0x0000000000000000-0x000000003fffffff   1G  online       yes   0-7
      0x0000000040000000-0x000000007fffffff   1G offline            8-15
      Memory block size:       128M
      Total online memory:       1G
      Total offline memory:      1G
      

       

      Expected results

      Hotplug memory should be online

      Actual results

      Hotplug memory is offline

       

      Additional info:

      If comment out the line in udev rule file like below:
      #CONST{arch}=="s390*", GOTO="memory_hotplug_end"

      Then the hotplug memory could be online.

              systemd-maint systemd maint mailing list
              lcong@redhat.com Liang Cong
              Lukáš Nykrýn
              systemd maint mailing list systemd maint mailing list
              Frantisek Sumsal Frantisek Sumsal
              Daniel Vozenilek Daniel Vozenilek
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated: