[Qemu-devel] [PATCH v5 15/15] target/sparc: sun4u Invert Endian TTE bit

2019-07-25 Thread tony.nguyen
This bit configures endianness of PCI MMIO devices. It is used by Solaris and OpenBSD sunhme drivers. Tested working on OpenBSD. Unfortunately Solaris 10 had a unrelated keyboard issue blocking testing... another inch towards Solaris 10 on SPARC64 =) Signed-off-by: Tony Nguyen --- target/sparc

[Qemu-devel] [PATCH v5 13/15] cputlb: Byte swap memory transaction attribute

2019-07-25 Thread tony.nguyen
Notice new attribute, byte swap, and force the transaction through the memory slow path. Required by architectures that can invert endianness of memory transaction, e.g. SPARC64 has the Invert Endian TTE bit. Signed-off-by: Tony Nguyen --- accel/tcg/cputlb.c | 11 +++ include/exec/

[Qemu-devel] [PATCH v5 14/15] target/sparc: Add TLB entry with attributes

2019-07-25 Thread tony.nguyen
Append MemTxAttrs to interfaces so we can pass along up coming Invert Endian TTE bit on SPARC64. Signed-off-by: Tony Nguyen --- target/sparc/mmu_helper.c | 32 ++-- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/target/sparc/mmu_helper.c b/target/spar

[Qemu-devel] [PATCH v5 12/15] cpu: TLB_FLAGS_MASK bit to force memory slow path

2019-07-25 Thread tony.nguyen
The fast path is taken when TLB_FLAGS_MASK is all zero. TLB_FORCE_SLOW is simply a TLB_FLAGS_MASK bit to force the slow path, there are no other side effects. Signed-off-by: Tony Nguyen --- include/exec/cpu-all.h | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/inc

[Qemu-devel] [PATCH v5 11/15] memory: Single byte swap along the I/O path

2019-07-25 Thread tony.nguyen
Now that MemOp has been pushed down into the memory API, we can collapse the two byte swaps adjust_endianness and handle_bswap into the former. Collapsing byte swaps along the I/O path enables additional endian inversion logic, e.g. SPARC64 Invert Endian TTE bit, with redundant byte swaps cancelli

[Qemu-devel] [PATCH v5 10/15] memory: Access MemoryRegion with MemOp semantics

2019-07-25 Thread tony.nguyen
To convert interfaces of MemoryRegion access, MEMOP_SIZE and SIZE_MEMOP no-op stubs were introduced to change syntax while keeping the existing semantics. Now with interfaces converted, we fill the stubs and use MemOp semantics. Signed-off-by: Tony Nguyen --- include/exec/memop.h | 5 ++--- in

[Qemu-devel] [PATCH v5 08/15] exec: Access MemoryRegion with MemOp

2019-07-25 Thread tony.nguyen
No-op SIZE_MEMOP macro allows us to later easily convert memory_region_dispatch_{read|write} paramter "unsigned size" into a size+sign+endianness encoded "MemOp op". Being a no-op macro, this patch does not introduce any logical change. Signed-off-by: Tony Nguyen Reviewed-by: Philippe Mathieu-Da

[Qemu-devel] [PATCH v5 09/15] cputlb: Access MemoryRegion with MemOp

2019-07-25 Thread tony.nguyen
No-op MEMOP_SIZE and SIZE_MEMOP macros allows us to later easily convert memory_region_dispatch_{read|write} paramter "unsigned size" into a size+sign+endianness encoded "MemOp op". Being a no-op macro, this patch does not introduce any logical change. Signed-off-by: Tony Nguyen --- accel/tcg/c

[Qemu-devel] [PATCH v5 07/15] hw/vfio: Access MemoryRegion with MemOp

2019-07-25 Thread tony.nguyen
No-op SIZE_MEMOP macro allows us to later easily convert memory_region_dispatch_{read|write} paramter "unsigned size" into a size+sign+endianness encoded "MemOp op". Being a no-op macro, this patch does not introduce any logical change. Signed-off-by: Tony Nguyen --- hw/vfio/pci-quirks.c | 5 ++

[Qemu-devel] [PATCH v5 06/15] hw/virtio: Access MemoryRegion with MemOp

2019-07-25 Thread tony.nguyen
No-op SIZE_MEMOP macro allows us to later easily convert memory_region_dispatch_{read|write} paramter "unsigned size" into a size+sign+endianness encoded "MemOp op". Being a no-op macro, this patch does not introduce any logical change. Signed-off-by: Tony Nguyen --- hw/virtio/virtio-pci.c | 7

[Qemu-devel] [PATCH v5 05/15] hw/intc/armv7m_nic: Access MemoryRegion with MemOp

2019-07-25 Thread tony.nguyen
No-op SIZE_MEMOP macro allows us to later easily convert memory_region_dispatch_{read|write} paramter "unsigned size" into a size+sign+endianness encoded "MemOp op". Being a no-op macro, this patch does not introduce any logical change. Signed-off-by: Tony Nguyen Reviewed-by: Philippe Mathieu-Da

[Qemu-devel] [PATCH v5 01/15] tcg: TCGMemOp is now accelerator independent MemOp

2019-07-25 Thread tony.nguyen
Preparation for collapsing the two byte swaps, adjust_endianness and handle_bswap, along the I/O path. Target dependant attributes are conditionalize upon NEED_CPU_H. Signed-off-by: Tony Nguyen --- MAINTAINERS | 1 + accel/tcg/cputlb.c | 2 +-

[Qemu-devel] [PATCH v5 04/15] hw/s390x: Access MemoryRegion with MemOp

