Re: [PATCH 04/22] machine: move SMP initialization from vl.c

2020-10-22 Thread Philippe Mathieu-Daudé
On 10/21/20 10:56 PM, Paolo Bonzini wrote: Initialize the object's values from the class when the object is created, no need to have vl.c do it for us. Signed-off-by: Paolo Bonzini --- hw/core/machine.c | 7 +++ softmmu/vl.c | 7 --- 2 files changed, 7 insertions(+), 7 deletion

Re: [PATCH 12/22] vl: move bios_name out of softmmu/vl.c

2020-10-22 Thread Philippe Mathieu-Daudé
On 10/21/20 10:57 PM, Paolo Bonzini wrote: bios_name is a legacy variable used by machine code. Hide it from softmmu/vl.c. Signed-off-by: Paolo Bonzini --- hw/core/machine.c | 5 + softmmu/vl.c | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/core/machine.

Re: [PATCH 17/22] vl: load plugins as late as possible

2020-10-22 Thread Philippe Mathieu-Daudé
On 10/21/20 10:57 PM, Paolo Bonzini wrote: There is no need to load plugins in the middle of default device processing, move -plugin handling just before preconfig is entered. Signed-off-by: Paolo Bonzini --- softmmu/vl.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-)

Re: [PATCH 20/22] vl: move CHECKPOINT_INIT after preconfig

2020-10-22 Thread Philippe Mathieu-Daudé
On 10/21/20 10:57 PM, Paolo Bonzini wrote: Move CHECKPOINT_INIT right before the machine initialization is completed. Everything before is essentially an extension of command line parsing. Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daudé --- softmmu/vl.c | 10 +-

Re: [PATCH v3 2/2] hw/block/nvme: add the dataset management command

