Re:Re: What this mean "dead: 1" and "dead: 0 1" on each tb block start?

2020-07-29 Thread tugouxp
So, flag is also the paramter index right? ,what about the sync ? At 2020-07-30 00:16:25, "Richard Henderson" wrote: >On 7/29/20 7:27 AM, tugouxp wrote: >> HI folks: >> on each tb block start, there are following ir code, and the most confusing >> me is that the postfix of

Re: [PATCH 1/2] hw/net/net_tx_pkt: add function to check pkt->max_raw_frags

2020-07-29 Thread Jason Wang
On 2020/7/29 上午12:26, Mauro Matteo Cascella wrote: On Tue, Jul 28, 2020 at 6:06 AM Jason Wang wrote: On 2020/7/28 上午1:08, Mauro Matteo Cascella wrote: This patch introduces a new function in hw/net/net_tx_pkt.{c,h} to check the current data fragment against the maximum number of data fragme

Re: [PATCH] docs/nvdimm: add 'pmem=on' for the device dax backend file

2020-07-29 Thread Pankaj Gupta
> At the end of live migration, QEMU uses msync() to flush the data to > the backend storage. When the backend file is a character device dax, > the pages explicitly avoid the page cache. It will return failure from > msync(). > The following warning is output. > > "warning: qemu_ram_msync: fa

Re: [PATCH] introduce VFIO-over-socket protocol specificaion

2020-07-29 Thread John G Johnson
Thanos is on vacation. My comments embedded. JJ > On Jul 29, 2020, at 5:48 AM, Stefan Hajnoczi wrote: > > On Wed, Jul 22, 2020 at 11:42:26AM +, Thanos Makatos wrote: diff --git a/docs/devel/vfio-over-socket.rst b/docs/devel/vfio-over

Re: [PATCH for-5.2 0/6] Continue booting in case the first device is not bootable

2020-07-29 Thread Thomas Huth
On 29/07/2020 13.42, Viktor Mihajlovski wrote: > > > On 7/28/20 8:37 PM, Thomas Huth wrote: >> If the user did not specify a "bootindex" property, the s390-ccw bios >> tries to find a bootable device on its own. Unfortunately, it alwasy >> stops at the very first device that it can find, no matte

[PATCH 2/2] target/arm: Fix compile error.

2020-07-29 Thread Kaige Li
When I compile qemu with such as: git clone https://git.qemu.org/git/qemu.git cd qemu git submodule init git submodule update --recursive ./configure make There is error log: /home/LiKaige/qemu/target/arm/translate-a64.c: In function ‘disas_ldst’: /home/LiKaige/qemu/target/arm/translate-a64.c:33

[PATCH 1/2] virtio-mem: Change PRIx32 to PRIXPTR to fix compile error.

2020-07-29 Thread Kaige Li
When I compile qemu with such as: git clone https://git.qemu.org/git/qemu.git cd qemu git submodule init git submodule update --recursive ./configure make There is error log: /home/LiKaige/qemu/hw/virtio/virtio-mem.c: In function ‘virtio_mem_set_block_size’: /home/LiKaige/qemu/hw/virtio/virtio-

Re: device compatibility interface for live migration with assigned devices

2020-07-29 Thread Yan Zhao
On Wed, Jul 29, 2020 at 01:12:55PM -0600, Alex Williamson wrote: > On Wed, 29 Jul 2020 12:28:46 +0100 > Sean Mooney wrote: > > > On Wed, 2020-07-29 at 16:05 +0800, Yan Zhao wrote: > > > On Mon, Jul 27, 2020 at 04:23:21PM -0600, Alex Williamson wrote: > > > > On Mon, 27 Jul 2020 15:24:40 +0800 >

Re: Adding VHOST_USER_PROTOCOL_F_CONFIG_MEM_SLOTS to 5.1 release notes

2020-07-29 Thread Raphael Norwitz
How about something like: "A new feature, VHOST_USER_PROTOCOL_F_CONFIGURE_MEM_SLOTS, has been added to the vhost-user protocol which, when negotiated, changes the way QEMU transmit memory regions to backend devices. Instead of sending all regions in a single VHOST_USER_SET_MEM_TABLE message, QEMU w

[PATCH 0/1] linux-user: Add support for SG_IO and SG_GET_VERSION_NUM raw SCSI ioctls

2020-07-29 Thread Leif N Huhn
Hi. This is my first time trying to contribute to qemu. This patch works correctly for architectures with the same bit-width, for example 32bit arm host and i386 user binary. Here is an example with the sg_simple2 executable from https://github.com/hreinecke/sg3_utils 32-bit ARM native: strace

[PATCH 1/1] linux-user: Add support for SG_IO and SG_GET_VERSION_NUM raw SCSI ioctls

2020-07-29 Thread Leif N Huhn
This patch implements functionalities of following ioctls: SG_GET_VERSION_NUM - Returns SG driver version number The sg version numbers are of the form "x.y.z" and the single number given by the SG_GET_VERSION_NUM ioctl() is calculated by (x * 1 + y * 100 + z). SG_IO - Permits us

Re: device compatibility interface for live migration with assigned devices

2020-07-29 Thread Yan Zhao
On Wed, Jul 29, 2020 at 12:28:46PM +0100, Sean Mooney wrote: > On Wed, 2020-07-29 at 16:05 +0800, Yan Zhao wrote: > > On Mon, Jul 27, 2020 at 04:23:21PM -0600, Alex Williamson wrote: > > > On Mon, 27 Jul 2020 15:24:40 +0800 > > > Yan Zhao wrote: > > > > > > > > > As you indicate, the vendor drive

