[Qemu-devel] [PATCH 02/67] target/arm: Remove offset argument to gen_exception_insn

2019-07-26 Thread Richard Henderson
The address of the current insn is still available in s->base.pc_next. Signed-off-by: Richard Henderson --- target/arm/translate-vfp.inc.c | 6 +++--- target/arm/translate.c | 32 2 files changed, 19 insertions(+), 19 deletions(-) diff --git

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] [PULL 1/1] linux-user: Make sigaltstack stacks per-thread

2019-07-26 Thread Laurent Vivier
From: Peter Maydell The alternate signal stack set up by the sigaltstack syscall is supposed to be per-thread. We were incorrectly implementing it as process-wide. This causes problems for guest binaries that rely on this. Notably the Go runtime does, and so we were seeing crashes caused by

[Qemu-devel] [PULL 0/1] Linux user for 4.1 patches

2019-07-26 Thread Laurent Vivier
The following changes since commit fff3159900d2b95613a9cb75fc3703e67a674729: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20190726' into staging (2019-07-26 16:23:07 +0100) are available in the Git repository at: git://github.com/vivier/qemu.git tags/linux-user

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 for-4.1] linux-user: Make sigaltstack stacks per-thread

2019-07-26 Thread Peter Maydell
On Fri, 26 Jul 2019 at 18:17, Laurent Vivier wrote: > Tested-by: Laurent Vivier > Reviewed-by: Laurent Vivier > > This patch seems also to fix failure of LTP test waitpid02. Well, that's a bonus :-) Could you submit a pullreq in time for rc3 (Tuesday), please? thanks -- PMM

Re: [Qemu-devel] [PATCH for-4.1] linux-user: Make sigaltstack stacks per-thread

2019-07-26 Thread Laurent Vivier
Le 25/07/2019 à 15:16, Peter Maydell a écrit : > The alternate signal stack set up by the sigaltstack syscall is > supposed to be per-thread. We were incorrectly implementing it as > process-wide. This causes problems for guest binaries that rely on > this. Notably the Go runtime does, and so

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

2019-07-26 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190726164921.1655115-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 for-3.1.1 0/2] tpm: Improve on error handling Message-id:

Re: [Qemu-devel] [PATCH v3] tests/boot_linux_console: add a test for riscv64 + virt

2019-07-26 Thread Chih-Min Chao
On Thu, Jul 25, 2019 at 8:12 AM Alistair Francis wrote: > On Tue, Jul 23, 2019 at 11:46 PM Chih-Min Chao > wrote: > > > > Similar to the mips + malta test, it boots a Linux kernel on a virt > > board and verify the serial is working. Also, it relies on the serial > > device set by the machine

Re: [Qemu-devel] [PATCH 2/3] spapr/pci: Free MSIs during reset

2019-07-26 Thread Greg Kurz
On Fri, 26 Jul 2019 18:17:57 +0200 Philippe Mathieu-Daudé wrote: > Cc'ing qemu-stable@ > This patch relies on the previous one, otherwise g_hash_table_remove_all() will just g_free() the spapr_pci_msi structures, but it will not tear down the MSIs in the interrupt controller. Also, this bug

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

2019-07-26 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190726164921.1655115-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 for-3.1.1 0/2] tpm: Improve on error handling Message-id:

[Qemu-devel] [Bug 1838066] [NEW] unexpected error: raw_reconfigure_getfd(): qemu-system-x86_64: Could not reopen file

2019-07-26 Thread Steffen (Daode) Nurpmeso
Public bug reported: Unexpected error in raw_reconfigure_getfd() at block/file-posix.c:923: qemu-system-x86_64: Could not reopen file: Permission denied Aborted Is what i sometimes (only) get, mostly for Linux guests i'd say (Arch just a few moments ago). This is on CRUX-Linux, thus a

Re: [Qemu-devel] [PATCH v4 6/7] monitor: adding tb_stats hmp command