2020-10-22 Thread Klaus Jensen
On Oct 21 17:59, Keith Busch wrote: > On Thu, Oct 22, 2020 at 12:17:36AM +0200, Klaus Jensen wrote: > > +static void nvme_aio_discard_cb(void *opaque, int ret) > > +{ > > +NvmeRequest *req = opaque; > > +int *discards = req->opaque; > > + > > +trace_pci_nvme_aio_discard_cb(nvme_cid(req)

[PATCH v4 0/2] hw/block/nvme: dulbe and dsm support

2020-10-22 Thread Klaus Jensen
From: Klaus Jensen This adds support for the Deallocated or Unwritten Logical Block error recovery feature as well as the Dataset Management command. I wanted to add support for the NPDG and NPDA fields such that the host could get a hint on how many blocks to request deallocation of for the dea

[PATCH v4 1/2] hw/block/nvme: add dulbe support

2020-10-22 Thread Klaus Jensen
From: Klaus Jensen Add support for reporting the Deallocated or Unwritten Logical Block Error (DULBE). Rely on the block status flags reported by the block layer and consider any block with the BDRV_BLOCK_ZERO flag to be deallocated. Multiple factors affect when a Write Zeroes command result in

[PATCH v5 2/6] [RISCV_PM] Support CSRs required for RISC-V PM extension except for ones in hypervisor mode

2020-10-22 Thread Alexey Baturo
Signed-off-by: Alexey Baturo --- target/riscv/cpu.c | 3 + target/riscv/cpu.h | 12 ++ target/riscv/cpu_bits.h | 66 ++ target/riscv/csr.c | 271 4 files changed, 352 insertions(+) diff --git a/target/riscv/cpu.c b/target/riscv/

[PATCH v5 4/6] [RISCV_PM] Support pointer masking for RISC-V for i/c/f/d/a types of instructions

2020-10-22 Thread Alexey Baturo
Signed-off-by: Alexey Baturo --- target/riscv/insn_trans/trans_rva.c.inc | 3 +++ target/riscv/insn_trans/trans_rvd.c.inc | 2 ++ target/riscv/insn_trans/trans_rvf.c.inc | 2 ++ target/riscv/insn_trans/trans_rvi.c.inc | 2 ++ target/riscv/translate.c| 14 ++ 5 file

[PATCH v5 1/6] [RISCV_PM] Add J-extension into RISC-V

2020-10-22 Thread Alexey Baturo
--- target/riscv/cpu.c | 1 + target/riscv/cpu.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 0bbfd7f457..4e305249b3 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -516,6 +516,7 @@ static Property riscv_cpu_properties[] = {

[PATCH v5 6/6] [RISCV_PM] Allow experimental J-ext to be turned on

2020-10-22 Thread Alexey Baturo
Signed-off-by: Alexey Baturo --- target/riscv/cpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 1c00d9ea26..56633c14eb 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -465,6 +465,7 @@ static void riscv_cpu_realize(DeviceState *dev,

[PATCH v5 5/6] [RISCV_PM] Implement address masking functions required for RISC-V Pointer Masking extension

2020-10-22 Thread Alexey Baturo
From: Anatoly Parshintsev Signed-off-by: Anatoly Parshintsev --- target/riscv/cpu.h | 19 +++ target/riscv/translate.c | 34 -- 2 files changed, 51 insertions(+), 2 deletions(-) diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index c23

[PATCH v5 3/6] [RISCV_PM] Print new PM CSRs in QEMU logs

2020-10-22 Thread Alexey Baturo
Signed-off-by: Alexey Baturo --- target/riscv/cpu.c | 25 + 1 file changed, 25 insertions(+) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index db72f5cf59..1c00d9ea26 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -255,6 +255,31 @@ static void riscv_c

[PATCH v4 2/2] hw/block/nvme: add the dataset management command

2020-10-22 Thread Klaus Jensen
From: Klaus Jensen Add support for the Dataset Management command and the Deallocate attribute. Deallocation results in discards being sent to the underlying block device. Whether of not the blocks are actually deallocated is affected by the same factors as Write Zeroes (see previous commit).

Re: [PATCH v26 05/17] vfio: Add VM state change handler to know state of VM

2020-10-22 Thread Cornelia Huck
On Wed, 21 Oct 2020 11:03:23 +0530 Kirti Wankhede wrote: > On 10/20/2020 4:21 PM, Cornelia Huck wrote: > > On Sun, 18 Oct 2020 01:54:56 +0530 > > Kirti Wankhede wrote: > > > >> On 9/29/2020 4:33 PM, Dr. David Alan Gilbert wrote: > >>> * Cornelia Huck (coh...@redhat.com) wrote: > On W

[PATCH v5 0/6] RISC-V Pointer Masking implementation

2020-10-22 Thread Alexey Baturo
Hi, Addressing Alistair comment: J-ext enabling patch is now the last one in the series. Thanks Alexey Baturo (5): [RISCV_PM] Add J-extension into RISC-V [RISCV_PM] Support CSRs required for RISC-V PM extension except for ones in hypervisor mode [RISCV_PM] Print new PM CSRs in QEMU lo

Re: [PATCH] migration/block-dirty-bitmap: fix larger granularity bitmaps

2020-10-22 Thread Stefan Reiter
On 10/21/20 5:17 PM, Vladimir Sementsov-Ogievskiy wrote: 21.10.2020 17:44, Stefan Reiter wrote: sectors_per_chunk is a 64 bit integer, but the calculation is done in 32 bits, leading to an overflow for coarse bitmap granularities. If that results in the value 0, it leads to a hang where no prog

Re: [PATCH v11 09/13] copy-on-read: skip non-guest reads if no copy needed

2020-10-22 Thread Andrey Shinkevich
On 21.10.2020 23:43, Andrey Shinkevich wrote: On 14.10.2020 18:22, Vladimir Sementsov-Ogievskiy wrote: 14.10.2020 15:51, Max Reitz wrote: On 12.10.20 19:43, Andrey Shinkevich wrote: If the flag BDRV_REQ_PREFETCH was set, pass it further to the COR-driver to skip unneeded reading. It can be t

Re: [PATCH v5 0/6] RISC-V Pointer Masking implementation

2020-10-22 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20201022074309.3210-1-space.monkey.deliv...@gmail.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20201022074309.3210-1-space.monkey.deliv...@gmail.com Subject: [PATCH v5 0/6]

[PATCH v6 2/6] [RISCV_PM] Support CSRs required for RISC-V PM extension except for ones in hypervisor mode

2020-10-22 Thread Alexey Baturo
Signed-off-by: Alexey Baturo --- target/riscv/cpu.c | 3 + target/riscv/cpu.h | 12 ++ target/riscv/cpu_bits.h | 66 ++ target/riscv/csr.c | 271 4 files changed, 352 insertions(+) diff --git a/target/riscv/cpu.c b/target/riscv/

[PATCH v6 1/6] [RISCV_PM] Add J-extension into RISC-V

2020-10-22 Thread Alexey Baturo
Signed-off-by: Alexey Baturo --- target/riscv/cpu.c | 1 + target/riscv/cpu.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 0bbfd7f457..4e305249b3 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -516,6 +516,7 @@ static Property ri

[PATCH v6 0/6] RISC-V Pointer Masking implementation

2020-10-22 Thread Alexey Baturo
Hi, Added missing sign-off on the first patch. Thanks Alexey Baturo (5): [RISCV_PM] Add J-extension into RISC-V [RISCV_PM] Support CSRs required for RISC-V PM extension except for ones in hypervisor mode [RISCV_PM] Print new PM CSRs in QEMU logs [RISCV_PM] Support pointer masking for

[PATCH v6 3/6] [RISCV_PM] Print new PM CSRs in QEMU logs

2020-10-22 Thread Alexey Baturo
Signed-off-by: Alexey Baturo --- target/riscv/cpu.c | 25 + 1 file changed, 25 insertions(+) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index db72f5cf59..1c00d9ea26 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -255,6 +255,31 @@ static void riscv_c

[PATCH] i386/cpu: Expose the PTWRITE to the guest

2020-10-22 Thread Luwei Kang
PTWRITE provides a mechanism by which software can instrument the Intel PT trace. The current implementation will mask off this feature when the PTWRITE is supported on the host because of the Intel PT CPUID is a constant value(ICX CPUID) in qemu. This patch will expose the PTWRITE feature to the g

[PATCH v6 4/6] [RISCV_PM] Support pointer masking for RISC-V for i/c/f/d/a types of instructions

2020-10-22 Thread Alexey Baturo
Signed-off-by: Alexey Baturo --- target/riscv/insn_trans/trans_rva.c.inc | 3 +++ target/riscv/insn_trans/trans_rvd.c.inc | 2 ++ target/riscv/insn_trans/trans_rvf.c.inc | 2 ++ target/riscv/insn_trans/trans_rvi.c.inc | 2 ++ target/riscv/translate.c| 14 ++ 5 file

[PATCH v6 5/6] [RISCV_PM] Implement address masking functions required for RISC-V Pointer Masking extension

2020-10-22 Thread Alexey Baturo
From: Anatoly Parshintsev Signed-off-by: Anatoly Parshintsev --- target/riscv/cpu.h | 19 +++ target/riscv/translate.c | 34 -- 2 files changed, 51 insertions(+), 2 deletions(-) diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index c23

[PATCH v6 6/6] [RISCV_PM] Allow experimental J-ext to be turned on

2020-10-22 Thread Alexey Baturo
Signed-off-by: Alexey Baturo --- target/riscv/cpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 1c00d9ea26..56633c14eb 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -465,6 +465,7 @@ static void riscv_cpu_realize(DeviceState *dev,

Re: [PATCH v6 01/16] memory: Add FlatView foreach function

2020-10-22 Thread Darren Kenny
Hi Alex, On Wednesday, 2020-10-21 at 17:09:07 -04, Alexander Bulekov wrote: > Acked-by: Paolo Bonzini > Signed-off-by: Alexander Bulekov > --- > include/exec/memory.h | 5 + > softmmu/memory.c | 9 + > 2 files changed, 14 insertions(+) > > diff --git a/include/exec/memory.h b/i

Re: [PATCH v3 0/6] virtio-mem: block size and address-assignment optimizations

2020-10-22 Thread David Hildenbrand
On 08.10.20 10:30, David Hildenbrand wrote: > > > Let's try to detect the actual THP size and use it as default block size > (unless the page size of the backend indicates that THP don't apply). > Always allow to set a block size of 1 MiB, but warn if the configured block > size is smaller than t

[PATCH] s390x: pv: Fix diag318 PV fencing

2020-10-22 Thread Janosch Frank
Diag318 fencing needs to be determined on the current VM PV state and not on the state that the VM has when we create the CPU model. Signed-off-by: Janosch Frank Reported-by: Marc Hartmayer Reviewed-by: Christian Borntraeger Fixes: fabdada935 ("s390: guest support for diagnose 0x318") --- If y

[PATCH 2/8] hw/misc/pvpanic: Cosmetic renaming

2020-10-22 Thread Mihai Carabas
From: Philippe Mathieu-Daudé To ease the MMIO device addition in the next patch, rename: - ISA_PVPANIC_DEVICE -> PVPANIC_ISA_DEVICE. - PVPanicState -> PVPanicISAState. - TYPE_PVPANIC -> TYPE_PVPANIC_ISA. - MemoryRegion io -> mr. Reviewed-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daudé

[PATCH 1/8] hw/misc/pvpanic: Build the pvpanic device for any machine

2020-10-22 Thread Mihai Carabas
From: Philippe Mathieu-Daudé The 'pvpanic' ISA device can be use by any machine with an ISA bus. Reviewed-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Peng Hao Signed-off-by: Mihai Carabas --- hw/misc/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-

Re: [PATCH v2 1/8] tests/9pfs: simplify do_mkdir()

2020-10-22 Thread Greg Kurz
On Wed, 21 Oct 2020 14:06:53 +0200 Christian Schoenebeck wrote: > Split out walking a directory path to a separate new utility function > do_walk() and use that function in do_mkdir(). > > The code difference saved this way is not much, but we'll use that new > do_walk() function in the upcoming

[PATCH 0/8] Add support for pvpanic mmio device

2020-10-22 Thread Mihai Carabas
The patchset was assembled from chuncks from some old patches from 2018 [1] which were left unmerged and some additions from me. Surprisingly their Linux kernel counterpart were merged (so the pvpanic driver from the kernel supports mmio). I have seen the discussions about moving the pvpanic to PC

[PATCH 8/8] pvpanic: break dependency on ISA_BUS

2020-10-22 Thread Mihai Carabas
pvpanic is supported on ARM VIRT MACHINE as an MMIO device, no need for an ISA bus. Signed-off-by: Mihai Carabas --- hw/arm/Kconfig| 1 + hw/misc/Kconfig | 2 +- hw/misc/pvpanic.c | 4 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig index

[PATCH 3/8] hw/misc/pvpanic: Add the MMIO interface

2020-10-22 Thread Mihai Carabas
From: Peng Hao Add new pvpanic type: "TYPE_PVPANIC_MMIO". Reviewed-by: Peter Maydell Signed-off-by: Peng Hao Signed-off-by: Mihai Carabas --- hw/misc/pvpanic.c | 51 +++ include/hw/misc/pvpanic.h | 3 ++- 2 files changed, 49 insertions(+),

[PATCH 4/8] hw/arm/virt: Use the pvpanic device

2020-10-22 Thread Mihai Carabas
From: Peng Hao Add pvpanic device in arm virt machine. Signed-off-by: Peng Hao Reviewed-by: Andrew Jones Signed-off-by: Mihai Carabas --- hw/arm/virt.c | 25 + include/hw/arm/virt.h | 2 ++ 2 files changed, 27 insertions(+) diff --git a/hw/arm/virt.c b/hw/ar

[PATCH 6/8] hw/arm/virt: add configure interface for pvpanic-mmio

2020-10-22 Thread Mihai Carabas
From: Peng Hao Add the option to turn on/off the pvpanic-mmio device in virt machine. Signed-off-by: Peng Hao Reviewed-by: Andrew Jones Signed-off-by: Mihai Carabas --- hw/arm/virt.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/hw/arm/virt.c b/hw/arm/virt.c ind

[PATCH 5/8] hw/arm/virt: add pvpanic device in virt acpi table

2020-10-22 Thread Mihai Carabas
From: Peng Hao Add pvpanic device in virt acpi table, so when kernel command line uses acpi=force, kernel can get info from acpi table. Reviewed-by: Andrew Jones Signed-off-by: Peng Hao Signed-off-by: Mihai Carabas --- hw/arm/virt-acpi-build.c | 17 + 1 file changed, 17 inser

[PATCH 7/8] pvpanic : update pvpanic document

2020-10-22 Thread Mihai Carabas
From: Peng Hao Add mmio support info in docs/specs/pvpanic.txt. Reviewed-by: Andrew Jones Signed-off-by: Peng Hao Signed-off-by: Mihai Carabas --- docs/specs/pvpanic.txt | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/specs/pvpanic.txt b/docs/specs/pvpan

Re: [PATCH 1/2] s390x: pv: Remove sclp boundary checks

2020-10-22 Thread Thomas Huth
On 21/10/2020 15.43, Janosch Frank wrote: > The SCLP boundary cross check is done by the Ultravisor for a > protected guest, hence we don't need to do it. As QEMU doesn't get a > valid SCCB address in protected mode this is even problematic and can > lead to QEMU reporting a false boundary cross er

Re: [PATCH] s390x: pv: Fix diag318 PV fencing

2020-10-22 Thread David Hildenbrand
On 22.10.20 10:23, Janosch Frank wrote: > Diag318 fencing needs to be determined on the current VM PV state and > not on the state that the VM has when we create the CPU model. > > Signed-off-by: Janosch Frank > Reported-by: Marc Hartmayer > Reviewed-by: Christian Borntraeger > Fixes: fabdada93

Re: [PATCH v2 2/8] tests/9pfs: add local Tunlinkat directory test

2020-10-22 Thread Greg Kurz
On Wed, 21 Oct 2020 14:17:01 +0200 Christian Schoenebeck wrote: > This test case uses a Tunlinkat 9p request with flag AT_REMOVEDIR > (see 'man 2 unlink') to remove a directory from host's test directory. > > Signed-off-by: Christian Schoenebeck > --- Reviewed-by: Greg Kurz > tests/qtest/vi

Re: [PATCH] s390x: pv: Fix diag318 PV fencing

2020-10-22 Thread Janosch Frank
On 10/22/20 10:32 AM, David Hildenbrand wrote: > On 22.10.20 10:23, Janosch Frank wrote: >> Diag318 fencing needs to be determined on the current VM PV state and >> not on the state that the VM has when we create the CPU model. >> >> Signed-off-by: Janosch Frank >> Reported-by: Marc Hartmayer >>

Re: [PATCH] migration/block-dirty-bitmap: fix larger granularity bitmaps

2020-10-22 Thread Vladimir Sementsov-Ogievskiy
22.10.2020 10:46, Stefan Reiter wrote: On 10/21/20 5:17 PM, Vladimir Sementsov-Ogievskiy wrote: 21.10.2020 17:44, Stefan Reiter wrote: sectors_per_chunk is a 64 bit integer, but the calculation is done in 32 bits, leading to an overflow for coarse bitmap granularities. If that results in the v

Re: [PATCH] s390x: pv: Fix diag318 PV fencing

2020-10-22 Thread David Hildenbrand
On 22.10.20 10:39, Janosch Frank wrote: > On 10/22/20 10:32 AM, David Hildenbrand wrote: >> On 22.10.20 10:23, Janosch Frank wrote: >>> Diag318 fencing needs to be determined on the current VM PV state and >>> not on the state that the VM has when we create the CPU model. >>> >>> Signed-off-by: Jan

Re: [PATCH v2 3/8] tests/9pfs: add local Tlcreate test

2020-10-22 Thread Greg Kurz
On Wed, 21 Oct 2020 14:25:33 +0200 Christian Schoenebeck wrote: > This test case uses a Tlcreate 9p request to create a regular file inside > host's test directory. > > Signed-off-by: Christian Schoenebeck > --- Just one remark, see below. Reviewed-by: Greg Kurz > tests/qtest/virtio-9p-tes

Re: [PATCH v2 4/8] tests/9pfs: add local Tunlinkat file test

2020-10-22 Thread Greg Kurz
On Wed, 21 Oct 2020 14:28:37 +0200 Christian Schoenebeck wrote: > This test case uses a Tunlinkat request to remove a regular file using > the 9pfs 'local' fs driver. > > Signed-off-by: Christian Schoenebeck > --- Reviewed-by: Greg Kurz > tests/qtest/virtio-9p-test.c | 24 ++

Re: [PATCH v11 09/13] copy-on-read: skip non-guest reads if no copy needed

2020-10-22 Thread Vladimir Sementsov-Ogievskiy
22.10.2020 10:50, Andrey Shinkevich wrote: On 21.10.2020 23:43, Andrey Shinkevich wrote: On 14.10.2020 18:22, Vladimir Sementsov-Ogievskiy wrote: 14.10.2020 15:51, Max Reitz wrote: On 12.10.20 19:43, Andrey Shinkevich wrote: If the flag BDRV_REQ_PREFETCH was set, pass it further to the COR-d

Re: [PATCH v2 5/8] tests/9pfs: add local Tsymlink test

2020-10-22 Thread Greg Kurz
On Wed, 21 Oct 2020 14:33:34 +0200 Christian Schoenebeck wrote: > This test case uses a Tsymlink 9p request to create a symbolic link using > the 9pfs 'local' fs driver. > > Signed-off-by: Christian Schoenebeck > --- Reviewed-by: Greg Kurz > tests/qtest/virtio-9p-test.c | 77 +++

Re: [PATCH v2 6/8] tests/9pfs: add local Tunlinkat symlink test

2020-10-22 Thread Greg Kurz
On Wed, 21 Oct 2020 14:36:23 +0200 Christian Schoenebeck wrote: > This test case uses a Tunlinkat request to remove a symlink using > the 9pfs 'local' fs driver. > > Signed-off-by: Christian Schoenebeck > --- Reviewed-by: Greg Kurz > tests/qtest/virtio-9p-test.c | 28 +++

[PATCH] MAINTAINERS: Update nvme entries

2020-10-22 Thread Klaus Jensen
From: Klaus Jensen Make sure that maintainers of both the nvme block driver and the emulated nvme device is notified about changes to the shared nvme.h. Signed-off-by: Klaus Jensen --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 6a197bd358d

Re: [PATCH] MAINTAINERS: Update nvme entries

2020-10-22 Thread Klaus Jensen
On Oct 22 11:00, Klaus Jensen wrote: > From: Klaus Jensen > > Make sure that maintainers of both the nvme block driver and the > emulated nvme device is notified about changes to the shared nvme.h. > > Signed-off-by: Klaus Jensen > --- > MAINTAINERS | 2 ++ > 1 file changed, 2 insertions(+) >

Re: [PATCH v2 7/8] tests/9pfs: add local Tlink test

2020-10-22 Thread Greg Kurz
On Wed, 21 Oct 2020 14:51:09 +0200 Christian Schoenebeck wrote: > This test case uses a Tlink request to create a hard link to a regular > file using the 9pfs 'local' fs driver. > > Signed-off-by: Christian Schoenebeck > --- Reviewed-by: Greg Kurz > tests/qtest/virtio-9p-test.c | 71 +++

Re: [PATCH v4 0/2] Skip copy-on-write when allocating a zero cluster

2020-10-22 Thread Alberto Garcia
ping On Mon 21 Sep 2020 04:30:48 PM CEST, Alberto Garcia wrote: > I had to rebase the series due to conflicting changes on master. There > are no other differences. > > Berto > > v4: > - Fix rebase conflicts after cb8503159a > > v3: https://lists.gnu.org/archive/html/qemu-block/2020-09/msg00912.ht

Re: [PATCH v2 7/8] tests/9pfs: add local Tlink test

2020-10-22 Thread Greg Kurz
On Wed, 21 Oct 2020 20:20:08 +0200 Christian Schoenebeck wrote: > On Mittwoch, 21. Oktober 2020 14:51:09 CEST Christian Schoenebeck wrote: > > This test case uses a Tlink request to create a hard link to a regular > > file using the 9pfs 'local' fs driver. > > > > Signed-off-by: Christian Schoen

Re: [PATCH v2 8/8] tests/9pfs: add local Tunlinkat hard link test

2020-10-22 Thread Greg Kurz
On Wed, 21 Oct 2020 14:55:46 +0200 Christian Schoenebeck wrote: > This test case uses a Tunlinkat request to remove a previously hard > linked file by using the 9pfs 'local' fs driver. > > Signed-off-by: Christian Schoenebeck > --- Reviewed-by: Greg Kurz > tests/qtest/virtio-9p-test.c | 30

Re: [PATCH v6 02/16] fuzz: Add generic virtual-device fuzzer

2020-10-22 Thread Darren Kenny
Hi Alex, On Wednesday, 2020-10-21 at 17:09:08 -04, Alexander Bulekov wrote: > This is a generic fuzzer designed to fuzz a virtual device's > MemoryRegions, as long as they exist within the Memory or Port IO (if it > exists) AddressSpaces. The fuzzer's input is interpreted into a sequence > of qtes

Re: [PATCH v6 13/16] fuzz: add an "opaque" to the FuzzTarget struct

2020-10-22 Thread Darren Kenny
On Wednesday, 2020-10-21 at 17:09:19 -04, Alexander Bulekov wrote: > It can be useful to register FuzzTargets that have nearly-identical > initialization handlers (e.g. for using the same fuzzing code, with > different configuration options). Add an opaque pointer to the > FuzzTarget struct, so tha

Re: [PATCH v6 14/16] fuzz: add generic-fuzz configs for oss-fuzz

2020-10-22 Thread Darren Kenny
On Wednesday, 2020-10-21 at 17:09:20 -04, Alexander Bulekov wrote: > Predefine some generic-fuzz configs. For each of these, we will create a > separate FuzzTarget that can be selected through argv0 and, therefore, > fuzzed on oss-fuzz. > > Signed-off-by: Alexander Bulekov Reviewed-by: Darren Ken

Re: [PATCH v6 15/16] fuzz: register predefined generic-fuzz configs

2020-10-22 Thread Darren Kenny
On Wednesday, 2020-10-21 at 17:09:21 -04, Alexander Bulekov wrote: > We call get_generic_fuzz_configs, which fills an array with > predefined {name, args, objects} triples. For each of these, we add a > new FuzzTarget, that uses a small wrapper to set > QEMU_FUZZ_{ARGS,OBJECTS} to the corresponding

Re: [PATCH v4 1/2] qcow2: Report BDRV_BLOCK_ZERO more accurately in bdrv_co_block_status()

2020-10-22 Thread Vladimir Sementsov-Ogievskiy
21.09.2020 17:30, Alberto Garcia wrote: If a BlockDriverState supports backing files but has none then any unallocated area reads back as zeroes. bdrv_co_block_status() is only reporting this is if want_zero is true, but this is an inexpensive test and there is no reason not to do it in all case

Re: [PATCH v6 16/16] scripts/oss-fuzz: remove the generic-fuzz target

2020-10-22 Thread Darren Kenny
Hi Alex, On Wednesday, 2020-10-21 at 17:09:22 -04, Alexander Bulekov wrote: > generic-fuzz is not a standalone fuzzer - it requires some env variables > to be set. On oss-fuzz, we set these with some predefined > generic-fuzz-{...} targets, that are thin wrappers around generic-fuzz. > Remove gene

Re: [PATCH] s390x: pv: Fix diag318 PV fencing

2020-10-22 Thread Halil Pasic
On Thu, 22 Oct 2020 04:23:12 -0400 Janosch Frank wrote: > Diag318 fencing needs to be determined on the current VM PV state and > not on the state that the VM has when we create the CPU model. > > Signed-off-by: Janosch Frank > Reported-by: Marc Hartmayer > Reviewed-by: Christian Borntraeger

Re: [PATCH] s390x: pv: Fix diag318 PV fencing

2020-10-22 Thread David Hildenbrand
On 22.10.20 11:54, Halil Pasic wrote: > On Thu, 22 Oct 2020 04:23:12 -0400 > Janosch Frank wrote: > >> Diag318 fencing needs to be determined on the current VM PV state and >> not on the state that the VM has when we create the CPU model. >> >> Signed-off-by: Janosch Frank >> Reported-by: Marc H

Re: [PULL 00/17] Microvm 20201021 patches

2020-10-22 Thread Peter Maydell
On Wed, 21 Oct 2020 at 15:52, Gerd Hoffmann wrote: > > The following changes since commit 4c41341af76cfc85b5a6c0f87de4838672ab9f89: > > Merge remote-tracking branch 'remotes/aperard/tags/pull-xen-20201020' into > staging (2020-10-20 11:20:36 +0100) > > are available in the Git repository at: >

[PATCH] target/i386: seg_helper: Correct segement selector nullification in the RET/IRET helper

2020-10-22 Thread Bin Meng
From: Bin Meng Per the SDM, when returning to outer privilege level, for segment registers (ES, FS, GS, and DS) if the check fails, the segment selector becomes null, but QEMU clears the base/limit/flags as well as nullifying the segment selector, which should be a spec violation. Real hardware

Re: [PATCH 0/8] Add support for pvpanic mmio device

2020-10-22 Thread Peter Maydell
On Thu, 22 Oct 2020 at 09:25, Mihai Carabas wrote: > The patchset was assembled from chuncks from some old patches from 2018 [1] > which were left unmerged and some additions from me. Surprisingly their Linux > kernel counterpart were merged (so the pvpanic driver from the kernel supports > mmio).

[PATCH v2 0/2] s390x: pv: Diag318 fixes

2020-10-22 Thread Janosch Frank
Here are two fixes for the diag318 support that fix crashes when booting PV guests. We're working on extending our testing to catch problems like these earlier. Branch: https://gitlab.com/frankja/qemu/-/commits/bb/frankja/diag318_fixes CI: https://gitlab.com/frankja/qemu/-/pipelines/206174979

[PATCH v2 1/2] s390x: pv: Remove sclp boundary checks

2020-10-22 Thread Janosch Frank
The SCLP boundary cross check is done by the Ultravisor for a protected guest, hence we don't need to do it. As QEMU doesn't get a valid SCCB address in protected mode this is even problematic and can lead to QEMU reporting a false boundary cross error. Signed-off-by: Janosch Frank Reported-by: M

[PATCH v2 2/2] s390x: pv: Fix diag318 PV fencing

2020-10-22 Thread Janosch Frank
Diag318 fencing needs to be determined on the current VM PV state and not on the state that the VM has when we create the CPU model. Signed-off-by: Janosch Frank Reported-by: Marc Hartmayer Fixes: fabdada935 ("s390: guest support for diagnose 0x318") --- target/s390x/cpu_features.c | 5 + t

Re: [PATCH v2 3/8] tests/9pfs: add local Tlcreate test

2020-10-22 Thread Christian Schoenebeck
On Donnerstag, 22. Oktober 2020 10:51:46 CEST Greg Kurz wrote: > On Wed, 21 Oct 2020 14:25:33 +0200 > > Christian Schoenebeck wrote: > > This test case uses a Tlcreate 9p request to create a regular file inside > > host's test directory. > > > > Signed-off-by: Christian Schoenebeck > > --- > >

Re: [PATCH v2 2/2] s390x: pv: Fix diag318 PV fencing

2020-10-22 Thread David Hildenbrand
On 22.10.20 12:31, Janosch Frank wrote: > Diag318 fencing needs to be determined on the current VM PV state and > not on the state that the VM has when we create the CPU model. > > Signed-off-by: Janosch Frank > Reported-by: Marc Hartmayer > Fixes: fabdada935 ("s390: guest support for diagnose 0

Re: [PATCH v3 1/2] hw/block/nvme: add dulbe support

2020-10-22 Thread Philippe Mathieu-Daudé
On 10/22/20 4:21 AM, Keith Busch wrote: On Thu, Oct 22, 2020 at 12:17:35AM +0200, Klaus Jensen wrote: +for (int i = 1; i <= n->num_namespaces; i++) { You can call me old-school, but I don't think C should have allowed mixed declarations with code. Since commit 7be41675f7c ("confi

Re: [PATCH v2 2/2] s390x: pv: Fix diag318 PV fencing

2020-10-22 Thread Christian Borntraeger
On 22.10.20 12:31, Janosch Frank wrote: > Diag318 fencing needs to be determined on the current VM PV state and > not on the state that the VM has when we create the CPU model. > > Signed-off-by: Janosch Frank > Reported-by: Marc Hartmayer > Fixes: fabdada935 ("s390: guest support for diagnos

Re: [PATCH v1 6/6] tests/acceptance: pick a random gdb port for reverse debugging

2020-10-22 Thread Philippe Mathieu-Daudé
On 10/22/20 7:20 AM, Thomas Huth wrote: On 21/10/2020 18.31, Alex Bennée wrote: Currently the test randomly fails if you are using a shared machine due to contention on the well known port 1234. We can ameliorate this a bit by picking a random non-ephemeral port although it doesn't totally avoid

Re: [PATCH v1 4/6] gitlab: skip checkpatch.pl checks if no commit delta on branch

2020-10-22 Thread Philippe Mathieu-Daudé
On 10/21/20 6:31 PM, Alex Bennée wrote: From: Daniel P. Berrangé If the current branch is synced to the current upstream git master, there are no commits that need checking. This causes checkpatch.pl to print an error that it found no commits. We need to avoid calling checkpatch.pl in this case

[PATCH] physmem: improve ram size error messages

2020-10-22 Thread Pankaj Gupta
Ram size mismatch condition logs below message. "Length mismatch: pc.ram: 0x8000 in != 0x18000: Invalid argument" This patch improves the readability of error messages. Removed the superflous "in" and changed "Length" to "Size". Signed-off-by: Pankaj Gupta Reported-by: Li Zhang

[PULL v2 00/28] Block patches

2020-10-22 Thread Stefan Hajnoczi
The following changes since commit ac793156f650ae2d77834932d72224175ee69086: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20201020-1' into staging (2020-10-20 21:11:35 +0100) are available in the Git repository at: https://gitlab.com/stefanha/qemu.git tags/block-pull

[PULL v2 05/28] block: move logical block size check function to a common utility function

2020-10-22 Thread Stefan Hajnoczi
From: Coiby Xu Move the constants from hw/core/qdev-properties.c to util/block-helpers.h so that knowledge of the min/max values is Signed-off-by: Stefan Hajnoczi Signed-off-by: Coiby Xu Reviewed-by: Stefan Hajnoczi Reviewed-by: Marc-André Lureau Acked-by: Eduardo Habkost Message-id: 202009

[PULL v2 01/28] block/nvme: Add driver statistics for access alignment and hw errors

2020-10-22 Thread Stefan Hajnoczi
From: Philippe Mathieu-Daudé Keep statistics of some hardware errors, and number of aligned/unaligned I/O accesses. QMP example booting a full RHEL 8.3 aarch64 guest: { "execute": "query-blockstats" } { "return": [ { "device": "", "node-name": "drive0",

[PULL v2 02/28] libvhost-user: Allow vu_message_read to be replaced

2020-10-22 Thread Stefan Hajnoczi
From: Coiby Xu Allow vu_message_read to be replaced by one which will make use of the QIOChannel functions. Thus reading vhost-user message won't stall the guest. For slave channel, we still use the default vu_message_read. Reviewed-by: Marc-André Lureau Signed-off-by: Coiby Xu Reviewed-by: St

[PULL v2 04/28] util/vhost-user-server: generic vhost user server

2020-10-22 Thread Stefan Hajnoczi
From: Coiby Xu Sharing QEMU devices via vhost-user protocol. Only one vhost-user client can connect to the server one time. Suggested-by: Kevin Wolf Signed-off-by: Stefan Hajnoczi Signed-off-by: Coiby Xu Reviewed-by: Stefan Hajnoczi Reviewed-by: Marc-André Lureau Message-id: 20200918080912

[PULL v2 03/28] libvhost-user: remove watch for kick_fd when de-initialize vu-dev

2020-10-22 Thread Stefan Hajnoczi
From: Coiby Xu When the client is running in gdb and quit command is run in gdb, QEMU will still dispatch the event which will cause segment fault in the callback function. Signed-off-by: Coiby Xu Reviewed-by: Stefan Hajnoczi Reviewed-by: Marc-André Lureau Message-id: 20200918080912.321299-3-

[PULL v2 11/28] block/export: consolidate request structs into VuBlockReq

2020-10-22 Thread Stefan Hajnoczi
Only one struct is needed per request. Drop req_data and the separate VuBlockReq instance. Instead let vu_queue_pop() allocate everything at once. This fixes the req_data memory leak in vu_block_virtio_process_req(). Signed-off-by: Stefan Hajnoczi Message-id: 20200924151549.913737-6-stefa...@red

[PULL v2 10/28] util/vhost-user-server: drop unnecessary watch deletion

2020-10-22 Thread Stefan Hajnoczi
Explicitly deleting watches is not necessary since libvhost-user calls remove_watch() during vu_deinit(). Add an assertion to check this though. Signed-off-by: Stefan Hajnoczi Message-id: 20200924151549.913737-5-stefa...@redhat.com Signed-off-by: Stefan Hajnoczi --- util/vhost-user-server.c | 1

[PULL v2 06/28] block/export: vhost-user block device backend server

2020-10-22 Thread Stefan Hajnoczi
From: Coiby Xu By making use of libvhost-user, block device drive can be shared to the connected vhost-user client. Only one client can connect to the server one time. Since vhost-user-server needs a block drive to be created first, delay the creation of this object. Suggested-by: Kevin Wolf S

[PULL v2 15/28] util/vhost-user-server: rework vu_client_trip() coroutine lifecycle

2020-10-22 Thread Stefan Hajnoczi
The vu_client_trip() coroutine is leaked during AioContext switching. It is also unsafe to destroy the vu_dev in panic_cb() since its callers still access it in some cases. Rework the lifecycle to solve these safety issues. Signed-off-by: Stefan Hajnoczi Message-id: 20200924151549.913737-10-stef

[PULL v2 07/28] MAINTAINERS: Add vhost-user block device backend server maintainer

2020-10-22 Thread Stefan Hajnoczi
From: Coiby Xu Suggested-by: Stefano Garzarella Signed-off-by: Coiby Xu Reviewed-by: Stefan Hajnoczi Reviewed-by: Marc-André Lureau Message-id: 20200918080912.321299-8-coiby...@gmail.com [Removed reference to vhost-user-blk-test.c, it will be sent in a separate pull request. --Stefan] Signed-

[PULL v2 13/28] util/vhost-user-server: fix memory leak in vu_message_read()

2020-10-22 Thread Stefan Hajnoczi
fds[] is leaked when qio_channel_readv_full() fails. Use vmsg->fds[] instead of keeping a local fds[] array. Then we can reuse goto fail to clean up fds. vmsg->fd_num must be zeroed before the loop to make this safe. Signed-off-by: Stefan Hajnoczi Message-id: 20200924151549.913737-8-stefa...@red

[PULL v2 08/28] util/vhost-user-server: s/fileds/fields/ typo fix

2020-10-22 Thread Stefan Hajnoczi
Signed-off-by: Stefan Hajnoczi Message-id: 20200924151549.913737-3-stefa...@redhat.com Signed-off-by: Stefan Hajnoczi --- util/vhost-user-server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/vhost-user-server.c b/util/vhost-user-server.c index b189944856..9bd33e0fdb

[PULL v2 24/28] block/io: fix bdrv_co_block_status_above

2020-10-22 Thread Stefan Hajnoczi
From: Vladimir Sementsov-Ogievskiy bdrv_co_block_status_above has several design problems with handling short backing files: 1. With want_zeros=true, it may return ret with BDRV_BLOCK_ZERO but without BDRV_BLOCK_ALLOCATED flag, when actually short backing file which produces these after-EOF zero

[PULL v2 09/28] util/vhost-user-server: drop unnecessary QOM cast

2020-10-22 Thread Stefan Hajnoczi
We already have access to the value with the correct type (ioc and sioc are the same QIOChannel). Signed-off-by: Stefan Hajnoczi Message-id: 20200924151549.913737-4-stefa...@redhat.com Signed-off-by: Stefan Hajnoczi --- util/vhost-user-server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PULL v2 16/28] block/export: report flush errors

2020-10-22 Thread Stefan Hajnoczi
Propagate the flush return value since errors are possible. Signed-off-by: Stefan Hajnoczi Message-id: 20200924151549.913737-11-stefa...@redhat.com Signed-off-by: Stefan Hajnoczi --- block/export/vhost-user-blk-server.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --g

[PULL v2 27/28] block/io: fix bdrv_is_allocated_above

2020-10-22 Thread Stefan Hajnoczi
From: Vladimir Sementsov-Ogievskiy bdrv_is_allocated_above wrongly handles short backing files: it reports after-EOF space as UNALLOCATED which is wrong, as on read the data is generated on the level of short backing file (if all overlays have unallocated areas at that place). Reusing bdrv_commo

Re: [PULL 00/13] SD/MMC patches for 2020-10-21

2020-10-22 Thread Peter Maydell
On Wed, 21 Oct 2020 at 18:37, Philippe Mathieu-Daudé wrote: > > The following changes since commit ac793156f650ae2d77834932d72224175ee69086: > > Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-2020102= > 0-1' into staging (2020-10-20 21:11:35 +0100) > > are available in the G

[PULL v2 18/28] util/vhost-user-server: move header to include/

2020-10-22 Thread Stefan Hajnoczi
Headers used by other subsystems are located in include/. Also add the vhost-user-server and vhost-user-blk-server headers to MAINTAINERS. Signed-off-by: Stefan Hajnoczi Message-id: 20200924151549.913737-13-stefa...@redhat.com Signed-off-by: Stefan Hajnoczi --- MAINTAINERS

[PULL v2 12/28] util/vhost-user-server: drop unused DevicePanicNotifier

2020-10-22 Thread Stefan Hajnoczi
The device panic notifier callback is not used. Drop it. Signed-off-by: Stefan Hajnoczi Message-id: 20200924151549.913737-7-stefa...@redhat.com Signed-off-by: Stefan Hajnoczi --- util/vhost-user-server.h | 3 --- block/export/vhost-user-blk-server.c | 3 +-- util/vhost-user-server.c

[PULL v2 19/28] util/vhost-user-server: use static library in meson.build

2020-10-22 Thread Stefan Hajnoczi
Don't compile contrib/libvhost-user/libvhost-user.c again. Instead build the static library once and then reuse it throughout QEMU. Also switch from CONFIG_LINUX to CONFIG_VHOST_USER, which is what the vhost-user tools (vhost-user-gpu, etc) do. Signed-off-by: Stefan Hajnoczi Message-id: 20200924

[PULL v2 14/28] util/vhost-user-server: check EOF when reading payload

2020-10-22 Thread Stefan Hajnoczi
Unexpected EOF is an error that must be reported. Signed-off-by: Stefan Hajnoczi Message-id: 20200924151549.913737-9-stefa...@redhat.com Signed-off-by: Stefan Hajnoczi --- util/vhost-user-server.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/util/vhost-user-server.c

  1   2   3   4   >