Re: [kvm-unit-tests PATCH v3 12/14] arm/run: Allow Migration tests

2020-01-29 Thread Thomas Huth
On 28/01/2020 11.34, Eric Auger wrote: > Let's link getchar.o to use puts and getchar from the > tests. > > Then allow tests belonging to the migration group to > trigger the migration from the test code by putting > "migrate" into the uart. Then the code can wait for the > migration completion by

Re: [PATCH] .travis.yml: Add description to each job

2020-01-29 Thread Philippe Mathieu-Daudé
On 1/29/20 8:34 AM, Thomas Huth wrote: On 29/01/2020 08.27, Philippe Mathieu-Daudé wrote: On 1/29/20 8:20 AM, Thomas Huth wrote: On 28/01/2020 14.33, Wainer dos Santos Moschetta wrote: On 1/28/20 11:18 AM, Philippe Mathieu-Daudé wrote: On Tue, Jan 28, 2020 at 1:55 PM Alex Bennée wrote: Tho

Re: [PATCH v2 2/4] qapi: Create module 'control'

2020-01-29 Thread Markus Armbruster
Kevin Wolf writes: > misc.json contains definitions that are related to the system emulator, > so it can't be used for other tools like the storage daemon. This patch > moves basic functionality that is shared between all tools (and mostly > related to the monitor itself) into a new control.json,

[PATCH v2] tests/acceptance: Add a test for the canon-a1100 machine

2020-01-29 Thread Thomas Huth
The canon-a1100 machine can be used with the Barebox firmware. The QEMU Advent Calendar 2018 features a pre-compiled image which we can use for testing. Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Reviewed-by: Wainer dos Santos Moschetta Tested-by: Wainer dos Santos Mo

Re: [RFC PATCH] hw/arm/virt: Support NMI injection

2020-01-29 Thread Marc Zyngier
On 2020-01-29 02:44, Alexey Kardashevskiy wrote: On 28/01/2020 17:48, Gavin Shan wrote: but a NMI is injected through LAPIC on x86. So I'm not sure what architect (system reset on ppc or injecting NMI on x86) aarch64 should follow. I'd say whatever triggers in-kernel debugger or kdump but I am

Re: [PATCH v2 2/4] qapi: Create module 'control'

2020-01-29 Thread Kevin Wolf
Am 29.01.2020 um 09:35 hat Markus Armbruster geschrieben: > Kevin Wolf writes: > > > misc.json contains definitions that are related to the system emulator, > > so it can't be used for other tools like the storage daemon. This patch > > moves basic functionality that is shared between all tools (

Re: [PATCH v2 3/4] monitor: Create monitor/qmp-cmds-control.c

2020-01-29 Thread Markus Armbruster
Kevin Wolf writes: > Move all of the QMP commands handlers to implement the 'control' module > (qapi/control.json) that can be shared between the system emulator and > tools such as a storage daemon to a new file monitor/qmp-cmds-control.c. > > Signed-off-by: Kevin Wolf > --- [...] > diff --git

Re: [PATCH v2 4/4] monitor: Move qmp_query_qmp_schema to qmp-cmds-control.c

2020-01-29 Thread Markus Armbruster
Kevin Wolf writes: > monitor/misc.c contains code that works only in the system emulator, so > it can't be linked to tools like a storage daemon. In order to make > schema introspection available for tools, move the function to > monitor/qmp-cmds-control.c, which can be linked into the storage da

Re: [PATCH v2 2/7] block/block-copy: use block_status

2020-01-29 Thread Andrey Shinkevich
On 27/11/2019 21:08, Vladimir Sementsov-Ogievskiy wrote: > Use bdrv_block_status_above to chose effective chunk size and to handle > zeroes effectively. > > This substitutes checking for just being allocated or not, and drops > old code path for it. Assistance by backup job is dropped too, as >

Re: [PATCH v3 07/18] machine: Add a new function init_apicid_fn in MachineClass

2020-01-29 Thread Igor Mammedov
On Tue, 28 Jan 2020 13:45:31 -0600 Babu Moger wrote: > On 1/28/20 10:29 AM, Igor Mammedov wrote: > > On Tue, 03 Dec 2019 18:37:42 -0600 > > Babu Moger wrote: > > > >> Add a new function init_apicid_fn in MachineClass to initialize the mode > >> specific handlers to decode the apic ids. > >> >

Re: [PATCH v2 3/7] block/block-copy: factor out block_copy_find_inflight_req

2020-01-29 Thread Andrey Shinkevich
On 27/11/2019 21:08, Vladimir Sementsov-Ogievskiy wrote: > Split block_copy_find_inflight_req to be used in seprate. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/block-copy.c | 31 +++ > 1 file changed, 19 insertions(+), 12 deletions(-) > > diff

Re: [kvm-unit-tests PATCH v3 12/14] arm/run: Allow Migration tests

2020-01-29 Thread Auger Eric
Hi Thomas, On 1/29/20 9:07 AM, Thomas Huth wrote: > On 28/01/2020 11.34, Eric Auger wrote: >> Let's link getchar.o to use puts and getchar from the >> tests. >> >> Then allow tests belonging to the migration group to >> trigger the migration from the test code by putting >> "migrate" into the uart