2019-07-26 Thread Alex Bennée
vandersonmr writes: > Adding tb_stats [start|pause|stop|filter] command to hmp. > This allows controlling the collection of statistics. > It is also possible to set the level of collection: > all, jit, or exec. > > The goal of this command is to allow the dynamic exploration > of the TCG

Re: [Qemu-devel] [PATCH 12/28] Include hw/irq.h a lot less

2019-07-26 Thread Alistair Francis
On Fri, Jul 26, 2019 at 5:10 AM Markus Armbruster wrote: > > In my "build everything" tree, changing hw/irq.h triggers a recompile > of some 5400 out of 6600 objects (not counting tests and objects that > don't depend on qemu/osdep.h). > > hw/hw.h supposedly includes it for convenience. Several

Re: [Qemu-devel] [PATCH 01/28] include: Make headers more self-contained

2019-07-26 Thread Alistair Francis
On Fri, Jul 26, 2019 at 5:08 AM Markus Armbruster wrote: > > Back in 2016, we discussed[1] rules for headers, and these were > generally liked: > > 1. Have a carefully curated header that's included everywhere first. We >got that already thanks to Peter: osdep.h. > > 2. Headers should

Re: [Qemu-devel] [PATCH 08/28] Include sysemu/reset.h a lot less

2019-07-26 Thread Alistair Francis
On Fri, Jul 26, 2019 at 9:03 AM Philippe Mathieu-Daudé wrote: > > On 7/26/19 2:05 PM, Markus Armbruster wrote: > > In my "build everything" tree, changing sysemu/reset.h triggers a > > recompile of some 2600 out of 6600 objects (not counting tests and > > objects that don't depend on

[Qemu-devel] [PATCH for-3.1.1 1/2] tpm: Exit in reset when backend indicates failure

2019-07-26 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 (git cherry-pick bcfd16fe26d6bb6eabfd2dfb46b9fda59d5493db) --- hw/tpm/tpm_crb.c | 4 +++- hw/tpm/tpm_tis.c | 4 +++- 2 files changed, 6

[Qemu-devel] [PATCH for-3.1.1 2/2] tpm_emulator: Translate TPM error codes to strings

2019-07-26 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 (git cherry-pick 7e095e84ba0b7c0a1ac45bc6824dace2fd352e56) ---

[Qemu-devel] [PATCH for-3.1.1 0/2] tpm: Improve on error handling

2019-07-26 Thread Stefan Berger
This series of patches improves error handling with the TPM backend. The have just been applied to master and can be cherry-pick'ed. I added the cherry-pick command in the 2 patches. Stefan Stefan Berger (2): tpm: Exit in reset when backend indicates failure tpm_emulator: Translate TPM

Re: [Qemu-devel] [PATCH v4 5/7] log: adding -d tb_stats to control tbstats

2019-07-26 Thread Alex Bennée
vandersonmr writes: > Adding -d tb_stats:[limit:[all|jit|exec]] to control TBStatistics > collection. "limit" is used to limit the number of TBStats in the > linux-user dump. [all|jit|exec] control the profilling level used > by the TBStats: all, only jit stats or only execution count stats. >

Re: [Qemu-devel] [PATCH 2/3] spapr/pci: Free MSIs during reset

2019-07-26 Thread Philippe Mathieu-Daudé
Cc'ing qemu-stable@ On 7/26/19 4:44 PM, Greg Kurz wrote: > When the machine is reset, the MSI bitmap is cleared but the allocated > MSIs are not freed. Some operating systems, such as AIX, can detect the > previous configuration and assert. > > Empty the MSI cache, this performs the needed

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

2019-07-26 Thread Peter Maydell
On Fri, 26 Jul 2019 at 16:19, Peter Maydell wrote: > > 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-2019072

Re: [Qemu-devel] [PATCH 04/28] memory: Fix type of IOMMUMemoryRegionClass member @parent_class

2019-07-26 Thread Philippe Mathieu-Daudé
On 7/26/19 2:05 PM, Markus Armbruster wrote: > TYPE_IOMMU_MEMORY_REGION is a direct subtype of TYPE_MEMORY_REGION. > Its instance struct is IOMMUMemoryRegion, and its first member is a > MemoryRegion. Correct. Its class struct is IOMMUMemoryRegionClass, > and its first member is a DeviceClass.

Re: [Qemu-devel] [PATCH 06/28] trace: Eliminate use of TARGET_FMT_plx

2019-07-26 Thread Philippe Mathieu-Daudé
On 7/26/19 2:05 PM, Markus Armbruster wrote: > hw/tpm/trace-events uses TARGET_FMT_plx formats with uint64_t > arguments. That's wrong, TARGET_FMT_plx takes hwaddr. Since hwaddr > happens to be uint64_t, it works anyway. Messed up in commit > ec427498da5, v2.12.0. Clean up by replacing

Re: [Qemu-devel] [PATCH 08/28] Include sysemu/reset.h a lot less

2019-07-26 Thread Philippe Mathieu-Daudé
On 7/26/19 2:05 PM, Markus Armbruster wrote: > In my "build everything" tree, changing sysemu/reset.h triggers a > recompile of some 2600 out of 6600 objects (not counting tests and > objects that don't depend on qemu/osdep.h). > > The main culprit is hw/hw.h, which supposedly includes it for >

Re: [Qemu-devel] [PATCH 25/28] numa: Move remaining NUMA declarations from sysemu.h to numa.h

2019-07-26 Thread Philippe Mathieu-Daudé
On 7/26/19 2:05 PM, Markus Armbruster wrote: > Commit e35704ba9c "numa: Move NUMA declarations from sysemu.h to > numa.h" left a few NUMA-related macros behind. Move them now. > > Cc: Eduardo Habkost > Cc: Marcel Apfelbaum > Signed-off-by: Markus Armbruster :) Reviewed-by: Philippe

Re: [Qemu-devel] [PATCH 24/28] Include sysemu/hostmem.h less

2019-07-26 Thread Philippe Mathieu-Daudé
On 7/26/19 2:05 PM, Markus Armbruster wrote: > Move the HostMemoryBackend typedef from sysemu/hostmem.h to > qemu/typedefs.h. This renders a few inclusions of sysemu/hostmem.h > superflouous; drop them. > > Cc: Eduardo Habkost > Cc: Igor Mammedov > Signed-off-by: Markus Armbruster

Re: [Qemu-devel] [PATCH 17/28] Include qom/object.h slightly less

2019-07-26 Thread Philippe Mathieu-Daudé
On 7/26/19 2:05 PM, Markus Armbruster wrote: > hw/hw.h used to include headers hardware emulation "usually" needs. > The previous commits removed all but one of them, to good effect. > Only qom/object.h is left. Remove that one, too. > > Signed-off-by: Markus Armbruster Reviewed-by: Philippe

Re: [Qemu-devel] [PATCH 14/28] migration: Move the VMStateDescription typedef to typedefs.h

2019-07-26 Thread Philippe Mathieu-Daudé
On 7/26/19 2:05 PM, Markus Armbruster wrote: > We declare incomplete struct VMStateDescription in a couple of places > so we don't have to include migration/vmstate.h for the typedef. > That's fine with me. However, the next commit will drop > migration/vmstate.h from a massive number of

Re: [Qemu-devel] [PATCH 0/2] ssh: add password and privkey auth methods

2019-07-26 Thread Daniel P . Berrangé
On Fri, Jul 26, 2019 at 04:35:27PM +0100, Richard W.M. Jones wrote: > On Fri, Jul 26, 2019 at 10:06:43AM -0500, Eric Blake wrote: > > On 7/26/19 9:45 AM, Pino Toscano wrote: > > > On Friday, 26 July 2019 16:27:11 CEST Richard W.M. Jones wrote: > > >> On Fri, Jul 26, 2019 at 04:09:52PM +0200, Pino

Re: [Qemu-devel] [PATCH 0/2] ssh: add password and privkey auth methods

2019-07-26 Thread Richard W.M. Jones
On Fri, Jul 26, 2019 at 10:06:43AM -0500, Eric Blake wrote: > On 7/26/19 9:45 AM, Pino Toscano wrote: > > On Friday, 26 July 2019 16:27:11 CEST Richard W.M. Jones wrote: > >> On Fri, Jul 26, 2019 at 04:09:52PM +0200, Pino Toscano wrote: > >>> These two patches add the password and private key

Re: [Qemu-devel] [PATCH v4 4/7] accel: replacing part of CONFIG_PROFILER with TBStats

2019-07-26 Thread Alex Bennée
vandersonmr writes: > We add some of the statistics collected in the TCGProfiler > into the TBStats, having the statistics not only for the whole > emulation but for each TB. Then, we removed these stats > from TCGProfiler and reconstruct the information for the > "info jit" using the sum of

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

2019-07-26 Thread Jonathan Behrens
Reviewed-by: Jonathan Behrens On Thu, Jul 25, 2019 at 2:56 PM Alistair Francis wrote: > 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

[Qemu-devel] [PULL 4/5] hw/arm/boot: Rename elf_{low, high}_addr to image_{low, high}_addr

2019-07-26 Thread Peter Maydell
Rename the elf_low_addr and elf_high_addr variables to image_low_addr and image_high_addr -- in the next commit we will extend them to be set for other kinds of image file and not just ELF files. Signed-off-by: Peter Maydell Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé

[Qemu-devel] [PULL 5/5] hw/arm/boot: Further improve initrd positioning code

2019-07-26 Thread Peter Maydell
In commit e6b2b20d9735d4ef we made the boot loader code try to avoid putting the initrd on top of the kernel. However the expression used to calculate the start of the initrd: info->initrd_start = info->loader_start + MAX(MIN(info->ram_size / 2, 128 * 1024 * 1024), kernel_size);

[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

[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 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 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

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 3/3] spapr/irq: Drop spapr_irq_msi_reset()

2019-07-26 Thread Greg Kurz
On Fri, 26 Jul 2019 17:01:36 +0200 Cédric Le Goater wrote: > On 26/07/2019 16:44, Greg Kurz wrote: > > PHBs already take care of clearing the MSIs from the bitmap during reset > > or unplug. No need to do this globally from the machine code. Rather add > > an assert to ensure that PHBs have

Re: [Qemu-devel] [PATCH 0/2] ssh: add password and privkey auth methods

2019-07-26 Thread Eric Blake
On 7/26/19 9:45 AM, Pino Toscano wrote: > On Friday, 26 July 2019 16:27:11 CEST Richard W.M. Jones wrote: >> On Fri, Jul 26, 2019 at 04:09:52PM +0200, Pino Toscano wrote: >>> These two patches add the password and private key authentication >>> methods to the ssh block driver, using secure objects

Re: [Qemu-devel] [PATCH 3/3] spapr/irq: Drop spapr_irq_msi_reset()

2019-07-26 Thread Cédric Le Goater
On 26/07/2019 16:44, Greg Kurz wrote: > PHBs already take care of clearing the MSIs from the bitmap during reset > or unplug. No need to do this globally from the machine code. Rather add > an assert to ensure that PHBs have acted as expected. This works because spar_irq_reset() is called after

Re: [Qemu-devel] [PATCH 1/3] spapr/pci: Consolidate de-allocation of MSIs

2019-07-26 Thread Cédric Le Goater
On 26/07/2019 16:44, Greg Kurz wrote: > When freeing MSIs, we need to: > - remove them from the machine's MSI bitmap > - remove them from the IC backend > - remove them from the PHB's MSI cache > > This is currently open coded in two places in rtas_ibm_change_msi(), > and we're about to need this

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

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

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

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

Re: [Qemu-devel] [PATCH 2/3] spapr/pci: Free MSIs during reset

2019-07-26 Thread Cédric Le Goater
On 26/07/2019 16:44, Greg Kurz wrote: > When the machine is reset, the MSI bitmap is cleared but the allocated > MSIs are not freed. Some operating systems, such as AIX, can detect the > previous configuration and assert. > > Empty the MSI cache, this performs the needed cleanup. This is fixing

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

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

Re: [Qemu-devel] [PATCH 0/2] ssh: add password and privkey auth methods

2019-07-26 Thread Richard W.M. Jones
On Fri, Jul 26, 2019 at 04:45:03PM +0200, Pino Toscano wrote: > On Friday, 26 July 2019 16:27:11 CEST Richard W.M. Jones wrote: > > On Fri, Jul 26, 2019 at 04:09:52PM +0200, Pino Toscano wrote: > > > These two patches add the password and private key authentication > > > methods to the ssh block

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

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

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

Re: [Qemu-devel] [PATCH v4 3/7] accel: collecting JIT statistics

2019-07-26 Thread Alex Bennée
vandersonmr writes: > If a TB has a TBS (TBStatistics) with the TB_JIT_STATS > enabled then we collect statistics of its translation > processes and code translation. To collect the number > of host instructions we used a modified version of the > disas function to pass through the whole code

[Qemu-devel] [PATCH 3/3] spapr/irq: Drop spapr_irq_msi_reset()

2019-07-26 Thread Greg Kurz
PHBs already take care of clearing the MSIs from the bitmap during reset or unplug. No need to do this globally from the machine code. Rather add an assert to ensure that PHBs have acted as expected. Signed-off-by: Greg Kurz --- hw/ppc/spapr.c |4 hw/ppc/spapr_irq.c

Re: [Qemu-devel] [PATCH 0/2] ssh: add password and privkey auth methods

2019-07-26 Thread Pino Toscano
On Friday, 26 July 2019 16:27:11 CEST Richard W.M. Jones wrote: > On Fri, Jul 26, 2019 at 04:09:52PM +0200, Pino Toscano wrote: > > These two patches add the password and private key authentication > > methods to the ssh block driver, using secure objects for > > passwords/passphrases. > > I was

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

2019-07-26 Thread Richard Henderson
On 7/26/19 2:39 AM, Paolo Bonzini wrote: > Then memory_region_endianness_inverted can be: > > if (mr->ops->endianness == DEVICE_NATIVE_ENDIAN) > return (op & MO_BSWAP) != MO_TE; > else if (mr->ops->endianness == DEVICE_BIG_ENDIAN) > return (op & MO_BSWAP) != MO_BE; > else if

[Qemu-devel] [PATCH 2/3] spapr/pci: Free MSIs during reset

2019-07-26 Thread Greg Kurz
When the machine is reset, the MSI bitmap is cleared but the allocated MSIs are not freed. Some operating systems, such as AIX, can detect the previous configuration and assert. Empty the MSI cache, this performs the needed cleanup. Signed-off-by: Greg Kurz --- hw/ppc/spapr_pci.c |2 ++ 1

[Qemu-devel] [PATCH 1/3] spapr/pci: Consolidate de-allocation of MSIs

2019-07-26 Thread Greg Kurz
When freeing MSIs, we need to: - remove them from the machine's MSI bitmap - remove them from the IC backend - remove them from the PHB's MSI cache This is currently open coded in two places in rtas_ibm_change_msi(), and we're about to need this in spapr_phb_reset() as well. Instead of

[Qemu-devel] [PATCH 0/3] spapr/pci: Improve MSI tracking

2019-07-26 Thread Greg Kurz
Some recent tests with AIX guests showed that we don't tear down MSIs that were allocated with the "change-msi" RTAS call, when the guest is rebooted. This series teach PHBs to do the cleanup at reset time. This bug has always been there. Not sure it is worth the pain to have this fixed in 4.1.

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] [PULL for-4.1 0/1] s390x: vfio-ccw maintainership update

2019-07-26 Thread Peter Maydell
m/cohuck/qemu tags/s390x-20190726 > > for you to fetch changes up to 6ef2d01abf44fa86f2de4bcde3be9391259bf718: > > MAINTAINERS: vfio-ccw: Remove myself as the maintainer (2019-07-25 09:36:14 > +0200) > > -

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 v5 11/15] memory: Single byte swap along the I/O path

2019-07-26 Thread Richard Henderson
On 7/26/19 2:26 AM, Paolo Bonzini wrote: > 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 =

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

2019-07-26 Thread Richard W.M. Jones
On Fri, Jul 26, 2019 at 09:24:34AM -0500, Eric Blake wrote: > On a different topic, how much of this work overlaps with the nbdkit ssh > plugin? Should we be duplicating efforts with both projects supporting > ssh natively, or is it worth considering getting qemu out of the ssh > business and

Re: [Qemu-devel] [PATCH 0/2] ssh: add password and privkey auth methods

2019-07-26 Thread Richard W.M. Jones
On Fri, Jul 26, 2019 at 04:09:52PM +0200, Pino Toscano wrote: > These two patches add the password and private key authentication > methods to the ssh block driver, using secure objects for > passwords/passphrases. I was attempting to test this but couldn't work out the full command line to use

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 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 v7 02/11] numa: move numa global variable nb_numa_nodes into MachineState