[Bug 1888601] Re: QEMU v5.1.0-rc0/rc1 hang with nested virtualization

2020-07-29 Thread Jason Wang
Thanks for the information. It could be fixed by this commit upstream. a48aaf882b100b30111b5c7c75e1d9e83fe76cfd ("virtio-pci: fix wrong index in virtio_pci_queue_enabled") Please try. Thanks -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribe

Re: [PATCH v5] hw/pci-host: save/restore pci host config register for old ones

2020-07-29 Thread Wangjing (Hogan, Cloud Infrastructure Service Product Dept.)
> On Tue, Jul 28, 2020 at 11:27:09AM +0800, Hogan Wang wrote: > > The i440fx and q35 machines integrate i440FX or MCH PCI device by default. > > Refer to i440FX and ICH9-LPC spcifications, there are some reserved > > configuration registers can used to save/restore PCIHostState.config_reg. > > It'

[PATCH 2/6] hw/pci-host: save/restore pci host config register for old ones

2020-07-29 Thread Hogan Wang
The i440fx and q35 machines integrate i440FX or MCH PCI device by default. Refer to i440FX and ICH9-LPC spcifications, there are some reserved configuration registers can used to save/restore PCIHostState.config_reg. It's nasty but friendly to old ones. Reproducer steps: step 1. Make modifications

[PATCH] docs/nvdimm: add 'pmem=on' for the device dax backend file

2020-07-29 Thread Jingqi Liu
At the end of live migration, QEMU uses msync() to flush the data to the backend storage. When the backend file is a character device dax, the pages explicitly avoid the page cache. It will return failure from msync(). The following warning is output. "warning: qemu_ram_msync: failed to sync m

Re: [PATCH v3 0/8] Generalize start-powered-off property from ARM

2020-07-29 Thread David Gibson
On Tue, Jul 28, 2020 at 09:56:36PM -0300, Thiago Jung Bauermann wrote: > > Thiago Jung Bauermann writes: > > > The ARM code has a start-powered-off property in ARMCPU, which is a > > subclass of CPUState. This property causes arm_cpu_reset() to set > > CPUState::halted to 1, signalling that the

Re: [PATCH 1/1] docs: adding NUMA documentation for pseries

2020-07-29 Thread David Gibson
On Wed, Jul 29, 2020 at 09:57:56AM -0300, Daniel Henrique Barboza wrote: > This patch adds a new documentation file, ppc-spapr-numa.rst, > informing what developers and user can expect of the NUMA distance > support for the pseries machine, up to QEMU 5.1. > > In the (hopefully soon) future, when

[PATCH] virtio-mem: Work around format specifier mismatch for RISC-V

2020-07-29 Thread Bruce Rogers
This likely affects other, less popular host architectures as well. Less common host architectures under linux get QEMU_VMALLOC_ALIGN (from which VIRTIO_MEM_MIN_BLOCK_SIZE is derived) define to a variable of type uintptr, which isn't compatible with the format specifier used to print a user message

Re: [PATCH 04/16] hw/block/nvme: remove redundant has_sg member

2020-07-29 Thread Minwoo Im
> -Original Message- > From: Qemu-devel On > Behalf Of Klaus Jensen > Sent: Thursday, July 30, 2020 3:29 AM > To: Minwoo Im > Cc: Kevin Wolf ; qemu-bl...@nongnu.org; Klaus Jensen > ; qemu-devel@nongnu.org; Max Reitz ; > Keith Busch > Subject: Re: [PATCH 04/16] hw/block/nvme: remove redun

Re: [PATCH] introduce VFIO-over-socket protocol specificaion

2020-07-29 Thread Alex Williamson
On Thu, 16 Jul 2020 08:31:43 -0700 Thanos Makatos wrote: > This patch introduces the VFIO-over-socket protocol specification, which > is designed to allow devices to be emulated outside QEMU, in a separate > process. VFIO-over-socket reuses the existing VFIO defines, structs and > concepts. > >

Re: [PATCH v6 2/2] nvme: allow cmb and pmr to be enabled on same device

2020-07-29 Thread Klaus Jensen
On Jul 29 15:01, Andrzej Jakowski wrote: > So far it was not possible to have CMB and PMR emulated on the same > device, because BAR2 was used exclusively either of PMR or CMB. This > patch places CMB at BAR4 offset so it not conflicts with MSI-X vectors. > > Signed-off-by: Andrzej Jakowski > ---

Re: [PATCH-for-5.2 v4] hw/core/qdev: Increase qdev_realize() kindness

2020-07-29 Thread Paolo Bonzini
On 29/07/20 09:39, Markus Armbruster wrote: > Taking a step back, I disagree with the notion that assertions should be > avoided just because we have an Error **. A programming error doesn't > become less wrong, and continuing when the program is in disorder > doesn't become any safer when you add

[PATCH] pci_dma_rw: return correct value instead of 0

2020-07-29 Thread Emanuele Giuseppe Esposito
pci_dma_rw currently always returns 0, regardless of the result of dma_memory_rw. Adjusted to return the correct value. Signed-off-by: Emanuele Giuseppe Esposito --- include/hw/pci/pci.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/hw/pci/pci.h b/include/hw/pci/p

[PATCH 4/5] virtiofsd: Open lo->source while setting up root in sandbox=NONE mode

2020-07-29 Thread Vivek Goyal
In sandbox=NONE mode, lo->source points to the directory which is being exported. We have not done any chroot()/pivot_root(). So open lo->source. Signed-off-by: Vivek Goyal --- tools/virtiofsd/passthrough_ll.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/virtiofs

