[RFC PATCH v4 07/29] Hexagon (target/hexagon) scalar core helpers

2020-09-28 Thread Taylor Simpson
The majority of helpers are generated. Define the helper functions needed then include the generated file Signed-off-by: Taylor Simpson --- target/hexagon/helper.h| 31 target/hexagon/op_helper.c | 381 + 2 files changed, 412 insertions(+)

[RFC PATCH v4 02/29] Hexagon (target/hexagon) README

2020-09-28 Thread Taylor Simpson
Gives an introduction and overview to the Hexagon target Signed-off-by: Taylor Simpson --- target/hexagon/README | 236 ++ 1 file changed, 236 insertions(+) create mode 100644 target/hexagon/README diff --git a/target/hexagon/README b/target/hexa

[RFC PATCH v4 05/29] Hexagon (disas) disassembler

2020-09-28 Thread Taylor Simpson
Add hexagon to disas/meson.build Add disas/hexagon.c Add hexagon to include/disas/dis-asm.h Signed-off-by: Taylor Simpson --- include/disas/dis-asm.h | 1 + disas/hexagon.c | 62 + disas/meson.build | 1 + 3 files changed, 64 insert

[RFC PATCH v4 08/29] Hexagon (target/hexagon) GDB Stub

2020-09-28 Thread Taylor Simpson
GDB register read and write routines Signed-off-by: Taylor Simpson Reviewed-by: Richard Henderson --- target/hexagon/internal.h | 3 +++ target/hexagon/cpu.c | 2 ++ target/hexagon/gdbstub.c | 47 +++ 3 files changed, 52 insertions(+) create

[RFC PATCH v4 20/29] Hexagon (target/hexagon) generater phase 4 - decode tree

2020-09-28 Thread Taylor Simpson
Python script that emits the decode tree in dectree_generated.h. Signed-off-by: Taylor Simpson --- target/hexagon/dectree.py | 352 ++ 1 file changed, 352 insertions(+) create mode 100755 target/hexagon/dectree.py diff --git a/target/hexagon/dectree.

[RFC PATCH v4 13/29] Hexagon (target/hexagon) instruction/packet decode

2020-09-28 Thread Taylor Simpson
Take the words from instruction memory and build a packet_t for TCG code generation The following operations are performed Convert the .new encoded offset to the register number of the producer Reorder the packet so .new producer is before consumer Apply constant extenders Separate

[RFC PATCH v4 14/29] Hexagon (target/hexagon) instruction printing

2020-09-28 Thread Taylor Simpson
Signed-off-by: Taylor Simpson --- target/hexagon/printinsn.h | 26 + target/hexagon/printinsn.c | 91 ++ 2 files changed, 117 insertions(+) create mode 100644 target/hexagon/printinsn.h create mode 100644 target/hexagon/printinsn.c diff -

[RFC PATCH v4 06/29] Hexagon (target/hexagon) register names

2020-09-28 Thread Taylor Simpson
Signed-off-by: Taylor Simpson Reviewed-by: Richard Henderson --- target/hexagon/hex_regs.h | 83 +++ 1 file changed, 83 insertions(+) create mode 100644 target/hexagon/hex_regs.h diff --git a/target/hexagon/hex_regs.h b/target/hexagon/hex_regs.h new

[RFC PATCH v4 04/29] Hexagon (target/hexagon) scalar core definition

2020-09-28 Thread Taylor Simpson
Add target state header, target definitions and initialization routines Signed-off-by: Taylor Simpson --- target/hexagon/cpu-param.h | 29 + target/hexagon/cpu.h | 159 +++ target/hexagon/cpu_bits.h | 34 + target/hexagon/internal.h | 36 ++ target/hexa

[RFC PATCH v4 03/29] Hexagon (include/elf.h) ELF machine definition

2020-09-28 Thread Taylor Simpson
Define EM_HEXAGON 164 Signed-off-by: Taylor Simpson Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- include/elf.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/elf.h b/include/elf.h index c117a4d..141a86f 100644 --- a/in

[RFC PATCH v4 01/29] Hexagon Update MAINTAINERS file

2020-09-28 Thread Taylor Simpson
Add Taylor Simpson as the Hexagon target maintainer Signed-off-by: Taylor Simpson Reviewed-by: Richard Henderson --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 5eed1e6..ab83525 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -185,6 +185

[PATCH 16/16] tests/acceptance: Test the MIPSsim machine

2020-09-28 Thread Philippe Mathieu-Daudé
Add a test for the mipssim machine, based on the recommended test setup from Thomas Huth: https://www.mail-archive.com/qemu-devel@nongnu.org/msg606846.html The test is quick and can be run as: $ avocado --show=console run -t machine:mipssim tests/acceptance/ (1/1) tests/acceptance/machine_m

[RFC PATCH v4 00/29] Hexagon patch series

2020-09-28 Thread Taylor Simpson
This series adds support for the Hexagon processor with Linux user support See patch 02/34 Hexagon README for detailed information. Once the series is applied, the Hexagon port will pass "make check-tcg". The series also includes Hexagon-specific tests in tcg/tests/hexagon. The series is also av

[PATCH 15/16] target/mips/cpu: Do not allow system-mode use without input clock

2020-09-28 Thread Philippe Mathieu-Daudé
Now than all QOM users provides the input clock, do not allow using a CPU core without its input clock connected on system-mode emulation. For user-mode, keep providing a fixed 200 MHz clock, as it used by the RDHWR instruction (see commit cdfcad788394). Signed-off-by: Philippe Mathieu-Daudé ---