2019-07-26 Thread Eduardo Habkost
On Fri, Jul 26, 2019 at 03:43:43PM +0200, Igor Mammedov wrote: > On Wed, 24 Jul 2019 15:15:28 -0300 > Eduardo Habkost wrote: > > > On Wed, Jul 24, 2019 at 05:48:11PM +0200, Igor Mammedov wrote: > > > On Wed, 24 Jul 2019 12:02:41 -0300 > > > Eduardo Habkost wrote: > > > > > > > On Wed, Jul

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

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

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

2019-07-26 Thread Pino Toscano
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 --- block/ssh.c | 98 block/trace-events

[Qemu-devel] [PATCH 1/2] ssh: implement password authentication

2019-07-26 Thread Pino Toscano
Add a 'password-secret' option which represents the name of an object with the password of the user. Signed-off-by: Pino Toscano --- block/ssh.c | 35 --- block/trace-events | 1 + docs/qemu-block-drivers.texi | 7 +--

[Qemu-devel] [PATCH 0/2] ssh: add password and privkey auth methods

2019-07-26 Thread Pino Toscano
These two patches add the password and private key authentication methods to the ssh block driver, using secure objects for passwords/passphrases. Pino Toscano (2): ssh: implement password authentication ssh: implement private key authentication block/ssh.c | 133

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

