Lines Matching +full:low +full:- +full:g

11 # SPDX-License-Identifier: GPL-2.0-or-later
23 # first, lets test some 32-bit processors.
24 # for all 32-bit cases, pci64_hole_size is 0.
36 Note that 64-bit pci hole size is 0 in this case. If maxmem is set to
37 59.6G, QEMU should fail to start with a message "phy-bits are too low".
38 If maxmem is set to 59.5G with all other QEMU parameters identical, QEMU
41 self.vm.add_args('-S', '-machine', 'q35', '-m',
42 '512,slots=1,maxmem=59.6G',
43 '-cpu', 'pentium,pse36=on', '-display', 'none',
44 '-object', 'memory-backend-ram,id=mem1,size=1G',
45 '-device', 'pc-dimm,id=vm0,memdev=mem1')
50 self.assertRegex(self.vm.get_log(), r'phys-bits too low')
58 self.vm.add_args('-S', '-machine', 'q35', '-m',
59 '512,slots=1,maxmem=59.6G',
60 '-cpu', 'pentium,pae=on', '-display', 'none',
61 '-object', 'memory-backend-ram,id=mem1,size=1G',
62 '-device', 'pc-dimm,id=vm0,memdev=mem1')
67 self.assertRegex(self.vm.get_log(), r'phys-bits too low')
71 Setting maxmem to 59.5G and making sure that QEMU can start with the
74 self.vm.add_args('-machine', 'q35', '-m',
75 '512,slots=1,maxmem=59.5G',
76 '-cpu', 'pentium,pse36=on', '-display', 'none',
77 '-object', 'memory-backend-ram,id=mem1,size=1G',
78 '-device', 'pc-dimm,id=vm0,memdev=mem1')
83 self.assertNotRegex(self.vm.get_log(), r'phys-bits too low')
88 Setting maxmem to 59.5G and making sure that QEMU can start fine
91 self.vm.add_args('-machine', 'q35', '-m',
92 '512,slots=1,maxmem=59.5G',
93 '-cpu', 'pentium,pae=on', '-display', 'none',
94 '-object', 'memory-backend-ram,id=mem1,size=1G',
95 '-device', 'pc-dimm,id=vm0,memdev=mem1')
100 self.assertNotRegex(self.vm.get_log(), r'phys-bits too low')
107 self.vm.add_args('-machine', 'q35', '-m',
108 '512,slots=1,maxmem=59.5G',
109 '-cpu', 'pentium2', '-display', 'none',
110 '-object', 'memory-backend-ram,id=mem1,size=1G',
111 '-device', 'pc-dimm,id=vm0,memdev=mem1')
116 self.assertNotRegex(self.vm.get_log(), r'phys-bits too low')
122 4 GiB should make QEMU fail to start with "phys-bits too low"
126 self.vm.add_args('-S', '-machine', 'q35', '-m',
127 '512,slots=1,maxmem=4G',
128 '-cpu', 'pentium', '-display', 'none',
129 '-object', 'memory-backend-ram,id=mem1,size=1G',
130 '-device', 'pc-dimm,id=vm0,memdev=mem1')
135 self.assertRegex(self.vm.get_log(), r'phys-bits too low')
137 # now lets test some 64-bit CPU cases.
141 1024 GiB and ends at 1 TiB - 1. If the max GPA falls in this range,
144 For q35-7.0 machines, "above 4G" memory starts are 4G.
149 1024 GiB - 4 GiB - 1 GiB per slot for alignment - 32 GiB + 0.5 GiB
153 self.vm.add_args('-S', '-machine', 'pc-q35-7.0', '-m',
154 '512,slots=1,maxmem=988G',
155 '-display', 'none',
156 '-object', 'memory-backend-ram,id=mem1,size=1G',
157 '-device', 'pc-dimm,id=vm0,memdev=mem1')
162 self.assertRegex(self.vm.get_log(), r'phys-bits too low')
173 self.vm.add_args('-S', '-machine', 'pc-q35-7.1', '-m',
174 '512,slots=1,maxmem=976G',
175 '-display', 'none',
176 '-object', 'memory-backend-ram,id=mem1,size=1G',
177 '-device', 'pc-dimm,id=vm0,memdev=mem1')
182 self.assertRegex(self.vm.get_log(), r'phys-bits too low')
186 Same as q35-7.0 AMD case except that here we check that QEMU can
187 successfully start when maxmem is < 988G.
189 self.vm.add_args('-S', '-machine', 'pc-q35-7.0', '-m',
190 '512,slots=1,maxmem=987.5G',
191 '-display', 'none',
192 '-object', 'memory-backend-ram,id=mem1,size=1G',
193 '-device', 'pc-dimm,id=vm0,memdev=mem1')
198 self.assertNotRegex(self.vm.get_log(), r'phys-bits too low')
202 Same as q35-7.1 AMD case except that here we check that QEMU can
203 successfully start when maxmem is < 976G.
205 self.vm.add_args('-S', '-machine', 'pc-q35-7.1', '-m',
206 '512,slots=1,maxmem=975.5G',
207 '-display', 'none',
208 '-object', 'memory-backend-ram,id=mem1,size=1G',
209 '-device', 'pc-dimm,id=vm0,memdev=mem1')
214 self.assertNotRegex(self.vm.get_log(), r'phys-bits too low')
220 "above_4G" memory starts at 4G.
222 self.vm.add_args('-S', '-cpu', 'Skylake-Server',
223 '-machine', 'pc-q35-7.1', '-m',
224 '512,slots=1,maxmem=976G',
225 '-display', 'none',
226 '-object', 'memory-backend-ram,id=mem1,size=1G',
227 '-device', 'pc-dimm,id=vm0,memdev=mem1')
232 self.assertNotRegex(self.vm.get_log(), r'phys-bits too low')
237 By setting maxram above 1012 GiB - 32 GiB - 4 GiB = 976 GiB, we can
238 force "above_4G" memory to start at 1 TiB for q35-7.1 machines
242 GiB with 1 GiB per slot for alignment and 0.5 GiB as non-hotplug
243 memory for the VM (1024 - 32 - 1 + 0.5). With 992 GiB, QEMU should
246 self.vm.add_args('-S', '-cpu', 'EPYC-v4,phys-bits=41',
247 '-machine', 'pc-q35-7.1', '-m',
248 '512,slots=1,maxmem=992G',
249 '-display', 'none',
250 '-object', 'memory-backend-ram,id=mem1,size=1G',
251 '-device', 'pc-dimm,id=vm0,memdev=mem1')
256 self.assertRegex(self.vm.get_log(), r'phys-bits too low')
264 self.vm.add_args('-S', '-cpu', 'EPYC-v4,phys-bits=41',
265 '-machine', 'pc-q35-7.1', '-m',
266 '512,slots=1,maxmem=990G',
267 '-display', 'none',
268 '-object', 'memory-backend-ram,id=mem1,size=1G',
269 '-device', 'pc-dimm,id=vm0,memdev=mem1')
274 self.assertNotRegex(self.vm.get_log(), r'phys-bits too low')
279 of cxl window memory. 4G_mem end aligns at 4G. pci64_hole is 32 GiB and
284 self.vm.add_args('-S', '-cpu', 'Skylake-Server,phys-bits=40',
285 '-machine', 'q35,cxl=on', '-m',
286 '512,slots=1,maxmem=987G',
287 '-display', 'none',
288 '-device', 'pxb-cxl,bus_nr=12,bus=pcie.0,id=cxl.1',
289 '-M', 'cxl-fmw.0.targets.0=cxl.1,cxl-fmw.0.size=1G')
294 self.assertRegex(self.vm.get_log(), r'phys-bits too low')
302 self.vm.add_args('-S', '-cpu', 'Skylake-Server,phys-bits=40',
303 '-machine', 'q35,cxl=on', '-m',
304 '512,slots=1,maxmem=987G',
305 '-display', 'none',
306 '-device', 'pxb-cxl,bus_nr=12,bus=pcie.0,id=cxl.1')
311 self.assertNotRegex(self.vm.get_log(), r'phys-bits too low')