Re: Performance hit in qemu-system-ppc

2020-01-29 Thread Howard Spoelstra
On Tue, Jan 28, 2020 at 7:30 PM Richard Henderson < richard.hender...@linaro.org> wrote: > On 1/25/20 3:30 PM, Howard Spoelstra wrote: > > I noticed a considerable (~20%) slowdown in the cpu performance of > qemu-system-ppc. > > ENOINFO. > > For what test case? This should not have been on any ho

[PATCH v4 06/14] dp8393x: Clear RRRA command register bit only when appropriate

2020-01-29 Thread Finn Thain
It doesn't make sense to clear the command register bit unless the command was actually issued. Signed-off-by: Finn Thain Reviewed-by: Philippe Mathieu-Daudé Tested-by: Laurent Vivier --- hw/net/dp8393x.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/net/dp8393x

[PATCH v4 09/14] dp8393x: Use long-word-aligned RRA pointers in 32-bit mode

2020-01-29 Thread Finn Thain
Section 3.4.1 of the datasheet says, The alignment of the RRA is confined to either word or long word boundaries, depending upon the data width mode. In 16-bit mode, the RRA must be aligned to a word boundary (A0 is always zero) and in 32-bit mode, the RRA is aligned to a long word

[PATCH v4 08/14] dp8393x: Don't clobber packet checksum

2020-01-29 Thread Finn Thain
A received packet consumes pkt_size bytes in the buffer and the frame checksum that's appended to it consumes another 4 bytes. The Receive Buffer Address register takes the former quantity into account but not the latter. So the next packet written to the buffer overwrites the frame checksum. Fix t

[PATCH v4 04/14] dp8393x: Have dp8393x_receive() return the packet size

2020-01-29 Thread Finn Thain
This function re-uses its 'size' argument as a scratch variable. Instead, declare a local 'size' variable for that purpose so that the function result doesn't get messed up. Signed-off-by: Finn Thain Reviewed-by: Philippe Mathieu-Daudé Tested-by: Laurent Vivier --- hw/net/dp8393x.c | 9 +--

[PATCH v4 05/14] dp8393x: Update LLFA and CRDA registers from rx descriptor

2020-01-29 Thread Finn Thain
Follow the algorithm given in the National Semiconductor DP83932C datasheet in section 3.4.7: At the next reception, the SONIC re-reads the last RXpkt.link field, and updates its CRDA register to point to the next descriptor. The chip is designed to allow the host to provide a new list of

[PATCH v4 11/14] dp8393x: Clear descriptor in_use field to release packet

2020-01-29 Thread Finn Thain
When the SONIC receives a packet into the last available descriptor, it retains ownership of that descriptor for as long as necessary. Section 3.4.7 of the datasheet says, When the system appends more descriptors, the SONIC releases ownership of the descriptor after writing h to the R

[PATCH v4 02/14] dp8393x: Always use 32-bit accesses

2020-01-29 Thread Finn Thain
The DP83932 and DP83934 have 32 data lines. The datasheet says, Data Bus: These bidirectional lines are used to transfer data on the system bus. When the SONIC is a bus master, 16-bit data is transferred on D15-D0 and 32-bit data is transferred on D31-D0. When the SONIC is accessed

[PATCH v4 13/14] dp8393x: Don't reset Silicon Revision register