2019-07-26 Thread Richard Henderson
On 7/26/19 6:36 AM, Richard Henderson wrote: > On 7/25/19 11:43 PM, tony.ngu...@bt.com wrote: >> } MemOp; >> >> +/* No-op while memory_region_dispatch_[read|write] is converted to MemOp */ >> +#define MEMOP_SIZE(op) (op)/* MemOp to size. */ >> +#define SIZE_MEMOP(ul) (ul)/* Size to

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

2019-07-26 Thread Eric Blake
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 QapiErrorClass: it's used

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

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

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

2019-07-26 Thread Richard Henderson
On 7/25/19 11:44 PM, tony.ngu...@bt.com wrote: > memory_region_dispatch_read(env->itc_tag, index, >CP0_TagLo, > -8, MEMTXATTRS_UNSPECIFIED); > +SIZE_MEMOP(8), MEMTXATTRS_UNSPECIFIED); As an example of why I'm not

Re: [Qemu-devel] [PATCH v7 02/11] numa: move numa global variable nb_numa_nodes into MachineState

2019-07-26 Thread Igor Mammedov
On Wed, 24 Jul 2019 15:15:28 -0300 Eduardo Habkost wrote: > On Wed, Jul 24, 2019 at 05:48:11PM +0200, Igor Mammedov wrote: > > On Wed, 24 Jul 2019 12:02:41 -0300 > > Eduardo Habkost wrote: > > > > > On Wed, Jul 24, 2019 at 04:27:21PM +0200, Igor Mammedov wrote: > > > > On Tue, 23 Jul 2019

