Bug 1629720
| Summary: | [Intel 7.6 BUG][Crystal Ridge] pc_dimm_get_free_addr: assertion failed: (QEMU_ALIGN_UP(address_space_start, align) == address_space_start) | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Yumei Huang <yuhuang> | |
| Component: | qemu-kvm-rhev | Assignee: | David Hildenbrand <dhildenb> | |
| Status: | CLOSED ERRATA | QA Contact: | Yumei Huang <yuhuang> | |
| Severity: | high | Docs Contact: | ||
| Priority: | high | |||
| Version: | 7.6 | CC: | ailan, chayang, hhuang, jinzhao, juzhang, pagupta, plai, pragyansri.pathi, virt-maint, xuelian.guo | |
| Target Milestone: | rc | Keywords: | Regression | |
| Target Release: | --- | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | qemu-kvm-rhev-2.12.0-19.el7 | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1630116 (view as bug list) | Environment: | ||
| Last Closed: | 2019-08-22 09:18:53 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 1630116, 1649160, 1651787 | |||
|
Description
Yumei Huang
2018-09-17 12:05:02 UTC
It is introduced by commit '9837684316 hostmem-file: add "align" option'. Amnon: can you clarify how customers are affected by this problem? In the meanwhile, I'm lowering the severity and deferring it to 7.7 + 7.6.z, because I don't think this should block RHEL-7.6.
Below is the commit which introduced it:
commit 983768431676f9ab8599a0b4813e1ca17af70838
Author: Haozhong Zhang <haozhong.zhang>
Date: Mon Dec 11 15:28:04 2017 +0800
hostmem-file: add "align" option
When mmap(2) the backend files, QEMU uses the host page size
(getpagesize(2)) by default as the alignment of mapping address.
However, some backends may require alignments different than the page
size. For example, mmap a device DAX (e.g., /dev/dax0.0) on Linux
kernel 4.13 to an address, which is 4K-aligned but not 2M-aligned,
fails with a kernel message like
[617494.969768] dax dax0.0: qemu-system-x86: dax_mmap: fail, unaligned vma (0x7fa37c579000 - 0x7fa43c579000, 0x1fffff)
Because there is no common approach to get such alignment requirement,
we add the 'align' option to 'memory-backend-file', so that users or
management utils, which have enough knowledge about the backend, can
specify a proper alignment via this option.
Signed-off-by: Haozhong Zhang <haozhong.zhang>
Message-Id: <20171211072806.2812-2-haozhong.zhang>
Reviewed-by: Michael S. Tsirkin <mst>
Reviewed-by: Stefan Hajnoczi <stefanha>
[ehabkost: fixed typo, fixed error_setg() format string]
Signed-off-by: Eduardo Habkost <ehabkost>
Hello Yumei,
align=2G,4g is not supported value for x86. This check is to avoid guest physical memory fragmentation.
The assert is being changed in upstream[2] with a check which does not cause qemu to crash. It avoids Qemu from starting up with a message[1]. This change is part of memory device series which is committed in upstream qemu-kvm-3.0 onwards.
Thanks,
Pankaj
------------
[1] (qemu) qemu-system-x86_64: -device nvdimm,memdev=mem1,id=nv1: the alignment (080000000) is not supported
commit 4d8938a05db15dea2c86c4ab9c5f872f160d2188
Author: David Hildenbrand <david>
Date: Thu Jun 7 17:47:04 2018 +0200
memory-device: turn alignment assert into check
The start of the address space indicates which maximum alignment is
supported by our machine (e.g. ppc, x86 1GB). This is helpful to
catch fragmenting guest physical memory in strange fashions.
Right now we can crash QEMU by e.g. (there might be easier examples)
qemu-system-x86_64 -m 256M,maxmem=20G,slots=2 \
-object memory-backend-file,id=mem0,size=8192M,mem-path=/dev/zero,align=8192M \
-device pc-dimm,id=dimm1,memdev=mem0
Signed-off-by: David Hildenbrand <david>
Message-Id: <20180607154705.6316-2-david>
Reviewed-by: Michael S. Tsirkin <mst>
Reviewed-by: Igor Mammedov <imammedo>
Signed-off-by: Paolo Bonzini <pbonzini>
(In reply to pagupta from comment #5) > Hello Yumei, > > align=2G,4g is not supported value for x86. This check is to avoid guest > physical memory fragmentation. > The assert is being changed in upstream[2] with a check which does not cause > qemu to crash. It avoids Qemu from starting up with a message[1]. This > change is part of memory device series which is committed in upstream > qemu-kvm-3.0 onwards. Thanks for helping check in upstream. So the maximum value for align is 1G, and it works for both nvdimm and pc-dimm. > > Thanks, > Pankaj > > ------------ > [1] (qemu) qemu-system-x86_64: -device nvdimm,memdev=mem1,id=nv1: the > alignment (080000000) is not supported > > commit 4d8938a05db15dea2c86c4ab9c5f872f160d2188 > Author: David Hildenbrand <david> > Date: Thu Jun 7 17:47:04 2018 +0200 > > memory-device: turn alignment assert into check > > The start of the address space indicates which maximum alignment is > supported by our machine (e.g. ppc, x86 1GB). This is helpful to > catch fragmenting guest physical memory in strange fashions. > > Right now we can crash QEMU by e.g. (there might be easier examples) > > qemu-system-x86_64 -m 256M,maxmem=20G,slots=2 \ > -object > memory-backend-file,id=mem0,size=8192M,mem-path=/dev/zero,align=8192M \ > -device pc-dimm,id=dimm1,memdev=mem0 > > Signed-off-by: David Hildenbrand <david> > Message-Id: <20180607154705.6316-2-david> > Reviewed-by: Michael S. Tsirkin <mst> > Reviewed-by: Igor Mammedov <imammedo> > Signed-off-by: Paolo Bonzini <pbonzini> Fix included in qemu-kvm-rhev-2.12.0-19.el7 Verify: qemu-kvm-rhev-2.12.0-19.el7 Ran some negative tests for align option, gets corresponding error message, and no core dumped. # /usr/libexec/qemu-kvm -m 4G,slots=20,maxmem=50G -M pc,nvdimm -object memory-backend-file,id=mem1,size=2G,mem-path=/tmp/nvdimm1,share,align=2G -device nvdimm,memdev=mem1,id=nv1 qemu-kvm: -device nvdimm,memdev=mem1,id=nv1: the alignment (0x80000000) is not supported # /usr/libexec/qemu-kvm -m 4G,slots=20,maxmem=50G -M pc,nvdimm -object memory-backend-file,id=mem1,size=2G,mem-path=/tmp/nvdimm1,share,align=1.5G -device nvdimm,memdev=mem1,id=nv1 qemu-kvm: -object memory-backend-file,id=mem1,size=2G,mem-path=/tmp/nvdimm1,share,align=1.5G: alignment 0x60000000 must be a power of two # /usr/libexec/qemu-kvm -m 4G,slots=20,maxmem=50G -M pc,nvdimm -object memory-backend-file,id=mem1,size=2G,mem-path=/tmp/nvdimm1,share,align=8 -device nvdimm,memdev=mem1,id=nv1 qemu-kvm: -object memory-backend-file,id=mem1,size=2G,mem-path=/tmp/nvdimm1,share,align=8: alignment 0x8 must be multiples of page size 0x1000 # /usr/libexec/qemu-kvm -m 4G,slots=20,maxmem=50G -M pc,nvdimm -object memory-backend-file,id=mem1,size=2G,mem-path=/tmp/nvdimm1,share,align=-1 -device nvdimm,memdev=mem1,id=nv1 qemu-kvm: -object memory-backend-file,id=mem1,size=2G,mem-path=/tmp/nvdimm1,share,align=-1: Parameter 'align' expects a size value Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2019:2553 |