Re: [PATCH v2 16/22] qemu-iotests/199: change discard patterns

2020-02-19 Thread Andrey Shinkevich
On 19/02/2020 17:33, Andrey Shinkevich wrote: On 17/02/2020 18:02, Vladimir Sementsov-Ogievskiy wrote: iotest 40 works too long because of many discard opertion. On the same operations At the same time time, postcopy period is very short, in spite of all these efforts. So, let's use less

Re: [PATCH] iotests: Fix nonportable use of od --endian

2020-02-19 Thread Eric Blake
On 2/19/20 8:41 AM, Eric Blake wrote: Tests 261 and 272 fail on RHEL 7 with coreutils 8.22, since od --endian was not added until coreutils 8.23. Fix this by manually constructing the final value one byte at a time. Fixes: fc8ba423 Reported-by: Andrey Shinkevich Signed-off-by: Eric Blake ---

[PATCH v2] pcie_root_port: Add enable_hotplug option

2020-02-19 Thread Julia Suvorova
Make hot-plug/hot-unplug on PCIe Root Ports optional to allow libvirt manage it and restrict unplug for the whole machine. This is going to prevent user-initiated unplug in guests (Windows mostly). Hotplug is enabled by default. Usage: -device pcie-root-port,enable-hotplug=false,... If you wan

Re: [PATCH v2 17/22] qemu-iotests/199: increase postcopy period

2020-02-19 Thread Andrey Shinkevich
On 17/02/2020 18:02, Vladimir Sementsov-Ogievskiy wrote: Test wants force bitmap postcopy. Still, resulting postcopy period is very small. Let's increase it by adding more bitmaps to migrate. Also, test disabled bitmaps migration. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iot

Re: [PATCH v2 00/22] Fix error handling during bitmap postcopy

2020-02-19 Thread Eric Blake
On 2/19/20 7:52 AM, Andrey Shinkevich wrote: +od: unrecognized option '--endian=big' +Try 'od --help' for more information. +od: invalid -N argument '--endian=big' Yay, same problem for both tests.  Fix common.rc once, and both tests should start working for you. Thank you Eric! I want to s

Re: [PATCH v5 2/4] vl: Initialise main loop earlier

2020-02-19 Thread Kevin Wolf
Am 19.02.2020 um 15:07 hat Wolfgang Bumiller geschrieben: > On Tue, Feb 18, 2020 at 04:40:34PM +0100, Kevin Wolf wrote: > > We want to be able to use qemu_aio_context in the monitor > > initialisation. > > > > Signed-off-by: Kevin Wolf > > Reviewed-by: Marc-André Lureau > > Reviewed-by: Markus A

Re: [PATCH v2] pcie_root_port: Add enable_hotplug option

2020-02-19 Thread Ján Tomko
On Wed, Feb 19, 2020 at 03:55:40PM +0100, Julia Suvorova wrote: Make hot-plug/hot-unplug on PCIe Root Ports optional to allow libvirt manage it and restrict unplug for the whole machine. This is going to prevent user-initiated unplug in guests (Windows mostly). Hotplug is enabled by default. Usag

Re: [PATCH v2 1/2] docs: Convert qemu-cpu-models.texi to rST

2020-02-19 Thread Kashyap Chamarthy
On Wed, Feb 19, 2020 at 01:16:11PM +, Peter Maydell wrote: > On Wed, 19 Feb 2020 at 11:46, Kashyap Chamarthy wrote: [...] > > docs/qemu-cpu-models.texi | 677 > > docs/system/index.rst | 1 + > > docs/system/qemu-cpu-models.rst | 496 ++

Re: [PATCH v4 3/4] qmp: Move dispatcher to a coroutine

2020-02-19 Thread Kevin Wolf
Am 19.02.2020 um 15:21 hat Markus Armbruster geschrieben: > I think we need to talk about AioContext in qapi-code-gen.txt. PATCH 1 > now adds > > Member 'coroutine' tells the QMP dispatcher whether the command handler > is safe to be run in a coroutine. It defaults to false. If it is true,