[PATCH 13/16] hw/mips/malta: Set CPU frequency to 320 MHz

2020-09-28 Thread Philippe Mathieu-Daudé
The CoreLV card with ID 0x420's CPU clocked at 320 MHz. Create a 'cpuclk' output clock and connect it to the CPU input clock. Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/malta.c | 20 +--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/hw/mips/malta.c b/hw/m

[PATCH 11/16] hw/mips/cps: Expose input clock and connect it to CPU cores

2020-09-28 Thread Philippe Mathieu-Daudé
Expose a qdev input clock named 'clk', and connect it to each core. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/mips/cps.h | 2 ++ hw/mips/cps.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/include/hw/mips/cps.h b/include/hw/mips/cps.h index 9e35a881366..859a8d4a674 1

[PATCH 09/16] hw/mips/mipssim: Correct CPU frequency

2020-09-28 Thread Philippe Mathieu-Daudé
The MIPSsim machine CPU frequency is too fast running at 200 MHz, while it should be 12 MHz for the 24K and 6 MHz for the 5K core. Ref: Linux commit c78cbf49c4ed ("Support for MIPSsim, the cycle accurate MIPS simulator.") Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/mipssim.c | 12

[PATCH 14/16] hw/mips/cps: Do not allow use without input clock

2020-09-28 Thread Philippe Mathieu-Daudé
Now than all QOM users provides the input clock, do not allow using a CPS without input clock connected. Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/cps.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/mips/cps.c b/hw/mips/cps.c index c332609f7b3..e4ff173f8c3 100644 --- a/hw/m

[PATCH 10/16] hw/mips/jazz: Correct CPU frequencies

2020-09-28 Thread Philippe Mathieu-Daudé
The Magnum 4000PC CPU runs at 100 MHz, and the Acer PICA-61 CPU at ~134 MHz. Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/jazz.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/hw/mips/jazz.c b/hw/mips/jazz.c index 47723093b63..eee79d5b47d 100644 --- a/h

[PATCH 06/16] target/mips: Keep CP0 counter in sync with the CPU frequency

2020-09-28 Thread Philippe Mathieu-Daudé
Since commit 6af0bf9c7c3 the CP0 counter is running at half the frequency of a 200 MHz CPU: a static 100 MHz value is used. By using the Clock API we can change the CPU frequency at runtime, so the CP0 counter might run out of sync with the CPU clock. Avoid that by using the recently introduced CP

[PATCH 12/16] hw/mips/boston: Set CPU frequency to 1 GHz

2020-09-28 Thread Philippe Mathieu-Daudé
The I6400 can run at 1 GHz or more. Create a 'cpuclk' output clock and connect it to the CPU input clock. Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/boston.c | 13 + 1 file changed, 13 insertions(+) diff --git a/hw/mips/boston.c b/hw/mips/boston.c index 1b3f69e949c..5c541a0c5

[PATCH 05/16] target/mips/cpu: Set default CPU frequency to 200 MHz

2020-09-28 Thread Philippe Mathieu-Daudé
Since the introduction of the 'r4k' machine in commit 6af0bf9c7c3, the MIPS target assumes a CPU running at 200 MHz. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/cpu.c | 8 1 file changed, 8 insertions(+) diff --git a/target/mips/cpu.c b/target/mips/cpu.c index c1c0f2e12ba..8d

[PATCH 03/16] target/mips/cp0_timer: Explicit unit in variable name

2020-09-28 Thread Philippe Mathieu-Daudé
Name variables holding nanoseconds with the '_ns' suffix. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/cp0_timer.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/target/mips/cp0_timer.c b/target/mips/cp0_timer.c index 9c38e9da1c8..5194c967ae3 10

[PATCH 07/16] hw/mips/r4k: Explicit CPU frequency is 200 MHz

2020-09-28 Thread Philippe Mathieu-Daudé
Since its introduction in commit 6af0bf9c7c3, the 'r4k' machine runs at 200 MHz. Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/r4k.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hw/mips/r4k.c b/hw/mips/r4k.c index 3487013a4a1..2aa18203f20 100644 --- a/hw/mips/r4

[PATCH 08/16] hw/mips/fuloong2e: Set CPU frequency to 533 MHz

2020-09-28 Thread Philippe Mathieu-Daudé
The CPU frequency is normally provided by the firmware in the "cpuclock" environment variable. The 2E board can handles up to 660MHz, but be conservative and take the same value used by the Linux kernel: 533 MHz. Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/fuloong2e.c | 8 +++- 1 file

[PATCH 04/16] target/mips/cpu: Introduce mips_cpu_properties[]

2020-09-28 Thread Philippe Mathieu-Daudé
To allow objects creating CPU objects to set non-default properties before qdev-realizing() it, add an empty mips_cpu_properties array in MIPSCPUClass. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/cpu.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/target/mip

[PATCH 00/16] hw/mips: Set CPU frequency

2020-09-28 Thread Philippe Mathieu-Daudé
All the MIPS cores emulated by QEMU provides the Coproc#0 'Count' register which can be used as a free running timer. Since it's introduction in 2005 this timer uses a fixed frequency of 100 MHz (for a CPU freq of 200 MHz). While this is not an issue with Linux guests, it makes some firmwares beha