Re: [Qemu-devel] [PULL 00/22] virtio, pc, pci: features, fixes, cleanups

2019-07-26 Thread Michael S. Tsirkin
On Fri, Jul 26, 2019 at 01:39:26PM +0100, Peter Maydell wrote: > On Tue, 2 Jul 2019 at 19:27, Peter Maydell wrote: > > > > On Tue, 2 Jul 2019 at 19:22, Michael S. Tsirkin wrote: > > > > > > On Tue, Jul 02, 2019 at 06:20:01PM +0100, Peter Maydell wrote: > > > > On Tue, 2 Jul 2019 at 18:01,

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

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

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

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

Re: [Qemu-devel] [PATCH v4 2/7] accel: collecting TB execution count

2019-07-26 Thread Alex Bennée
vandersonmr writes: > If a TB has a TBS (TBStatistics) with the TB_EXEC_STATS > enabled, then we instrument the start code of the TB > to atomically count the number of times it is executed. > The execution count of the TB is stored in its respective > TBS. > > Signed-off-by: Vanderson M. do

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

2019-07-26 Thread Vladimir Sementsov-Ogievskiy
25.07.2019 19:34, Max Reitz wrote: > 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: >>

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

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

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

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

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

2019-07-26 Thread Richard Henderson
On 7/25/19 11:43 PM, tony.ngu...@bt.com wrote: > } MemOp; > > +/* No-op while memory_region_dispatch_[read|write] is converted to MemOp */ > +#define MEMOP_SIZE(op) (op)/* MemOp to size. */ > +#define SIZE_MEMOP(ul) (ul)/* Size to MemOp. */ > + This doesn't thrill me, because for 9

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