[PATCH 1/5] virtiofsd: Add notion of unprivileged mode

2020-07-29 Thread Vivek Goyal
At startup if we are running as non-root user, then internall set unpriviliged mode set. Also add a notion of sandbox NONE and set that internally in unprivileged mode. setting up namespaces and chroot() fails when one does not have privileges. Signed-off-by: Vivek Goyal --- tools/virtiofsd/pass

[PATCH 5/5] virtiofsd: Skip setup_capabilities() in sandbox=NONE mode

2020-07-29 Thread Vivek Goyal
While running as unpriviliged user setup_capabilities() fails for me. So we are doing some operation which requires priviliges. For now simply skip it in sandbox=NONE mode. Signed-off-by: Vivek Goyal --- tools/virtiofsd/passthrough_ll.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) di

[PATCH 3/5] virtiofsd: open /proc/self/fd/ in sandbox=NONE mode

2020-07-29 Thread Vivek Goyal
We need /proc/self/fd descriptor even in sandbox=NONE mode. Signed-off-by: Vivek Goyal --- tools/virtiofsd/passthrough_ll.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c index cd91c4a831..76ef

[PATCH v2 12/16] hw/block/nvme: be consistent about zeros vs zeroes

2020-07-29 Thread Klaus Jensen
From: Klaus Jensen The NVM Express specification generally uses 'zeroes' and not 'zeros', so let us align with it. Cc: Fam Zheng Signed-off-by: Klaus Jensen Reviewed-by: Minwoo Im Reviewed-by: Maxim Levitsky --- block/nvme.c | 4 ++-- hw/block/nvme.c | 8 include/block

[RFC PATCH 0/5] virtiofsd: Add notion of unprivileged mode

2020-07-29 Thread Vivek Goyal
Hi, Daniel Berrange mentioned that having a unpriviliged mode in virtiofsd might be useful for certain use cases. Hence I decided to give it a try. This is RFC patch series to allow running virtiofsd as unpriviliged user. This is still work in progress. I am posting it to get some early feedback

[PATCH v2 16/16] hw/block/nvme: remove explicit qsg/iov parameters

2020-07-29 Thread Klaus Jensen
From: Klaus Jensen Since nvme_map_prp always operate on the request-scoped qsg/iovs, just pass a single pointer to the NvmeRequest instead of two for each of the qsg and iov. Suggested-by: Minwoo Im Signed-off-by: Klaus Jensen --- hw/block/nvme.c | 11 +++ 1 file changed, 7 insertions

[PATCH v2 13/16] hw/block/nvme: add ns/cmd references in NvmeRequest

2020-07-29 Thread Klaus Jensen
From: Klaus Jensen Instead of passing around the NvmeNamespace and the NvmeCmd, add them as members in the NvmeRequest structure. Signed-off-by: Klaus Jensen Reviewed-by: Minwoo Im Reviewed-by: Maxim Levitsky --- hw/block/nvme.c | 187 ++-- hw/bloc

[PATCH 2/5] virtiofsd: create lock/pid file in per user cache dir

2020-07-29 Thread Vivek Goyal
Right now we create lock/pid file in /usr/local/var/... and unprivliged user does not have access to create files there. So create this file in per user cache dir as queried as specified by environment variable XDG_RUNTIME_DIR. Note: "su $USER" does not update XDG_RUNTIME_DIR and it still points

[PATCH v2 05/16] hw/block/nvme: destroy request iov before reuse

2020-07-29 Thread Klaus Jensen
From: Klaus Jensen Make sure the request iov is destroyed before reuse; fixing a memory leak. Signed-off-by: Klaus Jensen --- hw/block/nvme.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index a9d9a2912655..8f8257e06eed 100644 --- a/hw/block/nvme.c

[PATCH v2 06/16] hw/block/nvme: refactor dma read/write

2020-07-29 Thread Klaus Jensen
From: Klaus Jensen Refactor the nvme_dma_{read,write}_prp functions into a common function taking a DMADirection parameter. Signed-off-by: Klaus Jensen Reviewed-by: Maxim Levitsky Reviewed-by: Minwoo Im --- hw/block/nvme.c | 91 + 1 file change

[PATCH v2 11/16] hw/block/nvme: add check for mdts

2020-07-29 Thread Klaus Jensen
From: Klaus Jensen Add 'mdts' device parameter to control the Maximum Data Transfer Size of the controller and check that it is respected. Signed-off-by: Klaus Jensen Reviewed-by: Maxim Levitsky Reviewed-by: Minwoo Im --- hw/block/nvme.c | 30 +- hw/block/nv

[PATCH v2 14/16] hw/block/nvme: consolidate qsg/iov clearing

2020-07-29 Thread Klaus Jensen
From: Klaus Jensen Always destroy the request qsg/iov at the end of request use. Signed-off-by: Klaus Jensen --- hw/block/nvme.c | 52 - 1 file changed, 21 insertions(+), 31 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 3d727

[PATCH v2 09/16] hw/block/nvme: verify validity of prp lists in the cmb

2020-07-29 Thread Klaus Jensen
From: Klaus Jensen Before this patch the device already supported PRP lists in the CMB, but it did not check for the validity of it nor announced the support in the Identify Controller data structure LISTS field. If some of the PRPs in a PRP list are in the CMB, then ALL entries must be there. T

[PATCH v2 04/16] hw/block/nvme: remove redundant has_sg member

2020-07-29 Thread Klaus Jensen
From: Klaus Jensen Remove the has_sg member from NvmeRequest since it's redundant. Signed-off-by: Klaus Jensen --- hw/block/nvme.c | 7 ++- hw/block/nvme.h | 1 - 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index d60b19e1840f..a9d9a29126

