Re: [Qemu-devel] [QEMU-PPC] [PATCH 02/13] target/ppc: Work [S]PURR implementation and add HV support

2019-05-08 Thread David Gibson
On Tue, May 07, 2019 at 11:28:04AM +1000, Suraj Jitindar Singh wrote: > On Mon, 2019-05-06 at 16:15 +1000, David Gibson wrote: > > On Fri, May 03, 2019 at 03:53:05PM +1000, Suraj Jitindar Singh wrote: > > > The Processor Utilisation of Resources Register (PURR) and Scaled > > > Processor Utilisatio

Re: [Qemu-devel] [PATCH] Multiple ramfb enhancements

2019-05-08 Thread Gerd Hoffmann
On Thu, May 09, 2019 at 08:15:44AM +0800, Hou Qiming wrote: > Pulled back the `qemu_create_displaysurface_guestmem` function to create > the display surface so that the guest memory gets properly unmaped. > > Only allow one resolution change per guest boot, which prevents a > crash when the guest

Re: [Qemu-devel] [PATCH 11/13] tests/vm: netbsd autoinstall, using serial console

2019-05-08 Thread Gerd Hoffmann
Hi, > I recommend to add one extra step into generated image: > > echo security.pax.mprotect.enabled=0 >> /etc/sysctl.conf Done. > Alternatively (and preferably) enhance qemu to handle RWX allocation for > JIT on NetBSD. > > Example in libffi. > > https://github.com/libffi/libffi/commit/2bf

Re: [Qemu-devel] [PATCH v2 4/6] Add vhost-user-input-pci