Re: [PATCH v2 05/22] migration/block-dirty-bitmap: refactor state global variables

2020-02-19 Thread Vladimir Sementsov-Ogievskiy
18.02.2020 16:05, Andrey Shinkevich wrote: On 17/02/2020 18:02, Vladimir Sementsov-Ogievskiy wrote: Move all state variables into one global struct. Reduce global variable usage, utilizing opaque pointer where possible. Signed-off-by: Vladimir Sementsov-Ogievskiy ---   migration/block-dirty-

Re: [PATCH v2 07/22] migration/block-dirty-bitmap: simplify dirty_bitmap_load_complete

2020-02-19 Thread Vladimir Sementsov-Ogievskiy
18.02.2020 17:26, Andrey Shinkevich wrote: On 17/02/2020 18:02, Vladimir Sementsov-Ogievskiy wrote: bdrv_enable_dirty_bitmap_locked() call does nothing, as if we are in postcopy, bitmap successor must be enabled, and reclaim operation will enable the bitmap. So, actually we need just call _recl

Re: [PATCH v2 09/22] migration/block-dirty-bitmap: relax error handling in incoming part

2020-02-19 Thread Vladimir Sementsov-Ogievskiy
18.02.2020 21:54, Andrey Shinkevich wrote: On 17/02/2020 18:02, Vladimir Sementsov-Ogievskiy wrote: Bitmaps data is not critical, and we should not fail the migration (or use postcopy recovering) because of dirty-bitmaps migration failure. Instead we should just lose unfinished bitmaps. Still

Re: [RFC PATCH v2] target/ppc: Enable hardfloat for PPC

2020-02-19 Thread BALATON Zoltan
Hello, On Tue, 18 Feb 2020, Programmingkid wrote: On Feb 18, 2020, at 12:10 PM, BALATON Zoltan wrote: While other targets take advantage of using host FPU to do floating point computations, this was disabled for PPC target because always clearing exception flags before every FP op made it sligh

Re: [PATCH v2 14/22] qemu-iotests/199: better catch postcopy time

2020-02-19 Thread Vladimir Sementsov-Ogievskiy
19.02.2020 16:16, Andrey Shinkevich wrote: On 17/02/2020 18:02, Vladimir Sementsov-Ogievskiy wrote: The test aims to test _postcopy_ migration, and wants to do some write operations during postcopy time. Test considers migrate status=complete event on source as start of postcopy. This is comple

Re: [PATCH v2 16/22] qemu-iotests/199: change discard patterns

2020-02-19 Thread Vladimir Sementsov-Ogievskiy
19.02.2020 17:33, Andrey Shinkevich wrote: On 17/02/2020 18:02, Vladimir Sementsov-Ogievskiy wrote: iotest 40 works too long because of many discard opertion. On the same operations At the same time time, postcopy period is very short, in spite of all these efforts. So, let's use less disca

Re: [PATCH v3 2/4] luks: implement .bdrv_measure()

2020-02-19 Thread Max Reitz
On 11.02.20 17:03, Stefan Hajnoczi wrote: > Add qemu-img measure support in the "luks" block driver. > > Signed-off-by: Stefan Hajnoczi > --- > block/crypto.c | 62 ++ > 1 file changed, 62 insertions(+) > > diff --git a/block/crypto.c b/block/cryp

Re: [PATCH v3 3/4] qemu-img: allow qemu-img measure --object without a filename

2020-02-19 Thread Max Reitz
On 11.02.20 17:03, Stefan Hajnoczi wrote: > In most qemu-img sub-commands the --object option only makes sense when > there is a filename. qemu-img measure is an exception because objects > may be referenced from the image creation options instead of an existing > image file. Allow --object witho

RE: [EXTERNAL] Re: [PATCH] WHPX: Assigning maintainer for Windows Hypervisor Platform

2020-02-19 Thread Justin Terry (SF)
Ha yes. LGTM Thanks! Reviewed-by: Justin Terry (VM) > -Original Message- > From: Philippe Mathieu-Daudé > Sent: Wednesday, February 19, 2020 12:32 AM > To: Justin Terry (SF) ; Sunil Muthuswamy > ; Eduardo Habkost ; > Paolo Bonzini ; Richard Henderson > > Cc: Stefan Weil ; qemu-devel@no