2019-07-25 Thread tony.nguyen
No-op SIZE_MEMOP macro allows us to later easily convert memory_region_dispatch_{read|write} paramter "unsigned size" into a size+sign+endianness encoded "MemOp op". Being a no-op macro, this patch does not introduce any logical change. Signed-off-by: Tony Nguyen --- hw/s390x/s390-pci-inst.c |

[Qemu-devel] [PATCH v5 03/15] target/mips: Access MemoryRegion with MemOp

2019-07-25 Thread tony.nguyen
No-op SIZE_MEMOP macro allows us to later easily convert memory_region_dispatch_{read|write} paramter "unsigned size" into a size+sign+endianness encoded "MemOp op". Being a no-op macro, this patch does not introduce any logical change. Signed-off-by: Tony Nguyen Reviewed-by: Philippe Mathieu-Da

[Qemu-devel] [PATCH v5 02/15] memory: Access MemoryRegion with MemOp

2019-07-25 Thread tony.nguyen
Change memory_region_dispatch_{read|write} parameter "unsigned size" to "MemOp op". The endianness encoded in MemOp will enable the collapse of two byte swaps, adjust_endianness and handle_bswap, along the I/O path. Interfaces will be converted in two steps: first syntactically then semantically.

[Qemu-devel] [PATCH v5 00/15] Invert Endian bit in SPARCv9 MMU TTE

2019-07-25 Thread tony.nguyen
This patchset implements the IE (Invert Endian) bit in SPARCv9 MMU TTE. It is an attempt of the instructions outlined by Richard Henderson to Mark Cave-Ayland. Tested with OpenBSD on sun4u. Solaris 10 is my actual goal, but unfortunately a separate keyboard issue remains in the way. On 01/11/17

Re: [Qemu-devel] [PATCH v4 02/15] memory: Access MemoryRegion with MemOp

2019-07-25 Thread Philippe Mathieu-Daudé
On 7/26/19 8:03 AM, tony.ngu...@bt.com wrote: > On 7/25/19 9:45 PM, Philippe Mathieu-Daudé wrote:  >>On 7/25/19 11:52 AM, tony.ngu...@bt.com wrote: >>> Replacing size with size+sign+endianness (MemOp) will enable us to >>> collapse the two byte swaps, adjust_endianness and handle_bswap, along >>> t

Re: [Qemu-devel] [PATCH v4 02/15] memory: Access MemoryRegion with MemOp

2019-07-25 Thread tony.nguyen
On 7/25/19 9:45 PM, Philippe Mathieu-Daudé wrote: >On 7/25/19 11:52 AM, tony.ngu...@bt.com wrote: >> Replacing size with size+sign+endianness (MemOp) will enable us to >> collapse the two byte swaps, adjust_endianness and handle_bswap, along >> the I/O path. >> >> While interfaces are converted, ca

Re: [Qemu-devel] [RFC v1 05/18] vfio/pci: add pasid alloc/free implementation

2019-07-25 Thread Liu, Yi L
Hi Eric, > -Original Message- > From: Auger Eric [mailto:eric.au...@redhat.com] > Sent: Wednesday, July 24, 2019 5:33 PM > To: Liu, Yi L ; David Gibson > Subject: Re: [RFC v1 05/18] vfio/pci: add pasid alloc/free implementation > > Hi Yi, David, > > On 7/24/19 6:57 AM, Liu, Yi L wrote:

Re: [Qemu-devel] [PATCH] Fix Guest VM crash due to iSCSI Sense Key error

2019-07-25 Thread John Snow
On 7/7/19 10:55 PM, shaju.abra...@nutanix.com wrote: > From: Shaju Abraham > > During the IDE DMA transfer for a ISCSI target,when libiscsi encounters > a SENSE KEY error, it sets the task->sense to the value "COMMAND ABORTED". > The function iscsi_translate_sense() later translaters this er

Re: [Qemu-devel] [QEMU-SECURITY] ide: fix assertion in ide_dma_cb() to prevent qemu DoS from quest

2019-07-25 Thread John Snow
On 7/5/19 10:07 AM, Alexander Popov wrote: > This assertion was introduced in the commit a718978ed58a in July 2015. > It implies that the size of successful DMA transfers handled in > ide_dma_cb() should be multiple of 512 (the size of a sector). > > But guest systems can initiate DMA transfers

Re: [Qemu-devel] [PATCH] migration: notify runstate immediately before vcpu stops

2019-07-25 Thread Yan Zhao
On Thu, Jul 25, 2019 at 06:39:07PM +0800, Dr. David Alan Gilbert wrote: > * Yan Zhao (yan.y.z...@intel.com) wrote: > > for some devices to do live migration, it is needed to do something > > immediately before vcpu stops. add a notification here. > > > > Signed-off-by: Yan Zhao > > --- > > cpus.

Re: [Qemu-devel] [Qemu-riscv] [PATCH-4.2 v1 2/6] target/riscv: Remove strict perm checking for CSR R/W

2019-07-25 Thread Jonathan Behrens
Unless I'm missing something, this is the only place that QEMU checks the privilege level for read and writes to CSRs. The exact computation used here won't work with the hypervisor extension, but we also can't just get rid of privilege checking entirely... Jonathan On Thu, Jul 25, 2019 at 2:56 P

Re: [Qemu-devel] [PATCH v3 0/4] Introduce the microvm machine type

2019-07-25 Thread Michael S. Tsirkin
On Thu, Jul 25, 2019 at 05:35:01PM +0200, Paolo Bonzini wrote: > On 25/07/19 16:46, Michael S. Tsirkin wrote: > > Actually, I think I have a better idea. > > At the moment we just get an exit on these reads and return all-ones. > > Yes, in theory there could be a UR bit set in a bunch of > > regist