2019-05-08 Thread Gerd Hoffmann
Hi, > +static const VirtioPCIDeviceTypeInfo vhost_user_input_pci_info = { > +.base_name = TYPE_VHOST_USER_INPUT_PCI, > +.generic_name = "vhost-user-input-pci", > +.transitional_name = "vhost-user-input-pci-transitional", > +.non_transitional_name = "vhost-user-input-pci-non-trans

[Qemu-devel] [PATCH v2 25/27] tcg: Use CPUClass::tlb_fill in cputlb.c

2019-05-08 Thread Richard Henderson
We can now use the CPUClass hook instead of a named function. Create a static tlb_fill function to avoid other changes within cputlb.c. This also isolates the asserts within. Remove the named tlb_fill function from all of the targets. Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Da

[Qemu-devel] [PATCH v2 22/27] target/tricore: Convert to CPUClass::tlb_fill

2019-05-08 Thread Richard Henderson
Cc: Bastian Koppelmann Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/tricore/cpu.h | 6 +++--- target/tricore/cpu.c | 1 + target/tricore/helper.c| 27 +++ target/tricore/op_helper.c | 26 -- 4 files chan

[Qemu-devel] [PATCH v2 26/27] tcg: Remove CPUClass::handle_mmu_fault

2019-05-08 Thread Richard Henderson
This hook is now completely replaced by tlb_fill. Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/qom/cpu.h | 3 --- accel/tcg/user-exec.c | 13 +++-- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/includ

[Qemu-devel] [PATCH v2 18/27] target/s390x: Convert to CPUClass::tlb_fill

2019-05-08 Thread Richard Henderson
Cc: qemu-s3...@nongnu.org Cc: Cornelia Huck Cc: David Hildenbrand Signed-off-by: Richard Henderson --- v2: Keep user-only and system tlb_fill separate. --- target/s390x/internal.h| 5 +-- target/s390x/cpu.c | 5 ++- target/s390x/excp_helper.c | 73 ++---

[Qemu-devel] [PATCH v2 23/27] target/unicore32: Convert to CPUClass::tlb_fill

2019-05-08 Thread Richard Henderson
Remove the user-only functions, as we no longer have a user-only config. Cc: Guan Xuetao Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/unicore32/cpu.h | 5 +++-- target/unicore32/cpu.c | 5 + target/unicore32/helper.c| 23 ---

[Qemu-devel] [PATCH v2 24/27] target/xtensa: Convert to CPUClass::tlb_fill

2019-05-08 Thread Richard Henderson
Cc: Max Filippov Signed-off-by: Richard Henderson --- v2: Keep user-only and system tlb_fill separate. --- target/xtensa/cpu.h| 5 +++-- target/xtensa/cpu.c| 5 ++--- target/xtensa/helper.c | 39 ++- 3 files changed, 31 insertions(+), 18 deletions(-)

[Qemu-devel] [PATCH v2 16/27] target/ppc: Convert to CPUClass::tlb_fill

2019-05-08 Thread Richard Henderson
Cc: qemu-...@nongnu.org Cc: David Gibson Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/ppc/cpu.h| 7 +++ target/ppc/mmu_helper.c | 22 +- target/ppc/translate_init.inc.c | 5 ++--- target/ppc/user_only_helper.c | 14 ++

[Qemu-devel] [PATCH v2 27/27] tcg: Use tlb_fill probe from tlb_vaddr_to_host

2019-05-08 Thread Richard Henderson
Most of the existing users would continue around a loop which would fault the tlb entry in via a normal load/store. But for SVE we have a true non-faulting case which requires the new probing form of tlb_fill. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- v2: Update function d

[Qemu-devel] [PATCH v2 19/27] target/sh4: Convert to CPUClass::tlb_fill

2019-05-08 Thread Richard Henderson
Cc: Aurelien Jarno Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/sh4/cpu.h | 5 +- target/sh4/cpu.c | 5 +- target/sh4/helper.c| 197 - target/sh4/op_helper.c | 12 --- 4 files changed, 101 insertions(+), 118

[Qemu-devel] [PATCH v2 20/27] target/sparc: Convert to CPUClass::tlb_fill

2019-05-08 Thread Richard Henderson
Cc: Artyom Tarasenko Cc: Mark Cave-Ayland Signed-off-by: Richard Henderson --- v2: Keep user-only, sparc32, and sparc64 tlb_fill separate. --- target/sparc/cpu.h | 5 ++- target/sparc/cpu.c | 5 +-- target/sparc/ldst_helper.c | 11 +- target/sparc/mmu_helper.c | 78 ++

[Qemu-devel] [PATCH v2 15/27] target/openrisc: Convert to CPUClass::tlb_fill

2019-05-08 Thread Richard Henderson
Cc: Stafford Horne Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/openrisc/cpu.h | 5 ++-- target/openrisc/cpu.c | 5 ++-- target/openrisc/mmu.c | 65 ++- 3 files changed, 39 insertions(+), 36 deletions(-) diff --git a/target/op

[Qemu-devel] [PATCH v2 21/27] target/tilegx: Convert to CPUClass::tlb_fill

2019-05-08 Thread Richard Henderson
Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/tilegx/cpu.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/target/tilegx/cpu.c b/target/tilegx/cpu.c index b9d37105fa..b209c55387 100644 --- a/target/tilegx/cpu.c +++ b/target/tilegx/cpu.c @@

[Qemu-devel] [PATCH v2 11/27] target/mips: Tidy control flow in mips_cpu_handle_mmu_fault

2019-05-08 Thread Richard Henderson
Since the only non-negative TLBRET_* value is TLBRET_MATCH, the subsequent test for ret < 0 is useless. Use early return to allow subsequent blocks to be unindented. Signed-off-by: Richard Henderson --- target/mips/helper.c | 54 1 file changed, 24 i

[Qemu-devel] [PATCH v2 08/27] target/m68k: Convert to CPUClass::tlb_fill

2019-05-08 Thread Richard Henderson
Cc: Laurent Vivier Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/m68k/cpu.h | 5 ++- target/m68k/cpu.c | 2 +- target/m68k/helper.c| 87 ++--- target/m68k/op_helper.c | 15 --- 4 files changed, 50 insertions(+),

[Qemu-devel] [PATCH v2 17/27] target/riscv: Convert to CPUClass::tlb_fill

2019-05-08 Thread Richard Henderson
Note that env->pc is removed from the qemu_log as that value is garbage. The PC isn't recovered until cpu_restore_state, called from cpu_loop_exit_restore, called from riscv_raise_exception. Cc: qemu-ri...@nongnu.org Cc: Palmer Dabbelt Reviewed-by: Alistair Francis Signed-off-by: Richard Henders

[Qemu-devel] [PATCH v2 13/27] target/moxie: Convert to CPUClass::tlb_fill

2019-05-08 Thread Richard Henderson
Remove the user-only functions, as we don't have a user-only config. Fix the unconditional call to tlb_set_page, even if the translation failed. Cc: Anthony Green Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/moxie/cpu.h| 5 ++-- target/moxie/cpu.c| 5 ++-- t

[Qemu-devel] [PATCH v2 07/27] target/lm32: Convert to CPUClass::tlb_fill

2019-05-08 Thread Richard Henderson
Cc: Michael Walle Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/lm32/cpu.h | 5 +++-- target/lm32/cpu.c | 5 ++--- target/lm32/helper.c| 12 +--- target/lm32/op_helper.c | 16 4 files changed, 14 insertions(+), 24 deletions(-)

[Qemu-devel] [PATCH v2 06/27] target/i386: Convert to CPUClass::tlb_fill

2019-05-08 Thread Richard Henderson
We do not support probing, but we do not need it yet either. Cc: Paolo Bonzini Cc: Eduardo Habkost Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/i386/cpu.h | 5 ++-- target/i386/cpu.c | 5 ++-- target/i386/excp_helper.c | 61 +

[Qemu-devel] [PATCH v2 14/27] target/nios2: Convert to CPUClass::tlb_fill

2019-05-08 Thread Richard Henderson
Remove the leftover debugging cpu_dump_state. Cc: Chris Wulff Cc: Marek Vasut Signed-off-by: Richard Henderson --- v2: Keep user-only and system tlb_fill separate. --- target/nios2/cpu.h| 5 +- target/nios2/cpu.c| 5 +- target/nios2/helper.c | 172 +-

[Qemu-devel] [PATCH v2 12/27] target/mips: Convert to CPUClass::tlb_fill

2019-05-08 Thread Richard Henderson
Note that env->active_tc.PC is removed from the qemu_log as that value is garbage. The PC isn't recovered until cpu_restore_state, called from cpu_loop_exit_restore, called from do_raise_exception_err. Cc: Aleksandar Markovic Cc: Aleksandar Rikalo Signed-off-by: Richard Henderson --- v2: Split

[Qemu-devel] [PATCH v2 09/27] target/microblaze: Convert to CPUClass::tlb_fill

2019-05-08 Thread Richard Henderson
Cc: Edgar E. Iglesias Signed-off-by: Richard Henderson --- v2: Keep user-only and system tlb_fill separate. --- target/microblaze/cpu.h | 5 +- target/microblaze/cpu.c | 5 +- target/microblaze/helper.c| 107 ++ target/microblaze/op_helper.c |

[Qemu-devel] [PATCH v2 03/27] target/arm: Convert to CPUClass::tlb_fill

2019-05-08 Thread Richard Henderson
Cc: qemu-...@nongnu.org Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- v2: Reword a comment to match the new interface. --- target/arm/internals.h | 10 +++-- target/arm/cpu.c | 22 +- target/arm/helper.c| 98 ++ target/a

[Qemu-devel] [PATCH v2 10/27] target/mips: Pass a valid error to raise_mmu_exception for user-only

2019-05-08 Thread Richard Henderson
At present we give ret = 0, or TLBRET_MATCH. This gets matched by the default case, which falls through to TLBRET_BADADDR. However, it makes more sense to use a proper value. All of the tlb-related exceptions are handled identically in cpu_loop.c, so TLBRET_BADADDR is as good as any other. Retai

[Qemu-devel] [PATCH v2 05/27] target/hppa: Convert to CPUClass::tlb_fill

2019-05-08 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/hppa/cpu.h| 8 target/hppa/cpu.c| 5 ++--- target/hppa/mem_helper.c | 22 +- 3 files changed, 23 insertions(+), 12 deletions(-) diff --git a

[Qemu-devel] [PATCH v2 04/27] target/cris: Convert to CPUClass::tlb_fill

2019-05-08 Thread Richard Henderson
Remove dumping of cpu state. Remove logging of PC, as that value is garbage until cpu_restore_state. Cc: Edgar E. Iglesias Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/cris/cpu.h | 5 +-- target/cris/cpu.c | 5 ++- target/cris/helper.c| 67 +

[Qemu-devel] [PATCH v2 01/27] tcg: Add CPUClass::tlb_fill

2019-05-08 Thread Richard Henderson
This hook will replace the (user-only mode specific) handle_mmu_fault hook, and the (system mode specific) tlb_fill function. The handle_mmu_fault hook was written as if there was a valid way to recover from an mmu fault, and had 3 possible return states. In reality, the only valid action is to ra

[Qemu-devel] [PATCH v2 02/27] target/alpha: Convert to CPUClass::tlb_fill

2019-05-08 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- v2: Keep user-only and system tlb_fill separate. --- target/alpha/cpu.h| 5 +++-- target/alpha/cpu.c| 5 ++--- target/alpha/helper.c | 30 +- tar

[Qemu-devel] [PATCH v2 00/27] tcg: Add CPUClass::tlb_fill

2019-05-08 Thread Richard Henderson
Changes from v1: * Do not unify user-only and system tlb_fill functions (alpha, microblaze, nios2, s390x, sparc, xtensa). * Split the mips patch into multiple. * Other random changes per review. Patches without review: 0009-target-microblaze-Convert-to-CPUClass-tlb_fill.patch 0010-target

Re: [Qemu-devel] [PATCH 0/7] Delete 16 *_cpu_class_by_name() functions

2019-05-08 Thread Markus Armbruster
Eduardo Habkost writes: > On Wed, May 08, 2019 at 10:34:44AM +0200, Markus Armbruster wrote: >> Eduardo Habkost writes: >> >> > On Mon, May 06, 2019 at 01:53:28PM +0200, Markus Armbruster wrote: >> >> Eduardo Habkost writes: >> >> >> >> > This series adds a new CPUClass::class_name_format fie

Re: [Qemu-devel] [PATCH v2 1/2] vfio/mdev: add version attribute for mdev device

2019-05-08 Thread Yan Zhao
On Thu, May 09, 2019 at 11:38:34AM +0800, Alex Williamson wrote: > On Wed, 8 May 2019 23:10:55 -0400 > Yan Zhao wrote: > > > On Thu, May 09, 2019 at 05:22:42AM +0800, Alex Williamson wrote: > > > On Wed, 8 May 2019 07:27:40 -0400 > > > Yan Zhao wrote: > > > > > > > On Wed, May 08, 2019 at 05:

Re: [Qemu-devel] [PATCH] configure: Require python3 >= 3.5

2019-05-08 Thread Markus Armbruster
Eduardo Habkost writes: > The oldest python3 version in distros that will be supported by > QEMU 4.1 is 3.5.3 (the one in Debian Stretch). Error out if > running python3 < 3.5. > > We have a .travis.yml job configured to use Python 3.4. Change > it to use Python 3.5. > > Signed-off-by: Eduardo

Re: [Qemu-devel] [PATCH 2/3] spapr/xive: fix EQ page addresses above 64GB

2019-05-08 Thread David Gibson
On Wed, May 08, 2019 at 07:19:45PM +0200, Cédric Le Goater wrote: > The high order bits of the address of the OS event queue is stored in > bits [4-31] of word2 of the XIVE END internal structures and the low > order bits in word3. This structure is using Big Endian ordering and > computing the val

Re: [Qemu-devel] [PATCH v2] target/ppc: Fix xxspltib

2019-05-08 Thread David Gibson
On Thu, May 09, 2019 at 06:17:33AM +1000, Anton Blanchard wrote: > xxspltib raises a VMX or a VSX exception depending on the register > set it is operating on. We had a check, but it was backwards. > > Fixes: f113283525a4 ("target-ppc: add xxspltib instruction") > Signed-off-by: Anton Blanchard

Re: [Qemu-devel] [PATCH 1/3] spapr/xive: EQ page should be naturally aligned

2019-05-08 Thread David Gibson
On Wed, May 08, 2019 at 07:19:44PM +0200, Cédric Le Goater wrote: > When the OS configures the EQ page in which to receive event > notifications from the XIVE interrupt controller, the page should be > naturally aligned. Add this check. > > Signed-off-by: Cédric Le Goater Applied, thanks. > ---

Re: [Qemu-devel] [PATCH 3/3] spapr/xive: print out the EQ page address in the monitor

2019-05-08 Thread David Gibson
On Wed, May 08, 2019 at 07:19:46PM +0200, Cédric Le Goater wrote: > This proved to be a useful information when debugging issues with OS > event queues allocated above 64GB. > > Signed-off-by: Cédric Le Goater Applied, thanks. > --- > hw/intc/spapr_xive.c | 5 +++-- > 1 file changed, 3 inserti

Re: [Qemu-devel] [PATCH 4/9] target/ppc: Fix lxvw4x, lxvh8x and lxvb16x

2019-05-08 Thread David Gibson
On Thu, May 09, 2019 at 10:33:24AM +1000, Anton Blanchard wrote: > Hi Mark, > > > Following on from this I've just gone through the load/store > > operations once again and spotted two things: > > > > > > 1) VSX_LOAD_SCALAR_DS has an extra get_cpu_vsrh() which can be removed > > > > diff --git

Re: [Qemu-devel] [PATCH] configure: Require python3 >= 3.5

2019-05-08 Thread Thomas Huth
On 08/05/2019 20.23, Eduardo Habkost wrote: > The oldest python3 version in distros that will be supported by > QEMU 4.1 is 3.5.3 (the one in Debian Stretch). Error out if > running python3 < 3.5. > > We have a .travis.yml job configured to use Python 3.4. Change > it to use Python 3.5. > > Sig

Re: [Qemu-devel] [PULL v2 00/28] Kconfig for Arm machines

2019-05-08 Thread Thomas Huth
On 08/05/2019 18.45, Philippe Mathieu-Daudé wrote: > [clicked ctrl+enter too fast] > > On Wed, May 8, 2019 at 6:43 PM Philippe Mathieu-Daudé > wrote: >> On 5/8/19 5:33 PM, Thomas Huth wrote: >>> On 08/05/2019 17.09, Peter Maydell wrote: On Tue, 7 May 2019 at 14:45, Thomas Huth wrote: >

Re: [Qemu-devel] [PATCH 26/26] tcg: Use tlb_fill probe from tlb_vaddr_to_host

2019-05-08 Thread Richard Henderson
On 4/29/19 10:41 AM, Peter Maydell wrote: > On Wed, 3 Apr 2019 at 05:05, Richard Henderson > wrote: >> >> Most of the existing users would continue around a loop which >> would fault the tlb entry in via a normal load/store. But for >> SVE we have a true non-faulting case which requires the new >

Re: [Qemu-devel] [PULL 10/19] tests/boot_linux_console: increase timeout

2019-05-08 Thread Gerd Hoffmann
Hi, > > Tests can also timeout due to slow downloads of test kernels. > > Any chance to run the downloads without timeout? > > I acknowledge this is an issue, and have thought about two possible > ways to solve it: > > 1) Downloading/caching/checking all the test assets in a job "pre-tests" >