Re: [PATCH v3 4/4] iotests: add 282 luks qemu-img measure test

2020-02-19 Thread Max Reitz
On 11.02.20 17:03, Stefan Hajnoczi wrote: > This test exercises the block/crypto.c "luks" block driver > .bdrv_measure() code. > > Signed-off-by: Stefan Hajnoczi > --- > tests/qemu-iotests/282 | 93 ++ > tests/qemu-iotests/282.out | 30 > test

Re: Race condition in overlayed qcow2?

2020-02-19 Thread Vladimir Sementsov-Ogievskiy
19.02.2020 17:32, dovgaluk wrote: Hi! I encountered a problem with record/replay of QEMU execution and figured out the following, when QEMU is started with one virtual disk connected to the qcow2 image with applied 'snapshot' option. The patch d710cf575ad5fb3ab329204620de45bfe50caa53 "block/q

[PATCH v6 01/79] numa: remove deprecated -mem-path fallback to anonymous RAM

2020-02-19 Thread Igor Mammedov
it has been deprecated since 4.0 by commit cb79224b7 (deprecate -mem-path fallback to anonymous RAM) Deprecation period ran out and it's time to remove it so it won't get in a way of switching to using hostmem backend for RAM. Signed-off-by: Igor Mammedov Reviewed-by: Richard Henderson --- CC:l

[PATCH v6 05/79] initialize MachineState::ram in NUMA case

2020-02-19 Thread Igor Mammedov
In case of NUMA there are 2 cases to consider: 1. '-numa node,memdev', the only one that will be available for 5.0 and newer machine types. In this case reuse current behavior, with only difference memdevs are put into MachineState::ram container + a temporary glue to keep memory_

[PATCH v6 02/79] machine: introduce memory-backend property

2020-02-19 Thread Igor Mammedov
Property will contain link to memory backend that will be used for backing initial RAM. Follow up commit will alias -mem-path and -mem-prealloc CLI options into memory backend options to make memory handling consistent (using only hostmem backend family for guest RAM allocation). Signed-off-by: Ig

[PATCH v6 08/79] alpha/dp264: use memdev for RAM

2020-02-19 Thread Igor Mammedov
memory_region_allocate_system_memory() API is going away, so replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and using MachineState::ram instead of manually initializi

[PATCH v6 06/79] vl.c: move -m parsing after memory backends has been processed

2020-02-19 Thread Igor Mammedov
It will be possible for main RAM to come from memory-backend and we should check that size specified in -m matches the size of the backend and [MachineState::]ram_size also matches backend's size. However -m parsing (set_memory_options()) happens before backends are intialized (object_create_delay

[PATCH v6 00/79] refactor main RAM allocation to use hostmem backend

2020-02-19 Thread Igor Mammedov
v6: - put back arm_boot_info::ram_size initialization removed by mistake in 'arm/collie: use memdev for RAM' and 'arm/palm: use memdev for RAM' patches - 'arm/xilinx_zynq: drop RAM size fixup', use GiB instead of hex numbers to make code/error message more readable - do not mention 'f

[PATCH v6 12/79] arm/cubieboard: use memdev for RAM

2020-02-19 Thread Igor Mammedov
memory_region_allocate_system_memory() API is going away, so replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and using MachineState::ram instead of manually initializi

[PATCH v6 14/79] arm/highbank: use memdev for RAM

2020-02-19 Thread Igor Mammedov
memory_region_allocate_system_memory() API is going away, so replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and using MachineState::ram instead of manually initializi

[PATCH v6 16/79] arm/imx25_pdk: use memdev for RAM

2020-02-19 Thread Igor Mammedov
memory_region_allocate_system_memory() API is going away, so replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and using MachineState::ram instead of manually initializi

[PATCH v6 04/79] machine: introduce convenience MachineState::ram