[PATCH 02/16] target/mips: Move cpu_mips_get_random() with CP0 helpers

2020-09-28 Thread Philippe Mathieu-Daudé
The get_random() helper uses the CP0_Wired register, which is unrelated to the CP0_Count register use as timer. Commit e16fe40c872 ("Move the MIPS CPU timer in a separate file") incorrectly moved this get_random() helper with timer specific code. Move it back to generic CP0 helpers. Signed-off-by:

[PATCH 01/16] hw/core/cpu: Let CPU object have a clock source

2020-09-28 Thread Philippe Mathieu-Daudé
Let CPUState have a clock source (named 'clk') and CPUClass have a clock_update() callback. The clock can be optionally set Using qdev_connect_clock_in() from the Clock API. If the clock changes, the optional clock_update() will be called. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/cor

[PATCH v3] linux-user: Add most IFTUN ioctls

2020-09-28 Thread Shu-Chun Weng via
The three options handling `struct sock_fprog` (TUNATTACHFILTER, TUNDETACHFILTER, and TUNGETFILTER) are not implemented. Linux kernel keeps a user space pointer in them which we cannot correctly handle. Signed-off-by: Josh Kunz Signed-off-by: Shu-Chun Weng --- v3: IOCTL_SPECIAL(TUNSETTXFILTER)

Re: [PATCH Kernel v24 4/8] vfio iommu: Add ioctl definition for dirty pages tracking

2020-09-28 Thread Stefan Hajnoczi
On Fri, May 29, 2020 at 02:00:50AM +0530, Kirti Wankhede wrote: > + * Calling the IOCTL with VFIO_IOMMU_DIRTY_PAGES_FLAG_GET_BITMAP flag set > + * returns the dirty pages bitmap for IOMMU container for a given IOVA range. > + * The user must specify the IOVA range and the pgsize through the structu

Re: [PATCH v2] linux-user: Add most IFTUN ioctls

2020-09-28 Thread Shu-Chun Weng
On Sat, Sep 26, 2020 at 9:44 AM Laurent Vivier wrote: > Le 24/07/2020 à 01:10, Shu-Chun Weng a écrit : > > The three options handling `struct sock_fprog` (TUNATTACHFILTER, > > TUNDETACHFILTER, and TUNGETFILTER) are not implemented. Linux kernel > > keeps a user space pointer in them which we cann

Re: [PATCH Kernel v24 1/8] vfio: UAPI for migration interface for device state

2020-09-28 Thread Stefan Hajnoczi
On Fri, May 29, 2020 at 02:00:47AM +0530, Kirti Wankhede wrote: > + * The sequence to be followed while in pre-copy state and stop-and-copy > state > + * is as follows: > + * a. Read pending_bytes, indicating the start of a new iteration to get > device > + *data. Repeated read on pending_byt

Re: [PATCH 1/3] qemu/compiler: Simplify as all compilers support attribute 'gnu_printf'

2020-09-28 Thread Paolo Bonzini
On 28/09/20 16:39, Daniel P. Berrangé wrote: > Looks like 2.58.0, which is still a fair bit newer than our 2.48 min. > > NB, only the macro changed - they were using GNU printf impl for many > many years before that but simply had the wrong macro definition > > We can just sacrifice -Wformat chec

Re: [PATCH] migration: Truncate state file in xen-save-devices-state

2020-09-28 Thread Anthony PERARD via
On Mon, Sep 21, 2020 at 12:17:23PM +0100, Dr. David Alan Gilbert wrote: > * Dov Murik (dovmu...@linux.vnet.ibm.com) wrote: > > When running the xen-save-devices-state QMP command, if the filename > > already exists it will be truncated before dumping the devices' state > > into it. > > > > Signed-

Re: [PATCH v1 1/3] i386: Remove the limitation of IP payloads for Intel PT

2020-09-28 Thread Paolo Bonzini
On 28/09/20 14:42, Kang, Luwei wrote: >> No, if a feature cannot be emulated, that means it cannot be >> enabled unless it matches the host. That's generally not a problem >> since Intel PT is usually used only with "-cpu host". >> > The limitation of LIP in qemu will mask off the Intel PT in KVM

Re: [PATCH] configure: Test that gio libs from pkg-config work

2020-09-28 Thread Paolo Bonzini
On 28/09/20 18:04, Peter Maydell wrote: > I wanted a statically-linked system emulation binary (which, yes, > I know is not really something we support :-)). I got one with > suitably liberal use of --disable-foo configure options, and > this was the only thing I couldn't work around that way. > Th

Re: I wanna fixes plugin on windows, any suggestion

2020-09-28 Thread Paolo Bonzini
On 28/09/20 17:47, Alex Bennée wrote: >> Plugins cannot work on Windows, because they would be specific to one >> executable as far as I know. Plugins would have to link with the >> emulator's import library, but there would be one import library per >> emulator. > > I'm not sure I follow. There

Re: [PATCH 08/12] tests/9pfs: refactor test names and test devices

2020-09-28 Thread Paolo Bonzini
On 28/09/20 15:35, Christian Schoenebeck wrote: >> As I said, the first two patches make total sense. They would be useful >> for testing both packed and split virtqueues, for example. However, I >> think the (useful) feature is being misused here. > > I haven't understood why my suggested mult-

[PATCH] qcow2: Use L1E_SIZE in qcow2_write_l1_entry()

