Re: [Qemu-devel] [PATCH 1/5] option: Make option help nicer to read

2018-10-16 Thread Markus Armbruster
Max Reitz writes: > This adds some whitespace into the option help (including indentation) > and replaces '=' by ': ' (not least because '=' should be used for > values, not types). Furthermore, the list name is no longer printed as > part of every line, but only once in advance, and only if the

Re: [Qemu-devel] No more chameleon devices (was: [PATCH] virtio: Provide version-specific variants of virtio PCI devices)

2018-10-16 Thread Gerd Hoffmann
On Wed, Oct 17, 2018 at 07:57:39AM +0200, Markus Armbruster wrote: > Laine Stump writes: > > [...] > > In the end, having a device that changed PCI ID depending on what kind > > of slot it was plugged into was an idea "too clever for its own good", > > should be avoided when new devices are added

[Qemu-devel] No more chameleon devices (was: [PATCH] virtio: Provide version-specific variants of virtio PCI devices)

2018-10-16 Thread Markus Armbruster
Laine Stump writes: [...] > In the end, having a device that changed PCI ID depending on what kind > of slot it was plugged into was an idea "too clever for its own good", > should be avoided when new devices are added in the future, and we > should at least provide an alternative that doesn't do

[Qemu-devel] "no-user" for properties (was: [PATCH] virtio: Provide version-specific variants of virtio PCI devices)