2020-02-19 Thread Igor Mammedov
the new field will be used by boards to get access to main RAM memory region and will help to save boiler plate in boards which often introduce a field or variable just for this purpose. Memory region will be equivalent to what currently used memory_region_allocate_system_memory() is returning apa

[PATCH v6 07/79] vl.c: ensure that ram_size matches size of machine.memory-backend

2020-02-19 Thread Igor Mammedov
Extend set_memory_options() to check that size specified by -m matches the size of backend pointed by memory-backend. And in case of -m was omitted adjust ram_size to match that of explicitly provided backend. Signed-off-by: Igor Mammedov --- CC: pbonz...@redhat.com --- vl.c | 15 +++

[PATCH v6 17/79] arm/integratorcp: use memdev for RAM

2020-02-19 Thread Igor Mammedov
memory_region_allocate_system_memory() API is going away, so replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and using MachineState::ram instead of manually initializi

[PATCH v6 10/79] arm/aspeed: use memdev for RAM

2020-02-19 Thread Igor Mammedov
memory_region_allocate_system_memory() API is going away, so replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and using MachineState::ram instead of manually initializi

[PATCH v6 03/79] machine: alias -mem-path and -mem-prealloc into memory-foo backend

2020-02-19 Thread Igor Mammedov
Allow machine to opt in for hostmem backend based initial RAM even if user uses old -mem-path/prealloc options by providing MachineClass::default_ram_id Follow up patches will incrementally convert machines to new API, by dropping memory_region_allocate_system_memory() and setting default_ram_id

[PATCH v6 19/79] arm/kzm: use memdev for RAM

2020-02-19 Thread Igor Mammedov
memory_region_allocate_system_memory() API is going away, so replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and using MachineState::ram instead of manually initializi

[PATCH v6 15/79] arm/imx25_pdk: drop RAM size fixup

2020-02-19 Thread Igor Mammedov
If user provided non-sense RAM size, board will complain and continue running with max RAM size supported. Also RAM is going to be allocated by generic code, so it won't be possible for board to fix things up for user. Make it error message and exit to force user fix CLI, instead of accepting non-

[PATCH v6 09/79] arm/aspeed: actually check RAM size

2020-02-19 Thread Igor Mammedov
It's supposed that SOC will check if "-m" provided RAM size is valid by setting "ram-size" property and then board would read back valid (possibly corrected value) to map RAM MemoryReging with valid size. It isn't doing so, since check is called only indirectly from aspeed_sdmc_reset()->asc->comp

[PATCH v6 18/79] arm/kzm: drop RAM size fixup

2020-02-19 Thread Igor Mammedov
If the user provided too large a RAM size, the code used to complain and trim it to the max size. Now that RAM is allocated by generic code, that's no longer possible, so generate an error and exit instead. Signed-off-by: Igor Mammedov Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Peter Chub

[PATCH v6 22/79] arm/mps2-tz: use memdev for RAM

2020-02-19 Thread Igor Mammedov
memory_region_allocate_system_memory() API is going away, so replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and using MachineState::ram instead of manually initializi

[PATCH v6 26/79] arm/omap_sx1: use memdev for RAM

2020-02-19 Thread Igor Mammedov
memory_region_allocate_system_memory() API is going away, so replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and using MachineState::ram instead of manually initializi

[PATCH v6 21/79] arm/mcimx7d-sabre: use memdev for RAM

2020-02-19 Thread Igor Mammedov
memory_region_allocate_system_memory() API is going away, so replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and using MachineState::ram instead of manually initializi

[PATCH v6 25/79] arm/nseries: use memdev for RAM

2020-02-19 Thread Igor Mammedov
memory_region_allocate_system_memory() API is going away, so replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and using MachineState::ram instead of manually initializi

[PATCH v6 13/79] arm/digic_boards: use memdev for RAM

2020-02-19 Thread Igor Mammedov
memory_region_allocate_system_memory() API is going away, so replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and using MachineState::ram instead of manually initializi

[PATCH v6 28/79] arm/sabrelite: use memdev for RAM

2020-02-19 Thread Igor Mammedov
memory_region_allocate_system_memory() API is going away, so replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and using MachineState::ram instead of manually initializi