Re: [Qemu-devel] [PATCH v2 1/2] vfio/mdev: add version attribute for mdev device

2019-05-08 Thread Alex Williamson
On Wed, 8 May 2019 23:10:55 -0400 Yan Zhao wrote: > On Thu, May 09, 2019 at 05:22:42AM +0800, Alex Williamson wrote: > > On Wed, 8 May 2019 07:27:40 -0400 > > Yan Zhao wrote: > > > > > On Wed, May 08, 2019 at 05:18:26AM +0800, Alex Williamson wrote: > > > > On Sun, 5 May 2019 21:49:04 -040

Re: [Qemu-devel] [PATCH v2 1/2] vfio/mdev: add version attribute for mdev device

2019-05-08 Thread Yan Zhao
On Thu, May 09, 2019 at 05:22:42AM +0800, Alex Williamson wrote: > On Wed, 8 May 2019 07:27:40 -0400 > Yan Zhao wrote: > > > On Wed, May 08, 2019 at 05:18:26AM +0800, Alex Williamson wrote: > > > On Sun, 5 May 2019 21:49:04 -0400 > > > Yan Zhao wrote: > > > > > > > version attribute is used

Re: [Qemu-devel] [PATCH 00/11] kvm/migration: support KVM_CLEAR_DIRTY_LOG

