Re: [RFC PATCH v2 4/5] virtio-net: Added eBPF RSS to virtio-net.

2020-12-01 Thread Yuri Benditovich
On Wed, Dec 2, 2020 at 6:06 AM Jason Wang wrote: > > On 2020/12/1 下午3:40, Yuri Benditovich wrote: > > > > > > On Tue, Nov 24, 2020 at 10:49 AM Jason Wang > > wrote: > > > > > > On 2020/11/19 下午7:13, Andrew Melnychenko wrote: > > > From: Andrew

Re: [PATCH] ide:atapi: check io_buffer_index in ide_atapi_cmd_reply_end

2020-12-01 Thread Markus Armbruster
Paolo Bonzini writes: > On 01/12/20 16:00, P J P wrote: [...] >> * I did test it against a reproducer, but did not get to the qtest >> part for >>the time constraints. > > qtests are not just helpful. Adding regression tests for bugs is a > *basic* software engineering principle. If you

Re: [Bug 1906463] [NEW] "-device help" does not report all devices

2020-12-01 Thread Markus Armbruster
Doug Evans <1906...@bugs.launchpad.net> writes: > Public bug reported: > > -device help doesn't report all devices. > E.g., devices that are instantiated by a board don't get printed in part > because they don't exist when "-device help" is processed. As an experiment I > deferred processing of

Re: [PATCH] tests/acceptance: fix timeout for vm.wait

2020-12-01 Thread Pavel Dovgalyuk
On 01.12.2020 22:15, John Snow wrote: On 11/16/20 6:13 AM, Philippe Mathieu-Daudé wrote: Cc'ing John. On Mon, Nov 16, 2020 at 11:08 AM Pavel Dovgalyuk wrote: This patch adds timeout parameter to vm.wait() calls, because the default value is just 30 seconds, and tests may last for more

Re: [PATCH v2 3/4] tests/qtest/fuzz-test: Add test_megasas_cdb_len_zero() reproducer