[PATCH v6 31/79] arm/versatilepb: use memdev for RAM

2020-02-19 Thread Igor Mammedov
memory_region_allocate_system_memory() API is going away, so replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and using MachineState::ram instead of manually initializi

[PATCH v6 29/79] arm/raspi: use memdev for RAM

2020-02-19 Thread Igor Mammedov
memory_region_allocate_system_memory() API is going away, so replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and using MachineState::ram instead of manually initiali

[PATCH v6 24/79] arm/musicpal: use memdev for RAM

2020-02-19 Thread Igor Mammedov
memory_region_allocate_system_memory() API is going away, so replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and using MachineState::ram instead of manually initializi

[PATCH v6 20/79] arm/mcimx6ul-evk: use memdev for RAM

2020-02-19 Thread Igor Mammedov
memory_region_allocate_system_memory() API is going away, so replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and using MachineState::ram instead of manually initializi

[PATCH v6 23/79] arm/mps2: use memdev for RAM

2020-02-19 Thread Igor Mammedov
memory_region_allocate_system_memory() API is going away, so replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and using MachineState::ram instead of manually initializi

[PATCH v6 27/79] arm/palm: use memdev for RAM

2020-02-19 Thread Igor Mammedov
memory_region_allocate_system_memory() API is going away, so replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and using MachineState::ram instead of manually initializi

[PATCH v6 33/79] arm/virt: use memdev for RAM

2020-02-19 Thread Igor Mammedov
memory_region_allocate_system_memory() API is going away, so replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and then map memory region provided by MachineState::ram

Re: [PATCH v2 19/22] qemu-iotests/199: prepare for new test-cases addition

2020-02-19 Thread Andrey Shinkevich
On 17/02/2020 18:02, Vladimir Sementsov-Ogievskiy wrote: Move future common part to start_postcopy() method. Move checking number of bitmaps to check_bitmap(). Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/199 | 36 +++- 1 file changed, 23

[PATCH v6 30/79] arm/sbsa-ref: use memdev for RAM

2020-02-19 Thread Igor Mammedov
memory_region_allocate_system_memory() API is going away, so replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and using MachineState::ram instead of manually initializi

[PATCH v6 32/79] arm/vexpress: use memdev for RAM

2020-02-19 Thread Igor Mammedov
replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and using MachineState::ram instead of manually initializing RAM memory region. Signed-off-by: Igor Mammedov Reviewed

[PATCH v6 11/79] arm/collie: use memdev for RAM

2020-02-19 Thread Igor Mammedov
memory_region_allocate_system_memory() API is going away, so replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and using MachineState::ram instead of manually initializi

[PATCH v6 35/79] arm/xilinx_zynq: use memdev for RAM

2020-02-19 Thread Igor Mammedov
memory_region_allocate_system_memory() API is going away, so replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and using MachineState::ram instead of manually initializi

[PATCH v6 39/79] null-machine: use memdev for RAM

2020-02-19 Thread Igor Mammedov
memory_region_allocate_system_memory() API is going away, so replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and using MachineState::ram instead of manually initializi

[PATCH v6 34/79] arm/xilinx_zynq: drop RAM size fixup

2020-02-19 Thread Igor Mammedov
If user provided non-sense RAM size, board will complain and continue running with max RAM size supported. Also RAM is going to be allocated by generic code, so it won't be possible for board to fix things up for user. Make it error message and exit to force user fix CLI, instead of accepting non-

[PATCH v6 36/79] arm/xlnx-versal-virt: use memdev for RAM

2020-02-19 Thread Igor Mammedov
memory_region_allocate_system_memory() API is going away, so replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and using MachineState::ram instead of manually initializi

[PATCH v6 37/79] arm/xlnx-zcu102: use memdev for RAM

2020-02-19 Thread Igor Mammedov
memory_region_allocate_system_memory() API is going away, so replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and using MachineState::ram instead of manually initializi

[PATCH v6 50/79] mips/boston: use memdev for RAM