2020-01-29 Thread Finn Thain
The jazzsonic driver in Linux uses the Silicon Revision register value to probe the chip. The driver fails unless the SR register contains 4. Unfortunately, reading this register in QEMU usually returns 0 because the s->regs[] array gets wiped after a software reset. Fixes: bd8f1ebce4 ("net/dp8393

[PATCH v4 07/14] dp8393x: Implement packet size limit and RBAE interrupt

2020-01-29 Thread Finn Thain
Add a bounds check to prevent a large packet from causing a buffer overflow. This is defensive programming -- I haven't actually tried sending an oversized packet or a jumbo ethernet frame. The SONIC handles packets that are too big for the buffer by raising the RBAE interrupt and dropping them. L

[PATCH v4 01/14] dp8393x: Mask EOL bit from descriptor addresses

2020-01-29 Thread Finn Thain
The Least Significant bit of a descriptor address register is used as an EOL flag. It has to be masked when the register value is to be used as an actual address for copying memory around. But when the registers are to be updated the EOL bit should not be masked. Signed-off-by: Finn Thain Tested-

[PATCH v4 14/14] dp8393x: Don't stop reception upon RBE interrupt assertion

2020-01-29 Thread Finn Thain
Section 3.4.7 of the datasheet explains that, The RBE bit in the Interrupt Status register is set when the SONIC finishes using the second to last receive buffer and reads the last RRA descriptor. Actually, the SONIC is not truly out of resources, but gives the system an early warn

[PATCH v4 00/14] Fixes for DP8393X SONIC device emulation

2020-01-29 Thread Finn Thain
Hi All, There are bugs in the emulated dp8393x device that can stop packet reception in a Linux/m68k guest (q800 machine). With a Linux/m68k v5.5 guest (q800), it's possible to remotely trigger an Oops by sending ping floods. With a Linux/mips guest (magnum machine), the driver fails to probe th

[PATCH v4 10/14] dp8393x: Pad frames to word or long word boundary

2020-01-29 Thread Finn Thain
The existing code has a bug where the Remaining Buffer Word Count (RBWC) is calculated with a truncating division, which gives the wrong result for odd-sized packets. Section 1.4.1 of the datasheet says, Once the end of the packet has been reached, the serializer will fill out the last wo

[PATCH v4 12/14] dp8393x: Always update RRA pointers and sequence numbers

2020-01-29 Thread Finn Thain
These operations need to take place regardless of whether or not rx descriptors have been used up (that is, EOL flag was observed). The algorithm is now the same for a packet that was withheld as for a packet that was not. Signed-off-by: Finn Thain Tested-by: Laurent Vivier --- hw/net/dp8393x.

[PATCH v4 03/14] dp8393x: Clean up endianness hacks

2020-01-29 Thread Finn Thain
According to the datasheet, section 3.4.4, "in 32-bit mode ... the SONIC always writes long words". Therefore, use the same technique for the 'in_use' field that is used everywhere else, and write the full long word. Signed-off-by: Finn Thain Tested-by: Laurent Vivier Reviewed-by: Philippe Math

Re: [PATCH v2 2/4] qapi: Create module 'control'

2020-01-29 Thread Markus Armbruster
Kevin Wolf writes: > Am 29.01.2020 um 09:35 hat Markus Armbruster geschrieben: >> Kevin Wolf writes: >> >> > misc.json contains definitions that are related to the system emulator, >> > so it can't be used for other tools like the storage daemon. This patch >> > moves basic functionality that i

[PATCH v2] Acceptance test: provides to use different transport for migration

2020-01-29 Thread Oksana Vohchana
Along with VM migration via TCP, we can use migration through EXEC and UNIX transport protocol --- tests/acceptance/migration.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/acceptance/migration.py b/tests/acceptance/migration.py index 8bbe28d52d..1f6a674843 10064

Re: [PATCH rc3 23/30] hw/core/loader: Let load_elf populate the processor-specific flags

2020-01-29 Thread Aleksandar Markovic
08:32 Sre, 29.01.2020. Philippe Mathieu-Daudé је написао/ла: > > Hi Aleksandar, > > On 1/28/20 8:25 PM, Aleksandar Markovic wrote: > > On Tue, Jan 28, 2020 at 2:27 PM Aleksandar Markovic > > mailto:aleksandar.m.m...@gmail.com>> wrote: > > > > > > > > On Tuesday, January 28, 2020, BALATON Zolta

Re: [PATCH v8 10/21] libqos: move useful qos-test funcs to qos_external

2020-01-29 Thread Paolo Bonzini
On 29/01/20 06:34, Bulekov, Alexander wrote: > The moved functions are not specific to qos-test and might be useful > elsewhere. For example the virtual-device fuzzer makes use of them for > qos-assisted fuzz-targets. > > Signed-off-by: Alexander Bulekov > Reviewed-by: Stefan Hajnoczi > Reviewed

Re: [PATCH rc3 01/30] target/avr: Add basic parameters for new AVR platform

2020-01-29 Thread Aleksandar Markovic
08:38 Sre, 29.01.2020. Philippe Mathieu-Daudé је написао/ла: > > On 1/28/20 7:01 PM, Aleksandar Markovic wrote: > > Works for me too. > > > > > > 16:10 Uto, 28.01.2020. Michael Rolnik > > је написао/ла: > > > > Sounds good to me. > > > > On Tue, Jan 28, 2020 at 3

Re: [virtio-dev] [PATCH v2 4/5] virtio-mmio: Introduce MSI details

2020-01-29 Thread Michael S. Tsirkin
On Tue, Jan 21, 2020 at 09:54:32PM +0800, Jing Liu wrote: > With VIRTIO_F_MMIO_MSI feature bit offered, the Message Signal > Interrupts (MSI) is supported as first priority. For any reason it > fails to use MSI, it need use the single dedicated interrupt as before. > > For MSI vectors and events m

Re: [virtio-dev] [PATCH v2 5/5] virtio-mmio: MSI vector and event mapping

2020-01-29 Thread Michael S. Tsirkin
On Tue, Jan 21, 2020 at 09:54:33PM +0800, Jing Liu wrote: > Bit 1 msi_sharing reported in the MsiState register indicates the mapping mode > device uses. > > Bit 1 is 0 - device uses MSI non-sharing mode. This indicates vector per > event and > fixed static vectors and events relationship. This f

Re: [PATCH v2 2/4] qapi: Create module 'control'

2020-01-29 Thread Kevin Wolf
Am 29.01.2020 um 10:41 hat Markus Armbruster geschrieben: > Kevin Wolf writes: > > > Am 29.01.2020 um 09:35 hat Markus Armbruster geschrieben: > >> Kevin Wolf writes: > >> > >> > misc.json contains definitions that are related to the system emulator, > >> > so it can't be used for other tools l

Re: [PATCH v3 03/13] monitor/hmp: rename device-hotplug.c to block/monitor/block-hmp-cmds.c

2020-01-29 Thread Markus Armbruster
Maxim Levitsky writes: > On Tue, 2020-01-28 at 16:56 +, Dr. David Alan Gilbert wrote: >> * Maxim Levitsky (mlevi...@redhat.com) wrote: >> > These days device-hotplug.c only contains the hmp_drive_add >> > In the next patch, rest of hmp_drive* functions will be moved >> > there. >> > >> > Als

[PATCH v3 0/4] monitor: Refactoring in preparation for qemu-storage-daemon

2020-01-29 Thread Kevin Wolf
This series creates a QAPI module 'control' that can be used from tools outside the system emulator and moves some monitor initialisation code from vl.c to monitor code. It is split from the series to introduce qemu-storage-daemon because these refactorings make sense on their own as cleanups. v3

[PATCH v3 1/4] monitor: Move monitor option parsing to monitor/monitor.c

2020-01-29 Thread Kevin Wolf
Both the system emulators and tools with QMP support (specifically, the planned storage daemon) will need to parse monitor options, so move that code to monitor/monitor.c, which can be linked into binaries that aren't a system emulator. Signed-off-by: Kevin Wolf Reviewed-by: Markus Armbruster --

[PATCH v3 2/4] qapi: Create module 'control'

2020-01-29 Thread Kevin Wolf
misc.json contains definitions that are related to the system emulator, so it can't be used for other tools like the storage daemon. This patch moves basic functionality that is shared between all tools (and mostly related to the monitor itself) into a new control.json, which could be used in tools

[PATCH v3 3/4] monitor: Create monitor/qmp-cmds-control.c

2020-01-29 Thread Kevin Wolf
Move all of the QMP commands handlers to implement the 'control' module (qapi/control.json) that can be shared between the system emulator and tools such as a storage daemon to a new file monitor/qmp-cmds-control.c. Signed-off-by: Kevin Wolf Reviewed-by: Markus Armbruster --- monitor/misc.c

[PATCH v3 4/4] monitor: Move qmp_query_qmp_schema to qmp-cmds-control.c

2020-01-29 Thread Kevin Wolf
monitor/misc.c contains code that works only in the system emulator, so it can't be linked to tools like a storage daemon. In order to make schema introspection available for tools, move the function to monitor/qmp-cmds-control.c, which can be linked into the storage daemon. Signed-off-by: Kevin W

Re: [PATCH v3 13/13] monitor/hmp: Prefer to use hmp_handle_error for error reporting in block hmp commands

2020-01-29 Thread Markus Armbruster
Maxim Levitsky writes: > On Mon, 2020-01-27 at 12:36 +0200, Maxim Levitsky wrote: >> This way they all will be prefixed with 'Error:' which some parsers >> (e.g libvirt) need >> >> Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1719169 >> >> Signed-off-by: Maxim Levitsky > > And I proba

Assertion triggers with power8e_v2.1-powernv-cpu-core

2020-01-29 Thread Thomas Huth
FYI, scripts/device-crash-test reported an assertion, triggerable like this: $ qemu-system-ppc64 -machine ppce500 -device power8e_v2.1-powernv-cpu-core qemu-system-ppc64: hw/ppc/pnv_core.c:221: pnv_core_realize: Assertion `pc->chip' failed. Aborted (core dumped) Of course using that CPU is not po

RE: [PATCH v2 7/7] tests/bios-tables-test: Update arm/virt memhp test

2020-01-29 Thread Shameerali Kolothum Thodi
Hi Eric, > -Original Message- > From: Qemu-devel > [mailto:qemu-devel-bounces+shameerali.kolothum.thodi=huawei.com@nongn > u.org] On Behalf Of Auger Eric > Sent: 28 January 2020 16:29 > To: Shameerali Kolothum Thodi ; > qemu-devel@nongnu.org; qemu-...@nongnu.org; imamm...@redhat.com > Cc:

Re: [PATCH v3 12/13] add 'error' prefix to vreport

2020-01-29 Thread Markus Armbruster
Maxim Levitsky writes: > On Mon, 2020-01-27 at 12:36 +0200, Maxim Levitsky wrote: >> This changes most of qemu's error messages, >> but it feels like the right thing to do. >> >> This is WIP patch, since I updated most of iotests but not all of them, >> and will be updated if this patch is accep

Re: Assertion triggers with power8e_v2.1-powernv-cpu-core

2020-01-29 Thread Cédric Le Goater
On 1/29/20 11:31 AM, Thomas Huth wrote: > FYI, scripts/device-crash-test reported an assertion, triggerable like this: > > $ qemu-system-ppc64 -machine ppce500 -device power8e_v2.1-powernv-cpu-core > qemu-system-ppc64: hw/ppc/pnv_core.c:221: pnv_core_realize: Assertion > `pc->chip' failed. > Abort

Re: [PATCH] docs: add virtiofsd(1) man page

2020-01-29 Thread Stefan Hajnoczi
On Mon, Jan 27, 2020 at 04:55:12PM +, Liam Merwick wrote: > On 27/01/2020 16:25, Stefan Hajnoczi wrote: > > Document the virtiofsd(1) program and its command-line options. This > > man page is a rST conversion of the original texi documentation that I > > wrote. > > > > Signed-off-by: Stefan

RE: [PATCH v2 0/7] ARM virt: Add NVDIMM support

2020-01-29 Thread Shameerali Kolothum Thodi
Hi Eric, > -Original Message- > From: Auger Eric [mailto:eric.au...@redhat.com] > Sent: 28 January 2020 15:29 > To: Shameerali Kolothum Thodi ; > qemu-devel@nongnu.org; qemu-...@nongnu.org; imamm...@redhat.com > Cc: peter.mayd...@linaro.org; shannon.zha...@gmail.com; m...@redhat.com; > xia

Re: Assertion triggers with power8e_v2.1-powernv-cpu-core

2020-01-29 Thread Thomas Huth
On 29/01/2020 11.39, Cédric Le Goater wrote: > On 1/29/20 11:31 AM, Thomas Huth wrote: >> FYI, scripts/device-crash-test reported an assertion, triggerable like this: >> >> $ qemu-system-ppc64 -machine ppce500 -device power8e_v2.1-powernv-cpu-core >> qemu-system-ppc64: hw/ppc/pnv_core.c:221: pnv_co

Re: [PATCH v3 12/13] add 'error' prefix to vreport

2020-01-29 Thread Maxim Levitsky
On Wed, 2020-01-29 at 11:38 +0100, Markus Armbruster wrote: > Maxim Levitsky writes: > > > On Mon, 2020-01-27 at 12:36 +0200, Maxim Levitsky wrote: > > > This changes most of qemu's error messages, > > > but it feels like the right thing to do. > > > > > > This is WIP patch, since I updated most

Re: [PATCH v3 13/13] monitor/hmp: Prefer to use hmp_handle_error for error reporting in block hmp commands

2020-01-29 Thread Maxim Levitsky
On Wed, 2020-01-29 at 11:27 +0100, Markus Armbruster wrote: > Maxim Levitsky writes: > > > On Mon, 2020-01-27 at 12:36 +0200, Maxim Levitsky wrote: > > > This way they all will be prefixed with 'Error:' which some parsers > > > (e.g libvirt) need > > > > > > Bugzilla: https://bugzilla.redhat.com

[PULL 00/18] Pull migration patches

2020-01-29 Thread Juan Quintela
The following changes since commit 4c60e3289875ae6c516a37523bcecb87f68ce67c: Merge remote-tracking branch 'remotes/rth/tags/pull-pa-20200127' into staging (2020-01-28 15:11:04 +) are available in the Git repository at: https://github.com/juanquintela/qemu.git tags/pull-migration-pull-re

[PULL 03/18] qemu-file: Don't do IO after shutdown

2020-01-29 Thread Juan Quintela
Be sure that we are not doing neither read/write after shutdown of the QEMUFile. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- migration/qemu-file.c | 22 +- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/migration/qemu-file.c b/migratio

[PULL 01/18] migration-test: Use g_free() instead of free()

2020-01-29 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé --- tests/qtest/migration-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index 26e2e77289..b6a74a05ce 100644 --- a/te

[PULL 02/18] multifd: Make sure that we don't do any IO after an error

2020-01-29 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- migration/ram.c | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index d2208b5534..f95d656c26 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -3

[PULL 09/18] multifd: multifd_send_pages only needs the qemufile

2020-01-29 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- migration/ram.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 82c7edb083..602e9ca5a0 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -929,7 +929,7 @@ s

[PULL 04/18] migration: Don't send data if we have stopped

2020-01-29 Thread Juan Quintela
If we do a cancel, we got out without one error, but we can't do the rest of the output as in a normal situation. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- migration/ram.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/migration/ram.c b/migratio

[PULL 06/18] migration: Create migration_is_running()

2020-01-29 Thread Juan Quintela
This function returns true if we are in the middle of a migration. It is like migration_is_setup_or_active() with CANCELLING and COLO. Adapt all callers that are needed. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- migration/migration.c | 29 -

[PULL 05/18] migration-test: Make sure that multifd and cancel works

2020-01-29 Thread Juan Quintela
Test that this sequence works: - launch source - launch target - start migration - cancel migration - relaunch target - do migration again Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- tests/qtest/migration-test.c | 112 ++- 1 file changed

[PULL 15/18] multifd: Make multifd_load_setup() get an Error parameter

2020-01-29 Thread Juan Quintela
We need to change the full chain to pass the Error parameter. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- migration/migration.c | 35 +-- migration/migration.h | 2 +- migration/ram.c | 2 +- migration/ram.h | 2 +- migrati

[PULL 14/18] multifd: Make multifd_save_setup() get an Error parameter

2020-01-29 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- migration/migration.c | 4 +++- migration/ram.c | 2 +- migration/ram.h | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index 77768fb2c7..d478f832

[PULL 11/18] multifd: multifd_send_sync_main only needs the qemufile

2020-01-29 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- migration/ram.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index ad9cc3e7bd..152e9cf46d 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -1082,7 +1082

[PULL 12/18] multifd: Use qemu_target_page_size()

2020-01-29 Thread Juan Quintela
We will make it cpu independent. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- migration/ram.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 152e9cf46d..8f04b5ab3a 100644 --- a/migration/ram.c +++ b/mi

[PULL 18/18] migration/compress: compress QEMUFile is not writable

2020-01-29 Thread Juan Quintela
From: Wei Yang We open a file with empty_ops for compress QEMUFile, which means this is not writable. Signed-off-by: Wei Yang Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- migration/qemu-file.c | 16 +++- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git

[PULL 10/18] multifd: multifd_queue_page only needs the qemufile

2020-01-29 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- migration/ram.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 602e9ca5a0..ad9cc3e7bd 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -974,7 +974,7 @@ s

[PULL 13/18] migration: Make checkpatch happy with comments

2020-01-29 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- migration/ram.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 8f04b5ab3a..12b76b7841 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -1320,10 +1320,

[PULL 07/18] migration/multifd: fix nullptr access in multifd_send_terminate_threads

2020-01-29 Thread Juan Quintela
From: Zhimin Feng If the multifd_send_threads is not created when migration is failed, multifd_save_cleanup would be called twice. In this senario, the multifd_send_state is accessed after it has been released, the result is that the source VM is crashing down. Here is the coredump stack: Pr

[PULL 17/18] migration: Simplify get_qlist

2020-01-29 Thread Juan Quintela
From: Eric Auger Instead of inserting read elements at the head and then reversing the list, it is simpler to add each element after the previous one. Introduce QLIST_RAW_INSERT_AFTER helper and use it in get_qlist(). Signed-off-by: Eric Auger Suggested-by: Juan Quintela Reviewed-by: Juan Quin

[PULL 08/18] ram_addr: Split RAMBlock definition

2020-01-29 Thread Juan Quintela
We need some of the fields without having to poison everything else. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- MAINTAINERS | 1 + include/exec/ram_addr.h | 40 +- include/exec/ramblock.h | 64 +++

[PULL 16/18] multifd: Split multifd code into its own file

2020-01-29 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- migration/Makefile.objs | 1 + migration/migration.c | 1 + migration/multifd.c | 899 migration/multifd.h | 139 ++ migration/ram.c | 988 +

[PATCH] git: Make submodule check only needed modules

2020-01-29 Thread Juan Quintela
If one is compiling more than one tree from the same source, it is possible that they need different submodules. Change the check to see that all modules that we are interested in are updated, discarding the ones that we don't care about. Signed-off-by: Juan Quintela --- scripts/git-submodule.s

[PATCH] hw/i386/vmmouse: Fix crash when using the vmmouse on a machine without vmport

2020-01-29 Thread Thomas Huth
QEMU currently crashes when the user tries to use the "vmmouse" on a machine without vmport, e.g.: $ x86_64-softmmu/qemu-system-x86_64 -machine microvm -device vmmouse Segmentation fault (core dumped) or: $ x86_64-softmmu/qemu-system-x86_64 -device vmmouse -M pc,vmport=off Segmentation fault

Re: [PATCH v3 03/13] monitor/hmp: rename device-hotplug.c to block/monitor/block-hmp-cmds.c

2020-01-29 Thread Maxim Levitsky
On Wed, 2020-01-29 at 11:19 +0100, Markus Armbruster wrote: > Maxim Levitsky writes: > > > On Tue, 2020-01-28 at 16:56 +, Dr. David Alan Gilbert wrote: > > > * Maxim Levitsky (mlevi...@redhat.com) wrote: > > > > These days device-hotplug.c only contains the hmp_drive_add > > > > In the next p

Re: [PATCH] hw/i386/vmmouse: Fix crash when using the vmmouse on a machine without vmport

2020-01-29 Thread Darren Kenny
On Wed, Jan 29, 2020 at 12:29:54PM +0100, Thomas Huth wrote: QEMU currently crashes when the user tries to use the "vmmouse" on a machine without vmport, e.g.: $ x86_64-softmmu/qemu-system-x86_64 -machine microvm -device vmmouse Segmentation fault (core dumped) or: $ x86_64-softmmu/qemu-system

[PATCH] ppc/pnv: change the PowerNV machine devices to be non user creatable

2020-01-29 Thread Cédric Le Goater
The PowerNV machine emulates an OpenPOWER system and the PowerNV chip devices are models of the internal logic of the POWER processor. They can not be instantiated by the user on the QEMU command line. The PHB3/PHB4 devices could be an exception in the future after some rework on how the device tr

[Question] Regarding presence of duplicate ACPI CPU entries at two nodes \\_SB.CXXX and \\_SB.CPUS.CXXX of namespace

2020-01-29 Thread Salil Mehta
Hello, Observation: If we launch Linux Guest VM using QEMU(running on any type host. I am using x86) with CPU based on any ARM64 architecture then I could see QEMU populating ACPI nodes related to same CPU at 2 places of the ACPI namespace: 1. \\_SB.CXXX 2. \\_SB.CPUS.CXXX Above results in Gues

[PATCH v5 2/8] migration: Add support for modules

2020-01-29 Thread Juan Quintela
So we don't have to compile everything in, or have ifdefs Signed-off-by: Juan Quintela --- include/qemu/module.h | 2 ++ vl.c | 1 + 2 files changed, 3 insertions(+) diff --git a/include/qemu/module.h b/include/qemu/module.h index 65ba596e46..907cb5c0a5 100644 --- a/include/qem

[PATCH v5 0/8] Multifd Migration Compression

2020-01-29 Thread Juan Quintela
Based-on: 20200129111536.9497-1-quint...@redhat.com [v5] - rebased on top of latest pull request - check zlib/zstd return codes in loops (denis suggestions) - check that we do the right thing in error cases (I corrupted the stream, make buffers too small, etc by hand) [v4] - create new paramete

[PATCH v5 3/8] multifd: Make no compression operations into its own structure

2020-01-29 Thread Juan Quintela
It will be used later. Signed-off-by: Juan Quintela --- migration/migration.c | 9 ++ migration/migration.h | 1 + migration/multifd.c | 185 -- migration/multifd.h | 25 ++ migration/ram.c | 1 + 5 files changed, 213 insertions(+), 8

[PATCH v5 4/8] multifd: Add multifd-zlib-level parameter

2020-01-29 Thread Juan Quintela
It will indicate which level use for compression. Signed-off-by: Juan Quintela --- migration/migration.c | 15 +++ monitor/hmp-cmds.c| 4 qapi/migration.json | 30 +++--- 3 files changed, 46 insertions(+), 3 deletions(-) diff --git a/migration/mig

[PATCH v5 1/8] multifd: Add multifd-method parameter

2020-01-29 Thread Juan Quintela
This will store the compression method to use. We start with none. Signed-off-by: Juan Quintela Reviewed-by: Markus Armbruster Reviewed-by: Dr. David Alan Gilbert --- hw/core/qdev-properties.c| 13 + include/hw/qdev-properties.h | 3 +++ migration/migration.c| 13

[PATCH v5 5/8] multifd: Add zlib compression multifd support

2020-01-29 Thread Juan Quintela
Signed-off-by: Juan Quintela --- hw/core/qdev-properties.c| 2 +- migration/Makefile.objs | 1 + migration/migration.c| 9 + migration/migration.h| 1 + migration/multifd-zlib.c | 325 +++ migration/multifd.c | 6 + m

[PATCH v5 6/8] configure: Enable test and libs for zstd

2020-01-29 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- configure | 30 ++ 1 file changed, 30 insertions(+) diff --git a/configure b/configure index a72a5def57..7c1dca326f 100755 --- a/configure +++ b/configure @@ -448,6 +448,7 @@ lzo="" snappy="" bzip

[PATCH v5 7/8] multifd: Add multifd-zstd-level parameter

2020-01-29 Thread Juan Quintela
Signed-off-by: Juan Quintela --- migration/migration.c | 15 +++ monitor/hmp-cmds.c| 4 qapi/migration.json | 29 ++--- 3 files changed, 45 insertions(+), 3 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index 3b081e8147..b

[PATCH v5 8/8] multifd: Add zstd compression multifd support

2020-01-29 Thread Juan Quintela
Signed-off-by: Juan Quintela --- hw/core/qdev-properties.c| 2 +- migration/Makefile.objs | 1 + migration/migration.c| 9 + migration/migration.h| 1 + migration/multifd-zstd.c | 337 +++ migration/multifd.h | 2 +-

Re: [PATCH 001/142] minikconf: accept alnum identifiers

2020-01-29 Thread Thomas Huth
-EMISSINGPATCHDESCRIPTION Why is this required? Bug fix? New feature? ... please add some words here. Thomas On 28/01/2020 18.51, Paolo Bonzini wrote: > From: Marc-André Lureau > > Signed-off-by: Marc-André Lureau > Signed-off-by: Paolo Bonzini > --- > scripts/minikconf.py | 2 +- > 1 f

[RFC v3 09/25] vfio: check VFIO_TYPE1_NESTING_IOMMU support

2020-01-29 Thread Liu, Yi L
From: Liu Yi L VFIO needs to check VFIO_TYPE1_NESTING_IOMMU support with Kernel before further using it. e.g. requires to check IOMMU UAPI version. Cc: Kevin Tian Cc: Jacob Pan Cc: Peter Xu Cc: Eric Auger Cc: Yi Sun Cc: David Gibson Cc: Alex Williamson Signed-off-by: Liu Yi L Signed-off-

[RFC v3 07/25] header file update VFIO/IOMMU vSVA APIs

2020-01-29 Thread Liu, Yi L
From: Liu Yi L The kernel uapi/linux/iommu.h header file includes the extensions for vSVA support. e.g. bind gpasid, iommu fault report related user structures and etc. Cc: Kevin Tian Cc: Jacob Pan Cc: Peter Xu Cc: Yi Sun Cc: Michael S. Tsirkin Cc: Cornelia Huck Cc: Paolo Bonzini Signed-o

[RFC v3 00/25] intel_iommu: expose Shared Virtual Addressing to VMs

2020-01-29 Thread Liu, Yi L
Shared Virtual Addressing (SVA), a.k.a, Shared Virtual Memory (SVM) on Intel platforms allows address space sharing between device DMA and applications. SVA can reduce programming complexity and enhance security. This QEMU series is intended to expose SVA usage to VMs. i.e. Sharing guest applicati

[RFC v3 06/25] scripts/update-linux-headers: Import iommu.h

2020-01-29 Thread Liu, Yi L
From: Eric Auger Update the script to import the new iommu.h uapi header. Cc: Kevin Tian Cc: Jacob Pan Cc: Peter Xu Cc: Yi Sun Cc: Michael S. Tsirkin Cc: Cornelia Huck Cc: Paolo Bonzini Signed-off-by: Eric Auger --- scripts/update-linux-headers.sh | 2 +- 1 file changed, 1 insertion(+),

[RFC v3 04/25] hw/pci: introduce pci_device_iommu_context()

2020-01-29 Thread Liu, Yi L
From: Liu Yi L This patch adds pci_device_iommu_context() to get an iommu_context for a given device. A new callback is added in PCIIOMMUOps. Users who wants to call into vIOMMU could leaverage it. And further vIOMMU operation could be done via IOMMUContext. Note: Previous version has got Review

[RFC v3 14/25] intel_iommu: add virtual command capability support

2020-01-29 Thread Liu, Yi L
From: Liu Yi L This patch adds virtual command support to Intel vIOMMU per Intel VT-d 3.1 spec. And adds two virtual commands: allocate pasid and free pasid. Cc: Kevin Tian Cc: Jacob Pan Cc: Peter Xu Cc: Yi Sun Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Signed-off-by: Liu

[RFC v3 03/25] hw/iommu: introduce IOMMUContext

2020-01-29 Thread Liu, Yi L
From: Peter Xu Currently, many platform vendors provide the capability of dual stage DMA address translation in hardware. For example, nested translation on Intel VT-d scalable mode, nested stage translation on ARM SMMUv3, and etc. Also there are efforts to make QEMU vIOMMU be backed by dual stag

[RFC v3 05/25] intel_iommu: provide get_iommu_context() callback

2020-01-29 Thread Liu, Yi L
From: Liu Yi L This patch adds get_iommu_context() callback to return an iommu_context Intel VT-d platform. Cc: Kevin Tian Cc: Jacob Pan Cc: Peter Xu Cc: Yi Sun Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Signed-off-by: Liu Yi L --- hw/i386/intel_iommu.c | 92 +++

[RFC v3 01/25] hw/pci: modify pci_setup_iommu() to set PCIIOMMUOps

2020-01-29 Thread Liu, Yi L
From: Liu Yi L This patch modifies pci_setup_iommu() to set PCIIOMMUOps instead of setting PCIIOMMUFunc. PCIIOMMUFunc is used to get an address space for a PCI device in vendor specific way. The PCIIOMMUOps still offers this functionality. But using PCIIOMMUOps leaves space to add more iommu rela

[RFC v3 08/25] vfio: pass IOMMUContext into vfio_get_group()

2020-01-29 Thread Liu, Yi L
From: Liu Yi L IOMMUContext provides an explicit way for VFIO to talk with vIOMMU. This patch passes IOMMUContext instance into vfio_get_group() for the reason of potential VFIO_TYPE1_NESTING_IOMMU configuration as such configuration requires interaction with vIOMMU. Cc: Kevin Tian Cc: Jacob P

[RFC v3 02/25] hw/iommu: introduce DualStageIOMMUObject

2020-01-29 Thread Liu, Yi L
From: Liu Yi L Currently, many platform vendors provide the capability of dual stage DMA address translation in hardware. For example, nested translation on Intel VT-d scalable mode, nested stage translation on ARM SMMUv3, and etc. In dual stage DMA address translation, there are two stages addre

[RFC v3 19/25] intel_iommu: replay guest pasid bindings to host

2020-01-29 Thread Liu, Yi L
From: Liu Yi L This patch adds guest pasid bindings replay for domain selective pasid cache invalidation(dsi) and global pasid cache invalidation by walking guest pasid table. Reason: Guest OS may flush the pasid cache with a larger granularity. e.g. guest does a svm_bind() but flush the pasid c

[RFC v3 10/25] vfio: register DualStageIOMMUObject to vIOMMU

2020-01-29 Thread Liu, Yi L
From: Liu Yi L After confirming dual stage DMA translation support with kernel by checking VFIO_TYPE1_NESTING_IOMMU, VFIO could register DualStageIOMMUObject instance to vIOMMU, thus that vIOMMU is aware of such hardware capability. vIOMMU may make use of such capability by leveraging the ops pro

  1   2   3   4   >