[PATCH v2 15/16] hw/block/nvme: use preallocated qsg/iov in nvme_dma_prp

2020-07-29 Thread Klaus Jensen
From: Klaus Jensen Since clean up of the request qsg/iov is now always done post-use, there is no need to use a stack-allocated qsg/iov in nvme_dma_prp. Signed-off-by: Klaus Jensen Acked-by: Keith Busch Reviewed-by: Maxim Levitsky --- hw/block/nvme.c | 41 ++--

[PATCH v2 07/16] hw/block/nvme: add tracing to nvme_map_prp

2020-07-29 Thread Klaus Jensen
From: Klaus Jensen Add tracing to nvme_map_prp. Signed-off-by: Klaus Jensen --- hw/block/nvme.c | 2 ++ hw/block/trace-events | 1 + 2 files changed, 3 insertions(+) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 571635ebe9f9..952afbb05175 100644 --- a/hw/block/nvme.c +++ b/hw/blo

[PATCH v2 00/16] hw/block/nvme: dma handling and address mapping cleanup

2020-07-29 Thread Klaus Jensen
From: Klaus Jensen This series consists of patches that refactors dma read/write and adds a number of address mapping helper functions. v2: * hw/block/nvme: add mapping helpers - Add an assert in case of out of bounds array access. (Maxim) * hw/block/nvme: remove redundant has_sg member

[PATCH v2 10/16] hw/block/nvme: refactor request bounds checking

2020-07-29 Thread Klaus Jensen
From: Klaus Jensen Hoist bounds checking into its own function and check for wrap-around. Signed-off-by: Klaus Jensen Reviewed-by: Maxim Levitsky Reviewed-by: Minwoo Im --- hw/block/nvme.c | 26 +- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/hw/bloc

[PATCH v2 01/16] hw/block/nvme: memset preallocated requests structures

2020-07-29 Thread Klaus Jensen
From: Klaus Jensen This is preparatory to subsequent patches that change how QSGs/IOVs are handled. It is important that the qsg and iov members of the NvmeRequest are initially zeroed. Signed-off-by: Klaus Jensen Reviewed-by: Maxim Levitsky --- hw/block/nvme.c | 2 +- 1 file changed, 1 inser

[PATCH v2 08/16] hw/block/nvme: add request mapping helper

2020-07-29 Thread Klaus Jensen
From: Klaus Jensen Introduce the nvme_map helper to remove some noise in the main nvme_rw function. Signed-off-by: Klaus Jensen Reviewed-by: Maxim Levitsky --- hw/block/nvme.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c

[PATCH v2 03/16] hw/block/nvme: replace dma_acct with blk_acct equivalent

2020-07-29 Thread Klaus Jensen
From: Klaus Jensen The QSG isn't always initialized, so accounting could be wrong. Issue a call to blk_acct_start instead with the size taken from the QSG or IOV depending on the kind of I/O. Signed-off-by: Klaus Jensen Reviewed-by: Maxim Levitsky Reviewed-by: Minwoo Im --- hw/block/nvme.c |

[PATCH v2 02/16] hw/block/nvme: add mapping helpers