Re: [Qemu-devel] [PATCH v4] qapi: Add InetSocketAddress member keep-alive

2019-07-25 Thread Markus Armbruster
Eric Blake writes: > On 7/25/19 10:26 AM, Markus Armbruster wrote: >> Vladimir Sementsov-Ogievskiy writes: >> >>> It's needed to provide keepalive for nbd client to track server >>> availability. >>> >>> Signed-off-by: Vladimir Sementsov-Ogievskiy >> >> Reviewed-by: Markus Armbruster > > It

Re: [Qemu-devel] [Qemu-block] [QEMU] [PATCH v5 0/8] Add Qemu to SeaBIOS LCHS interface

2019-07-25 Thread Laszlo Ersek
On 07/25/19 02:50, John Snow wrote: > > > On 7/24/19 8:47 PM, John Snow wrote: >> >> >> On 7/19/19 6:10 AM, Sam Eiderman wrote: >>> Well, this patch introduces 3 command line parameters (“lcyls”, “lheads”, >>> “lsecs”) >>> to “scsi-hd” “ide-hd” and “virtio-pci-blk” so this somehow has something

[Qemu-devel] [PATCH-4.2 v1 4/6] target/riscv: Create function to test if FP is enabled

2019-07-25 Thread Alistair Francis
Let's creaate a function that tests if floating point support is enabled. We can then protect all floating point operations based on if they are enabled. This patch so far doesn't change anything, it's just preparing for the Hypervisor support for floating point operations. Signed-off-by: Alistai

[Qemu-devel] [PATCH-4.2 v1 2/6] target/riscv: Remove strict perm checking for CSR R/W

2019-07-25 Thread Alistair Francis
The privledge check based on the CSR address mask 0x300 doesn't work when using Hypervisor extensions so remove the check Signed-off-by: Alistair Francis --- target/riscv/csr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target/riscv/csr.c b/target/riscv/csr.c index e0d

[Qemu-devel] [PATCH-4.2 v1 6/6] target/riscv: Fix Floating Point register names

2019-07-25 Thread Alistair Francis
From: Atish Patra As per the RISC-V spec, Floating Point registers are named as f0..f31 so lets fix the register names accordingly. Signed-off-by: Atish Patra Signed-off-by: Alistair Francis --- target/riscv/cpu.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tar

[Qemu-devel] [PATCH-4.2 v1 0/6] RISC-V: Hypervisor prep work part 2

2019-07-25 Thread Alistair Francis
The first four patches are ones that I have pulled out of my original Hypervisor series at an attempt to reduce the number of patches in the series. These four patches all make sense without the Hypervisor series so can be merged seperatley and will reduce the review burden of the next version of

[Qemu-devel] [PATCH-4.2 v1 1/6] target/riscv: Don't set write permissions on dirty PTEs

2019-07-25 Thread Alistair Francis
Setting write permission on dirty PTEs results in userspace inside a Hypervisor guest (VU) becoming corrupted. This appears to be becuase it ends up with write permission in the second stage translation in cases where we aren't doing a store. Signed-off-by: Alistair Francis --- target/riscv/cpu_

[Qemu-devel] [PATCH-4.2 v1 3/6] riscv: plic: Remove unused interrupt functions

2019-07-25 Thread Alistair Francis
Signed-off-by: Alistair Francis --- hw/riscv/sifive_plic.c | 12 include/hw/riscv/sifive_plic.h | 3 --- 2 files changed, 15 deletions(-) diff --git a/hw/riscv/sifive_plic.c b/hw/riscv/sifive_plic.c index 0950e89e15..864a1bed42 100644 --- a/hw/riscv/sifive_plic.c +++ b/hw/r

[Qemu-devel] [PATCH-4.2 v1 5/6] target/riscv: Update the Hypervisor CSRs to v0.4

2019-07-25 Thread Alistair Francis
Update the Hypervisor CSR addresses to match the v0.4 spec. Signed-off-by: Alistair Francis --- target/riscv/cpu_bits.h | 35 ++- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/target/riscv/cpu_bits.h b/target/riscv/cpu_bits.h index 11f971ad5d..97

Re: [Qemu-devel] [PATCH for-4.1? 1/2] stellaris_input: Fix vmstate description of buttons field

2019-07-25 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > On Thu, 25 Jul 2019 at 18:02, Dr. David Alan Gilbert > wrote: > > > > * Peter Maydell (peter.mayd...@linaro.org) wrote: > > > gamepad_state::buttons is a pointer to an array of structs, > > > not an array of structs, so should be declared in the

Re: [Qemu-devel] [PATCH for-4.2 16/24] target/arm: Add regime_has_2_ranges

2019-07-25 Thread Richard Henderson
On 7/25/19 8:59 AM, Alex Bennée wrote: > Can you elucidate what we mean by having 2 ranges? Both positive and negative virtual addresses, with the hole in the middle, controlled by two translation tables. In the current (E.a) manual, see D.5.2.1 page D5-2516, in the (sub-)section titled "About ad

Re: [Qemu-devel] [PATCH for-4.2 15/24] target/arm: Reorganize ARMMMUIdx

2019-07-25 Thread Richard Henderson
On 7/25/19 8:57 AM, Alex Bennée wrote: > > Richard Henderson writes: > >> Prepare for, but do not yet implement, the EL2&0 regime and the >> Secure EL2 regime. Rename all of the a-profile symbols to make >> the distictions clearer. > > Perhaps a summary of the renames would be useful here? My

Re: [Qemu-devel] [PATCH for-4.1? 2/2] vmstate.h: Type check VMSTATE_STRUCT_VARRAY macros

