Message ID | 20200217173452.15243-1-imammedo@redhat.com |
---|---|
Headers | show |
Series | refactor main RAM allocation to use hostmem backend | expand |
Patchew URL: https://patchew.org/QEMU/20200217173452.15243-1-imammedo@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [PATCH v5 00/79] refactor main RAM allocation to use hostmem backend Message-id: 20200217173452.15243-1-imammedo@redhat.com Type: series === TEST SCRIPT BEGIN === #!/bin/bash git rev-parse base > /dev/null || exit 0 git config --local diff.renamelimit 0 git config --local diff.renames True git config --local diff.algorithm histogram ./scripts/checkpatch.pl --mailback base.. === TEST SCRIPT END === Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384 From https://github.com/patchew-project/qemu * [new tag] patchew/20200217203734.18703-1-linux@roeck-us.net -> patchew/20200217203734.18703-1-linux@roeck-us.net Switched to a new branch 'test' ae79fd3 tests:numa-test: use explicit memdev to specify node RAM 06204f5 tests/numa-test: make top level args dynamic and g_autofree(cli) cleanups 9bab7ba hostmem: fix strict bind policy f5f2826 hostmem: introduce "prealloc-threads" property 00f806c make mem_path local variable 77aa301 exec: drop bogus mem_path from qemu_ram_alloc_from_fd() 645479c exec: cleanup qemu_minrampagesize()/qemu_maxrampagesize() a196f36 remove no longer used memory_region_allocate_system_memory() 5b4f6c8 sparc/niagara: use memdev for RAM 232dbaf sparc/sun4m: use memdev for RAM 2703398 sparc/leon3: use memdev for RAM bfdca1c ppc/virtex_ml507: use memdev for RAM 5d3fae5 ppc/spapr: use memdev for RAM 37756d6 ppc/{ppc440_bamboo, sam460ex}: use memdev for RAM d0744df ppc/{ppc440_bamboo, sam460ex}: drop RAM size fixup 4f44f1e ppc/ppc405_boards: use memdev for RAM a4c391c ppc/ppc405_boards: add RAM size checks 902998f ppc/pnv: use memdev for RAM 50aebc5 ppc/mac_oldworld: use memdev for RAM d1977f2 ppc/mac_newworld: use memdev for RAM aa567e1 ppc/e500: use memdev for RAM a018a92 ppc/e500: drop RAM size fixup ee1f59d mips/mips_r4k: use memdev for RAM 09c5a2a mips/mips_mipssim: use memdev for RAM 5d43531 mips/mips_malta: use memdev for RAM e074e55 mips/mips_jazz: add max ram size check 2ed9f97 mips/mips_jazz: use memdev for RAM d84d1c8 mips/mips_fulong2e: use memdev for RAM 3e1d49c mips/mips_fulong2e: drop RAM size fixup 52f47ea mips/boston: use memdev for RAM f5acaa4 m68k/next-cube: use memdev for RAM b4e9f6d m68k/mcf5208: use memdev for RAM 22bba18 m68k/q800: use memdev for RAM f59053b m68k/an5206: use memdev for RAM 4c253fe lm32/milkymist: use memdev for RAM b5eb224 lm32/lm32_boards: use memdev for RAM 217eba8 x86/pc: use memdev for RAM 7198205 x86/microvm: use memdev for RAM ba28142 hppa: use memdev for RAM ef6890c cris/axis_dev88: use memdev for RAM 839e6da null-machine: use memdev for RAM 058812e s390x/s390-virtio-ccw: use memdev for RAM f60ce98 arm/xlnx-zcu102: use memdev for RAM 7413187 arm/xlnx-versal-virt: use memdev for RAM 9dc7e1a arm/xilinx_zynq: use memdev for RAM 93ade06 arm/xilinx_zynq: drop RAM size fixup f7a4a9d arm/virt: use memdev for RAM 6338d4a arm/vexpress: use memdev for RAM 685cef7 arm/versatilepb: use memdev for RAM 4ffead4 arm/sbsa-ref: use memdev for RAM 07020c8 arm/raspi: use memdev for RAM d25a0f3 arm/sabrelite: use memdev for RAM 6784de1 arm/palm: use memdev for RAM 0097fd0 arm/omap_sx1: use memdev for RAM b3fb459 arm/nseries: use memdev for RAM d574f02 arm/musicpal: use memdev for RAM db4d4b5 arm/mps2: use memdev for RAM 75b0a20 arm/mps2-tz: use memdev for RAM 78f2a36 arm/mcimx7d-sabre: use memdev for RAM 7f7d800 arm/mcimx6ul-evk: use memdev for RAM e676979 arm/kzm: use memdev for RAM d679bf3 arm/kzm: drop RAM size fixup 6eae6e4 arm/integratorcp: use memdev for RAM 2862d21 arm/imx25_pdk: use memdev for RAM 638e121 arm/imx25_pdk: drop RAM size fixup 97380ec arm/highbank: use memdev for RAM df2e090 arm/digic_boards: use memdev for RAM c3b7af3 arm/cubieboard: use memdev for RAM dc58fe8 arm/collie: use memdev for RAM 26ff4ea arm/aspeed: use memdev for RAM c807c2d arm/aspeed: actually check RAM size 363d602 alpha/dp264: use memdev for RAM f8b117b vl.c: ensure that ram_size matches size of machine.memory-backend 6ecdd95 vl.c: move -m parsing after memory backends has been processed 39f9cfc initialize MachineState::ram in NUMA case 9f40209 machine: introduce convenience MachineState::ram b2ce5d3 machine: alias -mem-path and -mem-prealloc into memory-foo backend 896a0dc machine: introduce memory-backend property 18115fc numa: remove deprecated -mem-path fallback to anonymous RAM === OUTPUT BEGIN === 1/79 Checking commit 18115fc6fab3 (numa: remove deprecated -mem-path fallback to anonymous RAM) 2/79 Checking commit 896a0dccad5c (machine: introduce memory-backend property) 3/79 Checking commit b2ce5d3fecf9 (machine: alias -mem-path and -mem-prealloc into memory-foo backend) 4/79 Checking commit 9f40209ffc79 (machine: introduce convenience MachineState::ram) 5/79 Checking commit 39f9cfc53145 (initialize MachineState::ram in NUMA case) 6/79 Checking commit 6ecdd9593d8d (vl.c: move -m parsing after memory backends has been processed) 7/79 Checking commit f8b117bd9035 (vl.c: ensure that ram_size matches size of machine.memory-backend) 8/79 Checking commit 363d60235895 (alpha/dp264: use memdev for RAM) ERROR: spaces required around that '*' (ctx:WxV) #30: FILE: hw/alpha/alpha_sys.h:14: +PCIBus *typhoon_init(MemoryRegion *, ISABus **, qemu_irq *, AlphaCPU *[4], ^ total: 1 errors, 0 warnings, 49 lines checked Patch 8/79 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. 9/79 Checking commit c807c2d4ef9a (arm/aspeed: actually check RAM size) 10/79 Checking commit 26ff4ea3ad75 (arm/aspeed: use memdev for RAM) 11/79 Checking commit dc58fe8b3b6f (arm/collie: use memdev for RAM) 12/79 Checking commit c3b7af340f05 (arm/cubieboard: use memdev for RAM) 13/79 Checking commit df2e090ab9d7 (arm/digic_boards: use memdev for RAM) 14/79 Checking commit 97380ec58a73 (arm/highbank: use memdev for RAM) 15/79 Checking commit 638e121a7147 (arm/imx25_pdk: drop RAM size fixup) 16/79 Checking commit 2862d214c4ae (arm/imx25_pdk: use memdev for RAM) 17/79 Checking commit 6eae6e4d7be6 (arm/integratorcp: use memdev for RAM) 18/79 Checking commit d679bf37496f (arm/kzm: drop RAM size fixup) 19/79 Checking commit e676979b4fba (arm/kzm: use memdev for RAM) 20/79 Checking commit 7f7d8009d766 (arm/mcimx6ul-evk: use memdev for RAM) 21/79 Checking commit 78f2a36ff974 (arm/mcimx7d-sabre: use memdev for RAM) 22/79 Checking commit 75b0a208ab98 (arm/mps2-tz: use memdev for RAM) 23/79 Checking commit db4d4b573271 (arm/mps2: use memdev for RAM) 24/79 Checking commit d574f02e97de (arm/musicpal: use memdev for RAM) 25/79 Checking commit b3fb4594d916 (arm/nseries: use memdev for RAM) 26/79 Checking commit 0097fd0588d2 (arm/omap_sx1: use memdev for RAM) 27/79 Checking commit 6784de122e38 (arm/palm: use memdev for RAM) 28/79 Checking commit d25a0f3fc105 (arm/sabrelite: use memdev for RAM) 29/79 Checking commit 07020c85a317 (arm/raspi: use memdev for RAM) 30/79 Checking commit 4ffead478b83 (arm/sbsa-ref: use memdev for RAM) 31/79 Checking commit 685cef7cb5d4 (arm/versatilepb: use memdev for RAM) 32/79 Checking commit 6338d4ace4c1 (arm/vexpress: use memdev for RAM) 33/79 Checking commit f7a4a9dc2511 (arm/virt: use memdev for RAM) 34/79 Checking commit 93ade06459ed (arm/xilinx_zynq: drop RAM size fixup) 35/79 Checking commit 9dc7e1aef62c (arm/xilinx_zynq: use memdev for RAM) 36/79 Checking commit 7413187e091c (arm/xlnx-versal-virt: use memdev for RAM) 37/79 Checking commit f60ce9809eff (arm/xlnx-zcu102: use memdev for RAM) 38/79 Checking commit 058812ed343c (s390x/s390-virtio-ccw: use memdev for RAM) 39/79 Checking commit 839e6da50229 (null-machine: use memdev for RAM) 40/79 Checking commit ef6890c879ef (cris/axis_dev88: use memdev for RAM) 41/79 Checking commit ba281421e5af (hppa: use memdev for RAM) 42/79 Checking commit 719820521448 (x86/microvm: use memdev for RAM) 43/79 Checking commit 217eba8586ad (x86/pc: use memdev for RAM) 44/79 Checking commit b5eb224b7ccd (lm32/lm32_boards: use memdev for RAM) 45/79 Checking commit 4c253fe8b71e (lm32/milkymist: use memdev for RAM) 46/79 Checking commit f59053b0e26c (m68k/an5206: use memdev for RAM) 47/79 Checking commit 22bba182875f (m68k/q800: use memdev for RAM) 48/79 Checking commit b4e9f6da6630 (m68k/mcf5208: use memdev for RAM) 49/79 Checking commit f5acaa47c6b9 (m68k/next-cube: use memdev for RAM) 50/79 Checking commit 52f47ea4cfe9 (mips/boston: use memdev for RAM) 51/79 Checking commit 3e1d49c79397 (mips/mips_fulong2e: drop RAM size fixup) 52/79 Checking commit d84d1c8462af (mips/mips_fulong2e: use memdev for RAM) 53/79 Checking commit 2ed9f9769f3c (mips/mips_jazz: use memdev for RAM) 54/79 Checking commit e074e559753a (mips/mips_jazz: add max ram size check) 55/79 Checking commit 5d4353145b04 (mips/mips_malta: use memdev for RAM) 56/79 Checking commit 09c5a2ac20b1 (mips/mips_mipssim: use memdev for RAM) 57/79 Checking commit ee1f59dcc882 (mips/mips_r4k: use memdev for RAM) 58/79 Checking commit a018a92a7a29 (ppc/e500: drop RAM size fixup) 59/79 Checking commit aa567e147048 (ppc/e500: use memdev for RAM) 60/79 Checking commit d1977f268631 (ppc/mac_newworld: use memdev for RAM) 61/79 Checking commit 50aebc520f93 (ppc/mac_oldworld: use memdev for RAM) 62/79 Checking commit 902998f3417b (ppc/pnv: use memdev for RAM) 63/79 Checking commit a4c391c2a60a (ppc/ppc405_boards: add RAM size checks) 64/79 Checking commit 4f44f1e50408 (ppc/ppc405_boards: use memdev for RAM) 65/79 Checking commit d0744df8a90f (ppc/{ppc440_bamboo, sam460ex}: drop RAM size fixup) 66/79 Checking commit 37756d65c749 (ppc/{ppc440_bamboo, sam460ex}: use memdev for RAM) WARNING: Block comments use a leading /* on a separate line #50: FILE: hw/ppc/ppc4xx_devs.c:669: +/* Split RAM between SDRAM banks. total: 0 errors, 1 warnings, 103 lines checked Patch 66/79 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. 67/79 Checking commit 5d3fae5f6b6f (ppc/spapr: use memdev for RAM) 68/79 Checking commit bfdca1c99cde (ppc/virtex_ml507: use memdev for RAM) 69/79 Checking commit 2703398ed90c (sparc/leon3: use memdev for RAM) 70/79 Checking commit 232dbaf11b09 (sparc/sun4m: use memdev for RAM) 71/79 Checking commit 5b4f6c8d0827 (sparc/niagara: use memdev for RAM) 72/79 Checking commit a196f36732ef (remove no longer used memory_region_allocate_system_memory()) 73/79 Checking commit 645479c62da0 (exec: cleanup qemu_minrampagesize()/qemu_maxrampagesize()) 74/79 Checking commit 77aa30129bda (exec: drop bogus mem_path from qemu_ram_alloc_from_fd()) 75/79 Checking commit 00f806ce44ca (make mem_path local variable) 76/79 Checking commit f5f28260b424 (hostmem: introduce "prealloc-threads" property) 77/79 Checking commit 9bab7baf5c47 (hostmem: fix strict bind policy) 78/79 Checking commit 06204f5980b3 (tests/numa-test: make top level args dynamic and g_autofree(cli) cleanups) 79/79 Checking commit ae79fd309cdb (tests:numa-test: use explicit memdev to specify node RAM) === OUTPUT END === Test command exited with code: 1 The full log is available at http://patchew.org/logs/20200217173452.15243-1-imammedo@redhat.com/testing.checkpatch/?type=message. --- Email generated automatically by Patchew [https://patchew.org/]. Please send your feedback to patchew-devel@redhat.com
On Mon, 17 Feb 2020 12:44:57 -0800 (PST) no-reply@patchew.org wrote: > Patchew URL: https://patchew.org/QEMU/20200217173452.15243-1-imammedo@redhat.com/ > > > > Hi, > > This series seems to have some coding style problems. See output below for > more information: > [...] > 8/79 Checking commit 363d60235895 (alpha/dp264: use memdev for RAM) > ERROR: spaces required around that '*' (ctx:WxV) > #30: FILE: hw/alpha/alpha_sys.h:14: > +PCIBus *typhoon_init(MemoryRegion *, ISABus **, qemu_irq *, AlphaCPU *[4], > ^ false positive [...] > 66/79 Checking commit 37756d65c749 (ppc/{ppc440_bamboo, sam460ex}: use memdev for RAM) > WARNING: Block comments use a leading /* on a separate line > #50: FILE: hw/ppc/ppc4xx_devs.c:669: > +/* Split RAM between SDRAM banks. fixed up in v6 posted as reply to this patch [...]
On Mon, 17 Feb 2020 12:33:33 -0500 Igor Mammedov <imammedo@redhat.com> wrote: Paolo, Can you merge this via your tree if possible, pls? (You said that's about the time you'd be preparing pull req) > v5: > - pick up new Reviewed-by-s > - drop "ppc/prep: use memdev for RAM" since machine was removed > - add patch "mips/mips_jazz: add max ram size check" > - extend comment for "default_ram_id" to clarify that's setting it serves > as optin flag for -m support. [03/79] > - rebase "arm/raspi: use memdev for RAM" once more > > v4: > - pick up new Reviewed-by-s > - Fix access to uninitialized pagesize/hpsize in > "[PATCH REPOST v3 74/80] exec: cleanup qemu_minrampagesize()/qemu_maxrampagesize()" > - Make explicitly provided memory-backend work by using string property instead > of link so it would be possible to delay access to the backend to the time > when backends are initialized. > - added new patches to make explicit backend work nice with -m and do sanity > check on ram_size > 'vl.c: move -m parsing after memory backends has been processed' > 'vl.c: ensure that ram_size matches size of machine.memory-backend" > all this ram_size business needs cleanup too, but that's out of the scope > of this series. > - include m68k/q800 board into conversion > - drop patches that were merged through other trees > > v3: > - due to libvirt not being ready, postpone till 5.1 > * [PATCH v2 82/86] numa: forbid '-numa node, mem' for 5.0 and newer machine types > and depended > [PATCH v2 86/86] numa: remove deprecated implicit RAM distribution between nodes > - drop as not related "[PATCH v2 85/86] numa: make exit() usage consistent" > - drop "[PATCH v2 76/86] post conversion default_ram_id cleanup" > so that default memory-backedend won't be created for boards that do not care > about -m. Which makes -m optin feature. We should decide what do in case > board doesn't use -m (but that's out of scope of this series) > - use object_register_sugar_prop() instead of hacking compat props directly > - simplified/reworked aspeed patches > - s/RAM_ADDR_FMT/size_to_str()/ > - rename 'ram-memdev' property to 'memory-backend' > - minor fixes to numa-test > - fixes for issues noticed during review of > [PATCH v2 66/86] ppc/{ppc440_bamboo,sam460x}: drop RAM size fixup > > v2: > - fix compile errors on mingw32 host by introducing RAM_ADDR_UFMT [11/86] > - replace "[PATCH 43/86] hppa: drop RAM size fixup" with alternative > patches made by Philippe (which effectively do the same thing but other > way around) > - ppc440: fix crash and add suggested valid RAM size in error output. > s/ppc4xx_sdram_adjust/ppc4xx_sdram_prep/ and simplify it by removing > not necessary nested loop > - rebase on current master due to new conflicts > > > Series removes ad hoc RAM allocation API (memory_region_allocate_system_memory) > and consolidates it around hostmem backend. It allows to > * resolve conflicts between global -mem-prealloc and hostmem's "policy" option > fixing premature allocation before binding policy is applied > * simplify complicated memory allocation routines which had to deal with 2 ways > to allocate RAM. > * it allows to reuse hostmem backends of a choice for main RAM without adding > extra CLI options to duplicate hostmem features. > Recent case was -mem-shared, to enable vhost-user on targets that don't > support hostmem backends [1] (ex: s390) > * move RAM allocation from individual boards into generic machine code and > provide them with prepared MemoryRegion. > * clean up deprecated NUMA features which were tied to the old API (see patches) > - "numa: remove deprecated -mem-path fallback to anonymous RAM" > - (POSTPONED, waiting on libvirt side) "forbid '-numa node,mem' for 5.0 and newer machine types" > - (POSTPONED) "numa: remove deprecated implicit RAM distribution between nodes" > > Conversion introduces a new machine.memory-backend property and wrapper code that > aliases global -mem-path and -mem-alloc into automatically created hostmem > backend properties (provided memory-backend was not set explicitly given by user). > And then follows bulk of trivial patches that incrementally convert individual > boards to using machine.memory-backend provided MemoryRegion. > > Board conversion typically involves: > * providing MachineClass::default_ram_size and MachineClass::default_ram_id > so generic code could create default backend if user didn't explicitly provide > memory-backend or -m options > * dropping memory_region_allocate_system_memory() call > * using convenience MachineState::ram MemoryRegion, which points to MemoryRegion > allocated by ram-memdev > On top of that for some boards: > * added missing ram_size checks (typically it were boards with fixed ram size) > * ram_size fixups were replaced by checks and hard errors, forcing user to > provide correct "-m" values instead of ignoring it and continuing running. > > After all boards are converted the old API is removed and memory allocation > routines are cleaned up. > > git tree for testing: > https://github.com/imammedo/qemu convert_main_ram_to_memdev_v5 > > previous rev: > https://github.com/imammedo/qemu convert_main_ram_to_memdev_v4 > > CC: Paolo Bonzini <pbonzini@redhat.com> > [...]