2020-07-29 Thread Klaus Jensen
From: Klaus Jensen Add nvme_map_addr, nvme_map_addr_cmb and nvme_addr_to_cmb helpers and use them in nvme_map_prp. This fixes a bug where in the case of a CMB transfer, the device would map to the buffer with a wrong length. Fixes: b2b2b67a00574 ("nvme: Add support for Read Data and Write Data

[PATCH v6] nvme: allow cmb and pmr emulation on same device

2020-07-29 Thread Andrzej Jakowski
Resending series recently posted on mailing list related to nvme device extension with couple of fixes after review. This patch series does following: - Fixes problem where CMBS bit was not set in controller capabilities register, so support for CMB was not correctly advertised to guest. Th

[PATCH v6 1/2] nvme: indicate CMB support through controller capabilities register

2020-07-29 Thread Andrzej Jakowski
This patch sets CMBS bit in controller capabilities register when user configures NVMe driver with CMB support, so capabilites are correctly reported to guest OS. Signed-off-by: Andrzej Jakowski Reviewed-by: Klaus Jensen Reviewed-by: Maxim Levitsky --- hw/block/nvme.c | 1 + include/bloc

[PATCH v6 2/2] nvme: allow cmb and pmr to be enabled on same device

2020-07-29 Thread Andrzej Jakowski
So far it was not possible to have CMB and PMR emulated on the same device, because BAR2 was used exclusively either of PMR or CMB. This patch places CMB at BAR4 offset so it not conflicts with MSI-X vectors. Signed-off-by: Andrzej Jakowski --- hw/block/nvme.c | 124

Re: [PATCH 02/16] hw/block/nvme: add mapping helpers

2020-07-29 Thread Klaus Jensen
On Jul 29 14:51, Andrzej Jakowski wrote: > On 7/29/20 2:24 PM, Klaus Jensen wrote: > > On Jul 29 13:40, Andrzej Jakowski wrote: > >> On 7/20/20 4:37 AM, Klaus Jensen wrote: > >>> From: Klaus Jensen > >>> > >>> Add nvme_map_addr, nvme_map_addr_cmb and nvme_addr_to_cmb helpers and > >>> use them in

Re: [PATCH 02/16] hw/block/nvme: add mapping helpers

2020-07-29 Thread Andrzej Jakowski
On 7/29/20 2:24 PM, Klaus Jensen wrote: > On Jul 29 13:40, Andrzej Jakowski wrote: >> On 7/20/20 4:37 AM, Klaus Jensen wrote: >>> From: Klaus Jensen >>> >>> Add nvme_map_addr, nvme_map_addr_cmb and nvme_addr_to_cmb helpers and >>> use them in nvme_map_prp. >>> >>> This fixes a bug where in the cas

RE: [PATCH v2 1/3] hw/i386: Initialize topo_ids from CpuInstanceProperties

2020-07-29 Thread Babu Moger
Igor, Sorry. Few more questions. > -Original Message- > From: Igor Mammedov > Sent: Wednesday, July 29, 2020 9:12 AM > To: Moger, Babu > Cc: pbonz...@redhat.com; r...@twiddle.net; qemu-devel@nongnu.org; > ehabk...@redhat.com > Subject: Re: [PATCH v2 1/3] hw/i386: Initialize topo_ids from

Re: [PATCH 02/16] hw/block/nvme: add mapping helpers

2020-07-29 Thread Klaus Jensen
On Jul 29 13:40, Andrzej Jakowski wrote: > On 7/20/20 4:37 AM, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Add nvme_map_addr, nvme_map_addr_cmb and nvme_addr_to_cmb helpers and > > use them in nvme_map_prp. > > > > This fixes a bug where in the case of a CMB transfer, the device would > >

[Bug 1888601] Re: QEMU v5.1.0-rc0/rc1 hang with nested virtualization

2020-07-29 Thread Simon Kaegi
Here's what I get with 5.1.0-rc2 ``` (gdb) thread apply all bt Thread 5 (LWP 23730): #0 0x7f9ae6040ebb in ioctl () #1 0x7f9ae57cf98b in kvm_vcpu_ioctl (cpu=cpu@entry=0x57539ea0, type=type@entry=44672) at /root/qemu/accel/kvm/kvm-all.c:2631 #2 0x7f9ae57cfac5 in kvm_cpu_exec (cp

Re: qemu repo lockdown message for a WHPX PR

2020-07-29 Thread Peter Maydell
On Wed, 29 Jul 2020 at 21:29, Paolo Bonzini wrote: > I was not referring to github pull requests, but rather to a maintainer > pull request. This is also sent to the mailing list. There is no > QEMU-specific documentation since maintainers are generally experienced > enough to have observed how

[Bug 1888601] Re: QEMU v5.1.0-rc0/rc1 hang with nested virtualization

2020-07-29 Thread Simon Kaegi
``` (gdb) thread apply all bt Thread 5 (LWP 211759): #0 0x7ff56a9988d8 in g_str_hash () #1 0x7ff56a997a0c in g_hash_table_lookup () #2 0x7ff56a6c528f in type_table_lookup (name=0x7ff56ac9a9dd "virtio-bus") at qom/object.c:84 #3 type_get_by_name (name=0x7ff56ac9a9dd "virtio-bus") a

Re: [PATCH 02/16] hw/block/nvme: add mapping helpers

2020-07-29 Thread Andrzej Jakowski
On 7/20/20 4:37 AM, Klaus Jensen wrote: > From: Klaus Jensen > > Add nvme_map_addr, nvme_map_addr_cmb and nvme_addr_to_cmb helpers and > use them in nvme_map_prp. > > This fixes a bug where in the case of a CMB transfer, the device would > map to the buffer with a wrong length. > > Fixes: b2b2b

Re: [RFC v2 27/76] target/riscv: rvv-0.9: load/store whole register instructions

2020-07-29 Thread Richard Henderson
On 7/22/20 2:15 AM, frank.ch...@sifive.com wrote: > +static void > +vext_ldst_whole(void *vd, target_ulong base, CPURISCVState *env, uint32_t > desc, > +vext_ldst_elem_fn *ldst_elem, uint32_t esz, uintptr_t ra, > +MMUAccessType access_type) > +{ > +uint32_t i, k

Re: qemu repo lockdown message for a WHPX PR

2020-07-29 Thread Paolo Bonzini
On 28/07/20 21:19, Sunil Muthuswamy wrote: > Hey Paolo, > > Following your suggestion of creating PRs for WHPX changes, I tried creating > a PR https://github.com/qemu/qemu/pull/95 > > But, I am getting repo-lockdown message. What do I need to do differently? Hi, I was not referring to github

RE: [EXTERNAL] Re: qemu repo lockdown message for a WHPX PR

2020-07-29 Thread Sunil Muthuswamy
No, I am trying to submit a pull request as suggested by Paolo in this post: https://patchwork.ozlabs.org/project/qemu-devel/patch/sn4pr2101mb08804d23439166e81ff151f7c0...@sn4pr2101mb0880.namprd21.prod.outlook.com/#2373829 > -Original Message- > From: Eric Blake > Sent: Wednesday, July 29

Re: qemu repo lockdown message for a WHPX PR

2020-07-29 Thread Eric Blake
On 7/29/20 3:05 PM, Sunil Muthuswamy wrote: Adding Peter Maydell as well. -Original Message- From: Sunil Muthuswamy Sent: Tuesday, July 28, 2020 12:20 PM To: Paolo Bonzini Cc: qemu-devel@nongnu.org Subject: qemu repo lockdown message for a WHPX PR Hey Paolo, Following your suggestion

Re: [PATCH v5 3/3] nvme: allow cmb and pmr to be enabled on same device

2020-07-29 Thread Klaus Jensen
On Jul 27 11:59, Andrzej Jakowski wrote: > On 7/27/20 2:06 AM, Klaus Jensen wrote: > > On Jul 23 09:03, Andrzej Jakowski wrote: > >> So far it was not possible to have CMB and PMR emulated on the same > >> device, because BAR2 was used exclusively either of PMR or CMB. This > >> patch places CMB at

Re: [PATCH v3 08/18] hw/block/nvme: add support for the asynchronous event request command

2020-07-29 Thread Klaus Jensen
On Jul 29 21:45, Maxim Levitsky wrote: > On Wed, 2020-07-29 at 15:37 +0200, Klaus Jensen wrote: > > On Jul 29 13:43, Maxim Levitsky wrote: > > > On Mon, 2020-07-06 at 08:12 +0200, Klaus Jensen wrote: > > > > +DEFINE_PROP_UINT8("aerl", NvmeCtrl, params.aerl, 3), > > > So this is number of AERs t

[PATCH] linux-user: Map signal numbers in fcntl

2020-07-29 Thread Timothy Baldwin
Map signal numbers in fcntl F_SETSIG and F_GETSIG. Signed-off-by: Timothy E Baldwin ---  linux-user/syscall.c | 10 --  1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 945fc25279..8456bad109 100644 --- a/linux-user/syscall.c

RE: qemu repo lockdown message for a WHPX PR

2020-07-29 Thread Sunil Muthuswamy
Adding Peter Maydell as well. > -Original Message- > From: Sunil Muthuswamy > Sent: Tuesday, July 28, 2020 12:20 PM > To: Paolo Bonzini > Cc: qemu-devel@nongnu.org > Subject: qemu repo lockdown message for a WHPX PR > > Hey Paolo, > > Following your suggestion of creating PRs for WHPX c

Re: [PATCH 15/16] hw/block/nvme: remove NvmeCmd parameter

2020-07-29 Thread Klaus Jensen
On Jul 29 21:25, Maxim Levitsky wrote: > On Mon, 2020-07-20 at 13:37 +0200, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Keep a copy of the raw nvme command in the NvmeRequest and remove the > > now redundant NvmeCmd parameter. > > Shouldn't you clear the req->cmd in nvme_req_clear too for

[PATCH] configure: actually disable 'git_update' mode with --disable-git-update

2020-07-29 Thread Dan Streetman
The --disable-git-update configure param sets git_update=no, but some later checks only look for the .git dir. This changes the --enable-git-update to set git_update=yes but also fail if it does not find a .git dir. Then all the later checks for the .git dir can just be changed to a check for $git_

Re: [PATCH 16/16] hw/block/nvme: use preallocated qsg/iov in nvme_dma_prp

2020-07-29 Thread Klaus Jensen
On Jul 30 01:15, Minwoo Im wrote: > On 20-07-20 13:37:48, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Since clean up of the request qsg/iov is now always done post-use, there > > is no need to use a stack-allocated qsg/iov in nvme_dma_prp. > > > > Signed-off-by: Klaus Jensen > > Acked-by

Re: [PATCH v3 0/7] Fix scsi devices plug/unplug races w.r.t virtio-scsi iothread

2020-07-29 Thread Maxim Levitsky
On Wed, 2020-07-15 at 18:01 +0300, Maxim Levitsky wrote: > Hi! > > This is a patch series that is a result of my discussion with Paulo on > how to correctly fix the root cause of the BZ #1812399. > > The root cause of this bug is the fact that IO thread is running mostly > unlocked versus main th

Re: [PATCH 06/16] hw/block/nvme: pass request along for tracing

2020-07-29 Thread Klaus Jensen
On Jul 30 00:49, Minwoo Im wrote: > Klaus, > > On 20-07-20 13:37:38, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Pass along the NvmeRequest in various functions since it is very useful > > for tracing. > > One doubt here. > This patch has put NvmeRequest argument to the nvme_map_prp()

Re: [PATCH 14/16] hw/block/nvme: consolidate qsg/iov clearing

2020-07-29 Thread Klaus Jensen
On Jul 29 21:18, Maxim Levitsky wrote: > On Mon, 2020-07-20 at 13:37 +0200, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Always destroy the request qsg/iov at the end of request use. > > > > Signed-off-by: Klaus Jensen > > --- > > hw/block/nvme.c | 48 +---

Re: [PATCH for-5.1] qapi/machine.json: Fix missing newline in doc comment

2020-07-29 Thread Philippe Mathieu-Daudé
On 7/29/20 9:10 PM, Peter Maydell wrote: > In commit 176d2cda0dee9f4 we added the @die-id field > to the CpuInstanceProperties struct, but in the process > accidentally removed the newline between the doc-comment > lines for @core-id and @thread-id. > > Put the newline back in; this fixes a misfor

Re: [PATCH 15/16] hw/block/nvme: remove NvmeCmd parameter

2020-07-29 Thread Klaus Jensen
On Jul 30 01:10, Minwoo Im wrote: > On 20-07-20 13:37:47, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Keep a copy of the raw nvme command in the NvmeRequest and remove the > > now redundant NvmeCmd parameter. > > > > Signed-off-by: Klaus Jensen > > I would really have suggested this cha

Re: [PATCH 10/16] hw/block/nvme: add check for mdts

2020-07-29 Thread Klaus Jensen
On Jul 30 01:00, Minwoo Im wrote: > On 20-07-20 13:37:42, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Add 'mdts' device parameter to control the Maximum Data Transfer Size of > > the controller and check that it is respected. > > > > Signed-off-by: Klaus Jensen > > Reviewed-by: Maxim Lev

Re: [PATCH for-5.1] qapi/machine.json: Fix missing newline in doc comment

2020-07-29 Thread Eric Blake
On 7/29/20 2:10 PM, Peter Maydell wrote: In commit 176d2cda0dee9f4 we added the @die-id field to the CpuInstanceProperties struct, but in the process accidentally removed the newline between the doc-comment lines for @core-id and @thread-id. Put the newline back in; this fixes a misformatting in

Re: [PATCH 07/16] hw/block/nvme: add request mapping helper

2020-07-29 Thread Klaus Jensen
On Jul 29 21:31, Maxim Levitsky wrote: > On Thu, 2020-07-30 at 00:52 +0900, Minwoo Im wrote: > > Klaus, > > > > On 20-07-20 13:37:39, Klaus Jensen wrote: > > > From: Klaus Jensen > > > > > > Introduce the nvme_map helper to remove some noise in the main nvme_rw > > > function. > > > > > > Signe

Re: device compatibility interface for live migration with assigned devices

2020-07-29 Thread Alex Williamson
On Wed, 29 Jul 2020 12:28:46 +0100 Sean Mooney wrote: > On Wed, 2020-07-29 at 16:05 +0800, Yan Zhao wrote: > > On Mon, Jul 27, 2020 at 04:23:21PM -0600, Alex Williamson wrote: > > > On Mon, 27 Jul 2020 15:24:40 +0800 > > > Yan Zhao wrote: > > > > > > > > > As you indicate, the vendor driver

[PATCH for-5.1] qapi/machine.json: Fix missing newline in doc comment

2020-07-29 Thread Peter Maydell
In commit 176d2cda0dee9f4 we added the @die-id field to the CpuInstanceProperties struct, but in the process accidentally removed the newline between the doc-comment lines for @core-id and @thread-id. Put the newline back in; this fixes a misformatting in the generated HTML QMP reference manual.

Re: device compatibility interface for live migration with assigned devices

2020-07-29 Thread Dr. David Alan Gilbert
* Alex Williamson (alex.william...@redhat.com) wrote: > On Mon, 27 Jul 2020 15:24:40 +0800 > Yan Zhao wrote: > > > > > As you indicate, the vendor driver is responsible for checking version > > > > information embedded within the migration stream. Therefore a > > > > migration should fail early

Re: [PATCH 12/16] hw/block/nvme: refactor NvmeRequest clearing

2020-07-29 Thread Klaus Jensen
On Jul 29 20:47, Maxim Levitsky wrote: > On Mon, 2020-07-20 at 13:37 +0200, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Move clearing of the structure from "clear before use" to "clear > > after use". > > > > Signed-off-by: Klaus Jensen > > --- > > hw/block/nvme.c | 7 ++- > > 1 fil

[PATCH] schemas: Add vim modeline

2020-07-29 Thread Andrea Bolognani
The various schemas included in QEMU use a JSON-based format which is, however, strictly speaking not valid JSON. As a consequence, when vim tries to apply syntax highlight rules for JSON (as guessed from the file name), the result is an unreadable mess which mostly consist of red markers pointing

Re: [PATCH v3 12/18] hw/block/nvme: support the get/set features select and save fields

2020-07-29 Thread Maxim Levitsky
On Wed, 2020-07-29 at 15:48 +0200, Klaus Jensen wrote: > On Jul 29 16:17, Maxim Levitsky wrote: > > On Mon, 2020-07-06 at 08:12 +0200, Klaus Jensen wrote: > > > From: Klaus Jensen > > > > > > Since the device does not have any persistent state storage, no > > > features are "saveable" and setting

Re: [PATCH v3 08/18] hw/block/nvme: add support for the asynchronous event request command

2020-07-29 Thread Maxim Levitsky
On Wed, 2020-07-29 at 15:37 +0200, Klaus Jensen wrote: > On Jul 29 13:43, Maxim Levitsky wrote: > > On Mon, 2020-07-06 at 08:12 +0200, Klaus Jensen wrote: > > > From: Klaus Jensen > > > > > > Add support for the Asynchronous Event Request command. Required for > > > compliance with NVMe revision

Re: [PATCH v5] hw/pci-host: save/restore pci host config register for old ones

2020-07-29 Thread Dr. David Alan Gilbert
* Michael S. Tsirkin (m...@redhat.com) wrote: > On Tue, Jul 28, 2020 at 11:27:09AM +0800, Hogan Wang wrote: > > The i440fx and q35 machines integrate i440FX or MCH PCI device by default. > > Refer to i440FX and ICH9-LPC spcifications, there are some reserved > > configuration registers can used to

Re: [PATCH 05/16] hw/block/nvme: refactor dma read/write

2020-07-29 Thread Klaus Jensen
On Jul 29 20:35, Maxim Levitsky wrote: > On Mon, 2020-07-20 at 13:37 +0200, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Refactor the nvme_dma_{read,write}_prp functions into a common function > > taking a DMADirection parameter. > > > > Signed-off-by: Klaus Jensen > > Reviewed-by: Maxim

Re: [PATCH v3 07/18] hw/block/nvme: add support for the get log page command

2020-07-29 Thread Maxim Levitsky
On Wed, 2020-07-29 at 13:44 +0200, Klaus Jensen wrote: > On Jul 29 13:24, Maxim Levitsky wrote: > > On Mon, 2020-07-06 at 08:12 +0200, Klaus Jensen wrote: > > > From: Klaus Jensen > > > > > > Add support for the Get Log Page command and basic implementations of > > > the mandatory Error Informati

Re: [PATCH 07/16] hw/block/nvme: add request mapping helper

2020-07-29 Thread Maxim Levitsky
On Thu, 2020-07-30 at 00:52 +0900, Minwoo Im wrote: > Klaus, > > On 20-07-20 13:37:39, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Introduce the nvme_map helper to remove some noise in the main nvme_rw > > function. > > > > Signed-off-by: Klaus Jensen > > Reviewed-by: Maxim Levitsky >

Re: [PATCH 04/16] hw/block/nvme: remove redundant has_sg member

2020-07-29 Thread Klaus Jensen
On Jul 30 00:29, Minwoo Im wrote: > Klaus, > Hi Minwoo, Thanks for the reviews and welcome to the party! :) > On 20-07-20 13:37:36, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Remove the has_sg member from NvmeRequest since it's redundant. > > > > Also, make sure the request iov is de

Re: [PATCH 15/16] hw/block/nvme: remove NvmeCmd parameter

2020-07-29 Thread Maxim Levitsky
On Mon, 2020-07-20 at 13:37 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Keep a copy of the raw nvme command in the NvmeRequest and remove the > now redundant NvmeCmd parameter. Shouldn't you clear the req->cmd in nvme_req_clear too for consistency? Other than that looks OK, but I might

Re: [PATCH 02/16] hw/block/nvme: add mapping helpers

2020-07-29 Thread Klaus Jensen
On Jul 29 16:57, Maxim Levitsky wrote: > On Mon, 2020-07-20 at 13:37 +0200, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Add nvme_map_addr, nvme_map_addr_cmb and nvme_addr_to_cmb helpers and > > use them in nvme_map_prp. > > > > This fixes a bug where in the case of a CMB transfer, the dev

Re: [PATCH 1/4] hw/hppa: Sync hppa_hardware.h file with SeaBIOS sources

2020-07-29 Thread Philippe Mathieu-Daudé
On 7/27/20 11:46 PM, Helge Deller wrote: > The hppa_hardware.h file is shared with SeaBIOS. Sync it. > > Signed-off-by: Helge Deller > --- > hw/hppa/hppa_hardware.h | 6 ++ > hw/hppa/lasi.c | 2 -- > 2 files changed, 6 insertions(+), 2 deletions(-) > > diff --git a/hw/hppa/hppa_har

Re: [PATCH 14/16] hw/block/nvme: consolidate qsg/iov clearing

2020-07-29 Thread Maxim Levitsky
On Mon, 2020-07-20 at 13:37 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Always destroy the request qsg/iov at the end of request use. > > Signed-off-by: Klaus Jensen > --- > hw/block/nvme.c | 48 +--- > 1 file changed, 17 insertions(+), 31 de

Re: [PATCH 13/16] hw/block/nvme: add a namespace reference in NvmeRequest

2020-07-29 Thread Maxim Levitsky
On Mon, 2020-07-20 at 13:37 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Instead of passing around the NvmeNamespace, add it as a member in the > NvmeRequest structure. > > Signed-off-by: Klaus Jensen > --- > hw/block/nvme.c | 21 ++--- > hw/block/nvme.h | 1 + > 2 file

Re: [PATCH 12/16] hw/block/nvme: refactor NvmeRequest clearing

2020-07-29 Thread Maxim Levitsky
On Mon, 2020-07-20 at 13:37 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Move clearing of the structure from "clear before use" to "clear > after use". > > Signed-off-by: Klaus Jensen > --- > hw/block/nvme.c | 7 ++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a

Re: [PATCH 11/16] hw/block/nvme: be consistent about zeros vs zeroes

2020-07-29 Thread Maxim Levitsky
On Mon, 2020-07-20 at 13:37 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > The NVM Express specification generally uses 'zeroes' and not 'zeros', > so let us align with it. > > Cc: Fam Zheng > Signed-off-by: Klaus Jensen > --- > block/nvme.c | 4 ++-- > hw/block/nvme.c | 8 +

Re: [PATCH v8 3/7] 9pfs: split out fs driver core of v9fs_co_readdir()

2020-07-29 Thread Christian Schoenebeck
On Mittwoch, 29. Juli 2020 18:02:56 CEST Greg Kurz wrote: > On Wed, 29 Jul 2020 10:11:54 +0200 > > Christian Schoenebeck wrote: > > The implementation of v9fs_co_readdir() has two parts: the outer > > part is executed by main I/O thread, whereas the inner part is > > executed by fs driver on a ba

Re: [PATCH 05/16] hw/block/nvme: refactor dma read/write

2020-07-29 Thread Maxim Levitsky
On Mon, 2020-07-20 at 13:37 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Refactor the nvme_dma_{read,write}_prp functions into a common function > taking a DMADirection parameter. > > Signed-off-by: Klaus Jensen > Reviewed-by: Maxim Levitsky > --- > hw/block/nvme.c | 88 +++

Re: [PATCH 4/4] hw/display/artist.c: fix out of bounds check

2020-07-29 Thread Richard Henderson
On 7/27/20 2:46 PM, Helge Deller wrote: > -for (i = 0; i < pix_count; i++) { > +for (i = 0; i < pix_count && offset + i < buf->size; i++) { > artist_rop8(s, p + offset + pix_count - 1 - i, > (data & 1) ? (s->plane_mask >> 24) : 0); >

Re: [PATCH v8 1/7] tests/virtio-9p: added split readdir tests

2020-07-29 Thread Christian Schoenebeck
On Mittwoch, 29. Juli 2020 17:42:54 CEST Greg Kurz wrote: > On Wed, 29 Jul 2020 10:10:23 +0200 > > Christian Schoenebeck wrote: > > The previous, already existing 'basic' readdir test simply used a > > 'count' parameter big enough to retrieve all directory entries with a > > single Treaddir reque

  1   2   3   >