2019-07-26 Thread Richard Henderson
On 7/25/19 11:43 PM, tony.ngu...@bt.com wrote: > +#ifdef NEED_CPU_H > +#ifdef ALIGNED_ONLY > +MO_ALIGN = 0, > +MO_UNALN = MO_AMASK, You need the configure patch got TARGET_ALIGNED_ONLY that you posted separately as patch 1 in order for this to work. Otherwise, Reviewed-by: Richard

Re: [Qemu-devel] [RFC 00/19] Add virtual device fuzzing support

2019-07-26 Thread Stefan Hajnoczi
On Thu, Jul 25, 2019 at 03:23:43AM +, Oleinik, Alexander wrote: > As part of Google Summer of Code 2019, I'm working on integrating > fuzzing of virtual devices into QEMU [1]. This is a highly WIP patchset > adding this functionality. > > Fuzzers provide random data to a program and monitor

Re: [Qemu-devel] [RFC 19/19] fuzz: Add documentation about the fuzzer to docs/

2019-07-26 Thread Stefan Hajnoczi
On Thu, Jul 25, 2019 at 03:24:00AM +, Oleinik, Alexander wrote: > +== Main Modifications required for Fuzzing == > + > +Fuzzing is enabled with the -enable-fuzzing flag, which adds the needed > cflags > +to enable Libfuzzer and AddressSanitizer. In the code, most of the changes to > +existing

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