2020-12-01 Thread Thomas Huth
On 01/12/2020 20.10, Philippe Mathieu-Daudé wrote: > Add a reproducer which triggers (without the previous patch): > > $ make check-qtest-x86_64 > Running test qtest-x86_64/fuzz-test > qemu-system-x86_64: hw/scsi/megasas.c:1679: megasas_handle_scsi: Assertion > `cdb_len > 0 &&

Re: [PATCH] arm/hvf: Optimize and simplify WFI handling

2020-12-01 Thread Peter Collingbourne
On Tue, Dec 1, 2020 at 5:53 PM Alexander Graf wrote: > > > On 02.12.20 02:19, Peter Collingbourne wrote: > > On Tue, Dec 1, 2020 at 2:04 PM Alexander Graf wrote: > >> > >> On 01.12.20 19:59, Peter Collingbourne wrote: > >>> On Tue, Dec 1, 2020 at 3:16 AM Alexander Graf wrote: > Hi Peter, >

[PATCH v3 3/3] arm/hvf: Add a WFI handler

2020-12-01 Thread Peter Collingbourne via
Sleep on WFI until the VTIMER is due but allow ourselves to be woken up on IPI. Signed-off-by: Peter Collingbourne --- v3: - move the simplified locking to a separate patch - spin on sleep <2ms v2: - simplify locking further - wait indefinitely on disabled or masked timers

[PATCH v3 1/3] Revert "hvf: Actually set SIG_IPI mask"

2020-12-01 Thread Peter Collingbourne via
From: Alexander Graf This reverts commit 926a35700f0c14d6b95cbf8c3c3cce55ec7ffc3e. You can just drop patch 3 of your v2 instead of taking this commit. --- accel/hvf/hvf-cpus.c | 1 - 1 file changed, 1 deletion(-) diff --git a/accel/hvf/hvf-cpus.c b/accel/hvf/hvf-cpus.c index

[PATCH v3 2/3] arm/hvf: Do some cleanups

2020-12-01 Thread Peter Collingbourne via
- Stop setting current_cpu - Remove the previous WFx handler - Simplify locking - Remove the unused ret variable in hvf_vcpu_exec Signed-off-by: Peter Collingbourne --- include/sysemu/hvf_int.h | 2 - target/arm/hvf/hvf.c | 106 ++- 2 files changed, 5

Re: [RFC PATCH v2 4/5] virtio-net: Added eBPF RSS to virtio-net.

2020-12-01 Thread Jason Wang
On 2020/12/1 下午3:40, Yuri Benditovich wrote: On Tue, Nov 24, 2020 at 10:49 AM Jason Wang > wrote: On 2020/11/19 下午7:13, Andrew Melnychenko wrote: > From: Andrew mailto:and...@daynix.com>> > > When RSS is enabled the device tries to load the eBPF

Re: [PATCH] target/ppc: Remove "compat" property of server class POWER CPUs

2020-12-01 Thread David Gibson
On Tue, Dec 01, 2020 at 02:11:03PM +0100, Greg Kurz wrote: > This property has been deprecated since QEMU 5.0 by commit 22062e54bb68. > We only kept a legacy hack that internally converts "compat" into the > official "max-cpu-compat" property of the pseries machine type. > > According to our

Re: [PATCH for-6.0 v2 0/4] spapr: Perform hotplug sanity checks at pre-plug

2020-12-01 Thread David Gibson
On Tue, Dec 01, 2020 at 12:37:24PM +0100, Greg Kurz wrote: > Igor recently suggested that instead of failing in spapr_drc_attach() > at plug time we should rather check that the DRC is attachable at > pre-plug time. This allows to error out before the hot-plugged device > is even realized and to

Re: [PATCH] qemu-nbd: Fix a memleak in nbd_client_thread()

2020-12-01 Thread Alex Chen
On 2020/12/2 4:15, Eric Blake wrote: > On 12/1/20 12:13 AM, Alex Chen wrote: >> When the qio_channel_socket_connect_sync() fails >> we should goto 'out_socket' label to free the 'sioc' instead of >> goto 'out' label. >> In addition, now the 'out' label is useless, delete it. >> >> Reported-by:

Re: [PATCH v2 1/2] arm/hvf: Optimize and simplify WFI handling

2020-12-01 Thread Alexander Graf
On 02.12.20 02:52, Peter Collingbourne wrote: On Tue, Dec 1, 2020 at 5:39 PM Alexander Graf wrote: On 02.12.20 02:32, Peter Collingbourne wrote: On Tue, Dec 1, 2020 at 3:24 PM Alexander Graf wrote: On 01.12.20 22:00, Peter Collingbourne wrote: Sleep on WFx until the VTIMER is due but

Re: [PATCH v2 1/2] arm/hvf: Optimize and simplify WFI handling

2020-12-01 Thread Peter Collingbourne
On Tue, Dec 1, 2020 at 5:54 PM Alexander Graf wrote: > > > On 02.12.20 02:52, Peter Collingbourne wrote: > > On Tue, Dec 1, 2020 at 5:39 PM Alexander Graf wrote: > >> > >> On 02.12.20 02:32, Peter Collingbourne wrote: > >>> On Tue, Dec 1, 2020 at 3:24 PM Alexander Graf wrote: > On 01.12.20

RE: [RFC PATCH v5 18/33] Hexagon (target/hexagon/imported) arch import

2020-12-01 Thread Taylor Simpson
> -Original Message- > From: Alessandro Di Federico > Sent: Thursday, November 19, 2020 4:54 PM > To: Taylor Simpson > Cc: qemu-devel@nongnu.org; richard.hender...@linaro.org; > at@qualcomm.com; laur...@vivier.eu; Brian Cain > Subject: Re: [RFC PATCH v5 18/33] Hexagon

Re: [PATCH] arm/hvf: Optimize and simplify WFI handling

2020-12-01 Thread Alexander Graf
On 02.12.20 02:19, Peter Collingbourne wrote: On Tue, Dec 1, 2020 at 2:04 PM Alexander Graf wrote: On 01.12.20 19:59, Peter Collingbourne wrote: On Tue, Dec 1, 2020 at 3:16 AM Alexander Graf wrote: Hi Peter, On 01.12.20 09:21, Peter Collingbourne wrote: Sleep on WFx until the VTIMER is

Re: [PATCH v2 1/2] arm/hvf: Optimize and simplify WFI handling

2020-12-01 Thread Peter Collingbourne
On Tue, Dec 1, 2020 at 5:39 PM Alexander Graf wrote: > > > On 02.12.20 02:32, Peter Collingbourne wrote: > > On Tue, Dec 1, 2020 at 3:24 PM Alexander Graf wrote: > >> > >> On 01.12.20 22:00, Peter Collingbourne wrote: > >>> Sleep on WFx until the VTIMER is due but allow ourselves to be woken >

RE: [RFC PATCH v5 20/33] Hexagon (target/hexagon) generator phase 2 - generate header files

2020-12-01 Thread Taylor Simpson
> -Original Message- > From: Alessandro Di Federico > Sent: Thursday, November 19, 2020 4:54 PM > To: Taylor Simpson > Cc: qemu-devel@nongnu.org; Brian Cain ; > richard.hender...@linaro.org; at@qualcomm.com; laur...@vivier.eu > Subject: Re: [RFC PATCH v5 20/33] Hexagon

RE: [RFC PATCH v5 22/33] Hexagon (target/hexagon) generater phase 4 - decode tree

2020-12-01 Thread Taylor Simpson
> -Original Message- > From: Alessandro Di Federico > Sent: Thursday, November 19, 2020 4:54 PM > To: Taylor Simpson > Cc: qemu-devel@nongnu.org; richard.hender...@linaro.org; > at@qualcomm.com; laur...@vivier.eu; Brian Cain > Subject: Re: [RFC PATCH v5 22/33] Hexagon

Re: [PATCH v2 1/2] arm/hvf: Optimize and simplify WFI handling

2020-12-01 Thread Alexander Graf
On 02.12.20 02:32, Peter Collingbourne wrote: On Tue, Dec 1, 2020 at 3:24 PM Alexander Graf wrote: On 01.12.20 22:00, Peter Collingbourne wrote: Sleep on WFx until the VTIMER is due but allow ourselves to be woken up on IPI. Signed-off-by: Peter Collingbourne --- v2: - simplify locking

Re: [PATCH v2 1/2] arm/hvf: Optimize and simplify WFI handling

2020-12-01 Thread Peter Collingbourne
On Tue, Dec 1, 2020 at 3:24 PM Alexander Graf wrote: > > > On 01.12.20 22:00, Peter Collingbourne wrote: > > Sleep on WFx until the VTIMER is due but allow ourselves to be woken > > up on IPI. > > > > Signed-off-by: Peter Collingbourne > > --- > > v2: > > - simplify locking further > > - wait

Re: [PATCH] arm/hvf: Optimize and simplify WFI handling

2020-12-01 Thread Peter Collingbourne
On Tue, Dec 1, 2020 at 2:04 PM Alexander Graf wrote: > > > On 01.12.20 19:59, Peter Collingbourne wrote: > > On Tue, Dec 1, 2020 at 3:16 AM Alexander Graf wrote: > >> Hi Peter, > >> > >> On 01.12.20 09:21, Peter Collingbourne wrote: > >>> Sleep on WFx until the VTIMER is due but allow ourselves

Re: [PATCH V17 2/6] hw/intc: Rework Loongson LIOINTC

2020-12-01 Thread Huacai Chen
Hi, Phillippe, On Mon, Nov 30, 2020 at 6:08 PM Philippe Mathieu-Daudé wrote: > > On 11/28/20 7:19 AM, Huacai Chen wrote: > > On Tue, Nov 24, 2020 at 4:52 AM Philippe Mathieu-Daudé > > wrote: > >> On 11/6/20 5:21 AM, Huacai Chen wrote: > >>> As suggested by Philippe Mathieu-Daudé, rework

Re: [PATCH V17 4/6] hw/mips: Add Loongson-3 boot parameter helpers

2020-12-01 Thread Huacai Chen
Hi, Phillippe, On Tue, Nov 24, 2020 at 6:25 AM Philippe Mathieu-Daudé wrote: > > On 11/6/20 5:21 AM, Huacai Chen wrote: > > Preparing to add Loongson-3 machine support, add Loongson-3's LEFI (a > > UEFI-like interface for BIOS-Kernel boot parameters) helpers first. > > > > Reviewed-by: Philippe

[Bug 1906463] [NEW] "-device help" does not report all devices

2020-12-01 Thread Doug Evans
Public bug reported: -device help doesn't report all devices. E.g., devices that are instantiated by a board don't get printed in part because they don't exist when "-device help" is processed. As an experiment I deferred processing of "-device help" as long as possible and some devices were

Re: [PATCH v3 6/6] linux-user: Add support for MIPS Loongson 2F/3E

2020-12-01 Thread chen huacai
Hi, Philippe, On Wed, Dec 2, 2020 at 3:31 AM Philippe Mathieu-Daudé wrote: > > Userland ELF binaries using Longsoon SIMD instructions have the > HWCAP_LOONGSON_MMI bit set [1]. > Binaries compiled for Longsoon 3E [2] have the HWCAP_LOONGSON_EXT > bit set for the LQ / SQ instructions. What is

Re: [PATCH] arm/hvf: Optimize and simplify WFI handling

2020-12-01 Thread Peter Collingbourne
On Tue, Dec 1, 2020 at 2:09 PM Alexander Graf wrote: > > > On 01.12.20 21:03, Peter Collingbourne wrote: > > On Tue, Dec 1, 2020 at 8:26 AM Alexander Graf wrote: > >> > >> On 01.12.20 09:21, Peter Collingbourne wrote: > >>> Sleep on WFx until the VTIMER is due but allow ourselves to be woken >

Re: [PATCH] target/mips: Allow executing MSA instructions on Loongson-3A4000

2020-12-01 Thread chen huacai
Reviewed-by: Huacai Chen On Tue, Dec 1, 2020 at 2:24 AM Richard Henderson wrote: > > On 11/30/20 4:22 AM, Philippe Mathieu-Daudé wrote: > > The Loongson-3A4000 is a GS464V-based processor with MIPS MSA ASE: > > https://www.mail-archive.com/qemu-devel@nongnu.org/msg763059.html > > > > Commit

Re: [PATCH v2 2/2] arm/hvf: Stop setting current_cpu

2020-12-01 Thread Peter Collingbourne
On Tue, Dec 1, 2020 at 2:11 PM Alexander Graf wrote: > > > On 01.12.20 22:00, Peter Collingbourne wrote: > > This variable is already being set by the generic HVF code and it's a > > thread-local variable so I don't see how it can be overwritten. > > > > Signed-off-by: Peter Collingbourne > > >

Re: [PATCH v2 1/2] arm/hvf: Optimize and simplify WFI handling

2020-12-01 Thread Alexander Graf
On 01.12.20 22:00, Peter Collingbourne wrote: Sleep on WFx until the VTIMER is due but allow ourselves to be woken up on IPI. Signed-off-by: Peter Collingbourne --- v2: - simplify locking further - wait indefinitely on disabled or masked timers accel/hvf/hvf-cpus.c | 5 +-

Re: [PATCH v3 4/6] linux-user/elfload: Introduce MIPS GET_FEATURE_REG_EQU() macro

2020-12-01 Thread Richard Henderson
On 12/1/20 1:28 PM, Philippe Mathieu-Daudé wrote: > ISA features are usually denoted in read-only bits from > CPU registers. Add the GET_FEATURE_REG_EQU() macro which > checks if a CPU register has bits set to a specific value. > > Use the macro to check the 'Architecture Revision' level > of the

Re: [PATCH] arm/hvf: Optimize and simplify WFI handling

2020-12-01 Thread Alexander Graf
On 01.12.20 23:09, Alexander Graf wrote: On 01.12.20 21:03, Peter Collingbourne wrote: On Tue, Dec 1, 2020 at 8:26 AM Alexander Graf wrote: On 01.12.20 09:21, Peter Collingbourne wrote: Sleep on WFx until the VTIMER is due but allow ourselves to be woken up on IPI. Signed-off-by: Peter

Re: [PATCH 06/15] arc: TCG instruction definitions

2020-12-01 Thread Richard Henderson
On 11/11/20 10:17 AM, cupertinomira...@gmail.com wrote: > +case 0x09: > +/* (N & V & !Z) | (!N & !V & !Z) */ This is xnor(N, V) & !Z, and since as you now know xnor = eqv, you can perform this in just two steps. tcg_gen_eqv_tl(ret, cpu_Nf, cpu_Vf); tcg_gen_andc_tl(ret, ret,

Re: [PATCH RFC] vfio: Move the saving of the config space to the right place in VFIO migration

2020-12-01 Thread Alex Williamson
On Tue, 1 Dec 2020 14:37:52 +0800 Shenming Lu wrote: > On 2020/12/1 1:03, Alex Williamson wrote: > > On Thu, 26 Nov 2020 14:56:17 +0800 > > Shenming Lu wrote: > > > >> Hi, > >> > >> After reading everyone's opinions, we have a rough idea for this issue. > >> > >> One key point is whether it

Re: [PATCH 05/15] arc: TCG instruction generator and hand-definitions

2020-12-01 Thread Richard Henderson
On 11/11/20 10:17 AM, cupertinomira...@gmail.com wrote: > +/* > + * The macro to add boiler plate code for conditional execution. > + * It will add tcg_gen codes only if there is a condition to > + * be checked (ctx->insn.cc != 0). This macro assumes that there > + * is a "ctx" variable of type

Re: [PATCH v2 2/2] arm/hvf: Stop setting current_cpu

2020-12-01 Thread Alexander Graf
On 01.12.20 22:00, Peter Collingbourne wrote: This variable is already being set by the generic HVF code and it's a thread-local variable so I don't see how it can be overwritten. Signed-off-by: Peter Collingbourne Yikes :). Yes, absolutely! Would you mind if I squash this straight into

Re: [PATCH] arm/hvf: Optimize and simplify WFI handling

2020-12-01 Thread Alexander Graf
On 01.12.20 21:03, Peter Collingbourne wrote: On Tue, Dec 1, 2020 at 8:26 AM Alexander Graf wrote: On 01.12.20 09:21, Peter Collingbourne wrote: Sleep on WFx until the VTIMER is due but allow ourselves to be woken up on IPI. Signed-off-by: Peter Collingbourne --- Alexander Graf wrote: I

Re: [PATCH 00/18] qapi/qom: QAPIfy object-add

2020-12-01 Thread Eduardo Habkost
On Tue, Dec 01, 2020 at 10:23:57PM +0100, Paolo Bonzini wrote: > On 01/12/20 20:35, Kevin Wolf wrote: > > Am 01.12.2020 um 18:16 hat Paolo Bonzini geschrieben: > > I don't think this is actually a new things. We already have types and > > commands declared with things like 'if':

Re: [PATCH] arm/hvf: Optimize and simplify WFI handling

2020-12-01 Thread Alexander Graf
On 01.12.20 19:59, Peter Collingbourne wrote: On Tue, Dec 1, 2020 at 3:16 AM Alexander Graf wrote: Hi Peter, On 01.12.20 09:21, Peter Collingbourne wrote: Sleep on WFx until the VTIMER is due but allow ourselves to be woken up on IPI. Signed-off-by: Peter Collingbourne Thanks a bunch!

Re: [PATCH v2 11/13] xen: remove GNUC check

2020-12-01 Thread Stefano Stabellini
On Thu, 26 Nov 2020, Peter Maydell wrote: > On Thu, 26 Nov 2020 at 11:30, wrote: > > > > From: Marc-André Lureau > > > > QEMU requires Clang or GCC, that define and support __GNUC__ extensions > > > > Signed-off-by: Marc-André Lureau > > --- > > include/hw/xen/interface/io/ring.h | 9 -

Re: [PATCH v3 00/17] 64bit block-layer

2020-12-01 Thread Eric Blake
On 12/1/20 10:07 AM, Vladimir Sementsov-Ogievskiy wrote: > Hi! > > I'm sorry, I should have pinged it, or resend, or suggest to pull at > least a half long ago :( > > I've rebased it on master and make some fixes. > > What to do next? I can just resend. But I'm afraid that Eric's careful >

Re: [PATCH 04/15] arc: TCG and decoder glue code and helpers

2020-12-01 Thread Richard Henderson
On 11/11/20 10:17 AM, cupertinomira...@gmail.com wrote: > From: Cupertino Miranda > > Signed-off-by: Cupertino Miranda > --- > target/arc/extra_mapping.def | 40 ++ > target/arc/helper.c| 293 + > target/arc/helper.h| 46 ++ > target/arc/op_helper.c

Re: [PATCH 00/18] qapi/qom: QAPIfy object-add

2020-12-01 Thread Paolo Bonzini
On 01/12/20 20:35, Kevin Wolf wrote: Am 01.12.2020 um 18:16 hat Paolo Bonzini geschrieben: I don't think this is actually a new things. We already have types and commands declared with things like 'if': 'defined(TARGET_S390X)'. As far as I understand, QAPI generated files are already built per

Re: [PATCH 2/2] i386/cpu: Make the Intel PT LIP feature configurable

2020-12-01 Thread Eduardo Habkost
On Wed, Oct 14, 2020 at 04:04:43PM +0800, Luwei Kang wrote: > The current implementation will disable the guest Intel PT > feature if the Intel PT LIP feature is supported on the host, > but the LIP feature is comming soon(e.g. SnowRidge and later). > > This patch will make the guest LIP feature

Re: [PATCH 1/2] i386/cpu: Add the Intel PT capabilities checking before extend the CPUID level

2020-12-01 Thread Eduardo Habkost
Hi, Sorry for the long delay in reviewing this. Now that 5.2 is about to be released, we can try to merge this. Comments below: On Wed, Oct 14, 2020 at 04:04:42PM +0800, Luwei Kang wrote: > The current implementation will extend the CPUID level to 0x14 if > Intel PT is enabled in the guest(in

Re: [PATCH v11 1/7] Introduce yank feature

2020-12-01 Thread Eric Blake
On 12/1/20 2:43 PM, Eric Blake wrote: > On 11/15/20 5:36 AM, Lukas Straub wrote: >> The yank feature allows to recover from hanging qemu by "yanking" > > "allows to $verb" is not idiomatic English, better is "allows $subject > to verb" or "allows ${verb}ing". In this case, I suggest "The yank >

[PATCH v2 2/2] arm/hvf: Stop setting current_cpu

2020-12-01 Thread Peter Collingbourne via
This variable is already being set by the generic HVF code and it's a thread-local variable so I don't see how it can be overwritten. Signed-off-by: Peter Collingbourne --- target/arm/hvf/hvf.c | 8 1 file changed, 8 deletions(-) diff --git a/target/arm/hvf/hvf.c

[PATCH v2 1/2] arm/hvf: Optimize and simplify WFI handling

2020-12-01 Thread Peter Collingbourne via
Sleep on WFx until the VTIMER is due but allow ourselves to be woken up on IPI. Signed-off-by: Peter Collingbourne --- v2: - simplify locking further - wait indefinitely on disabled or masked timers accel/hvf/hvf-cpus.c | 5 +- include/sysemu/hvf_int.h | 3 +- target/arm/hvf/hvf.c

Re: [PATCH v11 2/7] block/nbd.c: Add yank feature

2020-12-01 Thread Eric Blake
On 11/15/20 5:36 AM, Lukas Straub wrote: > Register a yank function which shuts down the socket and sets > s->state = NBD_CLIENT_QUIT. This is the same behaviour as if an > error occured. occurred > > Signed-off-by: Lukas Straub > Acked-by: Stefan Hajnoczi > --- > block/nbd.c | 154

Re: [PATCH v11 1/7] Introduce yank feature

2020-12-01 Thread Eric Blake
On 11/15/20 5:36 AM, Lukas Straub wrote: > The yank feature allows to recover from hanging qemu by "yanking" "allows to $verb" is not idiomatic English, better is "allows $subject to verb" or "allows ${verb}ing". In this case, I suggest "The yank feature allows the recovery of a hung qemu by

[PATCH v12 08/19] multi-process: define MPQemuMsg format and transmission functions

2020-12-01 Thread Jagannathan Raman
From: Elena Ufimtseva Defines MPQemuMsg, which is the message that is sent to the remote process. This message is sent over QIOChannel and is used to command the remote process to perform various tasks. Define transmission functions used by proxy and by remote. There are certain restrictions on

[PATCH v12 19/19] multi-process: perform device reset in the remote process

2020-12-01 Thread Jagannathan Raman
From: Elena Ufimtseva Perform device reset in the remote process when QEMU performs device reset. This is required to reset the internal state (like registers, etc...) of emulated devices Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman

[PATCH v12 14/19] multi-process: Forward PCI config space acceses to the remote process

2020-12-01 Thread Jagannathan Raman
From: Elena Ufimtseva The Proxy Object sends the PCI config space accesses as messages to the remote process over the communication channel Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Reviewed-by: Stefan Hajnoczi ---

Re: [PATCH v4 0/6] UFFD write-tracking migration/snapshots

2020-12-01 Thread Andrey Gruzdev
On 01.12.2020 21:54, Peter Xu wrote: On Tue, Dec 01, 2020 at 02:24:12PM +0300, Andrey Gruzdev wrote: On 01.12.2020 13:53, Peter Krempa wrote: On Tue, Dec 01, 2020 at 11:42:18 +0300, Andrey Gruzdev wrote: On 01.12.2020 10:08, Peter Krempa wrote: On Thu, Nov 26, 2020 at 18:17:28 +0300, Andrey

Re: [PATCH v4 0/6] UFFD write-tracking migration/snapshots

2020-12-01 Thread Andrey Gruzdev
On 01.12.2020 23:01, Dr. David Alan Gilbert wrote: * Peter Xu (pet...@redhat.com) wrote: On Tue, Dec 01, 2020 at 06:40:55PM +, Dr. David Alan Gilbert wrote: Yep, seems that current userfaultfd supports hugetlbfs and shared memory for missing pages but not for wr-protected.. For

[PATCH v12 17/19] multi-process: create IOHUB object to handle irq

2020-12-01 Thread Jagannathan Raman
IOHUB object is added to manage PCI IRQs. It uses KVM_IRQFD ioctl to create irqfd to injecting PCI interrupts to the guest. IOHUB object forwards the irqfd to the remote process. Remote process uses this fd to directly send interrupts to the guest, bypassing QEMU. Signed-off-by: John G Johnson

[PATCH v12 10/19] multi-process: Associate fd of a PCIDevice with its object

2020-12-01 Thread Jagannathan Raman
Associate the file descriptor for a PCIDevice in remote process with DeviceState object. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Hajnoczi --- include/hw/remote/remote-obj.h | 42 +++ hw/remote/message.c

[PATCH v12 16/19] multi-process: Synchronize remote memory

2020-12-01 Thread Jagannathan Raman
Add memory-listener object which is used to keep the view of the RAM in sync between QEMU and remote process. A MemoryListener is registered for system-memory AddressSpace. The listener sends SYNC_SYSMEM message to the remote process when memory listener commits the changes to memory, the remote

[PATCH v12 18/19] multi-process: Retrieve PCI info from remote process

2020-12-01 Thread Jagannathan Raman
Retrieve PCI configuration info about the remote device and configure the Proxy PCI object based on the returned information Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Hajnoczi --- hw/remote/proxy.c | 85

[PATCH v12 04/19] multi-process: Add config option for multi-process QEMU

2020-12-01 Thread Jagannathan Raman
Add a configuration option to separate multi-process code Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva Reviewed-by: Stefan Hajnoczi --- accel/Kconfig | 1 + hw/Kconfig| 1 + hw/remote/Kconfig | 3 +++ 3 files changed, 5

[PATCH v12 11/19] multi-process: setup memory manager for remote device

2020-12-01 Thread Jagannathan Raman
SyncSysMemMsg message format is defined. It is used to send file descriptors of the RAM regions to remote device. RAM on the remote device is configured with a set of file descriptors. Old RAM regions are deleted and new regions, each with an fd, is added to the RAM. Signed-off-by: Jagannathan

[PATCH v12 05/19] multi-process: setup PCI host bridge for remote device

2020-12-01 Thread Jagannathan Raman
PCI host bridge is setup for the remote device process. It is implemented using remote-pcihost object. It is an extension of the PCI host bridge setup by QEMU. Remote-pcihost configures a PCI bus which could be used by the remote PCI device to latch on to. Signed-off-by: Jagannathan Raman

[PATCH v12 13/19] multi-process: add proxy communication functions

2020-12-01 Thread Jagannathan Raman
From: Elena Ufimtseva Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Reviewed-by: Stefan Hajnoczi --- include/hw/remote/mpqemu-link.h | 4 hw/remote/mpqemu-link.c | 38 ++ 2 files changed, 42

[PATCH v12 12/19] multi-process: introduce proxy object

2020-12-01 Thread Jagannathan Raman
From: Elena Ufimtseva Defines a PCI Device proxy object as a child of TYPE_PCI_DEVICE. Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Reviewed-by: Stefan Hajnoczi --- include/hw/remote/proxy.h | 36 + hw/remote/proxy.c

[PATCH v12 15/19] multi-process: PCI BAR read/write handling for proxy & remote endpoints

2020-12-01 Thread Jagannathan Raman
Proxy device object implements handler for PCI BAR writes and reads. The handler uses BAR_WRITE/BAR_READ message to communicate to the remote process with the BAR address and value to be written/read. The remote process implements handler for BAR_WRITE/BAR_READ message. Signed-off-by: Jagannathan

[PATCH v12 02/19] multi-process: add configure and usage information

2020-12-01 Thread Jagannathan Raman
From: Elena Ufimtseva Adds documentation explaining the command-line arguments needed to use multi-process. Also adds a python script that illustrates the usage. Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Reviewed-by: Stefan Hajnoczi ---

[PATCH v12 01/19] multi-process: add the concept description to docs/devel/qemu-multiprocess

2020-12-01 Thread Jagannathan Raman
From: John G Johnson Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Hajnoczi --- docs/devel/index.rst | 1 + docs/devel/multi-process.rst | 966 +++ MAINTAINERS

[PATCH v12 09/19] multi-process: Initialize message handler in remote device

2020-12-01 Thread Jagannathan Raman
Initializes the message handler function in the remote process. It is called whenever there's an event pending on QIOChannel that registers this function. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Hajnoczi ---

[PATCH v12 06/19] multi-process: setup a machine object for remote device process

2020-12-01 Thread Jagannathan Raman
x-remote-machine object sets up various subsystems of the remote device process. Instantiate PCI host bridge object and initialize RAM, IO & PCI memory regions. Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva Reviewed-by: Stefan Hajnoczi ---

[PATCH v12 07/19] multi-process: add qio channel function to transmit data and fds

2020-12-01 Thread Jagannathan Raman
From: Elena Ufimtseva Adds QIO channel functions that transmits the input iovs as well as the supplied fds. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Hajnoczi --- include/io/channel.h | 24

[PATCH v12 00/19] Initial support for multi-process Qemu

2020-12-01 Thread Jagannathan Raman
Hello, This is the v12 of the patchset. Thank you very much for the review of the v11 of the series. We made changes to the following patches in this version: - Moved patches 18 & 19 in v11 to the front of the series based on feedback from Phil - [PATCH v12 02/19 ] multi-process: add

[PATCH v12 03/19] memory: alloc RAM from file at offset

2020-12-01 Thread Jagannathan Raman
Allow RAM MemoryRegion to be created from an offset in a file, instead of allocating at offset of 0 by default. This is needed to synchronize RAM between QEMU & remote process. Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva Reviewed-by: Stefan

Re: [PATCH 03/15] arc: Opcode definitions table

2020-12-01 Thread Richard Henderson
On 11/11/20 10:17 AM, cupertinomira...@gmail.com wrote: > From: Claudiu Zissulescu > > Signed-off-by: Claudiu Zissulescu > --- > target/arc/opcodes.def | 19976 +++ > 1 file changed, 19976 insertions(+) > create mode 100644 target/arc/opcodes.def OMG. 20k

Re: [PATCH] docs/devel/writing-qmp-commands.txt: Fix docs

2020-12-01 Thread Eric Blake
On 12/1/20 8:33 AM, Zihao Chang wrote: > Fix the example of add qmp hello-world example. > Without ":", make will report error: > ../qapi/misc.json:573:2: line should end with ':' > > Signed-off-by: Zihao Chang > --- > docs/devel/writing-qmp-commands.txt | 2 +- > 1 file changed, 1

Re: [PATCH] qemu-nbd: Fix a memleak in nbd_client_thread()

2020-12-01 Thread Eric Blake
On 12/1/20 12:13 AM, Alex Chen wrote: > When the qio_channel_socket_connect_sync() fails > we should goto 'out_socket' label to free the 'sioc' instead of > goto 'out' label. > In addition, now the 'out' label is useless, delete it. > > Reported-by: Euler Robot > Signed-off-by: Alex Chen > ---

Re: [PATCH v4 0/6] UFFD write-tracking migration/snapshots

2020-12-01 Thread Andrey Gruzdev
On 01.12.2020 21:40, Dr. David Alan Gilbert wrote: * Andrey Gruzdev (andrey.gruz...@virtuozzo.com) wrote: On 01.12.2020 13:53, Peter Krempa wrote: On Tue, Dec 01, 2020 at 11:42:18 +0300, Andrey Gruzdev wrote: On 01.12.2020 10:08, Peter Krempa wrote: On Thu, Nov 26, 2020 at 18:17:28 +0300,

Re: [PATCH] linux-user/elfload: Fix handling of pure BSS segments

2020-12-01 Thread Stephen Long
Alex Bennee writes: >> Apologies for the unclear commit msg. I was also seeing a SIGSEGV in >> zero_bss() with the binaries I was generating. I was using LLD to generate >> the binaries. The binaries all had LOAD segments with a file size of >> 0. > > How hairy is the generation of these

Re: [PATCH] arm/hvf: Optimize and simplify WFI handling

2020-12-01 Thread Peter Collingbourne
On Tue, Dec 1, 2020 at 8:26 AM Alexander Graf wrote: > > > On 01.12.20 09:21, Peter Collingbourne wrote: > > Sleep on WFx until the VTIMER is due but allow ourselves to be woken > > up on IPI. > > > > Signed-off-by: Peter Collingbourne > > --- > > Alexander Graf wrote: > >> I would love to take

Re: [PATCH v4 0/6] UFFD write-tracking migration/snapshots

2020-12-01 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > On Tue, Dec 01, 2020 at 06:40:55PM +, Dr. David Alan Gilbert wrote: > > > Yep, seems that current userfaultfd supports hugetlbfs and shared memory > > > for > > > missing pages but not for wr-protected.. > > > > For hugepages, you'd need kernel support

Re: [PATCH v4 0/6] UFFD write-tracking migration/snapshots

2020-12-01 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > On Tue, Dec 01, 2020 at 02:24:12PM +0300, Andrey Gruzdev wrote: > > On 01.12.2020 13:53, Peter Krempa wrote: > > > On Tue, Dec 01, 2020 at 11:42:18 +0300, Andrey Gruzdev wrote: > > > > On 01.12.2020 10:08, Peter Krempa wrote: > > > > > On Thu, Nov 26, 2020

[ANNOUNCE] QEMU 5.2.0-rc4 is now available

2020-12-01 Thread Michael Roth
Hello, On behalf of the QEMU Team, I'd like to announce the availability of the fifth release candidate for the QEMU 5.2 release. This release is meant for testing purposes and should not be used in a production environment. http://download.qemu-project.org/qemu-5.2.0-rc4.tar.xz

Re: [PATCH v1 1/1] security-process: update process information

2020-12-01 Thread Konrad Rzeszutek Wilk
On Mon, Nov 30, 2020 at 07:19:07PM +0530, P J P wrote: > From: Prasad J Pandit > > We are about to introduce a qemu-security mailing list to report > and triage QEMU security issues. > > Update the QEMU security process web page with new mailing list > and triage details. > > Signed-off-by:

[PATCH v2 1/1] Fix to show vfio migration stat in migration status

2020-12-01 Thread Kirti Wankhede
Header file where CONFIG_VFIO is defined is not included in migration.c file. Moved populate_vfio_info() to hw/vfio/common.c file. Added its stub in stubs/vfio.c file. Updated header files and meson file accordingly. Fixes: 3710586caa5d ("qapi: Add VFIO devices migration stats in Migration

Re: [PATCH 00/18] qapi/qom: QAPIfy object-add

2020-12-01 Thread Kevin Wolf
Am 01.12.2020 um 18:16 hat Paolo Bonzini geschrieben: > On 01/12/20 17:20, Kevin Wolf wrote: > > Am 30.11.2020 um 20:35 hat Paolo Bonzini geschrieben: > > > For devices it's just the practical issue that there are too many to have > > > something like this series. For machine types the main issue

[PATCH v3 5/6] linux-user/elfload: Update HWCAP bits from linux 5.7

2020-12-01 Thread Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- linux-user/elfload.c | 13 + 1 file changed, 13 insertions(+) diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 9c475fa5f70..2ba42d8e4bd 100644 --- a/linux-user/elfload.c +++

Re: [PATCH v4 2/6] introduce UFFD-WP low-level interface helpers

2020-12-01 Thread Andrey Gruzdev
On 01.12.2020 15:24, Dr. David Alan Gilbert wrote: * Andrey Gruzdev (andrey.gruz...@virtuozzo.com) wrote: Implemented support for the whole RAM block memory protection/un-protection. Introduced higher level ram_write_tracking_start() and ram_write_tracking_stop() to start/stop tracking guest

[PATCH v3 4/6] linux-user/elfload: Introduce MIPS GET_FEATURE_REG_EQU() macro

2020-12-01 Thread Philippe Mathieu-Daudé
ISA features are usually denoted in read-only bits from CPU registers. Add the GET_FEATURE_REG_EQU() macro which checks if a CPU register has bits set to a specific value. Use the macro to check the 'Architecture Revision' level of the Config0 register, which is '2' when the Release 6 ISA is

[PATCH v3 2/6] linux-user/elfload: Rename MIPS GET_FEATURE() as GET_FEATURE_INSN()

2020-12-01 Thread Philippe Mathieu-Daudé
We want to add macros similar to GET_FEATURE(). As this one use the 'insn_flags' field, rename it GET_FEATURE_INSN(). Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- linux-user/elfload.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

[PATCH v3 6/6] linux-user: Add support for MIPS Loongson 2F/3E

2020-12-01 Thread Philippe Mathieu-Daudé
Userland ELF binaries using Longsoon SIMD instructions have the HWCAP_LOONGSON_MMI bit set [1]. Binaries compiled for Longsoon 3E [2] have the HWCAP_LOONGSON_EXT bit set for the LQ / SQ instructions. [1] commit 8e2d5831e4b ("target/mips: Legalize Loongson insn flags") [2] commit af868995e1b

[PATCH v3 3/6] linux-user/elfload: Introduce MIPS GET_FEATURE_REG_SET() macro

2020-12-01 Thread Philippe Mathieu-Daudé
ISA features are usually denoted in read-only bits from CPU registers. Add the GET_FEATURE_REG_SET() macro which checks if a CPU register has bits set. Use the macro to check for MSA (which sets the MSAP bit of the Config3 register when the ASE implementation is present). Reviewed-by: Richard

[PATCH v3 1/6] linux-user/elfload: Move GET_FEATURE macro out of get_elf_hwcap() body

2020-12-01 Thread Philippe Mathieu-Daudé
As we are going to add more macros, keep the function body clear. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- linux-user/elfload.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/linux-user/elfload.c b/linux-user/elfload.c index

[PATCH v3 0/6] linux-user: Rework get_elf_hwcap() and support MIPS Loongson 2F/3E

2020-12-01 Thread Philippe Mathieu-Daudé
Missing review: #4 Since v2: - Use extract32() in GET_FEATURE_REG_EQU (rth) Introduce the GET_FEATURE_REG_SET() and GET_FEATURE_REG_EQU() macros to check if an instruction set is supported by a CPU using CP0 read-only bits (instead of QEMU insn_flags which is not always coherent - we might

Re: [PATCH v4 0/6] UFFD write-tracking migration/snapshots

2020-12-01 Thread Peter Xu
On Tue, Dec 01, 2020 at 06:40:55PM +, Dr. David Alan Gilbert wrote: > > Yep, seems that current userfaultfd supports hugetlbfs and shared memory for > > missing pages but not for wr-protected.. > > For hugepages, you'd need kernel support - but also you'd want to make > sure you write the

Re: [PATCH v2 3/4] tests/qtest/fuzz-test: Add test_megasas_cdb_len_zero() reproducer

2020-12-01 Thread Philippe Mathieu-Daudé
On 12/1/20 8:10 PM, Philippe Mathieu-Daudé wrote: > Add a reproducer which triggers (without the previous patch): > > $ make check-qtest-x86_64 > Running test qtest-x86_64/fuzz-test > qemu-system-x86_64: hw/scsi/megasas.c:1679: megasas_handle_scsi: Assertion > `cdb_len > 0 &&