2019-05-08 Thread Peter Xu
On Wed, May 08, 2019 at 01:55:07PM +0200, Paolo Bonzini wrote: > On 08/05/19 06:39, Peter Xu wrote: > >> The disadvantage of this is that you won't clear in the kernel those > >> dirty bits that come from other sources (e.g. vhost or > >> address_space_map). This can lead to double-copying of page

Re: [Qemu-devel] [PATCH 17/26] target/s390x: Convert to CPUClass::tlb_fill

2019-05-08 Thread Richard Henderson
On 4/3/19 4:17 AM, David Hildenbrand wrote: >> +/* >> + * Note that handle_mmu_fault sets ilen to either 2 (for code) > This comment no longer matches. > >> + * or AUTO (for data). We can resolve AUTO now, as if it was >> + * set to UNWIND -- that will have been done via assignmen

[Qemu-devel] [PATCH v2] target/ppc: Fix xvabs[sd]p, xvnabs[sd]p, xvneg[sd]p, xvcpsgn[sd]p

2019-05-08 Thread Anton Blanchard
We were using set_cpu_vsr*() when we should have used get_cpu_vsr*(). Fixes: 8b3b2d75c7c0 ("introduce get_cpu_vsr{l,h}() and set_cpu_vsr{l,h}() helpers for VSR register access") Signed-off-by: Anton Blanchard --- target/ppc/translate/vsx-impl.inc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 d

Re: [Qemu-devel] [PATCH 23/26] target/xtensa: Convert to CPUClass::tlb_fill

2019-05-08 Thread Max Filippov
On Tue, Apr 30, 2019 at 2:07 PM Max Filippov wrote: > On Tue, Apr 30, 2019 at 11:14 AM Max Filippov wrote: > > On Tue, Apr 30, 2019 at 10:44 AM Richard Henderson > > > And Peter's right that I should have kept EXC_USER. > > It appears to work as is: the EXC_USER is set up by the > exception_cause

Re: [Qemu-devel] [PATCH 4/9] target/ppc: Fix lxvw4x, lxvh8x and lxvb16x

2019-05-08 Thread Anton Blanchard
Hi Mark, > Following on from this I've just gone through the load/store > operations once again and spotted two things: > > > 1) VSX_LOAD_SCALAR_DS has an extra get_cpu_vsrh() which can be removed > > diff --git a/target/ppc/translate/vsx-impl.inc.c > b/target/ppc/translate/vsx-impl.inc.c index

[Qemu-devel] [PATCH] target/ppc: Optimise VSX_LOAD_SCALAR_DS and VSX_VECTOR_LOAD_STORE

2019-05-08 Thread Anton Blanchard
A few small optimisations: In VSX_LOAD_SCALAR_DS() we can don't need to read the VSR via get_cpu_vsrh(). Split VSX_VECTOR_LOAD_STORE() into two functions. Loads only need to write the VSRs (set_cpu_vsr*()) and stores only need to read the VSRs (get_cpu_vsr*()) Thanks to Mark Cave-Ayland for the

[Qemu-devel] [PATCH] Multiple ramfb enhancements

2019-05-08 Thread Hou Qiming
Pulled back the `qemu_create_displaysurface_guestmem` function to create the display surface so that the guest memory gets properly unmaped. Only allow one resolution change per guest boot, which prevents a crash when the guest writes garbage to the configuration space (e.g. when rebooting). Writ

Re: [Qemu-devel] [PATCH] blockdev-backup: don't check aio_context too early

2019-05-08 Thread John Snow
On 5/7/19 4:50 AM, Kevin Wolf wrote: > Am 06.05.2019 um 22:33 hat John Snow geschrieben: >> in blockdev_backup_prepare, we check to make sure that the target is >> associated with a compatible aio context. However, do_blockdev_backup is >> called later and has some logic to move the target to a c

Re: [Qemu-devel] [PATCH v3 18/39] target/mips: Use env_cpu, env_archcpu

2019-05-08 Thread Philippe Mathieu-Daudé
Hi Richard, Aleksandar. On 5/8/19 4:32 PM, Richard Henderson wrote: > On 5/8/19 1:15 AM, Aleksandar Markovic wrote: >> >> On May 8, 2019 2:19 AM, "Richard Henderson" > > wrote: >>> >>> >>> >> >> This commit message doesnˊt explain the reason for the change, and

Re: [Qemu-devel] [PATCH v2 7/7] block: Ignore loosening perm restrictions failures

2019-05-08 Thread Max Reitz
On 08.05.19 20:25, Max Reitz wrote: > We generally assume that loosening permission restrictions can never > fail. We have seen in the past that this assumption is wrong. This has > led to crashes because we generally pass &error_abort when loosening > permissions. > > However, a failure in such

[Qemu-devel] [PATCH v3 2/5] iotests.py: Add qemu_nbd_early_pipe()

2019-05-08 Thread Max Reitz
qemu_nbd_pipe() currently unconditionally reads qemu-nbd's output. That is not ideal because qemu-nbd may keep stderr open after the parent process has exited. Currently, the only user of qemu_nbd_pipe() is 147, which discards the whole output if the parent process returned success and only evalu

Re: [Qemu-devel] [PATCH v2 1/2] vfio/mdev: add version attribute for mdev device

2019-05-08 Thread Alex Williamson
On Wed, 8 May 2019 07:27:40 -0400 Yan Zhao wrote: > On Wed, May 08, 2019 at 05:18:26AM +0800, Alex Williamson wrote: > > On Sun, 5 May 2019 21:49:04 -0400 > > Yan Zhao wrote: > > > > > version attribute is used to check two mdev devices' compatibility. > > > > > > The key point of this vers

[Qemu-devel] [PATCH v3 5/5] iotests: Let 233 run concurrently

2019-05-08 Thread Max Reitz
common.nbd's nbd_server_set_tcp_port() tries to find a free port, and then uses it for the whole test run. However, this is racy because even if the port was free at the beginning, there is no guarantee it will continue to be available. Therefore, 233 currently cannot reliably be run concurrently

[Qemu-devel] [PATCH v3 4/5] iotests: Use qemu-nbd's --pid-file

2019-05-08 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/common.rc | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc index 93f87389b6..5502c3da2f 100644 --- a/tests/qemu-iotests/common.rc +++ b/tests/qemu-iotests/common.rc

[Qemu-devel] [PATCH v3 1/5] qemu-nbd: Add --pid-file option

2019-05-08 Thread Max Reitz
--fork is a bit boring if there is no way to get the child's PID. This option helps. Signed-off-by: Max Reitz --- qemu-nbd.c| 11 +++ qemu-nbd.texi | 2 ++ 2 files changed, 13 insertions(+) diff --git a/qemu-nbd.c b/qemu-nbd.c index dca9e72cee..edb5195208 100644 --- a/qemu-nbd.c +

[Qemu-devel] [PATCH v3 0/5] iotests: Let 233 run concurrently

2019-05-08 Thread Max Reitz
Currently, 233 cannot reliably run concurrently to other NBD TCP tests. When it starts, it looks for a free port and then attempts to use that for the whole duration of the test run. This is a TOCTTOU race condition: It does not reserve that port, so another NBD TCP test that runs in parallel can

[Qemu-devel] [PATCH v3 3/5] qemu-nbd: Do not close stderr

2019-05-08 Thread Max Reitz
We kept old_stderr specifically so we could keep emitting error message on stderr. However, qemu_daemon() closes stderr. Therefore, we need to dup() stderr to old_stderr before invoking qemu_daemon(). Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- qemu-nbd.c | 3 ++- 1 file changed, 2 i

Re: [Qemu-devel] [PATCH v2 1/5] qemu-nbd: Add --pid-file option

2019-05-08 Thread Max Reitz
On 08.05.19 15:22, Max Reitz wrote: > --fork is a bit boring if there is no way to get the child's PID. This > option helps. > > Signed-off-by: Max Reitz > --- > qemu-nbd.c| 12 > qemu-nbd.texi | 2 ++ > 2 files changed, 14 insertions(+) > > diff --git a/qemu-nbd.c b/qemu-nbd

Re: [Qemu-devel] [PATCH] target/riscv: Only flush TLB if SATP.ASID changes

2019-05-08 Thread Palmer Dabbelt
On Wed, 08 May 2019 10:38:35 PDT (-0700), jonat...@fintelia.io wrote: There is an analogous change for ARM here: https://patchwork.kernel.org/patch/10649857 Signed-off-by: Jonathan Behrens --- target/riscv/csr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/risc

Re: [Qemu-devel] [Question] Memory hotplug clarification for Qemu ARM/virt

2019-05-08 Thread Laszlo Ersek
On 05/08/19 14:50, Robin Murphy wrote: > Hi Shameer, > > On 08/05/2019 11:15, Shameerali Kolothum Thodi wrote: >> Hi, >> >> This series here[0] attempts to add support for PCDIMM in QEMU for >> ARM/Virt platform and has stumbled upon an issue as it is not clear(at >> least >> from Qemu/EDK2 point

Re: [Qemu-devel] [PATCH 0/3] Export machine type deprecation info through QMP

2019-05-08 Thread Eduardo Habkost
On Wed, May 08, 2019 at 11:16:50AM +0200, Markus Armbruster wrote: > Eduardo Habkost writes: > > > On Tue, May 07, 2019 at 07:07:04AM +0200, Markus Armbruster wrote: > >> Eduardo Habkost writes: > >> > >> > This series adds machine type deprecation information to the > >> > output of the `query

Re: [Qemu-devel] [PATCH for-4.1 0/2] hw/alpha: Add the CY82C693UB southbridge in Kconfig

2019-05-08 Thread Philippe Mathieu-Daudé
Paolo, Thomas, On 4/29/19 1:29 PM, Philippe Mathieu-Daudé wrote: > CC'ing Thomas who is a Kconfig expert. > > On 3/17/19 12:44 AM, Philippe Mathieu-Daudé wrote: >> Explicit the CY82C693UB southbridge used by the 264DP. >> >> Philippe Mathieu-Daudé (2): >> hw/isa/southbridge: Add the Cypress 82C

Re: [Qemu-devel] [PATCH] target/riscv: Only flush TLB if SATP.ASID changes

2019-05-08 Thread Alistair Francis
On Wed, May 8, 2019 at 10:39 AM Jonathan Behrens wrote: > > There is an analogous change for ARM here: > https://patchwork.kernel.org/patch/10649857 > > Signed-off-by: Jonathan Behrens Reviewed-by: Alistair Francis Alistair > --- > target/riscv/csr.c | 4 +++- > 1 file changed, 3 insertions(

[Qemu-devel] [PATCH v2] target/ppc: Fix xxspltib

2019-05-08 Thread Anton Blanchard
xxspltib raises a VMX or a VSX exception depending on the register set it is operating on. We had a check, but it was backwards. Fixes: f113283525a4 ("target-ppc: add xxspltib instruction") Signed-off-by: Anton Blanchard --- target/ppc/translate/vsx-impl.inc.c | 8 1 file changed, 4 ins

Re: [Qemu-devel] [Question] Memory hotplug clarification for Qemu ARM/virt

2019-05-08 Thread Laszlo Ersek
On 05/08/19 12:15, Shameerali Kolothum Thodi wrote: > Hi, > > This series here[0] attempts to add support for PCDIMM in QEMU for > ARM/Virt platform and has stumbled upon an issue as it is not clear(at least > from Qemu/EDK2 point of view) how in physical world the hotpluggable > memory is handled

Re: [Qemu-devel] [PATCH v3] i386: Add some MSR based features on Cascadelake-Server CPU model

2019-05-08 Thread Eduardo Habkost
On Wed, May 08, 2019 at 09:31:53AM +0800, Tao Xu wrote: > As noted in "c7a88b52f6 i386: Add new model of Cascadelake-Server" > Because MSR based feature has been supported by QEMU, we add > CPUID_7_0_EDX_ARCH_CAPABILITIES on Cascadelake-Server CPU model, > and add IA32_ARCH_CAPABILITIES MSR based f

Re: [Qemu-devel] [PATCH v3 25/31] target/cris: Use tcg_gen_abs_tl

2019-05-08 Thread David Hildenbrand
On 04.05.19 07:52, Richard Henderson wrote: > Signed-off-by: Richard Henderson > --- > target/cris/translate.c | 9 + > 1 file changed, 1 insertion(+), 8 deletions(-) > > diff --git a/target/cris/translate.c b/target/cris/translate.c > index b005a5c20e..31b40a57f9 100644 > --- a/target/c

Re: [Qemu-devel] [PATCH 0/7] Delete 16 *_cpu_class_by_name() functions

2019-05-08 Thread Eduardo Habkost
On Wed, May 08, 2019 at 10:34:44AM +0200, Markus Armbruster wrote: > Eduardo Habkost writes: > > > On Mon, May 06, 2019 at 01:53:28PM +0200, Markus Armbruster wrote: > >> Eduardo Habkost writes: > >> > >> > This series adds a new CPUClass::class_name_format field, which > >> > allows us to dele

Re: [Qemu-devel] [PATCH 11/13] tests/vm: netbsd autoinstall, using serial console

2019-05-08 Thread Kamil Rytarowski
On 08.05.2019 10:56, Gerd Hoffmann wrote: > Instead of fetching the prebuilt image from patchew download the install > iso and prepare the image locally. Install to disk, using the serial > console. Create qemu user, configure ssh login. Install packages > needed for qemu builds. > I recommend

Re: [Qemu-devel] Update *BSD images with gnu-sed and bash

2019-05-08 Thread Kamil Rytarowski
On 08.05.2019 10:07, Thomas Huth wrote: > On 08/05/2019 09.06, Kamil Rytarowski wrote: >> On 06.05.2019 12:12, Thomas Huth wrote: > [...] >>> Kamil, >>> >>> could you maybe help with the NetBSD image and the tests/vm/netbsd script? >>> >> >> Please be more specific what am I expected to do. > > W

Re: [Qemu-devel] [PATCH v7 2/6] virtio-pmem: Add virtio pmem driver

2019-05-08 Thread Jakub Staroń via Qemu-devel
On 5/8/19 4:12 AM, Pankaj Gupta wrote: > >> >> On 4/25/19 10:00 PM, Pankaj Gupta wrote: >> >>> +void host_ack(struct virtqueue *vq) >>> +{ >>> + unsigned int len; >>> + unsigned long flags; >>> + struct virtio_pmem_request *req, *req_buf; >>> + struct virtio_pmem *vpmem = vq->vdev->priv; >

[Qemu-devel] [PATCH v2 5/7] block: Fix order in bdrv_replace_child()

2019-05-08 Thread Max Reitz
We have to start by applying the permission restrictions to new_bs before we can loosen them on old_bs. See the comment for the explanation. Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf --- block.c | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/bloc

[Qemu-devel] [PATCH v2 6/7] block: Add *tighten_restrictions to *check*_perm()

2019-05-08 Thread Max Reitz
This patch makes three functions report whether the necessary permission change tightens restrictions or not. These functions are: - bdrv_check_perm() - bdrv_check_update_perm() - bdrv_child_check_perm() Callers can use this result to decide whether a failure is fatal or not (see the next patch).

[Qemu-devel] [PATCH v2 4/7] block/commit: Drop bdrv_child_try_set_perm()

2019-05-08 Thread Max Reitz
commit_top_bs never requests or unshares any permissions. There is no reason to make this so explicit here. Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf --- block/commit.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/block/commit.c b/block/commit.c index 14e5bb394c..44b3083b84 1006

[Qemu-devel] [PATCH v2 2/7] block: Add bdrv_child_refresh_perms()

2019-05-08 Thread Max Reitz
If a block node uses bdrv_child_try_set_perm() to change the permission it takes on its child, the result may be very short-lived. If anything makes the block layer recalculate the permissions internally, it will invoke the node driver's .bdrv_child_perm() implementation. The permission/shared pe

[Qemu-devel] [PATCH v2 3/7] block/mirror: Fix child permissions

2019-05-08 Thread Max Reitz
We cannot use bdrv_child_try_set_perm() to give up all restrictions on the child edge, and still have bdrv_mirror_top_child_perm() request BLK_PERM_WRITE. Fix this by making bdrv_mirror_top_child_perm() return 0/BLK_PERM_ALL when we want to give up all permissions, and replacing bdrv_child_try_set

[Qemu-devel] [PATCH v2 7/7] block: Ignore loosening perm restrictions failures

2019-05-08 Thread Max Reitz
We generally assume that loosening permission restrictions can never fail. We have seen in the past that this assumption is wrong. This has led to crashes because we generally pass &error_abort when loosening permissions. However, a failure in such a case should actually be handled in quite the

[Qemu-devel] [PATCH v2 0/7] block: Ignore loosening perm restrictions failures

2019-05-08 Thread Max Reitz
Hi, This series is mainly a fix for https://bugzilla.redhat.com/show_bug.cgi?id=1703793. The problem described there is that mirroring to a gluster volume, then switching off the volume makes qemu crash. There are two problems here: (1) file-posix reopens the FD all the time because it thinks t

[Qemu-devel] [PATCH v2 1/7] file-posix: Update open_flags in raw_set_perm()

2019-05-08 Thread Max Reitz
raw_check_perm() + raw_set_perm() can change the flags associated with the current FD. If so, we have to update BDRVRawState.open_flags accordingly. Otherwise, we may keep reopening the FD even though the current one already has the correct flags. Signed-off-by: Max Reitz Reviewed-by: Kevin Wol

[Qemu-devel] [PATCH] configure: Require python3 >= 3.5

2019-05-08 Thread Eduardo Habkost
The oldest python3 version in distros that will be supported by QEMU 4.1 is 3.5.3 (the one in Debian Stretch). Error out if running python3 < 3.5. We have a .travis.yml job configured to use Python 3.4. Change it to use Python 3.5. Signed-off-by: Eduardo Habkost --- configure | 5 +++-- .tr

[Qemu-devel] [Bug 1828272] Re: 4.0 breaks keyboard autorepeat in guests with xserver

2019-05-08 Thread Frederick Metzengerstein
** Description changed: Description: In a linux/bsd guest within X, pressing and holding a key for a short time causes an endless repeat of that key in the guest. The release of the key gets ignored. Example 1: pressing and holding 'a' for a few seconds results in typing of '.

Re: [Qemu-devel] [PATCH] include/exec/poison: Mark TARGET_FMT_lu as poisoned, too

2019-05-08 Thread Richard Henderson
On 5/8/19 8:06 AM, Thomas Huth wrote: > We already poison TARGET_FMT_lx and TARGET_FMT_ld, but apparently > forgot to poison TARGET_FMT_lu, too. Do it now. > > Signed-off-by: Thomas Huth > --- > include/exec/poison.h | 1 + > 1 file changed, 1 insertion(+) Reviewed-by: Richard Henderson r~

[Qemu-devel] [Bug 1828272] Re: 4.0 breaks keyboard autorepeat in guests with xserver

2019-05-08 Thread Frederick Metzengerstein
** Description changed: Description: In a linux/bsd guest within X, pressing and holding a key for a short time causes an endless repeat of that key in the guest. The release of the key gets ignored. Example 1: pressing and holding 'a' for a few seconds results in typing of '.

[Qemu-devel] [Bug 1828272] [NEW] 4.0 breaks keyboard autorepeat in guests with xserver

2019-05-08 Thread Frederick Metzengerstein
Public bug reported: Description: In a linux/bsd guest within X, pressing and holding a key for a short time causes an endless repeat of that key in the guest. The release of the key gets ignored. Example 1: pressing and holding 'a' for a few seconds results in typing of '...' endle

Re: [Qemu-devel] [PATCH] Deprecate Python 2 support

2019-05-08 Thread Eduardo Habkost
On Wed, May 08, 2019 at 02:50:00PM +0200, Markus Armbruster wrote: > Daniel P. Berrangé writes: > > > On Tue, May 07, 2019 at 12:38:14PM +0200, Kevin Wolf wrote: > >> Am 03.05.2019 um 21:37 hat Eduardo Habkost geschrieben: > >> > Python 2 will reach end of life in January 1 2020. Declare it as >

Re: [Qemu-devel] [PATCH] tests: Force Python I/O encoding for check-qapi-schema

2019-05-08 Thread Eduardo Habkost
On Wed, May 08, 2019 at 03:04:43PM +0200, Markus Armbruster wrote: > Eduardo Habkost writes: > > > On Tue, May 07, 2019 at 03:13:45PM +0100, Daniel P. Berrangé wrote: > >> On Mon, May 06, 2019 at 06:38:17PM -0300, Eduardo Habkost wrote: > >> > test-qapi.py doesn't force a specific encoding for st

Re: [Qemu-devel] [PATCH v7 2/2] hw/arm: Add arm SBSA reference machine, devices part

2019-05-08 Thread Radoslaw Biernacki
On Wed, 8 May 2019 at 13:30, Hongbo Zhang wrote: > On Tue, 30 Apr 2019 at 22:17, Peter Maydell > wrote: > > > > On Thu, 18 Apr 2019 at 05:05, Hongbo Zhang > wrote: > > > > > > Following the previous patch, this patch adds peripheral devices to the > > > newly introduced SBSA-ref machine. > > >

Re: [Qemu-devel] [PATCH] target/riscv: Only flush TLB if SATP.ASID changes

2019-05-08 Thread Richard Henderson
On 5/8/19 10:38 AM, Jonathan Behrens wrote: > There is an analogous change for ARM here: > https://patchwork.kernel.org/patch/10649857 > > Signed-off-by: Jonathan Behrens > --- > target/riscv/csr.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [PATCH v5 03/15] tests/tcg/aarch64: add system boot.S

2019-05-08 Thread Alex Bennée
Richard Henderson writes: > On 4/30/19 9:52 AM, Alex Bennée wrote: >> +.error: >> +.string "Terminated by exception.\n" > > Put it in .rodata just because we can? > >> +/* Page table setup (identity mapping). */ >> +adrpx0, ttb >> +add x0, x0, :lo12:ttb > > You are