2020-02-19 Thread Igor Mammedov
memory_region_allocate_system_memory() API is going away, so replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and using MachineState::ram instead of manually initializi

[PATCH v6 38/79] s390x/s390-virtio-ccw: use memdev for RAM

2020-02-19 Thread Igor Mammedov
memory_region_allocate_system_memory() API is going away, so replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and using MachineState::ram instead of manually initializi

[PATCH v6 42/79] x86/microvm: use memdev for RAM

2020-02-19 Thread Igor Mammedov
memory_region_allocate_system_memory() API is going away, so replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and using MachineState::ram instead of manually initializi

[PATCH v6 59/79] ppc/e500: use memdev for RAM

2020-02-19 Thread Igor Mammedov
memory_region_allocate_system_memory() API is going away, so replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and using MachineState::ram instead of manually initializi

[PATCH v6 40/79] cris/axis_dev88: use memdev for RAM

2020-02-19 Thread Igor Mammedov
memory_region_allocate_system_memory() API is going away, so replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and using MachineState::ram instead of manually initializi

[PATCH v6 45/79] lm32/milkymist: use memdev for RAM

2020-02-19 Thread Igor Mammedov
memory_region_allocate_system_memory() API is going away, so replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and using MachineState::ram instead of manually initializi

[PATCH v6 43/79] x86/pc: use memdev for RAM

2020-02-19 Thread Igor Mammedov
memory_region_allocate_system_memory() API is going away, so replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and using MachineState::ram instead of manually initializi

[PATCH v6 76/79] hostmem: introduce "prealloc-threads" property

2020-02-19 Thread Igor Mammedov
the property will allow user to specify number of threads to use in pre-allocation stage. It also will allow to reduce implicit hostmem dependency on current_machine. On object creation it will default to 1, but via machine compat property it will be updated to MachineState::smp::cpus to keep curre

[PATCH v6 47/79] m68k/q800: use memdev for RAM

2020-02-19 Thread Igor Mammedov
Switch to using generic main RAM allocation. To do this set MachineClass::default_ram_id to m68k_mac.ram and use MachineState::ram instead of manually initializing RAM memory region. Signed-off-by: Igor Mammedov Acked-by: Laurent Vivier Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathi

[PATCH v6 44/79] lm32/lm32_boards: use memdev for RAM

2020-02-19 Thread Igor Mammedov
memory_region_allocate_system_memory() API is going away, so replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and using MachineState::ram instead of manually initializi

[PATCH v6 46/79] m68k/an5206: use memdev for RAM

2020-02-19 Thread Igor Mammedov
memory_region_allocate_system_memory() API is going away, so replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and using MachineState::ram instead of manually initializi

[PATCH v6 73/79] exec: cleanup qemu_minrampagesize()/qemu_maxrampagesize()

2020-02-19 Thread Igor Mammedov
Since all RAM is backed by hostmem backends, drop global -mem-path invariant and simplify code. Signed-off-by: Igor Mammedov Reviewed-by: David Gibson Reviewed-by: Richard Henderson --- v4: * fix access to uninitialized pagesize/hpsize (David Gibson ) CC: th...@redhat.com CC: a...@ozlabs

[PATCH v6 48/79] m68k/mcf5208: use memdev for RAM

2020-02-19 Thread Igor Mammedov
memory_region_allocate_system_memory() API is going away, so replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and using MachineState::ram instead of manually initializi

[PATCH v6 41/79] hppa: use memdev for RAM

2020-02-19 Thread Igor Mammedov
memory_region_allocate_system_memory() API is going away, so replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and using MachineState::ram instead of manually initializi

[PATCH v6 49/79] m68k/next-cube: use memdev for RAM

2020-02-19 Thread Igor Mammedov
memory_region_allocate_system_memory() API is going away, so replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and using MachineState::ram instead of manually initializi

[PATCH v6 75/79] make mem_path local variable