Re: [PATCH] tests/acceptance: fix timeout for vm.wait

2020-12-01 Thread John Snow
On 11/16/20 6:13 AM, Philippe Mathieu-Daudé wrote: Cc'ing John. On Mon, Nov 16, 2020 at 11:08 AM Pavel Dovgalyuk wrote: This patch adds timeout parameter to vm.wait() calls, because the default value is just 30 seconds, and tests may last for more time. This doesn't sound right -- the

[RFC PATCH v2 4/4] hw/scsi/megasas: Have incorrect cdb return MFI_STAT_ABORT_NOT_POSSIBLE

2020-12-01 Thread Philippe Mathieu-Daudé
Avoid out-of-bound array access with invalid CDB is provided. Signed-off-by: Philippe Mathieu-Daudé --- RFC because no clue how hardware works --- hw/scsi/megasas.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c index

[PATCH v2 2/4] hw/scsi/megasas: Assert cdb_len is valid in megasas_handle_scsi()

2020-12-01 Thread Philippe Mathieu-Daudé
cdb_len can not be zero... (or less than 6) here, else we have a out-of-bound read first in scsi_cdb_length(): 71 int scsi_cdb_length(uint8_t *buf) 72 { 73 int cdb_len; 74 75 switch (buf[0] >> 5) { 76 case 0: 77 cdb_len = 6; 78 break; Then another out-of-bound

[PATCH v2 3/4] tests/qtest/fuzz-test: Add test_megasas_cdb_len_zero() reproducer

2020-12-01 Thread Philippe Mathieu-Daudé
Add a reproducer which triggers (without the previous patch): $ make check-qtest-x86_64 Running test qtest-x86_64/fuzz-test qemu-system-x86_64: hw/scsi/megasas.c:1679: megasas_handle_scsi: Assertion `cdb_len > 0 && scsi_cdb_length(cdb) <= cdb_len' failed. tests/qtest/libqtest.c:181:

[PATCH v2 0/4] hw/scsi/megasas: Avoid buffer overrun in megasas_handle_scsi()

2020-12-01 Thread Philippe Mathieu-Daudé
FWIW megasas is not use by KVM. Not sure what is the proper fix, but at least we have a reproducer. Since v1: - Fix assert() condition - Extract reproducer in different patch for git-bisect (thuth) - Add simpler reproducer from Alex - Try better scsi error Philippe Mathieu-Daudé (4):

  1   2   3   4   >