2020-09-28 Thread Alberto Garcia
We overlooked these in 02b1ecfa100e7ecc2306560cd27a4a2622bfeb04 Signed-off-by: Alberto Garcia --- block/qcow2-cluster.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c index 9acc6ce4ae..aa87d3e99b 100644 --- a/block/qcow2-clus

Re: [RFC PATCH 15/19] tools/vhost-user-rpmb: implement VIRTIO_RPMB_REQ_DATA_WRITE

2020-09-28 Thread Joakim Bech
On Mon, Sep 28, 2020 at 03:56:19PM +0100, Alex Bennée wrote: > > Joakim Bech writes: > > > On Fri, Sep 25, 2020 at 01:51:43PM +0100, Alex Bennée wrote: > >> With this command we are finally updating data to the backing store > >> and cycling the write_count and each successful write. We also inc

Re: [PATCH 2/3] nbd: Add new qemu:allocation-depth metacontext

2020-09-28 Thread Richard W.M. Jones
On Mon, Sep 28, 2020 at 09:33:22AM -0500, Eric Blake wrote: > On 9/26/20 2:33 AM, Richard W.M. Jones wrote: > >On Fri, Sep 25, 2020 at 03:32:48PM -0500, Eric Blake wrote: > >>+The second is related to exposing the source of various extents within > >>+the image, with a single context named: > >>+ >

Re: [RFC PATCH 15/19] tools/vhost-user-rpmb: implement VIRTIO_RPMB_REQ_DATA_WRITE

2020-09-28 Thread Joakim Bech
On Fri, Sep 25, 2020 at 01:51:43PM +0100, Alex Bennée wrote: > With this command we are finally updating data to the backing store > and cycling the write_count and each successful write. We also include > the write count in all response frames as the spec is a little unclear > but the example test

Re: [PATCH 57/63] xen: Rename XENBACKEND_DEVICE to XENBACKEND

2020-09-28 Thread Anthony PERARD via
On Wed, Sep 02, 2020 at 06:43:05PM -0400, Eduardo Habkost wrote: > Make the type checking macro name consistent with the TYPE_* > constant. > > Signed-off-by: Eduardo Habkost Acked-by: Anthony PERARD Thanks, -- Anthony PERARD

[PATCH] configure: Test that gio libs from pkg-config work

2020-09-28 Thread Peter Maydell
On some hosts (eg Ubuntu Bionic) pkg-config returns a set of libraries for gio-2.0 which don't actually work when compiling statically. (Specifically, the returned library string includes -lmount, but not -lblkid which -lmount depends upon, so linking fails due to missing symbols.) Check that the

Re: [PULL 1/1] Revert "migration: Properly destroy variables on incoming side"

2020-09-28 Thread Peter Xu
On Mon, Sep 28, 2020 at 04:20:24PM +0100, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > This reverts commit c02039a6f3730ddcf683a0ba9a175688c6db71a0. > > This is breaking test 068 that does a loadvm twice. This is exactly something I'm afraid of happening... :-( Thou

Re: [PULL 0/8] Trivial branch for 5.2 patches

2020-09-28 Thread Peter Maydell
the right section (2020-= > 09-23 19:19:57 +0200) > > ---- > Trivial Patches Pull request 20200928 > Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/5.2 for any user-visible changes. -- PMM

Re: I wanna fixes plugin on windows, any suggestion

2020-09-28 Thread Alex Bennée
Paolo Bonzini writes: > On 25/09/20 21:12, 罗勇刚(Yonggang Luo) wrote: >> currently the empty.c plugin are failed of linkage error >> >> The fowlloing are the failing message: >> Compiling C object tests/plugin/libbb.dll.p/bb.c.obj >> Linking target tests/plugin/libempty.dll >> Linking target tes

Re: [PATCH] target/i386: add -cpu,lbr=true support to enable guest LBR

2020-09-28 Thread Eduardo Habkost
On Mon, Sep 28, 2020 at 10:51:03PM +0800, Xu, Like wrote: > Hi Eduardo, > > Thanks for your detailed review. > > On 2020/9/25 6:05, Eduardo Habkost wrote: > > I've just noticed this on my review queue (apologies for the long > > delay). Comments below: > > > > On Sun, Jul 26, 2020 at 11:32:20PM

Re: [PATCH v6 01/15] block: simplify comment to BDRV_REQ_SERIALISING

2020-09-28 Thread Alberto Garcia
On Fri 18 Sep 2020 08:19:37 PM CEST, Vladimir Sementsov-Ogievskiy wrote: > 1. BDRV_REQ_NO_SERIALISING doesn't exist already, don't mention it. > > 2. We are going to add one more user of BDRV_REQ_SERIALISING, so >comment about backup becomes a bit confusing here. The use case in >backup is

Re: Outline for VHOST_USER_PROTOCOL_F_VDPA

2020-09-28 Thread Stefan Hajnoczi
On Mon, Sep 28, 2020 at 03:21:56PM +0400, Marc-André Lureau wrote: > On Mon, Sep 28, 2020 at 1:25 PM Stefan Hajnoczi > Where this converges with multi-process QEMU > > > > At this point QEMU can run ad-hoc vhost-user backends using existing > > VIRTIO d

Re: [PATCH v2 00/31] block/export: Add infrastructure and QAPI for block exports