2020-02-19 Thread Igor Mammedov
It's no longer used anywhere beside main(), so make it local variable that is used for CLI compat purposes to keep -mem-path option working. Under hood QEMU will use it to create memory-backend-file,mem-path=... backend and use its MemoryRegion as main RAM. Signed-off-by: Igor Mammedov Reviewe

[PATCH v6 53/79] mips/mips_jazz: use memdev for RAM

2020-02-19 Thread Igor Mammedov
memory_region_allocate_system_memory() API is going away, so replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and using MachineState::ram instead of manually initializi

[PATCH v6 51/79] mips/mips_fulong2e: drop RAM size fixup

2020-02-19 Thread Igor Mammedov
If user provided non-sense RAM size, board will complain and continue running with max RAM size supported. Also RAM is going to be allocated by generic code, so it won't be possible for board to fix things up for user. Make it error message and exit to force user fix CLI, instead of accepting non-

[PATCH v6 58/79] ppc/e500: drop RAM size fixup

2020-02-19 Thread Igor Mammedov
If user provided non-sense RAM size, board will complain and continue running with max RAM size supported. Also RAM is going to be allocated by generic code, so it won't be possible for board to fix things up for user. Make it error message and exit to force user fix CLI, instead of accepting non-

[PATCH v6 77/79] hostmem: fix strict bind policy

2020-02-19 Thread Igor Mammedov
When option -mem-prealloc is used with one or more memory-backend objects, created backends may not obey configured bind policy or creation may fail after kernel attempts to move pages according to bind policy. Reason is in file_ram_alloc(), which will pre-allocate any descriptor based RAM if globa

[PATCH v6 55/79] mips/mips_malta: use memdev for RAM

2020-02-19 Thread Igor Mammedov
memory_region_allocate_system_memory() API is going away, so replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and using MachineState::ram instead of manually initializi

[PATCH v6 54/79] mips/mips_jazz: add max ram size check

2020-02-19 Thread Igor Mammedov
error out in case user asked for more RAM than board supports. Signed-off-by: Igor Mammedov Reviewed-by: Philippe Mathieu-Daude --- hw/mips/mips_jazz.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/mips/mips_jazz.c b/hw/mips/mips_jazz.c index 85d49cf155..32fbd10b4e 100644 --- a/hw

[PATCH v6 61/79] ppc/mac_oldworld: use memdev for RAM

2020-02-19 Thread Igor Mammedov
memory_region_allocate_system_memory() API is going away, so replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and using MachineState::ram instead of manually initializi

[PATCH v6 65/79] ppc/{ppc440_bamboo, sam460ex}: drop RAM size fixup