2019-07-25 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > On Thu, 25 Jul 2019 at 18:27, Dr. David Alan Gilbert > wrote: > > > > * Peter Maydell (peter.mayd...@linaro.org) wrote: > > > The VMSTATE_STRUCT_VARRAY_UINT32 macro is intended to handle > > > migrating a field which is an array of structs, but w

Re: [Qemu-devel] [PATCH for-4.1? 1/2] stellaris_input: Fix vmstate description of buttons field

2019-07-25 Thread Peter Maydell
On Thu, 25 Jul 2019 at 18:02, Dr. David Alan Gilbert wrote: > > * Peter Maydell (peter.mayd...@linaro.org) wrote: > > gamepad_state::buttons is a pointer to an array of structs, > > not an array of structs, so should be declared in the vmstate > > with VMSTATE_STRUCT_VARRAY_POINTER_INT32; otherwis

Re: [Qemu-devel] [Qemu-block] [PATCH v3 0/4] virtio/block: handle zoned backing devices

2019-07-25 Thread John Snow
On 7/23/19 6:19 PM, Dmitry Fomichev wrote: > Currently, attaching zoned block devices (i.e., storage devices > compliant to ZAC/ZBC standards) using several virtio methods doesn't > work properly as zoned devices appear as regular block devices at the > guest. This may cause unexpected i/o error

Re: [Qemu-devel] [PATCH for-4.1? 2/2] vmstate.h: Type check VMSTATE_STRUCT_VARRAY macros

2019-07-25 Thread Peter Maydell
On Thu, 25 Jul 2019 at 18:27, Dr. David Alan Gilbert wrote: > > * Peter Maydell (peter.mayd...@linaro.org) wrote: > > The VMSTATE_STRUCT_VARRAY_UINT32 macro is intended to handle > > migrating a field which is an array of structs, but where instead of > > migrating the entire array we only migrate

Re: [Qemu-devel] Sphinx and docs/index.rst: dead code?

2019-07-25 Thread Peter Maydell
On Thu, 25 Jul 2019 at 18:26, John Snow wrote: > On 7/25/19 12:42 PM, Peter Maydell wrote: > > This means you'll end up building 90% of our documentation twice, > > which is something I was trying to avoid with the current setup. > > > > Why? Wouldn't it suffice to build just one of the top-level

Re: [Qemu-devel] [RFC 16/19] fuzz: add general fuzzer entrypoints

2019-07-25 Thread Philippe Mathieu-Daudé
Hi Aleksander, On 7/25/19 5:23 AM, Oleinik, Alexander wrote: > Defines LLVMFuzzerInitialize and LLVMFuzzerTestOneInput > > Signed-off-by: Alexander Oleinik > --- > tests/fuzz/fuzz.c | 262 ++ > tests/fuzz/fuzz.h | 96 + > 2 files chan

Re: [Qemu-devel] [PATCH v27 5/8] target/avr: Add limited support for USART and 16 bit timer peripherals

2019-07-25 Thread Michael Rolnik
Hi Pavel. Please see my answers below. On Thu, Jul 25, 2019 at 1:00 PM Pavel Dovgalyuk wrote: > > From: Qemu-devel [mailto:qemu-devel-bounces+patchwork-qemu- > > devel=patchwork.kernel@nongnu.org] On Behalf Of Michael Rolnik > > From: Sarah Harris > > > > These were designed to facilitate

Re: [Qemu-devel] [PATCH for-4.1? 1/2] stellaris_input: Fix vmstate description of buttons field

2019-07-25 Thread Philippe Mathieu-Daudé
On 7/25/19 7:02 PM, Dr. David Alan Gilbert wrote: > * Peter Maydell (peter.mayd...@linaro.org) wrote: >> gamepad_state::buttons is a pointer to an array of structs, >> not an array of structs, so should be declared in the vmstate >> with VMSTATE_STRUCT_VARRAY_POINTER_INT32; otherwise we >> corrupt

Re: [Qemu-devel] [PATCH v3 0/4] Introduce the microvm machine type

2019-07-25 Thread Michael S. Tsirkin
On Thu, Jul 25, 2019 at 05:39:39PM +0200, Paolo Bonzini wrote: > On 25/07/19 17:01, Michael S. Tsirkin wrote: > >> It would be educational to try to enable ACPI core but disable all > >> optional features. > > A lot of them are select'ed so it's not easy. > > > Trying with ACPI_REDUCED_HARDWARE_O

Re: [Qemu-devel] [PATCH v3 0/4] Introduce the microvm machine type

2019-07-25 Thread Michael S. Tsirkin
On Thu, Jul 25, 2019 at 05:35:01PM +0200, Paolo Bonzini wrote: > On 25/07/19 16:46, Michael S. Tsirkin wrote: > > Actually, I think I have a better idea. > > At the moment we just get an exit on these reads and return all-ones. > > Yes, in theory there could be a UR bit set in a bunch of > > regist

Re: [Qemu-devel] [PATCH for-4.1? 2/2] vmstate.h: Type check VMSTATE_STRUCT_VARRAY macros

2019-07-25 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > The VMSTATE_STRUCT_VARRAY_UINT32 macro is intended to handle > migrating a field which is an array of structs, but where instead of > migrating the entire array we only migrate a variable number of > elements of it. > > The VMSTATE_STRUCT_VARRAY_

Re: [Qemu-devel] Sphinx and docs/index.rst: dead code?

2019-07-25 Thread John Snow
On 7/25/19 12:42 PM, Peter Maydell wrote: > On Thu, 25 Jul 2019 at 17:34, John Snow wrote: >> Yup; I think a single point of entry would be nice -- I think we need to >> start hosting our sphinx documentation because it's confusing that we >> have both the traditional manual (hosted by Stefan W