2020-09-28 Thread Kevin Wolf
Am 24.09.2020 um 17:26 hat Kevin Wolf geschrieben: > We are planning to add more block export types than just NBD in the near > future (e.g. vhost-user-blk and FUSE). This series lays the ground for > this with some generic block export infrastructure and QAPI interfaces > that will allow managing

[PULL 1/1] Revert "migration: Properly destroy variables on incoming side"

2020-09-28 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" This reverts commit c02039a6f3730ddcf683a0ba9a175688c6db71a0. This is breaking test 068 that does a loadvm twice. Signed-off-by: Dr. David Alan Gilbert --- migration/migration.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/migration

[PULL 0/1] migration queue

2020-09-28 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The following changes since commit 8d16e72f2d4df2c9e631393adf1669a1da7efe8a: Merge remote-tracking branch 'remotes/dgilbert/tags/pull-migration-20200925a' into staging (2020-09-25 14:46:18 +0100) are available in the Git repository at: git://github.com/dagrh

Re: [PATCH v3 00/47] qapi: static typing conversion, pt1

2020-09-28 Thread John Snow
On 9/24/20 8:28 PM, John Snow wrote: Hi, this series adds static type hints to the QAPI module. This is part one! Part 1: https://gitlab.com/jsnow/qemu/-/tree/python-qapi-cleanup-pt1 Everything: https://gitlab.com/jsnow/qemu/-/tree/python-qapi-cleanup-pt6 At this point, I have made only extre

Re: [RFC PATCH 4/7] block-backend: add I/O hang drain when disbale

2020-09-28 Thread Eric Blake
On 9/27/20 8:04 AM, Ying Fang wrote: In the subject: s/disbale/disabled/ To disable I/O hang, all hanging AIOs need to be drained. A rehandle status field is introduced to notify rehandle mechanism not to rehandle failed AIOs when I/O hang is disabled. Signed-off-by: Ying Fang Signed-off-by:

Re: [PATCH v2 18/38] qapi/events.py: Move comments into docstrings

2020-09-28 Thread John Snow
On 9/28/20 7:49 AM, Markus Armbruster wrote: John Snow writes: On 9/25/20 8:19 AM, Markus Armbruster wrote: What about: Generate a QAPI struct variable holding the event parameters, initialized with the function's arguments. Line length and style-guide limitations; docstrings ne

Re: [PATCH v2 5/8] qemu/bswap: Use compiler __builtin_bswap() on Haiku

2020-09-28 Thread David CARLIER
errors as ... expected '=', ',', ';', 'asm' r "__attribute__' before "builtin_swap16' ... base gcc 8.3 On Mon, 28 Sep 2020 at 15:14, Daniel P. Berrangé wrote: > > On Mon, Sep 28, 2020 at 03:09:01PM +0100, David CARLIER wrote: > > Unfortunately it breaks the build. > > Can you provide details o

Re: [RFC PATCH 15/19] tools/vhost-user-rpmb: implement VIRTIO_RPMB_REQ_DATA_WRITE

2020-09-28 Thread Alex Bennée
Joakim Bech writes: > On Fri, Sep 25, 2020 at 01:51:43PM +0100, Alex Bennée wrote: >> With this command we are finally updating data to the backing store >> and cycling the write_count and each successful write. We also include >> the write count in all response frames as the spec is a little u

Re: [PATCH] target/i386: add -cpu,lbr=true support to enable guest LBR

2020-09-28 Thread Xu, Like
Hi Eduardo, Thanks for your detailed review. On 2020/9/25 6:05, Eduardo Habkost wrote: I've just noticed this on my review queue (apologies for the long delay). Comments below: On Sun, Jul 26, 2020 at 11:32:20PM +0800, Like Xu wrote: The LBR feature would be enabled on the guest if: - the KV

Re: [PATCH 1/3] qemu/compiler: Simplify as all compilers support attribute 'gnu_printf'

2020-09-28 Thread Daniel P . Berrangé
On Mon, Sep 28, 2020 at 03:32:45PM +0100, Peter Maydell wrote: > On Mon, 28 Sep 2020 at 15:23, Daniel P. Berrangé wrote: > > > > On Mon, Sep 28, 2020 at 03:14:45PM +0100, Peter Maydell wrote: > > > On Mon, 28 Sep 2020 at 15:06, Daniel P. Berrangé > > > wrote: > > > > I think this can be simplifi

Re: [PATCH v3 12/47] qapi: enforce import order/styling with isort

2020-09-28 Thread John Snow
On 9/28/20 8:13 AM, Markus Armbruster wrote: PEP 8: "Surround top-level function and class definitions with two blank lines." [...] Yep, but flake8 does not complain about the first definitions that occur below imports. Why not? I don't know. Regardless, I can change it and fold the chang

Re: [PATCH 3/3] nbd: Add 'qemu-nbd -A' to expose allocation depth

2020-09-28 Thread Eric Blake
On 9/26/20 8:32 AM, Vladimir Sementsov-Ogievskiy wrote: 25.09.2020 23:32, Eric Blake wrote: Allow the server to expose an additional metacontext to be requested by savvy clients.  qemu-nbd adds a new option -A to expose the qemu:allocation-depth metacontext through NBD_CMD_BLOCK_STATUS; this can

Re: [PATCH 2/3] nbd: Add new qemu:allocation-depth metacontext