[Qemu-devel] [PATCH] target/riscv: Only flush TLB if SATP.ASID changes

2019-05-08 Thread Jonathan Behrens
There is an analogous change for ARM here: https://patchwork.kernel.org/patch/10649857 Signed-off-by: Jonathan Behrens --- target/riscv/csr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/riscv/csr.c b/target/riscv/csr.c index 6083c782a1..1ec1222da1 100644 --- a/t

Re: [Qemu-devel] [PATCH v10 13/13] qemu/bitops.h: Add extract8 and extract16

2019-05-08 Thread Richard Henderson
On 5/8/19 7:56 AM, Yoshinori Sato wrote: > +static inline uint16_t extract16(uint32_t value, int start, int length) s/uint32_t/uint16_t/ Aside from the possible value of the more restrictive asserts, I'm not sure what advantage you see in these routines. All arithmetic in C is promoted to type "

Re: [Qemu-devel] [PATCH v10 12/13] hw/registerfields.h: Add 8bit and 16bit register macros.

2019-05-08 Thread Richard Henderson
On 5/8/19 7:56 AM, Yoshinori Sato wrote: > Some RX peripheral using 8bit and 16bit registers. > Added 8bit and 16bit APIs. > > Signed-off-by: Yoshinori Sato > --- > include/hw/registerfields.h | 32 +++- > 1 file changed, 31 insertions(+), 1 deletion(-) Reviewed-by:

Re: [Qemu-devel] [PATCH v10 10/13] Add rx-softmmu

2019-05-08 Thread Richard Henderson
On 5/8/19 7:56 AM, Yoshinori Sato wrote: > Signed-off-by: Yoshinori Sato > --- > configure | 8 > default-configs/rx-softmmu.mak | 7 +++ > include/sysemu/arch_init.h | 1 + > arch_init.c| 2 ++ > hw/Kconfig | 1 + > 5

Re: [Qemu-devel] [PATCH v10 05/13] target/rx: Miscellaneous files

2019-05-08 Thread Richard Henderson
On 5/8/19 7:56 AM, Yoshinori Sato wrote: > Signed-off-by: Yoshinori Sato > --- > target/rx/gdbstub.c | 112 > > target/rx/monitor.c | 38 > target/rx/Makefile.objs | 12 ++ > 3 files changed, 162 insertions(+) > cre

  1   2   3   >