2019-07-26 Thread Stefan Hajnoczi
On Thu, Jul 25, 2019 at 05:05:25PM +, Oleinik, Alexander wrote: > 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 > >

Re: [Qemu-devel] [RFC 09/19] fuzz: use mtree_info to find mapped addresses

2019-07-26 Thread Stefan Hajnoczi
On Thu, Jul 25, 2019 at 03:23:51AM +, Oleinik, Alexander wrote: > Locate mmio and port i/o addresses that are mapped to devices so we can > limit the fuzzer to only these addresses. This should be replaced with > a sane way of enumaring these memory regions. > > Signed-off-by: Alexander

Re: [Qemu-devel] [RFC 08/19] fuzz: add shims to intercept libfuzzer init

2019-07-26 Thread Stefan Hajnoczi
On Thu, Jul 25, 2019 at 10:21:18AM +0200, Paolo Bonzini wrote: > On 25/07/19 05:23, Oleinik, Alexander wrote: > > Intercept coverage buffer registration calls and use this information to > > copy them to shared memory, if using fork() to avoid resetting device > > state. > > > > Signed-off-by:

Re: [Qemu-devel] [RFC 07/19] fuzz: Modify libqtest to directly invoke qtest.c

2019-07-26 Thread Stefan Hajnoczi
On Thu, Jul 25, 2019 at 03:23:49AM +, Oleinik, Alexander wrote: > @@ -379,9 +399,18 @@ static void socket_sendf(int fd, const char *fmt, > va_list ap) > { > gchar *str = g_strdup_vprintf(fmt, ap); > size_t size = strlen(str); > +#ifdef CONFIG_FUZZ > +// Directly call

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

2019-07-26 Thread Peter Maydell
On Thu, 25 Jul 2019 at 16:48, Stefan Berger wrote: > > 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 >

Re: [Qemu-devel] [PATCH v4 0/7] Measure Tiny Code Generation Quality

2019-07-26 Thread Alex Bennée
vandersonmr writes: > This patch is part of Google Summer of Code (GSoC) 2019. > More about the project can be found in: > https://wiki.qemu.org/Internships/ProjectIdeas/TCGCodeQuality > > The goal of this patch is to add infrastructure to collect > execution and JIT statistics during the

Re: [Qemu-devel] [RFC 07/19] fuzz: Modify libqtest to directly invoke qtest.c

2019-07-26 Thread Stefan Hajnoczi
On Thu, Jul 25, 2019 at 11:04:11AM +0200, Thomas Huth wrote: > On 25/07/2019 05.23, Oleinik, Alexander wrote: > > @@ -379,9 +399,18 @@ static void socket_sendf(int fd, const char *fmt, > > va_list ap) > > { > > gchar *str = g_strdup_vprintf(fmt, ap); > > size_t size = strlen(str); > >

Re: [Qemu-devel] [RFC 06/19] fuzz: Add ramfile for fast vmstate/vmload

2019-07-26 Thread Stefan Hajnoczi
On Thu, Jul 25, 2019 at 03:23:49AM +, Oleinik, Alexander wrote: > The ramfile allows vmstate to be saved and restored directly onto the > heap. > > Signed-off-by: Alexander Oleinik > --- > tests/fuzz/ramfile.c | 127 +++ > tests/fuzz/ramfile.h | 20

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

2019-07-26 Thread Jason Dillaman
On Fri, Jul 26, 2019 at 4:48 AM Stefano Garzarella wrote: > > 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,

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

2019-07-26 Thread Igor Mammedov
On Thu, 25 Jul 2019 13:38:48 -0400 "Michael S. Tsirkin" wrote: > 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

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

2019-07-26 Thread Max Reitz
On 26.07.19 13:49, Kevin Wolf wrote: > Am 26.07.2019 um 12:50 hat Max Reitz geschrieben: >> On 25.07.19 18:27, Kevin Wolf wrote: >>> This fixes device like IDE that can still start new requests from I/O >> >> *devices >> >>> handlers in the CPU thread while the block backend is drained. >>> >>>

Re: [Qemu-devel] [PULL 00/22] virtio, pc, pci: features, fixes, cleanups

2019-07-26 Thread Peter Maydell
On Tue, 2 Jul 2019 at 19:27, Peter Maydell wrote: > > On Tue, 2 Jul 2019 at 19:22, Michael S. Tsirkin wrote: > > > > On Tue, Jul 02, 2019 at 06:20:01PM +0100, Peter Maydell wrote: > > > On Tue, 2 Jul 2019 at 18:01, Michael S. Tsirkin wrote: > > > > This isn't from mainline. We have a bit of a

Re: [Qemu-devel] [RFC 03/19] fuzz: add fuzz accelerator

2019-07-26 Thread Stefan Hajnoczi
On Thu, Jul 25, 2019 at 03:23:46AM +, Oleinik, Alexander wrote: > Much like the qtest accelerator, the fuzz accelerator skips the CPU > emulation > > Signed-off-by: Alexander Oleinik > --- > include/sysemu/qtest.h | 7 ++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git

<    1   2   3   4   >