2020-09-28 Thread Eric Blake
On 9/26/20 2:33 AM, Richard W.M. Jones wrote: On Fri, Sep 25, 2020 at 03:32:48PM -0500, Eric Blake wrote: +The second is related to exposing the source of various extents within +the image, with a single context named: + +qemu:allocation-depth + +In the allocation depth context, bits 0 and 1

Re: [PATCH 1/3] qemu/compiler: Simplify as all compilers support attribute 'gnu_printf'

2020-09-28 Thread Peter Maydell
On Mon, 28 Sep 2020 at 15:23, Daniel P. Berrangé wrote: > > On Mon, Sep 28, 2020 at 03:14:45PM +0100, Peter Maydell wrote: > > On Mon, 28 Sep 2020 at 15:06, Daniel P. Berrangé > > wrote: > > > I think this can be simplified even more by using GLib's macros > > > > > > #define GCC_FMT_ATTR(n, m

Re: [PATCH v7 06/13] qmp: Call monitor_set_cur() only in qmp_dispatch()

2020-09-28 Thread Kevin Wolf
Am 28.09.2020 um 13:42 hat Markus Armbruster geschrieben: > Kevin Wolf writes: > > > Am 14.09.2020 um 17:10 hat Markus Armbruster geschrieben: > >> Kevin Wolf writes: > >> > >> > The correct way to set the current monitor for a coroutine handler will > >> > be different than for a blocking hand

Re: [PATCH 1/3] qemu/compiler: Simplify as all compilers support attribute 'gnu_printf'

2020-09-28 Thread Daniel P . Berrangé
On Mon, Sep 28, 2020 at 03:14:45PM +0100, Peter Maydell wrote: > On Mon, 28 Sep 2020 at 15:06, Daniel P. Berrangé wrote: > > I think this can be simplified even more by using GLib's macros > > > > #define GCC_FMT_ATTR(n, m) G_GNUC_PRINTF(n, m) > > At least on my system G_GNUC_PRINTF() expands

Re: [PATCH v2 5/8] qemu/bswap: Use compiler __builtin_bswap() on Haiku

2020-09-28 Thread Philippe Mathieu-Daudé
On 9/28/20 4:13 PM, Daniel P. Berrangé wrote: > On Mon, Sep 28, 2020 at 03:09:01PM +0100, David CARLIER wrote: >> Unfortunately it breaks the build. > > Can you provide details of the errors seen and toolchain versions. > > I notice we don't have any CI support for Haiku right now, nor > any reci

Re: [PATCH v2 5/8] qemu/bswap: Use compiler __builtin_bswap() on Haiku

2020-09-28 Thread Daniel P . Berrangé
On Mon, Sep 28, 2020 at 03:09:01PM +0100, David CARLIER wrote: > Unfortunately it breaks the build. Can you provide details of the errors seen and toolchain versions. I notice we don't have any CI support for Haiku right now, nor any recipe in tests/vm/ for enabling users to setup a VM with Haik

Re: [PATCH 1/3] qemu/compiler: Simplify as all compilers support attribute 'gnu_printf'

2020-09-28 Thread Peter Maydell
On Mon, 28 Sep 2020 at 15:06, Daniel P. Berrangé wrote: > I think this can be simplified even more by using GLib's macros > > #define GCC_FMT_ATTR(n, m) G_GNUC_PRINTF(n, m) At least on my system G_GNUC_PRINTF() expands to __format__(__printf__,...), not gnu_printf, so it is not quite what we w

Re: [PATCH v1 1/3] i386: Remove the limitation of IP payloads for Intel PT

2020-09-28 Thread Eduardo Habkost
On Mon, Sep 28, 2020 at 12:42:37PM +, Kang, Luwei wrote: > > No, it's not possible. KVM doesn't have a say on what the > > processor writes in the tracing packets. > > >>> Can KVM refuse to enable packet generation if CSbase is not zero and > > >>> CPUID.(EAX=14H,ECX=0)[bit 31] seen

Re: [PATCH v2 28/38] qapi/gen.py: update write() to be more idiomatic

2020-09-28 Thread John Snow
On 9/28/20 8:09 AM, Markus Armbruster wrote: Eric Blake writes: On 9/25/20 8:52 AM, Markus Armbruster wrote: This was my best attempt to open the file read/write, creating it if it doesn't exist. Plain f = open(pathname, "r+", encoding='utf-8') fails instead of creates, and

Re: [PATCH v2 5/8] qemu/bswap: Use compiler __builtin_bswap() on Haiku

2020-09-28 Thread David CARLIER
Unfortunately it breaks the build. Regards. On Mon, 28 Sep 2020 at 14:20, Philippe Mathieu-Daudé wrote: > > Since commit efc6c070aca ("configure: Add a test for the minimum > compiler version") the minimum compiler version required for GCC > is 4.8, which supports __builtin_bswap(). > Remove the

Re: [PATCH 1/3] nbd: Simplify meta-context parsing

2020-09-28 Thread Eric Blake
On 9/26/20 7:58 AM, Vladimir Sementsov-Ogievskiy wrote: 25.09.2020 23:32, Eric Blake wrote: We had a premature optimization of trying to read as little from the wire as possible while handling NBD_OPT_SET_META_CONTEXT in phases. But in reality, we HAVE to read the entire string from the client b

Re: [PATCH 1/3] qemu/compiler: Simplify as all compilers support attribute 'gnu_printf'

