Re: [Qemu-devel] [PATCH 2/2] ssh: implement private key authentication

2019-07-26 Thread Eric Blake
On 7/26/19 9:09 AM, Pino Toscano wrote: > Add a 'private-key' option which represents the path of a private key > to use for authentication, and 'private-key-secret' as the name of an > object with its passphrase. > > Signed-off-by: Pino Toscano > +++ b/qapi/block-core.json > @@ -3226,6

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

2019-07-26 Thread Richard Henderson
On 7/25/19 11:47 PM, tony.ngu...@bt.com wrote: > 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. > >

Re: [Qemu-devel] [PATCH 03/28] qapi: Split error.json off common.json

2019-07-26 Thread Markus Armbruster
Eric Blake writes: > On 7/26/19 7:05 AM, Markus Armbruster wrote: >> In my "build everything" tree, changing a type in qapi/common.json >> triggers a recompile of some 3600 out of 6600 objects (not counting >> tests and objects that don't depend on qemu/osdep.h). >> >> One common dependency is

Re: [Qemu-devel] [PATCH 1/2] net: assert that tx packets have nonzero size

2019-07-26 Thread Oleinik, Alexander
On Tue, 2019-07-23 at 11:38 +0800, Jason Wang wrote: > On 2019/7/20 上午2:52, Oleinik, Alexander wrote: > > Virtual devices should not try to send zero-sized packets. The > > caller > > should check the size prior to calling qemu_sendv_packet_async. > > > > Signed-off-by: Alexander Oleinik > > ---

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

2019-07-26 Thread Sarah Harris
Hi Michael and Pavel, The USART was based on the ATMega2560. It was designed for testing so its functionality is somewhat limited. Peripherals seem to vary between AVR chips so the configuration in the 2560 may not match other chips, especially the older ones. >From memory, the only shared

[Qemu-devel] [PULL 0/5] target-arm queue

2019-07-26 Thread Peter Maydell
Handful of bug fixes to sneak in before rc3. thanks -- PMM The following changes since commit c985266ea5b50e46e07b3568c1346e10064205c9: Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20190726' into staging (2019-07-26 13:52:06 +0100) are available in the Git repository at: https

[Qemu-devel] [PULL 2/5] stellaris_input: Fix vmstate description of buttons field

2019-07-26 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

[Qemu-devel] [PULL 1/5] pl330: fix vmstate description

2019-07-26 Thread Peter Maydell
From: Damien Hedde 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 Also bump corresponding vmsd version

[Qemu-devel] [PULL 3/5] vmstate.h: Type check VMSTATE_STRUCT_VARRAY macros

2019-07-26 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

Re: [Qemu-devel] [PATCH v5] target/arm: generate a custom MIDR for -cpu max

2019-07-26 Thread Richard Henderson
On 7/26/19 4:39 AM, Alex Bennée wrote: > While most features are now detected by probing the ID_* registers > kernels can (and do) use MIDR_EL1 for working out of they have to > apply errata. This can trip up warnings in the kernel as it tries to > work out if it should apply workarounds to

Re: [Qemu-devel] [PATCH v3 0/3] qapi: block-dirty-bitmap-remove transaction action

2019-07-26 Thread Vladimir Sementsov-Ogievskiy
24.07.2019 15:52, John Snow wrote: > > > On 7/24/19 7:12 AM, Vladimir Sementsov-Ogievskiy wrote: >> 15.07.2019 22:48, John Snow wrote: >>> >>> >>> On 7/8/19 6:04 PM, John Snow wrote: Hi, this is a proposal based off of Vladimir's patchset: [Qemu-devel] [PATCH 0/4] qapi:

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

2019-07-26 Thread Chih-Min Chao
On Fri, Jul 26, 2019 at 2:55 AM Alistair Francis wrote: > 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

[Qemu-devel] [PATCH 26/67] target/arm: Convert Packing, unpacking, saturation, and reversal

2019-07-26 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/translate.c | 554 + target/arm/a32.decode | 32 +++ target/arm/t32.decode | 37 ++- 3 files changed, 302 insertions(+), 321 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c

[Qemu-devel] [PATCH 23/67] target/arm: Convert Synchronization primitives

2019-07-26 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/translate.c | 560 ++--- target/arm/a32.decode | 48 target/arm/t32.decode | 46 3 files changed, 396 insertions(+), 258 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c

[Qemu-devel] [PATCH 09/67] target/arm: Fold a pc load into load_reg

2019-07-26 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/translate.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index e316eeb312..53c46fcdc4 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -9161,11 +9161,7

[Qemu-devel] [PATCH 15/67] target/arm: Convert Saturating addition and subtraction

2019-07-26 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/helper.h| 1 - target/arm/op_helper.c | 15 - target/arm/translate.c | 74 +++--- target/arm/a32.decode | 10 ++ target/arm/t32.decode | 9 + 5 files changed, 66 insertions(+), 43

[Qemu-devel] [PATCH 46/67] target/arm: Convert T16 load/store (immediate offset)

2019-07-26 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/translate.c | 94 +++--- target/arm/t16.decode | 33 +++ 2 files changed, 38 insertions(+), 89 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index 7b87621315..28f274ca7c

[Qemu-devel] [PATCH 44/67] target/arm: Convert T16 data-processing (two low regs)

2019-07-26 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/translate.c | 152 ++--- target/arm/t16.decode | 36 ++ 2 files changed, 43 insertions(+), 145 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index db93b12608..17a0eea425

Re: [Qemu-devel] [PATCH 66/67] target/arm: Move singlestep check from gen_jmp to gen_goto_tb

2019-07-26 Thread Peter Maydell
On Fri, 26 Jul 2019 at 18:51, Richard Henderson wrote: > > We miss quite a number of single-step events by having > the check in the wrong place. > > Signed-off-by: Richard Henderson > --- > target/arm/translate.c | 16 ++-- > 1 file changed, 6 insertions(+), 10 deletions(-) > >

[Qemu-devel] [PULL] riscv/boot: Fixup the RISC-V firmware warning

2019-07-26 Thread Palmer Dabbelt
From: Alistair Francis Fix a typo in the warning message displayed to users, don't print the message when running inside qtest and don't mention a specific QEMU version for the deprecation. Signed-off-by: Alistair Francis Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Palmer Dabbelt ---

[Qemu-devel] [PULL] RISC-V Patch for 4.1-rc3

2019-07-26 Thread Palmer Dabbelt
The following changes since commit bf8b024372bf8abf5a9f40bfa65eeefad23ff988: Update version for v4.1.0-rc2 release (2019-07-23 18:28:08 +0100) are available in the Git repository at: git://github.com/palmer-dabbelt/qemu.git tags/riscv-for-master-4.1-rc3 for you to fetch changes up to

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

2019-07-26 Thread Dmitry Fomichev
John, please see inline... Regards, Dmitry On Thu, 2019-07-25 at 13:58 -0400, John Snow wrote: > > 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

[Qemu-devel] [PATCH 2/2] iotests: use python logging for iotests.log()

2019-07-26 Thread John Snow
We can turn logging on/off globally instead of per-function. Remove use_log from run_job, and use python logging to turn on diffable output when we run through a script entry point. (No, I have no idea why output on 245 changed. I really don't.) Signed-off-by: John Snow ---

[Qemu-devel] Question regarding tcg trace-events

2019-07-26 Thread sainath grandhi
Hello I am working with qemu tracing support and combined with tcg. I read that if tcg property is used for trace-event, it generates a trace-event once during translation and another trace-event after the execution. I made the following change in target/i386/translate.c -static inline void

Re: [Qemu-devel] [Virtio-fs] [PATCH 1/5] virtiofsd: skip unnecessary vu_queue_get_avail_bytes()

2019-07-26 Thread Liu Bo
On Fri, Jul 26, 2019 at 10:10:59AM +0100, Stefan Hajnoczi wrote: > When debug output is disabled there is no need to calculate the number > of in/out bytes available. > > There is also no need to skip a request if there are 0 out bytes. The > request parsing code already handles invalid

Re: [Qemu-devel] [Virtio-fs] [PATCH 2/5] virtiofsd: prevent lo_lookup() NULL pointer dereference

2019-07-26 Thread Liu Bo
On Fri, Jul 26, 2019 at 10:11:00AM +0100, Stefan Hajnoczi wrote: > Most lo_do_lookup() have already checked that the parent inode exists. > lo_lookup() hasn't and can therefore hit a NULL pointer dereference when > lo_inode(req, parent) returns NULL. > Sigh...this one has been fixed by 3

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

2019-07-26 Thread Alistair Francis
On Fri, Jul 26, 2019 at 2:00 PM Jonathan Behrens wrote: > > The remaining checks are not sufficient. If you look at the bottom of csr.c, > you'll see that for most of the M-mode CSRs the predicate is set to "any" > which unconditionally allows access regardless of privilege mode. The S-mode >

[Qemu-devel] [PATCH 1/2] iotests: add script_initialize

2019-07-26 Thread John Snow
Like script_main, but doesn't require a single point of entry. Replace all existing initialization sections with this drop-in replacement. This brings debug support to all existing script-style iotests. Note: supported_oses=['linux'] was omitted, as it is a default argument. Signed-off-by: John

[Qemu-devel] [PATCH 0/2] iotests: use python logging

2019-07-26 Thread John Snow
Based-on: https://github.com/jnsnow/qemu/tree/bitmaps This is a quick hack-em-up of what it might look like to use python logging to enable output conditionally on iotests.log(). We unify an initialization call (which also enables debugging output for those tests with -d) and then make the switch

[Qemu-devel] [for-4.2 PATCH 0/2] PCI DMA alias support

2019-07-26 Thread Alex Williamson
Please see patch 1/ for the motivation and utility of this series. This v1 submission improves on the previous RFC with revised commit logs, comments, and more testing, and the missing IVRS support for DMA alias ranges is now included. Testing has been done with Linux guests with both SeaBIOS and

[Qemu-devel] [for-4.2 PATCH 1/2] pci: Use PCI aliases when determining device IOMMU address space

2019-07-26 Thread Alex Williamson
PCIe requester IDs are used by modern IOMMUs to differentiate devices in order to provide a unique IOVA address space per device. These requester IDs are composed of the bus/device/function (BDF) of the requesting device. Conventional PCI pre-dates this concept and is simply a shared parallel

[Qemu-devel] [for-4.2 PATCH 2/2] hw/i386: AMD-Vi IVRS DMA alias support

2019-07-26 Thread Alex Williamson
When we account for DMA aliases in the PCI address space, we can no longer use a single IVHD entry in the IVRS covering all devices. We instead need to walk the PCI bus and create alias ranges when we find a conventional bus. These alias ranges cannot overlap with a "Select All" range (as

[Qemu-devel] [Bug 1585533] Re: cache-miss-rate / Invalid JSON

2019-07-26 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1585533 Title:

[Qemu-devel] [Bug 1590322] Re: mouse_button 0 takes back to initial position

2019-07-26 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1590322 Title:

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

2019-07-26 Thread Damien Hedde
On 7/25/19 7:59 PM, Peter Maydell 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 vmstate >>>

Re: [Qemu-devel] [PATCH v7 01/11] hw/arm: simplify arm_load_dtb

2019-07-26 Thread Tao Xu
On 7/23/2019 10:59 PM, Igor Mammedov wrote: On Tue, 16 Jul 2019 22:51:11 +0800 Tao Xu wrote: In struct arm_boot_info, kernel_filename, initrd_filename and kernel_cmdline are copied from from MachineState. This patch add MachineState as a parameter into arm_load_dtb() and move the copy chunk

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

2019-07-26 Thread David Gibson
On Fri, Jul 26, 2019 at 06:43:27AM +, tony.ngu...@bt.com wrote: > 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 ppc parts Acked-by:

Re: [Qemu-devel] [PATCH-for-4.1 v4 7/7] virtio-balloon: No need to track subpages for the PBP anymore

2019-07-26 Thread David Gibson
On Thu, Jul 25, 2019 at 01:36:38PM +0200, David Hildenbrand wrote: > As ramblocks cannot get removed/readded while we are processing a bulk > of inflation requests, there is no more need to track the page size > in form of the number of subpages. > > Suggested-by: David Gibson > Signed-off-by:

Re: [Qemu-devel] [PATCH v7] ppc: remove idle_timer logic

2019-07-26 Thread David Gibson
On Thu, Jul 25, 2019 at 09:15:08AM -0500, Shivaprasad G Bhat wrote: > The logic is broken for multiple vcpu guests, also causing memory leak. > The logic is in place to handle kvm not having KVM_CAP_PPC_IRQ_LEVEL, > which is part of the kernel now since 2.6.37. Instead of fixing the > leak, drop

Re: [Qemu-devel] [PATCH-for-4.1 v4 5/7] virtio-balloon: Rework pbp tracking data

2019-07-26 Thread David Gibson
On Thu, Jul 25, 2019 at 01:36:36PM +0200, David Hildenbrand wrote: > Using the address of a RAMBlock to test for a matching pbp is not really > safe. Instead, let's use the guest physical address of the base page > along with the page size (via the number of subpages). > > Also, let's allocate

[Qemu-devel] [PATCH 1/3] virtiofsd: sync up fuse.h Linux 5.1 header

2019-07-26 Thread Stefan Hajnoczi
Signed-off-by: Stefan Hajnoczi --- contrib/virtiofsd/fuse_kernel.h | 51 ++--- 1 file changed, 34 insertions(+), 17 deletions(-) diff --git a/contrib/virtiofsd/fuse_kernel.h b/contrib/virtiofsd/fuse_kernel.h index 3186efbed6..7722e0ac23 100644 ---

[Qemu-devel] [PATCH 2/3] virtiofsd: add map_alignment to fuse_kernel.h

2019-07-26 Thread Stefan Hajnoczi
This new FUSE_INIT field communicates the alignment constraint for FUSE_SETUPMAPPING/FUSE_REMOVEMAPPING. This feature will be implemented in the next commit. Signed-off-by: Stefan Hajnoczi --- contrib/virtiofsd/fuse_kernel.h | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff

[Qemu-devel] [PATCH 3/3] virtiofsd: implement FUSE_INIT map_alignment field

2019-07-26 Thread Stefan Hajnoczi
Communicate the host page size to the FUSE client so that FUSE_SETUPMAPPING/FUSE_REMOVEMAPPING requests are aware of our alignment constraints. Signed-off-by: Stefan Hajnoczi --- contrib/virtiofsd/fuse_lowlevel.c | 8 1 file changed, 8 insertions(+) diff --git

[Qemu-devel] [PATCH 0/3] virtiofsd: add FUSE_INIT map_alignment field

2019-07-26 Thread Stefan Hajnoczi
The client must know the server's alignment constraints for FUSE_SETUPMAPPING and FUSE_REMOVEMAPPING. This is necessary because mmap(2)/munmap(2) have alignment constraints and the guest may have a different page size from the host. The new FUSE_INIT map_alignment field communicates this

Re: [Qemu-devel] [PATCH 1/2] tests.acceptance.avocado_qemu: Add support for powerpc

2019-07-26 Thread Cédric Le Goater
On 26/07/2019 09:18, sathn...@linux.vnet.ibm.com wrote: > From: Satheesh Rajendran > > Current acceptance test will not run in powerpc Little endian > environment due the arch name does not match the qemu binary path, > let's handle it. > > Signed-off-by: Satheesh Rajendran Reviewed-by:

Re: [Qemu-devel] [PATCH 0/2] Add support for powerpc acceptance test

2019-07-26 Thread Cédric Le Goater
On 26/07/2019 09:17, sathn...@linux.vnet.ibm.com wrote: > From: Satheesh Rajendran > > This series attempt to add support for avocado acceptance > test for powerpc and adds linux console boot test. > > avocado run boot_linux_console.py:BootLinuxConsole.test_ppc64le_pseries > version.py vnc.py

Re: [Qemu-devel] [PATCH 2/2] tests.acceptance.boot_linux_console: Add pseries linux boot console test

2019-07-26 Thread Cédric Le Goater
On 26/07/2019 09:18, sathn...@linux.vnet.ibm.com wrote: > From: Satheesh Rajendran > > Add pseries linux boot console test > > $avocado --show=console run -t arch:ppc64le boot_linux_console.py > console: SLOF > ** > console:

Re: [Qemu-devel] [PATCH for 4.2] target/arm: generate a custom MIDR for -cpu max

2019-07-26 Thread Peter Maydell
On Fri, 26 Jul 2019 at 08:37, Laurent Desnogues wrote: > On Fri, Jul 26, 2019 at 9:24 AM Alex Bennée wrote: > > Peter Maydell writes: > > > I wonder if we should put 0x51 (ascii 'Q') in the PARTNUM field; > > > then if somebody really needs to distinguish QEMU from random > > > other

Re: [Qemu-devel] [PATCH 0/2] Add support for powerpc acceptance test

2019-07-26 Thread Satheesh Rajendran
On Fri, Jul 26, 2019 at 10:37:35AM +0200, Cédric Le Goater wrote: > On 26/07/2019 09:17, sathn...@linux.vnet.ibm.com wrote: > > From: Satheesh Rajendran > > > > This series attempt to add support for avocado acceptance > > test for powerpc and adds linux console boot test. > > > > avocado run

Re: [Qemu-devel] [PATCH 2/2] tests.acceptance.boot_linux_console: Add pseries linux boot console test

2019-07-26 Thread Satheesh Rajendran
On Fri, Jul 26, 2019 at 10:40:44AM +0200, Cédric Le Goater wrote: > On 26/07/2019 09:18, sathn...@linux.vnet.ibm.com wrote: > > From: Satheesh Rajendran > > > > Add pseries linux boot console test > > > > $avocado --show=console run -t arch:ppc64le boot_linux_console.py > > console: SLOF > >

Re: [Qemu-devel] [PATCH v3] block/rbd: add preallocation support

2019-07-26 Thread Stefano Garzarella
On Thu, Jul 25, 2019 at 09:30:30AM -0400, Jason Dillaman wrote: > On Thu, Jul 25, 2019 at 4:13 AM Stefano Garzarella > wrote: > > > > On Wed, Jul 24, 2019 at 01:48:42PM -0400, Jason Dillaman wrote: > > > On Tue, Jul 23, 2019 at 3:13 AM Stefano Garzarella > > > wrote: > > > > > > > > This patch

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

2019-07-26 Thread Peter Maydell
On Fri, 26 Jul 2019 at 09:25, Damien Hedde wrote: > On 7/25/19 7:59 PM, Peter Maydell wrote: > > As an aside, I'm surprised also the macro doesn't complain > > that we said the num_buttons field is int32 but it's really "int"... > > arguably a different kind of missing type check. > > We would

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

2019-07-26 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

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

2019-07-26 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

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

2019-07-26 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 ++---

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

2019-07-26 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 ---

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

2019-07-26 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

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

2019-07-26 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 12/15] cpu: TLB_FLAGS_MASK bit to force memory slow path

2019-07-26 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

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

2019-07-26 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

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

2019-07-26 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 +++

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

2019-07-26 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 ---

[Qemu-devel] [PATCH 2/2] tests.acceptance.boot_linux_console: Add pseries linux boot console test

2019-07-26 Thread sathnaga
From: Satheesh Rajendran Add pseries linux boot console test $avocado --show=console run -t arch:ppc64le boot_linux_console.py console: SLOF ** console: QEMU Starting console: Build Date = Jul 3 2019 12:26:14 console: FW

[Qemu-devel] [PATCH 1/2] tests.acceptance.avocado_qemu: Add support for powerpc

2019-07-26 Thread sathnaga
From: Satheesh Rajendran Current acceptance test will not run in powerpc Little endian environment due the arch name does not match the qemu binary path, let's handle it. Signed-off-by: Satheesh Rajendran --- tests/acceptance/avocado_qemu/__init__.py | 4 1 file changed, 4 insertions(+)

[Qemu-devel] [PATCH 0/2] Add support for powerpc acceptance test

2019-07-26 Thread sathnaga
From: Satheesh Rajendran This series attempt to add support for avocado acceptance test for powerpc and adds linux console boot test. avocado run boot_linux_console.py:BootLinuxConsole.test_ppc64le_pseries version.py vnc.py JOB ID : 918ed65e5e8bc1370c84c166a2c41936a700571e JOB LOG:

Re: [Qemu-devel] [PATCH v6] ppc: remove idle_timer logic

2019-07-26 Thread David Gibson
On Wed, Jul 24, 2019 at 07:47:45AM -0500, Shivaprasad G Bhat wrote: > The KVM_CAP_PPC_IRQ_LEVEL is part of the kernel now since 2.6.37. > Drop the redundant logic which is not excercised on new the kernels anymore. > Exit with error on older kernels. > > Signed-off-by: Shivaprasad G Bhat

Re: [Qemu-devel] [PATCH] ppc/pnv: Introduce PowerNV machines with fixed CPU models

2019-07-26 Thread David Gibson
On Wed, Jul 24, 2019 at 11:32:00AM +0200, Cédric Le Goater wrote: > On 23/07/2019 08:37, David Gibson wrote: > > On Tue, Jul 23, 2019 at 08:00:27AM +0200, Cédric Le Goater wrote: > >> On 23/07/2019 03:38, David Gibson wrote: > >>> On Mon, Jul 22, 2019 at 08:23:47PM +0200, Cédric Le Goater wrote: >

Re: [Qemu-devel] [PATCH for 4.2] target/arm: generate a custom MIDR for -cpu max

2019-07-26 Thread Laurent Desnogues
On Fri, Jul 26, 2019 at 9:24 AM Alex Bennée wrote: > > > Peter Maydell writes: > > > On Tue, 23 Jul 2019 at 12:33, Alex Bennée wrote: [...] > > /* > > * Reset MIDR so the guest doesn't mistake our 'max' CPU type for a real > > * one and try to apply errata workarounds or use impdef

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

2019-07-26 Thread Max Reitz
On 25.07.19 19:00, Eric Blake wrote: > 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

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

2019-07-26 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

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

2019-07-26 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 06/15] hw/virtio: Access MemoryRegion with MemOp

2019-07-26 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-26 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

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

2019-07-26 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

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

2019-07-26 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 |

Re: [Qemu-devel] [PATCH for 4.2] target/arm: generate a custom MIDR for -cpu max

2019-07-26 Thread Alex Bennée
Peter Maydell writes: > On Tue, 23 Jul 2019 at 12:33, Alex Bennée wrote: >> >> While most features are now detected by probing the ID_* registers >> kernels can (and do) use MIDR_EL1 for working out of they have to >> apply errata. This can trip up warnings in the kernel as it tries to >>

Re: [Qemu-devel] [Qemu-ppc] [PATCH] ppc/pnv: Generate phandle for the "interrupt-parent" property

2019-07-26 Thread David Gibson
On Wed, Jul 24, 2019 at 08:25:04PM +0530, Amol Surati wrote: > On Wed, Jul 24, 2019 at 06:57:30PM +1000, David Gibson wrote: > > On Wed, Jul 24, 2019 at 09:11:54AM +0200, Cédric Le Goater wrote: > > > On 24/07/2019 05:23, David Gibson wrote: > > > > On Tue, Jul 23, 2019 at 11:01:38AM +0200, Cédric

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

2019-07-26 Thread David Gibson
On Wed, Jul 24, 2019 at 11:33:06AM +0200, Auger Eric wrote: > Hi Yi, David, > > On 7/24/19 6:57 AM, Liu, Yi L wrote: > >> From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On > >> Behalf > >> Of David Gibson > >> Sent: Tuesday, July 23, 2019 11:58 AM > >> To: Liu, Yi L > >>

Re: [Qemu-devel] [PATCH for-4.1 0/2] spapr/xics: Last minute fixes

2019-07-26 Thread David Gibson
On Wed, Jul 24, 2019 at 06:57:09PM +0200, Greg Kurz wrote: > KVM on POWER9 doesn't use the XIVE VP space optimally. This currently > limits the number of VMs we can start to 127. Starting with the 128th > one, KVM fails to create the XIVE or the XICS-on-XIVE device and we > go through the fallback

Re: [Qemu-devel] [PATCH for-4.2] hw: add compat machines for 4.2

2019-07-26 Thread David Gibson
On Wed, Jul 24, 2019 at 10:50:17AM -0300, Eduardo Habkost wrote: > On Wed, Jul 24, 2019 at 12:35:24PM +0200, Cornelia Huck wrote: > > Add 4.2 machine types for arm/i440fx/q35/s390x/spapr. > > > > For i440fx and q35, unversioned cpu models are still translated > > to -v1, as 0788a56bd1ae ("i386:

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

2019-07-26 Thread Paolo Bonzini
On 25/07/19 22:30, Michael S. Tsirkin wrote: > 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

Re: [Qemu-devel] [PATCH v2 03/11] block: Add bdrv_has_zero_init_truncate()

2019-07-26 Thread Stefano Garzarella
On Wed, Jul 24, 2019 at 07:12:31PM +0200, Max Reitz wrote: > No .bdrv_has_zero_init() implementation returns 1 if growing the file > would add non-zero areas (at least with PREALLOC_MODE_OFF), so using it > in lieu of this new function was always safe. > > But on the other hand, it is possible

[Qemu-devel] [PATCH 1/5] virtiofsd: skip unnecessary vu_queue_get_avail_bytes()

2019-07-26 Thread Stefan Hajnoczi
When debug output is disabled there is no need to calculate the number of in/out bytes available. There is also no need to skip a request if there are 0 out bytes. The request parsing code already handles invalid requests. Signed-off-by: Stefan Hajnoczi --- contrib/virtiofsd/fuse_virtio.c |

[Qemu-devel] [PATCH 3/5] virtiofsd: make lo_release() atomic

2019-07-26 Thread Stefan Hajnoczi
Hold the lock across both lo_map_get() and lo_map_remove() to prevent races between two FUSE_RELEASE requests. In this case I don't see a serious bug but it's safer to do things atomically. Signed-off-by: Stefan Hajnoczi --- contrib/virtiofsd/passthrough_ll.c | 12 1 file changed,

[Qemu-devel] [PATCH 0/5] virtiofsd: multithreading preparation

2019-07-26 Thread Stefan Hajnoczi
virtiofsd is not ready for multithreading yet. This patch series starts to make the code capable of processing multiple FUSE requests simultaneously. I'm sending these fixes split into several patch series as I make progress auditing the code for thread-safety issues. The final patch series

[Qemu-devel] [PATCH 2/5] virtiofsd: prevent lo_lookup() NULL pointer dereference

2019-07-26 Thread Stefan Hajnoczi
Most lo_do_lookup() have already checked that the parent inode exists. lo_lookup() hasn't and can therefore hit a NULL pointer dereference when lo_inode(req, parent) returns NULL. Signed-off-by: Stefan Hajnoczi --- contrib/virtiofsd/passthrough_ll.c | 4 1 file changed, 4 insertions(+)

[Qemu-devel] [PATCH 4/5] virtiofsd: drop lo_dirp->fd field

2019-07-26 Thread Stefan Hajnoczi
fdopendir(3) takes ownership of the file descriptor. The presence of the lo_dirp->fd field could lead to someone incorrectly adding a close(d->fd) cleanup call in the future. Do not store the file descriptor in struct lo_dirp since it is unused. Signed-off-by: Stefan Hajnoczi ---

[Qemu-devel] [PATCH 5/5] virtiofsd: prevent races with lo_dirp_put()

2019-07-26 Thread Stefan Hajnoczi
Introduce lo_dirp_put() so that FUSE_RELEASEDIR does not cause use-after-free races with other threads that are accessing lo_dirp. Also make lo_releasedir() atomic to prevent FUSE_RELEASEDIR racing with itself. This prevents double-frees. Signed-off-by: Stefan Hajnoczi ---

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

2019-07-26 Thread Damien Hedde
On 7/25/19 7:27 PM, 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 a variable

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

2019-07-26 Thread Max Reitz
On 25.07.19 18:27, Kevin Wolf wrote: > 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

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

2019-07-26 Thread Peter Maydell
On Thu, 25 Jul 2019 at 19:00, Dr. David Alan Gilbert wrote: > > * 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: > > > > #define type_check_2darray(t1,t2,n,m)

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

2019-07-26 Thread Paolo Bonzini
On 26/07/19 08:47, tony.ngu...@bt.com wrote: > +        op = SIZE_MEMOP(size); > +        if (need_bswap(big_endian)) { > +            op ^= MO_BSWAP; > +        } And this has the same issue as the first version. It should be op = SIZE_MEMOP(size) | (big_endian ? MO_BE : MO_LE); and

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

2019-07-26 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > On Thu, 25 Jul 2019 at 19:00, Dr. David Alan Gilbert > wrote: > > > > * Peter Maydell (peter.mayd...@linaro.org) wrote: > > > On Thu, 25 Jul 2019 at 18:27, Dr. David Alan Gilbert > > > wrote: > > > > > > > > * Peter Maydell

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

2019-07-26 Thread Peter Maydell
On Fri, 26 Jul 2019 at 10:32, Dr. David Alan Gilbert wrote: > > * Peter Maydell (peter.mayd...@linaro.org) wrote: > > Would > > > > /* > > * Check that type t2 is an array of type t1 of size n, > > * eg if t1 is 'foo' and n is 32 then t2 must be 'foo[32]' > > */ > > > > be clearer ? > > Yep.

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

2019-07-26 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > On Fri, 26 Jul 2019 at 10:32, Dr. David Alan Gilbert > wrote: > > > > * Peter Maydell (peter.mayd...@linaro.org) wrote: > > > Would > > > > > > /* > > > * Check that type t2 is an array of type t1 of size n, > > > * eg if t1 is 'foo' and n is

Re: [Qemu-devel] [PATCH v2 01/11] qemu-img: Fix bdrv_has_zero_init() use in convert

2019-07-26 Thread Stefano Garzarella
On Wed, Jul 24, 2019 at 07:12:29PM +0200, Max Reitz wrote: > bdrv_has_zero_init() only has meaning for newly created images or image > areas. If qemu-img convert did not create the image itself, it cannot > rely on bdrv_has_zero_init()'s result to carry any meaning. > > Signed-off-by: Max Reitz

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

2019-07-26 Thread Paolo Bonzini
On 26/07/19 08:47, tony.ngu...@bt.com wrote: > +static bool memory_region_endianness_inverted(MemoryRegion *mr) >  { >  #ifdef TARGET_WORDS_BIGENDIAN >      return mr->ops->endianness == DEVICE_LITTLE_ENDIAN; > @@ -361,23 +361,27 @@ static bool > memory_region_wrong_endianness(MemoryRegion *mr) >  

Re: [Qemu-devel] [PATCH v2 04/11] block: Implement .bdrv_has_zero_init_truncate()

2019-07-26 Thread Stefano Garzarella
On Wed, Jul 24, 2019 at 07:12:32PM +0200, Max Reitz wrote: > We need to implement .bdrv_has_zero_init_truncate() for every block > driver that supports truncation and has a .bdrv_has_zero_init() > implementation. > > Implement it the same way each driver implements .bdrv_has_zero_init(). > This

Re: [Qemu-devel] [PATCH v2 05/11] block: Use bdrv_has_zero_init_truncate()

2019-07-26 Thread Stefano Garzarella
On Wed, Jul 24, 2019 at 07:12:33PM +0200, Max Reitz wrote: > Signed-off-by: Max Reitz > --- > block/parallels.c | 2 +- > block/vhdx.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/block/parallels.c b/block/parallels.c > index 00fae125d1..7cd2714b69 100644 >

[Qemu-devel] [PATCH v3] target/arm: generate a custom MIDR for -cpu max

2019-07-26 Thread Alex Bennée
While most features are now detected by probing the ID_* registers kernels can (and do) use MIDR_EL1 for working out of they have to apply errata. This can trip up warnings in the kernel as it tries to work out if it should apply workarounds to features that don't actually exist in the reported

  1   2   3   4   >