2018-10-16 Thread Markus Armbruster
Gerd Hoffmann writes: > Hi, > >> > See above. We can't drop disable-modern. >> >> Good point. But this doesn't require it to be a supported device >> option for users/management. Maybe we should rename it to >> "x-disable-modern" (but that's a separate discussion). > > I think it would be m

Re: [Qemu-devel] [PATCH v3 37/38] raw: Convert a warning to warn_report()

2018-10-16 Thread Markus Armbruster
Eric Blake writes: > On 10/16/18 12:41 PM, Markus Armbruster wrote: >> Signed-off-by: Markus Armbruster >> --- >> block/raw-format.c | 17 + >> 1 file changed, 9 insertions(+), 8 deletions(-) > > Incomplete. tests/qemu-iotests/109.out needs updating: > >> @@ -436,14 +437,14 @@

Re: [Qemu-devel] [RFC 0/5] Improve balloon handling of pagesizes other than 4kiB

2018-10-16 Thread David Gibson
On Fri, Oct 12, 2018 at 01:26:45PM -0400, Michael S. Tsirkin wrote: > On Fri, Oct 12, 2018 at 02:24:26PM +1100, David Gibson wrote: > > The virtio-balloon devices was never really thought out for cases > > other than 4kiB pagesize on both guest and host. It works in some > > cases, but in others c

Re: [Qemu-devel] [RFC 5/5] virtio-balloon: Safely handle BALLOON_PAGE_SIZE < host page size

2018-10-16 Thread David Gibson
On Mon, Oct 15, 2018 at 09:08:45AM +0200, David Hildenbrand wrote: > >>> This occurs in practice routinely for POWER KVM systems, since both host > >>> and guest typically use 64kiB pages. > >>> > >>> To make this safe, without breaking that useful case, we need to > >>> accumulate 4kiB balloon req

Re: [Qemu-devel] [PATCH] macio/pmu: Fix missing vmsd terminator

2018-10-16 Thread David Gibson
On Tue, Oct 16, 2018 at 12:30:45PM +0100, Dr. David Alan Gilbert wrote: > > I noticed this hadn't got merged - who wants it? I think that's one for my tree, but I'm afraid I completely missed it before. It's generally best to CC me on ppc related patches, otherwise I'm likely to lose them in the

[Qemu-devel] [PATCH v2] target/arm : add pvpanic mmio device

2018-10-16 Thread Peng Hao
Add pvpanic mmio device that is similar to x86's pvpanic device. v1 ---> v2 add copyright and license for new files. Signed-off-by: Peng Hao --- default-configs/arm-softmmu.mak | 2 +- hw/arm/virt.c | 21 + hw/misc/Makefile.objs | 1 + hw/misc/pvpanic-mmio.

[Qemu-devel] [PATCH 2/3] linux-user: Fix shmat emulation by honoring host SHMLBA

2018-10-16 Thread Richard Henderson
For those hosts with SHMLBA > getpagesize, we don't automatically select a guest address that is compatible with the host. We can achieve this by boosting the alignment of guest_base and by adding an extra alignment argument to mmap_find_vma. Signed-off-by: Richard Henderson --- linux-user/qemu

[Qemu-devel] [PATCH 3/3] linux-user: Align mmap_find_vma to host page size

2018-10-16 Thread Richard Henderson
This can avoid stack allocation failures for i386 guest on ppc64 (64k page) host. Suggested-by: Laurent Vivier Signed-off-by: Richard Henderson --- linux-user/mmap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/linux-user/mmap.c b/linux-user/mmap.c index 47950ee9d7..735bc928fe 100644 -

[Qemu-devel] [PATCH 1/3] tests/tcg/multiarch/linux-test: Fix error check for shmat

2018-10-16 Thread Richard Henderson
The error indicator for this syscall is -1, not 0. Signed-off-by: Richard Henderson --- tests/tcg/multiarch/linux-test.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/tcg/multiarch/linux-test.c b/tests/tcg/multiarch/linux-test.c index e80eccc0ce..6d2c02c5c0 100644 -

[Qemu-devel] [PATCH 0/3] linux-user: Fix shmat by honoring SHMLBA

2018-10-16 Thread Richard Henderson
These three patches were posted independently back in July. The second patch has been modified for feedback from Laurent. C.f. http://lists.nongnu.org/archive/html/qemu-devel/2018-07/msg01999.html http://lists.nongnu.org/archive/html/qemu-devel/2018-07/msg02180.html http://lists.nongnu.org/a

Re: [Qemu-devel] [PATCH 1/3] archive-source.sh: Modern shellscripting (use $() instead of ``)

2018-10-16 Thread maozy
Hi, Eric On 10/15/18 11:44 PM, Eric Blake wrote: On 10/15/18 1:51 AM, Mao Zhongyi wrote: Various shell files contain a mix between obsolete `` and modern $(); use of `` is only required when using /bin/sh on Solaris. It would be nice to convert to using $() everywhere, or at least in all bash s

Re: [Qemu-devel] [PATCH] target/arm : add pvpanic mmio device

2018-10-16 Thread peng.hao2
>On 10/17/18 2:23 AM, Peng Hao wrote: >> +++ b/hw/misc/pvpanic-mmio.c >> @@ -0,0 +1,76 @@ >> +#include "qemu/osdep.h" > >New file requires file header w/ copyright and license. I will handle it in new version .Thanks >r~

Re: [Qemu-devel] [PATCH V5 1/4] target-i386: introduce coalesced_pio kvm headerupdate

2018-10-16 Thread peng.hao2
On Fri, Aug 31, 2018 at 05:05:02PM +0800, Peng Hao wrote: >> add coalesced_pio's struct and KVM_CAP_COALESCED_PIO header. >> >> Signed-off-by: Peng Hao > >I can merge ths together with q35 patch, but pls >get acks from kvm folks, to this end fix up >commit logs and subjects to match reality and re

Re: [Qemu-devel] [PATCH] target/arm : add pvpanic mmio device

2018-10-16 Thread Richard Henderson
On 10/17/18 2:23 AM, Peng Hao wrote: > +++ b/hw/misc/pvpanic-mmio.c > @@ -0,0 +1,76 @@ > +#include "qemu/osdep.h" New file requires file header w/ copyright and license. r~

[Qemu-devel] [PATCH] target/arm : add pvpanic mmio device

2018-10-16 Thread Peng Hao
Add pvpanic mmio device that is similar to x86's pvpanic device. Signed-off-by: Peng Hao --- default-configs/arm-softmmu.mak | 2 +- hw/arm/virt.c | 21 hw/misc/Makefile.objs | 1 + hw/misc/pvpanic-mmio.c | 76 ++

[Qemu-devel] [PATCH] target/arm : add pvpanic mmio device

2018-10-16 Thread Peng Hao
From: root Add pvpanic mmio device that is similar to x86's pvpanic device. Signed-off-by: Peng Hao --- default-configs/arm-softmmu.mak | 2 +- hw/arm/virt.c | 21 hw/misc/Makefile.objs | 1 + hw/misc/pvpanic-mmio.c | 76 +

Re: [Qemu-devel] [PATCH v6 13/14] target/arm: Implement PMSWINC

2018-10-16 Thread Richard Henderson
On 10/10/18 1:37 PM, Aaron Lindsay wrote: > Signed-off-by: Aaron Lindsay > --- > target/arm/helper.c | 39 +-- > 1 file changed, 37 insertions(+), 2 deletions(-) Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [PATCH v6 12/14] target/arm: PMU: Set PMCR.N to 4

2018-10-16 Thread Richard Henderson
On 10/10/18 1:37 PM, Aaron Lindsay wrote: > This both advertises that we support four counters and enables them > because the pmu_num_counters() reads this value from PMCR. > > Signed-off-by: Aaron Lindsay > --- > target/arm/helper.c | 8 > 1 file changed, 4 insertions(+), 4 deletions(-

Re: [Qemu-devel] [PATCH v6 11/14] target/arm: PMU: Add instruction and cycle events

2018-10-16 Thread Richard Henderson
On 10/10/18 1:37 PM, Aaron Lindsay wrote: > + * Return the underlying cycle count for the PMU cycle counters. If we're in > + * usermode, simply return 0. > + */ > +static uint64_t cycles_get_count(CPUARMState *env) > +{ > +#ifndef CONFIG_USER_ONLY > +return muldiv64(qemu_clock_get_ns(QEMU_CLOC

Re: [Qemu-devel] [PATCH v6 10/14] target/arm: Finish implementation of PM[X]EVCNTR and PM[X]EVTYPER

2018-10-16 Thread Richard Henderson
On 10/10/18 1:37 PM, Aaron Lindsay wrote: > Add arrays to hold the registers, the definitions themselves, access > functions, and logic to reset counters when PMCR.P is set. Update > filtering code to support counters other than PMCCNTR. Support migration > with raw read/write functions. > > Signe

[Qemu-devel] [PATCH] Acceptance tests: host arch to target arch name mapping

2018-10-16 Thread Cleber Rosa
The host arch name is not always the target arch name, so it's necessary to have a mapping. The configure scripts contains what is the authoritative and failproof mapping, but, reusing it is not straightforward, so it's replicated in the acceptance tests supporting code. Signed-off-by: Cleber Ros

[Qemu-devel] [PULL 0/1] target/hppa patch queue

2018-10-16 Thread Richard Henderson
The following changes since commit 09558375a634e17cea6cfbfec883ac2376d2dc7f: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20181016-1' into staging (2018-10-16 17:42:56 +0100) are available in the Git repository at: https://github.com/rth7680/qemu.git tags

[Qemu-devel] [PULL 1/1] target/hppa: Raise exception 26 on emulated hardware

2018-10-16 Thread Richard Henderson
From: Helge Deller On PCXS chips (PA7000, pa 1.1a), trap #18 is raised on memory faults, while all later chips (>= PA7100) generate either trap #26, #27 or #28 (depending on the fault type). Since the current qemu emulation emulates a B160L machine (with a PA7300LC PCX-L2 chip, we should raise t

Re: [Qemu-devel] [RFC PATCH v1 1/4] VFIO KABI for migration interface

2018-10-16 Thread Alex Williamson
On Tue, 16 Oct 2018 23:42:35 +0530 Kirti Wankhede wrote: > - Added vfio_device_migration_info structure to use interact with vendor > driver. > - Different flags are used to get or set migration related information > from/to vendor driver. > Flag VFIO_MIGRATION_PROBE: To query if feature is s

[Qemu-devel] [PATCH v4 3/8] target/arm: Convert v8 extensions from feature bits to isar tests

2018-10-16 Thread Richard Henderson
Most of the v8 extensions are self-contained within the ISAR registers and are not implied by other feature bits, which makes them the easiest to convert. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/cpu.h | 131 +-

[Qemu-devel] [PATCH v4 6/8] target/arm: Convert t32ee from feature bit to isar3 test

2018-10-16 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/cpu.h | 6 +- linux-user/elfload.c | 2 +- target/arm/cpu.c | 4 target/arm/helper.c | 2 +- target/arm/machine.c | 3 +-- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/target/a

[Qemu-devel] [PATCH v4 7/8] target/arm: Convert sve from feature bit to aa64pfr0 test

2018-10-16 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/cpu.h| 16 +++- linux-user/aarch64/signal.c | 4 ++-- linux-user/elfload.c| 2 +- linux-user/syscall.c| 10 ++ target/arm/cpu64.c | 5 - target/arm/

[Qemu-devel] [PATCH v4 1/8] target/arm: Move some system registers into a substructure

2018-10-16 Thread Richard Henderson
Create struct ARMISARegisters, to be accessed during translation. Signed-off-by: Richard Henderson --- target/arm/cpu.h | 32 hw/intc/armv7m_nvic.c | 12 +-- target/arm/cpu.c | 178 +- target/arm/cpu64.c| 70 - tar

[Qemu-devel] [PATCH v4 2/8] target/arm: V8M should not imply V7VE

2018-10-16 Thread Richard Henderson
Instantiating mps2-an505 (cortex-m33) will fail make check when V7VE asserts that ID_ISAR0.Divide includes ARM division. It is also wrong to include ARM_FEATURE_LPAE. Signed-off-by: Richard Henderson --- target/arm/cpu.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/t

[Qemu-devel] [PATCH v4 8/8] target/arm: Convert v8.2-fp16 from feature bit to aa64pfr0 test

2018-10-16 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/cpu.h | 17 +++- linux-user/elfload.c | 6 +- target/arm/cpu64.c | 16 --- target/arm/helper.c| 2 +- target/arm/translate-a64.c | 40

[Qemu-devel] [PATCH v4 4/8] target/arm: Convert division from feature bits to isar0 tests

2018-10-16 Thread Richard Henderson
Both arm and thumb2 division are controlled by the same ISAR field, which takes care of the arm implies thumb case. Having M imply thumb2 division was wrong for cortex-m0, which is v6m and does not have thumb2 at all, much less thumb2 division. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by:

[Qemu-devel] [PATCH v4 5/8] target/arm: Convert jazelle from feature bit to isar1 test

2018-10-16 Thread Richard Henderson
Having V6 alone imply jazelle was wrong for cortex-m0. Change to an assertion for V6 & !M. This was harmless, because the only place we tested ARM_FEATURE_JAZELLE was for 'bxj' in disas_arm(), which is unreachable for M-profile cores. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard He

[Qemu-devel] [PATCH v4 0/8] target/arm: Rely on id regs instead of features

2018-10-16 Thread Richard Henderson
This edition moves some of the system registers into a substructure, which is then shared with "normal" runtime and the translators. This is seen as a better solution than letting the entire translator have access to the main ARMCPU structure. Also after rebasing on mainline, there was a new corte

Re: [Qemu-devel] [PATCH v3 37/38] raw: Convert a warning to warn_report()

2018-10-16 Thread Eric Blake
On 10/16/18 12:41 PM, Markus Armbruster wrote: Signed-off-by: Markus Armbruster --- block/raw-format.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) Incomplete. tests/qemu-iotests/109.out needs updating: @@ -436,14 +437,14 @@ static int raw_open(BlockDriverState

Re: [Qemu-devel] [PATCH v3 36/38] block: Clean up bdrv_img_create()'s error reporting

2018-10-16 Thread Eric Blake
On 10/16/18 12:41 PM, Markus Armbruster wrote: bdrv_img_create() takes an Error ** argument and uses it in the conventional way, except for one place: when qemu_opts_do_parse() fails, it first reports its error to stderr or the HMP monitor with error_report_err(), then error_setg()'s a generic er

Re: [Qemu-devel] [PATCH] virtio: Provide version-specific variants of virtio PCI devices

2018-10-16 Thread Laine Stump
On 10/16/2018 01:02 PM, Daniel P. Berrangé wrote: > On Mon, Oct 15, 2018 at 03:14:04PM -0300, Eduardo Habkost wrote: >> On Sun, Oct 14, 2018 at 05:35:12PM -0400, Michael S. Tsirkin wrote: >>> On Fri, Oct 12, 2018 at 11:54:35PM -0300, Eduardo Habkost wrote: The current virtio-*-pci device types

Re: [Qemu-devel] [PATCH] target/mips: Support Toshiba specific three-operand MADD and MADDU

2018-10-16 Thread Maciej W. Rozycki
On Tue, 16 Oct 2018, Fredrik Noring wrote: > > I would not implement r5900 for mips32 in that case, > > I would implement it only for TARGET_MIPS64. > > R5900 Linux implements the O32 ABI, which is why 32-bit QEMU user-mode is > very useful. Perhaps a better alternative is to define the MMI regis

Re: [Qemu-devel] [PATCH] target/mips: Support Toshiba specific three-operand MADD and MADDU

2018-10-16 Thread Maciej W. Rozycki
On Tue, 16 Oct 2018, Fredrik Noring wrote: > One option is to create a new array such as > > static TCGv_i64 mmi_gpr[32]; > > that represents the upper 64 bits of each GPR. Then cpu_gpr must be of > a 64-bit type too, even when QEMU runs in 32-bit user mode. The R5900 > does not implement CP0.St

Re: [Qemu-devel] [PATCH] target/mips: Support Toshiba specific three-operand MADD and MADDU

2018-10-16 Thread Fredrik Noring
Hi Richard, > > /* global register indices */ > > static TCGv cpu_gpr[32], cpu_PC; > > static TCGv cpu_HI[MIPS_DSP_ACC], cpu_LO[MIPS_DSP_ACC]; > > > > One option is to create a new array such as > > > > static TCGv_i64 mmi_gpr[32]; > > > > that represents the upper 64 bits of each GPR. Then cpu

Re: [Qemu-devel] [PATCH v2 3/8] block: Require auto-read-only for existing fallbacks

2018-10-16 Thread Eric Blake
On 10/16/18 9:12 AM, Kevin Wolf wrote: Am 12.10.2018 um 19:02 hat Eric Blake geschrieben: On 10/12/18 6:55 AM, Kevin Wolf wrote: Some block drivers have traditionally changed their node to read-only mode without asking the user. This behaviour has been marked deprecated since 2.11, expecting us

Re: [Qemu-devel] [PATCH] target/mips: Support Toshiba specific three-operand MADD and MADDU

2018-10-16 Thread Richard Henderson
On 10/16/18 11:19 AM, Fredrik Noring wrote: > /* global register indices */ > static TCGv cpu_gpr[32], cpu_PC; > static TCGv cpu_HI[MIPS_DSP_ACC], cpu_LO[MIPS_DSP_ACC]; > > One option is to create a new array such as > > static TCGv_i64 mmi_gpr[32]; > > that represents the upper 64 bits of each

Re: [Qemu-devel] [PATCH 1/9] iotests: Make nbd-fault-injector flush

2018-10-16 Thread Eric Blake
On 10/15/18 9:14 AM, Max Reitz wrote: When closing a connection, make the nbd-fault-injector flush the socket. Without this, the output is a bit unreliable with Python 3. Signed-off-by: Max Reitz --- tests/qemu-iotests/083.out | 9 + tests/qemu-iotests/nbd-fault-injecto

Re: [Qemu-devel] [PATCH v2 2/8] block: Add auto-read-only option

2018-10-16 Thread Eric Blake
On 10/15/18 4:37 AM, Kevin Wolf wrote: Am 12.10.2018 um 18:47 hat Eric Blake geschrieben: On 10/12/18 6:55 AM, Kevin Wolf wrote: If a management application builds the block graph node by node, the protocol layer doesn't inherit its read-only option from the format layer any more, so it must be

[Qemu-devel] [PATCH v5 3/3] Travis support for the acceptance tests

2018-10-16 Thread Cleber Rosa
This enables the execution of the acceptance tests on Travis. Because the Travis environment is based on Ubuntu Trusty, it requires the python3-pip and python3.4-venv packages. Signed-off-by: Cleber Rosa Tested-by: Philippe Mathieu-Daudé --- .travis.yml | 5 + 1 file changed, 5 insertions(

[Qemu-devel] [PATCH v5 2/3] Acceptance tests: add make rule for running them

2018-10-16 Thread Cleber Rosa
The acceptance (aka functional, aka Avocado-based) tests are Python files located in "tests/acceptance" that need to be run with the Avocado libs and test runner. Let's provide a convenient way for QEMU developers to run them, by making use of the tests-venv with the required setup. Also, while t

Re: [Qemu-devel] [PATCH] virtio: Provide version-specific variants of virtio PCI devices

2018-10-16 Thread Gerd Hoffmann
Hi, > > See above. We can't drop disable-modern. > > Good point. But this doesn't require it to be a supported device > option for users/management. Maybe we should rename it to > "x-disable-modern" (but that's a separate discussion). I think it would be more useful to allow properties bein

[Qemu-devel] [PATCH v5 1/3] Bootstrap Python venv for tests

2018-10-16 Thread Cleber Rosa
A number of QEMU tests are written in Python, and may benefit from an untainted Python venv. By using make rules, tests that depend on specific Python libs can set that rule as a requirement, along with rules that require the presence or installation of specific libraries. The tests/venv-requirem

Re: [Qemu-devel] [PATCH v1 0/5] Misc RISC-V patches

2018-10-16 Thread Palmer Dabbelt
On Tue, 16 Oct 2018 01:05:11 PDT (-0700), peter.mayd...@linaro.org wrote: On 15 October 2018 at 21:28, Palmer Dabbelt wrote: On Fri, 12 Oct 2018 02:34:12 PDT (-0700), peter.mayd...@linaro.org wrote: The expected patch flow for QEMU is: * original patch author posts patch to qemu-devel (thi

[Qemu-devel] [PULL 19/21] target/s390x: Skip wout, cout helpers if op helper does not return

2018-10-16 Thread Richard Henderson
When op raises an exception, it may not have initialized the output temps that would be written back by wout or cout. Reviewed-by: David Hildenbrand Signed-off-by: Richard Henderson --- target/s390x/translate.c | 20 +++- 1 file changed, 15 insertions(+), 5 deletions(-) diff --

[Qemu-devel] [RFC PATCH v1 2/4] Add migration functions for VFIO devices

2018-10-16 Thread Kirti Wankhede
- Migration function are implemented for VFIO_DEVICE_TYPE_PCI device. - Added SaveVMHandlers and implemented all basic functions required for live migration. - Added VM state change handler to know running or stopped state of VM. - Added migration state change notifier to get notification on migr

[Qemu-devel] [RFC PATCH v1 1/4] VFIO KABI for migration interface

2018-10-16 Thread Kirti Wankhede
- Added vfio_device_migration_info structure to use interact with vendor driver. - Different flags are used to get or set migration related information from/to vendor driver. Flag VFIO_MIGRATION_PROBE: To query if feature is supported Flag VFIO_MIGRATION_GET_REGION: To get migration region info

[Qemu-devel] [PULL 17/21] target/s390x: Convert to HAVE_CMPXCHG128 and HAVE_ATOMIC128

2018-10-16 Thread Richard Henderson
Reviewed-by: David Hildenbrand Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 92 +-- 1 file changed, 41 insertions(+), 51 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index bacae4f503..e106f61b4e 100644 --

[Qemu-devel] [RFC PATCH v1 4/4] Make vfio-pci device migration capable.

2018-10-16 Thread Kirti Wankhede
Call vfio_migration_probe() and vfio_migration_finalize() functions for vfio-pci device to enable migration for vfio PCI device. Removed vfio_pci_vmstate structure. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia --- hw/vfio/pci.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deleti

Re: [Qemu-devel] [PATCH] target/mips: Support Toshiba specific three-operand MADD and MADDU

2018-10-16 Thread Fredrik Noring
Hi Aleksandar, > A peculiar case of DMULTU would be interesting. Agreed, DMULTU would be good to test as well. (DMULTU isn't part of the R5900 ISA, though.) > It would be nice to implement just a single instruction from MMI, let's > say PAND, and have a test for it. Most if not all multimedia i

[Qemu-devel] [PULL 11/21] tcg: Add tlb_index and tlb_entry helpers

2018-10-16 Thread Richard Henderson
Isolate the computation of an index from an address into a helper before we change that function. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson [ cota: convert tlb_vaddr_to_host; use atomic_read on addr_write ] Signed-off-by: Emilio G. Cota Message-Id: <20181009175129.17888-2-c...@b

[Qemu-devel] [PULL 15/21] target/arm: Check HAVE_CMPXCHG128 at translate time

2018-10-16 Thread Richard Henderson
Reviewed-by: Emilio G. Cota Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/helper-a64.c| 16 target/arm/translate-a64.c | 38 ++ 2 files changed, 26 insertions(+), 28 deletions(-) diff --git a/target/

[Qemu-devel] [PULL 06/21] target/alpha: remove tlb_flush from alpha_cpu_initfn

2018-10-16 Thread Richard Henderson
From: "Emilio G. Cota" As far as I can tell tlb_flush does not need to be called this early. tlb_flush is eventually called after the CPU has been realized. This change paves the way to the introduction of tlb_init, which will be called from cpu_exec_realizefn. Reviewed-by: Alex Bennée Reviewe

[Qemu-devel] [PULL 18/21] target/s390x: Split do_cdsg, do_lpq, do_stpq

2018-10-16 Thread Richard Henderson
Reviewed-by: David Hildenbrand Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 128 ++ 1 file changed, 61 insertions(+), 67 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index e106f61b4e..b5858d2fa2 100644 --

[Qemu-devel] [PULL 13/21] target/i386: Convert to HAVE_CMPXCHG128

2018-10-16 Thread Richard Henderson
Reviewed-by: Emilio G. Cota Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/i386/mem_helper.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/target/i386/mem_helper.c b/target/i386/mem_helper.c index 30c26b9d9c..6cc53bcb40 100644 ---

[Qemu-devel] [PATCH v5 0/3] Bootstrap Python venv and acceptance/functional tests

2018-10-16 Thread Cleber Rosa
TL;DR = Allow acceptance tests to be run with `make check-acceptance`. Details === This introduces a Python virtual environment that will be setup within the QEMU build directory, that will contain the exact environment that tests may require. There's one current caveat: it requires Pyt

[Qemu-devel] [PULL 10/21] cputlb: serialize tlb updates with env->tlb_lock

2018-10-16 Thread Richard Henderson
From: "Emilio G. Cota" Currently we rely on atomic operations for cross-CPU invalidations. There are two cases that these atomics miss: cross-CPU invalidations can race with either (1) vCPU threads flushing their TLB, which happens via memset, or (2) vCPUs calling tlb_reset_dirty on their TLB, wh

[Qemu-devel] [PULL 04/21] tcg: plug holes in struct TCGProfile

2018-10-16 Thread Richard Henderson
From: "Emilio G. Cota" This plugs two 4-byte holes in 64-bit. Signed-off-by: Emilio G. Cota Message-Id: <20181010144853.13005-4-c...@braap.org> Signed-off-by: Richard Henderson --- tcg/tcg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcg/tcg.h b/tcg/tcg.h index f9f123

[Qemu-devel] [PULL 02/21] tcg: access cpu->icount_decr.u16.high with atomics

2018-10-16 Thread Richard Henderson
From: "Emilio G. Cota" Consistently access u16.high with atomics to avoid undefined behaviour in MTTCG. Note that icount_decr.u16.low is only used in icount mode, so regular accesses to it are OK. Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota Message-Id: <20181010144853.13005-2

[Qemu-devel] [PULL 21/21] cputlb: read CPUTLBEntry.addr_write atomically

2018-10-16 Thread Richard Henderson
From: "Emilio G. Cota" Updates can come from other threads, so readers that do not take tlb_lock must use atomic_read to avoid undefined behaviour (UB). This completes the conversion to tlb_lock. This conversion results on average in no performance loss, as the following experiments (run on an I

[Qemu-devel] [RFC PATCH v1 0/4] Add migration support for VFIO device

2018-10-16 Thread Kirti Wankhede
Add migration support for VFIO device This Patch set include patches as below: - Define KABI for VFIO device for migration support. - Generic migration functionality for VFIO device. * This patch set adds functionality only for PCI devices, but can be extended to other VFIO devices. * Adde

[Qemu-devel] [PULL 00/21] tcg patch queue

2018-10-16 Thread Richard Henderson
s/pull-tcg-20181016 for you to fetch changes up to e3e9d1ea20c75718ce7c528c588a0a497f12f750: cputlb: read CPUTLBEntry.addr_write atomically (2018-10-16 10:04:27 -0700) Queued t

[Qemu-devel] [PULL 01/21] tcg: Implement CPU_LOG_TB_NOCHAIN during expansion

2018-10-16 Thread Richard Henderson
Rather than test NOCHAIN before linking, do not emit the goto_tb opcode at all. We already do this for goto_ptr. Signed-off-by: Richard Henderson --- accel/tcg/cpu-exec.c | 2 +- tcg/tcg-op.c | 9 - 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/accel/tcg/cpu-exe

[Qemu-devel] [PULL 16/21] target/ppc: Convert to HAVE_CMPXCHG128 and HAVE_ATOMIC128

2018-10-16 Thread Richard Henderson
Reviewed-by: Emilio G. Cota Signed-off-by: Richard Henderson --- target/ppc/helper.h | 2 +- target/ppc/mem_helper.c | 33 ++-- target/ppc/translate.c | 115 +--- 3 files changed, 88 insertions(+), 62 deletions(-) diff --git a/target/ppc/helpe

[Qemu-devel] [RFC PATCH v1 3/4] Add vfio_listerner_log_sync to mark dirty pages

2018-10-16 Thread Kirti Wankhede
vfio_listerner_log_sync gets list of dirty pages from vendor driver and mark those pages dirty. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia --- hw/vfio/common.c | 32 1 file changed, 32 insertions(+) diff --git a/hw/vfio/common.c b/hw/vfio/common.c index

[Qemu-devel] [PULL 03/21] tcg: fix use of uninitialized variable under CONFIG_PROFILER

2018-10-16 Thread Richard Henderson
From: "Emilio G. Cota" We forgot to initialize n in commit 15fa08f845 ("tcg: Dynamically allocate TCGOps", 2017-12-29). Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Emilio G. Cota Message-Id: <20181010144853.13005-3-c...@braap.org> Signed-off-by: Richard Henderson --- tcg/tcg.c | 2 +-

[Qemu-devel] [PULL 14/21] target/arm: Convert to HAVE_CMPXCHG128

2018-10-16 Thread Richard Henderson
Reviewed-by: Emilio G. Cota Signed-off-by: Richard Henderson --- target/arm/helper-a64.c | 259 +--- 1 file changed, 133 insertions(+), 126 deletions(-) diff --git a/target/arm/helper-a64.c b/target/arm/helper-a64.c index 7f6ad3000b..6e4e1b8a19 100644 --- a/t

[Qemu-devel] [PATCH v3 31/38] fsdev: Clean up error reporting in qemu_fsdev_add()

2018-10-16 Thread Markus Armbruster
Calling error_report() from within a function that takes an Error ** argument is suspicious. qemu_fsdev_add() does that, and its caller fsdev_init_func() then fails without setting an error. Its caller main(), via qemu_opts_foreach(), is fine with it, but clean it up anyway. Cc: Greg Kurz Signe

[Qemu-devel] [PULL 05/21] tcg: distribute tcg_time into TCG contexts

2018-10-16 Thread Richard Henderson
From: "Emilio G. Cota" When we implemented per-vCPU TCG contexts, we forgot to also distribute the tcg_time counter, which has remained as a global accessed without any serialization, leading to potentially missed counts. Fix it by distributing the field over the TCG contexts, embedding it into

[Qemu-devel] [PATCH v3 26/38] ui: Convert vnc_display_init(), init_keyboard_layout() to Error

2018-10-16 Thread Markus Armbruster
From: Fei Li Signed-off-by: Fei Li Cc: Gerd Hoffmann Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé --- include/ui/console.h | 2 +- ui/curses.c | 6 +++--- ui/keymaps.c | 11 ++- ui/keymaps.h | 2 +- ui/sdl.c | 6 +++---

[Qemu-devel] [PULL 09/21] cputlb: fix assert_cpu_is_self macro

2018-10-16 Thread Richard Henderson
From: "Emilio G. Cota" Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota Message-Id: <20181009174557.16125-5-c...@braap.org> Signed-off-by: Richard Henderson --- accel/tcg/cputlb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/acc

[Qemu-devel] [PATCH] hw/acpi/nvdimm: Don't take address of fields in packed structs

2018-10-16 Thread Peter Maydell
Taking the address of a field in a packed struct is a bad idea, because it might not be actually aligned enough for that pointer type (and thus cause a crash on dereference on some host architectures). Newer versions of clang warn about this. Avoid the bug by not using the "modify in place" byte sw

[Qemu-devel] [PATCH v3 38/38] vpc: Fail open on bad header checksum

2018-10-16 Thread Markus Armbruster
vpc_open() merely prints a warning when it finds a bad header checksum. Turn that into a hard error. Signed-off-by: Markus Armbruster --- block/vpc.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/block/vpc.c b/block/vpc.c index bf294abfa7..1729c0cb44 100644 --- a/b

[Qemu-devel] [PATCH v3 04/38] cpus hw target: Use warn_report() & friends to report warnings

2018-10-16 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. Convert a few that are actually warnings to warn_report(). While there, split a warning consisting of multiple sentences to conform to conventions spelled out in warn_report()'s contract. Cc: Alex Bennée Cc: Mar

[Qemu-devel] [PULL 08/21] exec: introduce tlb_init

2018-10-16 Thread Richard Henderson
From: "Emilio G. Cota" Paves the way for the addition of a per-TLB lock. Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota Message-Id: <20181009174557.16125-4-c...@braap.org> Signed-off-by: Richard Henderson --- include/exec/exec-all.h | 8 accel

[Qemu-devel] [PULL 07/21] target/unicore32: remove tlb_flush from uc32_init_fn

2018-10-16 Thread Richard Henderson
From: "Emilio G. Cota" As far as I can tell tlb_flush does not need to be called this early. tlb_flush is eventually called after the CPU has been realized. This change paves the way to the introduction of tlb_init, which will be called from cpu_exec_realizefn. Cc: Guan Xuetao Reviewed-by: Ale

[Qemu-devel] [PATCH v3 25/38] ui/keymaps: Fix handling of erroneous include files

2018-10-16 Thread Markus Armbruster
While errors in the keyboard layout named with -k are fatal, errors in included files are reported, but otherwise ignored: $ cat worst include bad include worse $ ls -l bad worse ls: cannot access 'bad': No such file or directory ls: cannot access 'worse': No such file or d

[Qemu-devel] [PATCH v3 19/38] qom: Clean up error reporting in user_creatable_add_opts_foreach()

2018-10-16 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. user_creatable_add_opts_foreach() does that, and then fails without setting an error. Its caller main(), via qemu_opts_foreach(), is fine with it, but clean it up anyway. Cc: Daniel P. Berrangé Signed-off-by: Ma

[Qemu-devel] [PULL 20/21] target/s390x: Check HAVE_ATOMIC128 and HAVE_CMPXCHG128 at translate

2018-10-16 Thread Richard Henderson
Reviewed-by: David Hildenbrand Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 40 +++ target/s390x/translate.c | 25 +--- 2 files changed, 38 insertions(+), 27 deletions(-) diff --git a/target/s390x/mem_helper.c b/target

[Qemu-devel] [PATCH v3 28/38] numa: Clean up error reporting in parse_numa()

2018-10-16 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. parse_numa() does that, and then fails without setting an error. Its caller main(), via qemu_opts_foreach(), is fine with it, but clean it up anyway. While there, give parse_numa() internal linkage. Cc: Eduardo

[Qemu-devel] [PATCH v3 29/38] tpm: Clean up error reporting in tpm_init_tpmdev()

2018-10-16 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. tpm_init_tpmdev() does that, and then fails without setting an error. Its caller main(), via tpm_init() and qemu_opts_foreach(), is fine with it, but clean it up anyway. Cc: Stefan Berger Signed-off-by: Markus A

[Qemu-devel] [PATCH v3 33/38] blockdev: Convert drive_new() to Error

2018-10-16 Thread Markus Armbruster
Calling error_report() from within a function that takes an Error ** argument is suspicious. drive_new() calls error_report() even though it can run within drive_init_func(), which takes an Error ** argument. drive_init_func()'s caller main(), via qemu_opts_foreach(), is fine with it, but clean it

[Qemu-devel] [PULL 12/21] tcg: Split CONFIG_ATOMIC128

2018-10-16 Thread Richard Henderson
GCC7+ will no longer advertise support for 16-byte __atomic operations if only cmpxchg is supported, as for x86_64. Fortunately, x86_64 still has support for __sync_compare_and_swap_16 and we can make use of that. AArch64 does not have, nor ever has had such support, so open-code it. Reviewed-by:

[Qemu-devel] [PATCH v3 34/38] vl: Fix exit status for -drive format=help

2018-10-16 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- vl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vl.c b/vl.c index 22beca29d1..89520d8007 100644 --- a/vl.c +++ b/vl.c @@ -4397,7 +4397,7 @@ int main(int argc, char **argv, char **envp) if (qemu_opts_foreach(qemu_find_opts("drive")

[Qemu-devel] [PATCH v3 06/38] vfio: Clean up error reporting after previous commit

2018-10-16 Thread Markus Armbruster
The previous commit changed vfio's warning messages from vfio warning: DEV-NAME: Could not frobnicate to warning: vfio DEV-NAME: Could not frobnicate To match this change, change error messages from vfio error: DEV-NAME: On fire to vfio DEV-NAME: On fire Note the loss of "er

[Qemu-devel] [PATCH v3 35/38] vl: Simplify call of parse_name()

2018-10-16 Thread Markus Armbruster
main() checks for parse_name() failure even though it can't actually fail. That's okay. Simplify it to check by passing &error_fatal, like the other users of qemu_opts_foreach(). Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé --- vl.c | 6 ++ 1 file changed, 2 insert

[Qemu-devel] [PATCH v3 27/38] vnc: Clean up error reporting in vnc_init_func()

2018-10-16 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. vnc_init_func() does that, and then fails without setting an error. Its caller main(), via qemu_opts_foreach(), is fine with it, but clean it up anyway. While there, drop a "Failed to start VNC server: " error me

[Qemu-devel] [PATCH v3 03/38] block: Use warn_report() & friends to report warnings

2018-10-16 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. Convert a few that are actually warnings to warn_report(). While there, split warnings consisting of multiple sentences to conform to conventions spelled out in warn_report()'s contract, and improve a rather usele

[Qemu-devel] [PATCH v3 30/38] spice: Clean up error reporting in add_channel()

2018-10-16 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. add_channel() does that, and then exit()s. Its caller main(), via qemu_opts_foreach(), is fine with it, but clean it up anyway. Cc: Gerd Hoffmann Signed-off-by: Markus Armbruster Reviewed-by: Marc-André Lureau

[Qemu-devel] [PATCH v3 24/38] vl: Clean up error reporting in device_init_func()

2018-10-16 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. device_init_func() does that, and then fails without setting an error. Its caller main(), via qemu_opts_foreach(), is fine with it, but clean it up anyway. Signed-off-by: Markus Armbruster Reviewed-by: Philippe

[Qemu-devel] [PATCH v3 36/38] block: Clean up bdrv_img_create()'s error reporting

2018-10-16 Thread Markus Armbruster
bdrv_img_create() takes an Error ** argument and uses it in the conventional way, except for one place: when qemu_opts_do_parse() fails, it first reports its error to stderr or the HMP monitor with error_report_err(), then error_setg()'s a generic error. When the caller reports that second error s

[Qemu-devel] [PATCH v3 15/38] numa: Fix QMP command set-numa-node error handling

2018-10-16 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. parse_numa_node() does that, and then exit()s. It also passes &error_fatal to machine_set_cpu_numa_node(). Both wrong. Attempting to configure numa when the machine doesn't support it kills the VM: $ qemu-sy

[Qemu-devel] [PATCH v3 37/38] raw: Convert a warning to warn_report()

2018-10-16 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- block/raw-format.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/block/raw-format.c b/block/raw-format.c index 6f6dc99b2c..d65fd0ffce 100644 --- a/block/raw-format.c +++ b/block/raw-format.c @@ -29,6 +29,7 @@ #include "

  1   2   3   4   >