2020-09-28 Thread Daniel P . Berrangé
On Mon, Sep 28, 2020 at 02:58:57PM +0200, Philippe Mathieu-Daudé wrote: > Since commit efc6c070aca ("configure: Add a test for the minimum > compiler version") the minimum compiler version required for GCC > is 4.8, which supports the gnu_printf attribute. > > We can safely remove the code introdu

Re: [PATCH 3/3] accel/tcg: Remove special case for GCC < 4.6

2020-09-28 Thread Peter Maydell
On Mon, 28 Sep 2020 at 14:40, Philippe Mathieu-Daudé wrote: > > Since commit efc6c070aca ("configure: Add a test for the > minimum compiler version") the minimum compiler version > required for GCC is 4.8. > > We can safely remove the special case for GCC 4.6 introduced > in commit 0448f5f8b81 ("c

[PATCH v2 3/8] qemu/bswap: Replace bswapXXs() by compiler __builtin_bswap()

2020-09-28 Thread Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/bswap.h | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/include/qemu/bswap.h b/include/qemu/bswap.h index 41131d3d76e..fed967a 100644 --- a/include/qemu/bswap.h +++ b/in

Publishing docs for formal releases

2020-09-28 Thread Daniel P . Berrangé
We currently have a cronjob publishing: https://www.qemu.org/docs/master/ The URL was chosen such that we would also publish docs for each release at URLs like https://www.qemu.org/docs/5.0.0 The latter part has not happened yet. IIUC, we first introduced the new docs approach in 4.0.0,

Re: [PATCH 1/3] qemu/compiler: Simplify as all compilers support attribute 'gnu_printf'

2020-09-28 Thread Peter Maydell
On Mon, 28 Sep 2020 at 14:37, Philippe Mathieu-Daudé wrote: > > Since commit efc6c070aca ("configure: Add a test for the minimum > compiler version") the minimum compiler version required for GCC > is 4.8, which supports the gnu_printf attribute. > > We can safely remove the code introduced in com

Re: SEV guest debugging support for Qemu

2020-09-28 Thread Ashish Kalra
Hello Paolo, On Sat, Sep 26, 2020 at 02:02:20AM +0200, Paolo Bonzini wrote: > On 26/09/20 01:48, Ashish Kalra wrote: > > Thanks for your input, i have one additional query with reference to this > > support : > > > > For all explicitly unecrypted guest memory regions such as S/W IOTLB bounce >

Re: [PATCH v6 00/21] Convert QAPI doc comments to generate rST instead of texinfo

2020-09-28 Thread Peter Maydell
On Mon, 28 Sep 2020 at 14:04, Markus Armbruster wrote: > > Peter Maydell writes: > > > On Fri, 25 Sep 2020 at 20:25, wrote: > > > >> In file included from ../src/qapi/qapi-schema.json:78: > >> ../src/qapi/migration.json:1747:1: unexpected de-indent (expected at least > >> 13 spaces) > > > > Thi

[PATCH v2 5/8] qemu/bswap: Use compiler __builtin_bswap() on Haiku

2020-09-28 Thread Philippe Mathieu-Daudé
Since commit efc6c070aca ("configure: Add a test for the minimum compiler version") the minimum compiler version required for GCC is 4.8, which supports __builtin_bswap(). Remove the Haiku specific ifdef'ry. This reverts commit 652a46ebba970017c7a23767dcc983265cdb8eb7 ("bswap.h: Include on Haiku

Re: [PATCH 2/3] qemu/atomic: Drop special case for unsupported compiler

2020-09-28 Thread Peter Maydell
On Mon, 28 Sep 2020 at 14:12, Philippe Mathieu-Daudé wrote: > > Since commit efc6c070aca ("configure: Add a test for the > minimum compiler version") the minimum compiler version > required for GCC is 4.8, which has the GCC BZ#36793 bug fixed. > > We can safely remove the special case introduced i

[PATCH v9 9/9] block: apply COR-filter to block-stream jobs

2020-09-28 Thread Andrey Shinkevich via
This patch completes the series with the COR-filter insertion for block-stream operations. Adding the filter makes it possible for copied regions to be discarded in backing files during the block-stream job, what will reduce the disk overuse. The COR-filter insertion incurs changes in the iotests c

[PATCH v2 2/8] qemu/bswap: Replace bswapXX() by compiler __builtin_bswap()

2020-09-28 Thread Philippe Mathieu-Daudé
Use the compiler built-in function to byte swap values, as the compiler is clever and will fold constants. Suggested-by: Richard Henderson Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/bswap.h | 33 +++-- 1 file changed, 7 ins

[PATCH v9 6/9] copy-on-read: skip non-guest reads if no copy needed

2020-09-28 Thread Andrey Shinkevich via
If the flag BDRV_REQ_PREFETCH was set, pass it further to the COR-driver to skip unneeded reading. It can be taken into account for the COR-algorithms optimization. That check is being made during the block stream job by the moment. Signed-off-by: Andrey Shinkevich --- block/copy-on-read.c | 14

Re: [PATCH 08/12] tests/9pfs: refactor test names and test devices

2020-09-28 Thread Christian Schoenebeck
On Montag, 28. September 2020 14:42:48 CEST Paolo Bonzini wrote: > On 28/09/20 13:56, Christian Schoenebeck wrote: > >> The implementation in patches 1 and 2 is reasonable, but what is the > >> advantage of this as opposed to specifying the fsdev in the edge options > >> for the test (similar to vi

[PATCH v2 0/8] qemu/bswap: Use compiler __builtin_bswap()

2020-09-28 Thread Philippe Mathieu-Daudé
Implement Richard's suggestion to use __builtin_bswap(). const_XX() not updated. We could use le_bswap() definitions but they are undefined, not sure yet what is the best way. Meanwhile I figure this out, these patches are ready for review. Since v1: - Remove the Haiku/BSD ifdef'ry (Peter) - Incl

[RFC PATCH v2 8/8] tests/vm: Add Haiku test based on their vagrant images

2020-09-28 Thread Philippe Mathieu-Daudé
From: Alexander von Gluck IV Signed-off-by: Alexander von Gluck IV [PMD: Avoid to recreate the image each time] Signed-off-by: Philippe Mathieu-Daudé --- RFC because Alexander will probably add more comments to this patch. tests/keys/vagrant| 27 + tests/keys/vagrant.pub|

Re: [PATCH] qemu-io-cmds: Simplify help_oneline

2020-09-28 Thread Kevin Wolf
Am 24.08.2020 um 12:29 hat Dr. David Alan Gilbert (git) geschrieben: > From: "Dr. David Alan Gilbert" > > help_oneline is declared and starts as: > > static void help_oneline(const char *cmd, const cmdinfo_t *ct) > { > if (cmd) { > printf("%s ", cmd); > } else { >

[PATCH v9 0/9] Apply COR-filter to the block-stream permanently

2020-09-28 Thread Andrey Shinkevich via
Despite the patch "freeze link to base node..." has been removed from the series in the current version 9, the iotest case test_stream_parallel does not pass after the COR-filter is inserted into the backing chain. As the test case may not be initialized, it does not make a sense and was removed ag

Re: [PATCH v2 0/9] s390x/tcg: Implement some z14 facilities

2020-09-28 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200928122717.30586-1-da...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20200928122717.30586-1-da...@redhat.com Subject: [PATCH v2 0/9] s390x/tcg: Implement some z14

[PATCH v2 6/8] qemu/bswap: Use compiler __builtin_bswap() on FreeBSD

2020-09-28 Thread Philippe Mathieu-Daudé
Since commit efc6c070aca ("configure: Add a test for the minimum compiler version") the minimum compiler version required for GCC is 4.8, which supports __builtin_bswap(). Remove the FreeBSD specific ifdef'ry. This reverts commit de03c3164accc21311c39327601fcdd95da301f3 ("bswap: Fix build on FreeB

[PATCH] vhost-user: add separate memslot counter for vhost-user

2020-09-28 Thread Jiajun Chen
Used_memslots is equal to dev->mem->nregions now, it is true for vhost kernel, but not for vhost user, which uses the memory regions that have file descriptor. In fact, not all of the memory regions have file descriptor. It is usefully in some scenarios, e.g. used_memslots is 8, and only 5 memory s

[PATCH 3/3] accel/tcg: Remove special case for GCC < 4.6

2020-09-28 Thread Philippe Mathieu-Daudé
Since commit efc6c070aca ("configure: Add a test for the minimum compiler version") the minimum compiler version required for GCC is 4.8. We can safely remove the special case for GCC 4.6 introduced in commit 0448f5f8b81 ("cpu-exec: Fix compiler warning (-Werror=clobbered)"). No change for Clang a

[Bug 1897568] [NEW] Strange keyboard behaviour in Vim editor

2020-09-28 Thread Albert Wik
Public bug reported: I'm running MS-DOS 7.10 in a QEMU virtual machine, and there is a problem with the keyboard in the Vim editor. The arrow keys jump over a line, as if you had typed the key twice. PgUp and PgDn are likewise affected. Other applications are not affected, unless you shell

[PATCH 1/3] qemu/compiler: Simplify as all compilers support attribute 'gnu_printf'

2020-09-28 Thread Philippe Mathieu-Daudé
Since commit efc6c070aca ("configure: Add a test for the minimum compiler version") the minimum compiler version required for GCC is 4.8, which supports the gnu_printf attribute. We can safely remove the code introduced in commit 9c9e7d51bf0 ("Move macros GCC_ATTR and GCC_FMT_ATTR to common header

[PULL 5/5] hw/usb: Use lock guard macros

2020-09-28 Thread Gerd Hoffmann
From: Amey Narkhede Use qemu LOCK_GUARD macros from "qemu/lockable.h" in hw/usb/ccid-card-emulated.c, saves manual unlock calls. Signed-off-by: Amey Narkhede Reviewed-by: Philippe Mathieu-Daudé Message-id: 20200923134327.576139-1-ameynarkhed...@gmail.com Signed-off-by: Gerd Hoffmann --- hw/u

[PATCH v2 4/8] qemu/bswap: Remove dependency

2020-09-28 Thread Philippe Mathieu-Daudé
Since commit efc6c070aca ("configure: Add a test for the minimum compiler version") the minimum compiler version required for GCC is 4.8, which supports __builtin_bswap(). Drop the dependency. Suggested-by: Richard Henderson Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé

[PATCH v2 1/8] qemu/bswap: Remove unused qemu_bswap_len()

2020-09-28 Thread Philippe Mathieu-Daudé
Last use of qemu_bswap_len() has been removed in commit e5fd1eb05ec ("apb: add busA qdev property to PBM PCI bridge"). Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/bswap.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/include/qemu/bswap.h b/in

<    1   2   3   4   >