2020-02-19 Thread Igor Mammedov
If user provided non-sense RAM size, board will complain and continue running with max RAM size supported or sometimes crash like this: %QEMU -M bamboo -m 1 exec.c:1926: find_ram_offset: Assertion `size != 0' failed. Aborted (core dumped) Also RAM is going to be allocated by generic code,

[PATCH v1 02/13] stubs/ram-block: Remove stubs that are no longer needed

2020-02-19 Thread David Hildenbrand
Current code no longer needs these stubs to compile. Let's just remove them. Cc: Richard Henderson Cc: Paolo Bonzini Cc: Eduardo Habkost Cc: Peter Xu Signed-off-by: David Hildenbrand --- stubs/ram-block.c | 20 1 file changed, 20 deletions(-) diff --git a/stubs/ram-bloc

[PATCH v6 57/79] mips/mips_r4k: use memdev for RAM

2020-02-19 Thread Igor Mammedov
memory_region_allocate_system_memory() API is going away, so replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and using MachineState::ram instead of manually initializi

[PATCH v6 67/79] ppc/spapr: use memdev for RAM

2020-02-19 Thread Igor Mammedov
memory_region_allocate_system_memory() API is going away, so replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and using MachineState::ram instead of manually initializi

[PATCH v1 04/13] numa: Make all callbacks of ram block notifiers optional

2020-02-19 Thread David Hildenbrand
Let's make add/remove optional. We want to introduce a RAM block notifier for RAM migration, that's only interested in resizes. Cc: Richard Henderson Cc: Paolo Bonzini Cc: Eduardo Habkost Cc: Marcel Apfelbaum Cc: Peter Xu Signed-off-by: David Hildenbrand --- hw/core/numa.c | 13 ++--

[PATCH v6 64/79] ppc/ppc405_boards: use memdev for RAM

2020-02-19 Thread Igor Mammedov
memory_region_allocate_system_memory() API is going away, so replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and using MachineState::ram instead of manually initializi

[PATCH v6 56/79] mips/mips_mipssim: use memdev for RAM

2020-02-19 Thread Igor Mammedov
memory_region_allocate_system_memory() API is going away, so replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and using MachineState::ram instead of manually initializi

[PATCH v6 60/79] ppc/mac_newworld: use memdev for RAM

2020-02-19 Thread Igor Mammedov
memory_region_allocate_system_memory() API is going away, so replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and using MachineState::ram instead of manually initializi

[PATCH v6 52/79] mips/mips_fulong2e: use memdev for RAM

2020-02-19 Thread Igor Mammedov
memory_region_allocate_system_memory() API is going away, so replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and using MachineState::ram instead of manually initializi

[PATCH v1 06/13] migrate/ram: Discard new RAM when growing RAM blocks and the VM is stopped

2020-02-19 Thread David Hildenbrand
In case we grow our RAM after ram_postcopy_incoming_init() (e.g., when synchronizing the RAM block state with the migration source), the resized part would not get discarded. Let's perform that when being notified about a resize while postcopy has been advised and the guest is not running yet. Cc:

[PATCH v6 78/79] tests/numa-test: make top level args dynamic and g_autofree(cli) cleanups

2020-02-19 Thread Igor Mammedov
Use GString to pass argument to make_cli() so that it would be easy to dynamically change test case arguments from main(). The follow up patch will use it to change RAM size options depending on target. While at it cleanup 'cli' freeing, using g_autofree annotation. Signed-off-by: Igor Mammedov

[PATCH v6 70/79] sparc/sun4m: use memdev for RAM

2020-02-19 Thread Igor Mammedov
memory_region_allocate_system_memory() API is going away, so replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and using MachineState::ram instead of manually initializi

Re: [PATCH v2 20/22] qemu-iotests/199: check persistent bitmaps

2020-02-19 Thread Andrey Shinkevich
On 17/02/2020 18:02, Vladimir Sementsov-Ogievskiy wrote: Check that persistent bitmaps are not stored on source and that bitmaps are persistent on destination. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/199 | 16 +++- 1 file changed, 15 insertions(+), 1

[PATCH v6 63/79] ppc/ppc405_boards: add RAM size checks

2020-02-19 Thread Igor Mammedov
If user provided non-sense RAM size, board will ignore it and continue running with fixed RAM size. Also RAM is going to be allocated by generic code, so it won't be possible for board to fix CLI. Make it error message and exit to force user fix CLI, instead of accepting non-sense CLI values. PS

Re: [PATCH v2 07/22] migration/block-dirty-bitmap: simplify dirty_bitmap_load_complete

2020-02-19 Thread Vladimir Sementsov-Ogievskiy
19.02.2020 18:30, Vladimir Sementsov-Ogievskiy wrote: 18.02.2020 17:26, Andrey Shinkevich wrote: On 17/02/2020 18:02, Vladimir Sementsov-Ogievskiy wrote: bdrv_enable_dirty_bitmap_locked() call does nothing, as if we are in postcopy, bitmap successor must be enabled, and reclaim operation will e

[PATCH v6 72/79] remove no longer used memory_region_allocate_system_memory()

2020-02-19 Thread Igor Mammedov
all boards were switched to using memdev backend for main RAM, so we can drop no longer used memory_region_allocate_system_memory() Signed-off-by: Igor Mammedov Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- CC: ehabk...@redhat.com CC:

[PATCH v6 66/79] ppc/{ppc440_bamboo, sam460ex}: use memdev for RAM

2020-02-19 Thread Igor Mammedov
memory_region_allocate_system_memory() API is going away, so replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and using MachineState::ram instead of manually initializi

<    1   2   3   4   >