Re: [Qemu-devel] [PATCH 4/4] block-backend: Queue requests while drained

2019-07-25 Thread Eric Blake
On 7/25/19 11:27 AM, Kevin Wolf wrote: > This fixes device like IDE that can still start new requests from I/O > handlers in the CPU thread while the block backend is drained. > > The basic assumption is that in a drain section, no new requests should > be allowed through a BlockBackend (blk_drain

Re: [Qemu-devel] [RFC 13/19] fuzz: add ctrl vq support to virtio-net in libqos

2019-07-25 Thread Oleinik, Alexander
On Thu, 2019-07-25 at 12:25 -0400, John Snow wrote: > > On 7/24/19 11:23 PM, Oleinik, Alexander wrote: > > Signed-off-by: Alexander Oleinik > > Is there some explanation for why the below patch does what the > subject > line claims for the uninitiated? When multiqueue mode (VIRTIO_NET_F_MQ) is d

Re: [Qemu-devel] [PATCH 3/4] mirror: Keep target drained until graph changes are done

2019-07-25 Thread Eric Blake
On 7/25/19 11:27 AM, Kevin Wolf wrote: > Calling bdrv_drained_end() for target_bs can restarts requests too restart > early, so that they would execute on mirror_top_bs, which however has > already dropped all permissions. > > Keep the target node drained until all graph changes have completed.

Re: [Qemu-devel] [PATCH for-4.1? 1/2] stellaris_input: Fix vmstate description of buttons field

2019-07-25 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > gamepad_state::buttons is a pointer to an array of structs, > not an array of structs, so should be declared in the vmstate > with VMSTATE_STRUCT_VARRAY_POINTER_INT32; otherwise we > corrupt memory on incoming migration. > > We bump the vmstate v

Re: [Qemu-devel] [PATCH 7/7] iotests: Disable 126 for some vmdk subformats

2019-07-25 Thread Eric Blake
On 7/25/19 10:57 AM, Max Reitz wrote: > Several vmdk subformats do not work with iotest 126, so disable them. > > (twoGbMaxExtentSparse actually should work, but fixing that is a bit > difficult. The problem is that the vmdk descriptor file will contain a > referenc to "image:base.vmdk", which th

Re: [Qemu-devel] [PATCH v4] qapi: Add InetSocketAddress member keep-alive

2019-07-25 Thread Daniel P . Berrangé
On Thu, Jul 25, 2019 at 11:38:56AM -0500, Eric Blake wrote: > On 7/25/19 10:26 AM, Markus Armbruster wrote: > > Vladimir Sementsov-Ogievskiy writes: > > > >> It's needed to provide keepalive for nbd client to track server > >> availability. > >> > >> Signed-off-by: Vladimir Sementsov-Ogievskiy >

Re: [Qemu-devel] Sphinx and docs/index.rst: dead code?

2019-07-25 Thread Peter Maydell
On Thu, 25 Jul 2019 at 17:34, John Snow wrote: > Yup; I think a single point of entry would be nice -- I think we need to > start hosting our sphinx documentation because it's confusing that we > have both the traditional manual (hosted by Stefan Weil) and this newer > one that isn't available any

Re: [Qemu-devel] Exploring Sphinx, autodoc, apidoc, and coverage tools for python/qemu

2019-07-25 Thread John Snow
On 7/25/19 5:02 AM, Peter Maydell wrote: > On Wed, 24 Jul 2019 at 22:06, John Snow wrote: >> And then you can edit e.g. the top-level index.rst TOC in docs/index.rst >> to look like this: >> >> ``` >> .. toctree:: >>:maxdepth: 2 >>:caption: Contents: >> >>interop/index >>devel/i

Re: [Qemu-devel] [PATCH v4] qapi: Add InetSocketAddress member keep-alive

2019-07-25 Thread Eric Blake
On 7/25/19 10:26 AM, Markus Armbruster wrote: > Vladimir Sementsov-Ogievskiy writes: > >> It's needed to provide keepalive for nbd client to track server >> availability. >> >> Signed-off-by: Vladimir Sementsov-Ogievskiy > > Reviewed-by: Markus Armbruster It looks like this could go in any nu

[Qemu-devel] [PATCH for-4.1? 2/2] vmstate.h: Type check VMSTATE_STRUCT_VARRAY macros

2019-07-25 Thread Peter Maydell
The VMSTATE_STRUCT_VARRAY_UINT32 macro is intended to handle migrating a field which is an array of structs, but where instead of migrating the entire array we only migrate a variable number of elements of it. The VMSTATE_STRUCT_VARRAY_POINTER_UINT32 macro is intended to handle migrating a field w

[Qemu-devel] [PATCH for-4.1? 0/2] Typecheck VMSTATE VARRAY macros and fix bug found

2019-07-25 Thread Peter Maydell
Damien's patch to fix a pl330 vmstate mixup between VMSTATE_STRUCT_VARRAY_UINT32 and VMSTATE_STRUCT_VARRAY_POINTER_UINT32 led me to think about whether we could catch that particular mixup. It turns out that we can, by adding a type check that the field given to the macro is really an array of the

[Qemu-devel] [PATCH for-4.1? 1/2] stellaris_input: Fix vmstate description of buttons field

2019-07-25 Thread Peter Maydell
gamepad_state::buttons is a pointer to an array of structs, not an array of structs, so should be declared in the vmstate with VMSTATE_STRUCT_VARRAY_POINTER_INT32; otherwise we corrupt memory on incoming migration. We bump the vmstate version field as the easiest way to deal with the migration bre

Re: [Qemu-devel] Sphinx and docs/index.rst: dead code?

2019-07-25 Thread John Snow
On 7/25/19 5:08 AM, Peter Maydell wrote: > On Thu, 25 Jul 2019 at 00:22, John Snow wrote: >> >> Does anything actually use this file? It doesn't appear to be used for >> generating the HTML manuals. > > It's there for if you want to do a "build all the manuals into > a single document" -- see

Re: [Qemu-devel] [PATCH v5 30/42] qemu-img: Use child access functions

2019-07-25 Thread Max Reitz
On 24.07.19 11:54, Vladimir Sementsov-Ogievskiy wrote: > 21.06.2019 16:15, Vladimir Sementsov-Ogievskiy wrote: >> 19.06.2019 18:49, Max Reitz wrote: >>> On 19.06.19 11:18, Vladimir Sementsov-Ogievskiy wrote: 13.06.2019 1:09, Max Reitz wrote: > This changes iotest 204's output, because blkd

Re: [Qemu-devel] [PATCH v2 09/11] iotests: Convert to preallocated encrypted qcow2

2019-07-25 Thread Max Reitz
On 25.07.19 17:30, Maxim Levitsky wrote: > On Wed, 2019-07-24 at 19:12 +0200, Max Reitz wrote: >> Add a test case for converting an empty image (which only returns zeroes >> when read) to a preallocated encrypted qcow2 image. >> qcow2_has_zero_init() should return 0 then, thus forcing qemu-img >> c

[Qemu-devel] [PATCH 4/4] block-backend: Queue requests while drained

2019-07-25 Thread Kevin Wolf
This fixes device like IDE that can still start new requests from I/O handlers in the CPU thread while the block backend is drained. The basic assumption is that in a drain section, no new requests should be allowed through a BlockBackend (blk_drained_begin/end don't exist, we get drain sections o

[Qemu-devel] [PATCH 0/4] block-backend: Queue requests while drained

2019-07-25 Thread Kevin Wolf
This series fixes the problem that devices like IDE, which submit requests as a direct result of I/O from the CPU thread, can continue to submit new requests even in a drained section. In order to avoid a dependency for this series, I borrowed a patch from Max. Kevin Wolf (3): block: Remove blk

[Qemu-devel] [PATCH 3/4] mirror: Keep target drained until graph changes are done

2019-07-25 Thread Kevin Wolf
Calling bdrv_drained_end() for target_bs can restarts requests too early, so that they would execute on mirror_top_bs, which however has already dropped all permissions. Keep the target node drained until all graph changes have completed. Signed-off-by: Kevin Wolf --- block/mirror.c | 14 ++

[Qemu-devel] [PATCH 1/4] block: Remove blk_pread_unthrottled()

2019-07-25 Thread Kevin Wolf
The functionality offered by blk_pread_unthrottled() goes back to commit 498e386c584. Then, we couldn't perform I/O throttling with synchronous requests because timers wouldn't be executed in polling loops. So the commit automatically disabled I/O throttling as soon as a synchronous request was iss

[Qemu-devel] [PATCH 2/4] block: Reduce (un)drains when replacing a child

2019-07-25 Thread Kevin Wolf
From: Max Reitz Currently, bdrv_replace_child_noperm() undrains the parent until it is completely undrained, then re-drains it after attaching the new child node. This is a problem with bdrv_drop_intermediate(): We want to keep the whole subtree drained, including parents, while the operation is

Re: [Qemu-devel] [RFC 13/19] fuzz: add ctrl vq support to virtio-net in libqos

2019-07-25 Thread John Snow
On 7/24/19 11:23 PM, Oleinik, Alexander wrote: > Signed-off-by: Alexander Oleinik Is there some explanation for why the below patch does what the subject line claims for the uninitiated? I don't know why increasing the number of queues from 2 to 3 here is correct in the general case, OR why i

Re: [Qemu-devel] [PATCH v2 02/11] mirror: Fix bdrv_has_zero_init() use

2019-07-25 Thread Max Reitz
On 25.07.19 18:21, Max Reitz wrote: > On 25.07.19 17:28, Maxim Levitsky wrote: [...] >> For example, QMP reference states that MIRROR_SYNC_MODE_TOP copies data in >> the topmost image to the destination. >> If there is only the topmost image, I could image the caller assume that >> target is id

Re: [Qemu-devel] [PATCH] ppc: remove redundant capability check for unset irq

2019-07-25 Thread Greg Kurz
On Thu, 25 Jul 2019 10:40:11 -0500 Shivaprasad G Bhat wrote: > The KVM_CAP_PPC_UNSET_IRQ is part of kernel since v2.6.36. > Kernels older than that are not supported anymore. > So, remove the checks. > Ok to drop the dead paths but we do need this cap to be present. int kvmppc_set_interrupt(Po

Re: [Qemu-devel] [PATCH v2 02/11] mirror: Fix bdrv_has_zero_init() use

2019-07-25 Thread Max Reitz
On 25.07.19 17:28, Maxim Levitsky wrote: > On Wed, 2019-07-24 at 19:12 +0200, Max Reitz wrote: >> bdrv_has_zero_init() only has meaning for newly created images or image >> areas. If the mirror job itself did not create the image, it cannot >> rely on bdrv_has_zero_init()'s result to carry any mea

Re: [Qemu-devel] [PATCH for-4.2 00/24] target/arm: Implement ARMv8.1-VHE

2019-07-25 Thread Alex Bennée
Richard Henderson writes: > About half of this patch set is cleanup of the qemu tlb handling > leading up to the actual implementation of VHE, and the biggest > piece of that: The EL2&0 translation regime. > > Testing so far has been limited to booting a debian 9 system with > a 4.9 kernel, and

Re: [Qemu-devel] [PATCH for 4.1?] pl330: fix vmstate description

2019-07-25 Thread Peter Maydell
On Wed, 24 Jul 2019 at 15:36, Damien Hedde wrote: > > Fix the pl330 main and queue vmstate description. > There were missing POINTER flags causing crashes during > incoming migration because: > + PL330State chan field is a pointer to an array > + PL330Queue queue field is a pointer to an array > >

Re: [Qemu-devel] [PATCH v3] qapi: add dirty-bitmaps to query-named-block-nodes result

2019-07-25 Thread John Snow
On 7/25/19 2:06 AM, Markus Armbruster wrote: > John Snow writes: > >> On 7/24/19 12:47 AM, Markus Armbruster wrote: >>> John Snow writes: >>> From: Vladimir Sementsov-Ogievskiy Let's add a possibility to query dirty-bitmaps not only on root nodes. It is useful when dealin

Re: [Qemu-devel] [PATCH for-4.2 18/24] target/arm: Update arm_sctlr for VHE

2019-07-25 Thread Alex Bennée
Richard Henderson writes: > Use this function in many more places in order to select > the correct control. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée > --- > target/arm/cpu.h | 10 ++ > target/arm/arch_dump.c| 2 +- > target/arm/helper-a64.c | 2

Re: [Qemu-devel] [PATCH for-4.2 17/24] target/arm: Update arm_mmu_idx for VHE

2019-07-25 Thread Alex Bennée
Richard Henderson writes: > This covers initial generation in arm_mmu_idx, and reconstruction > in core_to_arm_mmu_idx. As a conseqeuence, we also need a bit in > TBFLAGS in order to make the latter reliable. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée > --- > target/arm

[Qemu-devel] [PATCH 5/7] iotests: Disable broken streamOptimized tests

2019-07-25 Thread Max Reitz
streamOptimized does not support writes that do not span exactly one cluster. Furthermore, it cannot rewrite already allocated clusters. As such, many iotests do not work with it. Disable them. Signed-off-by: Max Reitz --- tests/qemu-iotests/002 | 1 + tests/qemu-iotests/003 | 1 + tests/qemu-

[Qemu-devel] [PATCH 7/7] iotests: Disable 126 for some vmdk subformats

2019-07-25 Thread Max Reitz
Several vmdk subformats do not work with iotest 126, so disable them. (twoGbMaxExtentSparse actually should work, but fixing that is a bit difficult. The problem is that the vmdk descriptor file will contain a referenc to "image:base.vmdk", which the block layer cannot open because it does not kn

[Qemu-devel] [PATCH 4/7] vmdk: Reject invalid compressed writes

2019-07-25 Thread Max Reitz
Compressed writes generally have to write full clusters, not just in theory but also in practice when it comes to vmdk's streamOptimized subformat. It currently is just silently broken for writes with non-zero in-cluster offsets: $ qemu-img create -f vmdk -o subformat=streamOptimized foo.vmdk 1M

Re: [Qemu-devel] [PATCH for-4.2 16/24] target/arm: Add regime_has_2_ranges

2019-07-25 Thread Alex Bennée
Richard Henderson writes: Can you elucidate what we mean by having 2 ranges? > Signed-off-by: Richard Henderson > --- > target/arm/internals.h | 16 > target/arm/helper.c| 22 +- > target/arm/translate-a64.c | 3 +-- > 3 files changed, 22 in

[Qemu-devel] [PATCH 1/7] iotests: Fix _filter_img_create()

2019-07-25 Thread Max Reitz
fe646693acc changed qemu-img create's output so that it no longer prints single quotes around parameter values. The subformat and adapter_type filters in _filter_img_create() have never been adapted to that change. Fixes: fe646693acc13ac48b98435d14149ab04dc597bc Signed-off-by: Max Reitz --- tes

[Qemu-devel] [PATCH 3/7] iotests: Keep testing broken relative extent paths

2019-07-25 Thread Max Reitz
We had a test for a case where relative extent paths did not work, but unfortunately we just fixed the underlying problem, so it works now. This patch adds a new test case that still fails. Signed-off-by: Max Reitz --- tests/qemu-iotests/059 | 27 +++ tests/qemu-iotes

[Qemu-devel] [PATCH 6/7] iotests: Disable 110 for vmdk.twoGbMaxExtentSparse

2019-07-25 Thread Max Reitz
The error message for the test case where we have a quorum node for which no directory name can be generated is different: For twoGbMaxExtentSparse, it complains that it cannot open the extent file. For other (sub)formats, it just notes that it cannot determine the backing file path. Both are fine

[Qemu-devel] [PATCH 2/7] vmdk: Use bdrv_dirname() for relative extent paths

2019-07-25 Thread Max Reitz
This makes iotest 033 pass with e.g. subformat=monolithicFlat. It also turns a former error in 059 into success. Signed-off-by: Max Reitz --- block/vmdk.c | 54 -- tests/qemu-iotests/059 | 7 +++-- tests/qemu-iotests/059.out | 4 ++- 3 fil

Re: [Qemu-devel] [PATCH for-4.2 15/24] target/arm: Reorganize ARMMMUIdx

2019-07-25 Thread Alex Bennée
Richard Henderson writes: > Prepare for, but do not yet implement, the EL2&0 regime and the > Secure EL2 regime. Rename all of the a-profile symbols to make > the distictions clearer. Perhaps a summary of the renames would be useful here? My head is spinning a little given the number that we

[Qemu-devel] [PATCH 0/7] vmdk: Misc fixes

2019-07-25 Thread Max Reitz
I made the mistake of trying to run the iotests with all non-default subformats our vmdk driver has to offer: - monolithicFlat - twoGbMaxExtentSparse - twoGbMaxExtentFlat - streamOptimized Many things broke, so this series fixes what I found. It’s mostly just iotest fixes, but there are actually

[Qemu-devel] [PATCH 2/3] vmdk: Make block_status recurse for flat extents

2019-07-25 Thread Max Reitz
Fixes: 69f47505ee66afaa513305de0c1895a224e52c45 Signed-off-by: Max Reitz --- block/vmdk.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/block/vmdk.c b/block/vmdk.c index bd36ece125..fd78fd0ccf 100644 --- a/block/vmdk.c +++ b/block/vmdk.c @@ -1692,6 +1692,9 @@ static int coroutine_fn vmd

[Qemu-devel] [PATCH 3/3] vpc: Do not return RAW from block_status

2019-07-25 Thread Max Reitz
vpc is not really a passthrough driver, even when using the fixed subformat (where host and guest offsets are equal). It should handle preallocation like all other drivers do, namely by returning DATA | RECURSE instead of RAW. There is no tangible difference but the fact that bdrv_is_allocated()

[Qemu-devel] [PATCH 1/3] vdi: Make block_status recurse for fixed images

2019-07-25 Thread Max Reitz
Suggested-by: Vladimir Sementsov-Ogievskiy Fixes: 69f47505ee66afaa513305de0c1895a224e52c45 Signed-off-by: Max Reitz --- block/vdi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/vdi.c b/block/vdi.c index b9845a4cbd..40d40c34d5 100644 --- a/block/vdi.c +++ b/block/vd

[Qemu-devel] [PATCH 0/3] block: Make various formats' block_status recurse again

2019-07-25 Thread Max Reitz
Hi, 69f47505ee66afaa513305de0c1895a224e52c45 changed block_status so that it would only go down to the protocol layer if the format layer returned BDRV_BLOCK_RECURSE, thus indicating that it has no sufficient information whether a given range in the image is zero or not. Generally, this is because

Re: [Qemu-devel] [PATCH v3 0/4] Introduce the microvm machine type

2019-07-25 Thread Sergio Lopez
Michael S. Tsirkin writes: > On Thu, Jul 25, 2019 at 10:58:22AM -0400, Michael S. Tsirkin wrote: >> On Thu, Jul 25, 2019 at 04:42:42PM +0200, Sergio Lopez wrote: >> > >> > Paolo Bonzini writes: >> > >> > > On 25/07/19 15:26, Stefan Hajnoczi wrote: >> > >> The microvm design has a premise and

[Qemu-devel] [PULL v1 0/2] Merge tpm 2019/07/25 v1

2019-07-25 Thread Stefan Berger
This series of patches improves error handling with the TPM backend. Stefan The following changes since commit 9d2e1fcd14c2bae5be1992214a03c0ddff714c80: Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2019-07-22 13:20:49 +0100) are available in the Git repos

[Qemu-devel] [PULL v1 2/2] tpm_emulator: Translate TPM error codes to strings

2019-07-25 Thread Stefan Berger
Implement a function to translate TPM error codes to strings so that at least the most common error codes can be translated to human readable strings. Signed-off-by: Stefan Berger Reviewed-by: Marc-André Lureau --- hw/tpm/tpm_emulator.c | 60 +++ hw/tpm/t

[Qemu-devel] [PULL v1 1/2] tpm: Exit in reset when backend indicates failure

2019-07-25 Thread Stefan Berger
Exit() in the frontend reset function when the backend indicates intialization failure. Signed-off-by: Stefan Berger Reviewed-by: Marc-André Lureau --- hw/tpm/tpm_crb.c | 4 +++- hw/tpm/tpm_tis.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/tpm/tpm_crb.c b/hw/tpm/

Re: [Qemu-devel] [PATCH] target-i386: kvm: 'kvm_get_supported_msrs' cleanup

2019-07-25 Thread Paolo Bonzini
On 25/07/19 17:16, Li Qiang wrote: > Function 'kvm_get_supported_msrs' is only called once > now, get rid of the static variable 'kvm_supported_msrs'. > > Signed-off-by: Li Qiang Queued, thanks. Paolo > --- > target/i386/kvm.c | 185 +++--- > 1 file cha

[Qemu-devel] [PATCH] ppc: remove redundant capability check for unset irq

2019-07-25 Thread Shivaprasad G Bhat
The KVM_CAP_PPC_UNSET_IRQ is part of kernel since v2.6.36. Kernels older than that are not supported anymore. So, remove the checks. Signed-off-by: Shivaprasad G Bhat --- target/ppc/kvm.c |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/target/ppc/kvm.c b/target/ppc/kvm.

Re: [Qemu-devel] [PATCH v3 0/4] Introduce the microvm machine type

2019-07-25 Thread Paolo Bonzini
On 25/07/19 17:01, Michael S. Tsirkin wrote: >> It would be educational to try to enable ACPI core but disable all >> optional features. A lot of them are select'ed so it's not easy. > Trying with ACPI_REDUCED_HARDWARE_ONLY would also be educational. That's what the NEMU guys experimented with.

Re: [Qemu-devel] [PATCH v2 0/2] tpm: Improve on error handling

2019-07-25 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190725150832.1180275-1-stef...@linux.vnet.ibm.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Subject: [Qemu-devel] [PATCH v2 0/2] tpm: Improve on error handling Message-id: 201907251508

Re: [Qemu-devel] [PATCH v3 0/4] Introduce the microvm machine type

2019-07-25 Thread Paolo Bonzini
On 25/07/19 16:46, Michael S. Tsirkin wrote: > Actually, I think I have a better idea. > At the moment we just get an exit on these reads and return all-ones. > Yes, in theory there could be a UR bit set in a bunch of > registers but in practice no one cares about these, > and I don't think we impl

  1   2   3   4   >