RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1477459 - There wasn't any warnings when pc-dimm's slot exceeded 32.
Summary: There wasn't any warnings when pc-dimm's slot exceeded 32.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm
Version: 7.4-Alt
Hardware: ppc64le
OS: Linux
medium
medium
Target Milestone: rc
: 7.4-Alt
Assignee: Laurent Vivier
QA Contact: Min Deng
URL:
Whiteboard:
Depends On:
Blocks: 1440030
TreeView+ depends on / blocked
 
Reported: 2017-08-02 07:27 UTC by Min Deng
Modified: 2017-08-10 05:56 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-10 05:49:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
IBM Linux Technology Center 157333 0 None None None 2017-08-06 10:36:14 UTC

Description Min Deng 2017-08-02 07:27:21 UTC
Description of problem:
There is wasn't any warnings when pc-dimm's slot exceeded 32.

Version-Release number of selected component (if applicable):
kernel-4.11.0-14.el7a.ppc64le - host
kernel-4.11.0-16.el7a.ppc64le - guest
qemu-kvm-2.9.0-18.el7a.ppc64le

How reproducible:
3/3

Steps to Reproduce:
1.boot up guest with cli
  /usr/libexec/qemu-kvm -name mdeng -sandbox off -machine pseries-rhel7.4.0 -nodefaults -vga none -chardev socket,id=serial_id_serial0,path=/tmp/tt,server,nowait -device spapr-vty,reg=0x30000000,chardev=serial_id_serial0 -device nec-usb-xhci,id=usb1,bus=pci.0,addr=0x3 -device virtio-scsi-pci,id=virtio_scsi_pci0,bus=pci.0,addr=0x4 -drive id=drive_image1,if=none,snapshot=off,aio=native,cache=none,format=qcow2,file=memory.qcow2 -device scsi-hd,id=image1,drive=drive_image1 -device virtio-net-pci,mac=9a:2b:2c:2d:2e:2f,id=id6b5tKj,vectors=4,netdev=idXB7qte,bus=pci.0,addr=0x5 -netdev tap,id=idXB7qte,vhost=on,script=/etc/qemu-ifup,downscript=/etc/qemu-down,id=hostnet1 -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 -vnc :11 -rtc base=utc,clock=host -enable-kvm -monitor stdio -qmp tcp:0:4441,server,nowait -smp 8 -m 4,slots=256,maxmem=8G
2.
  (qemu) object_add memory-backend-ram,id=mem1,size=1G
  (qemu) device_add pc-dimm,id=dimm1,memdev=mem1,slot=35
3.

Actual results:
There wasn't any warnings though it seemed guest still was running well.

Expected results:
There should be some warnings since it was only supported 32 slots on Power platform so far.

Additional info:

Comment 1 Min Deng 2017-08-02 07:30:14 UTC
It also can be reproduced on P8 + RHEL7.4,thanks.

Comment 2 Laurent Vivier 2017-08-02 10:43:36 UTC
The limit is not 32 anymore (except for TCG), the limit is given by KVM:

hw/ppc/spapr.c:
2091 static void ppc_spapr_init(MachineState *machine)
...
2214     if (machine->ram_size < machine->maxram_size) {
2215         ram_addr_t hotplug_mem_size = machine->maxram_size - machine->ram_size;
2216         /*
2217          * Limit the number of hotpluggable memory slots to half the number
2218          * slots that KVM supports, leaving the other half for PCI and other
2219          * devices. However ensure that number of slots doesn't drop below 32.
2220          */
2221         int max_memslots = kvm_enabled() ? kvm_get_max_memslots() / 2 :
2222                            SPAPR_MAX_RAM_SLOTS;

include/hw/ppc/spapr.h:

    649 /*
    650  * This defines the maximum number of DIMM slots we can have for sPAPR
    651  * guest. This is not defined by sPAPR but we are defining it to 32 slots
    652  * based on default number of slots provided by PowerPC kernel.
    653  */
    654 #define SPAPR_MAX_RAM_SLOTS     32

From kernel:

arch/powerpc/kvm/powerpc.c:
    486 int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
    487 {
...
    606         case KVM_CAP_NR_MEMSLOTS:
    607                 r = KVM_USER_MEM_SLOTS;
    608                 break;

arch/powerpc/include/asm/kvm_host.h:

     38 
     39 #define KVM_MAX_VCPUS           NR_CPUS
     40 #define KVM_MAX_VCORES          NR_CPUS
     41 #define KVM_USER_MEM_SLOTS      512
     42 

So the limit is KVM_USER_MEM_SLOTS / 2 = 256

Comment 3 David Gibson 2017-08-03 01:22:20 UTC
Right, we basically allow more than we used to.

Is the 32 slot limit documented somewhere?  In that case possibly we should update the documentation.


Note You need to log in before you can comment on or make changes to this bug.