[Bug 1815721] Re: RISC-V PLIC enable interrupt for multicore

2020-09-28 Thread Teodori Serge
Hello as far as I can tell, there is a major problem with PLIC implementation. When decompiling DTB on virt board with X harts, I see that hartid 0 has MEI and SEI, hartid 1 has MEI and SEI, etc... But when configuring context 1 (hartid 0 SEI) no interrupt is generated, but context 0, 2, 4 etc... w

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 07:19, 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 by guest is different from host? >> >>

Re: [PATCH] vhost: Ignore vrings in dirty log when using a vIOMMU

2020-09-28 Thread Greg Kurz
On Mon, 28 Sep 2020 16:23:43 +1000 David Gibson wrote: > On Fri, Sep 25, 2020 at 07:29:43PM +0200, Greg Kurz wrote: > > When a vIOMMU is present, any address comming from the guest is an IO > > virtual address, including those of the vrings. The backend's accesses > > to the vrings happen through

Re: [PATCH v7 07/13] monitor: Make current monitor a per-coroutine property

2020-09-28 Thread Markus Armbruster
Kevin Wolf writes: > Am 14.09.2020 um 17:11 hat Markus Armbruster geschrieben: >> Kevin Wolf writes: >> >> > This way, a monitor command handler will still be able to access the >> > current monitor, but when it yields, all other code code will correctly >> > get NULL from monitor_cur(). >> > >

Re: [PATCH 1/3] util/cutils: Introduce freq_to_str() to display Hertz units

2020-09-28 Thread Luc Michel
Hi Philippe, On 11:08 Sun 27 Sep , Philippe Mathieu-Daudé wrote: > Introduce freq_to_str() to convert frequency values in human > friendly units using the SI units for Hertz. > > Signed-off-by: Philippe Mathieu-Daudé > --- > include/qemu/cutils.h | 12 > util/cutils.c |

Re: [PATCH 2/3] qdev-monitor: Display frequencies scaled to SI unit

2020-09-28 Thread Luc Michel
On 11:08 Sun 27 Sep , Philippe Mathieu-Daudé wrote: > Since commit 9f2ff99c7f2 ("qdev-monitor: print the device's clock > with info qtree") we can display the clock frequencies in the > monitor. Use the recently introduced freq_to_str() to display > the frequencies using the closest SI unit (hu

Re: [PATCH 3/3] hw/qdev-clock: Display error hint when clock is missing from device

2020-09-28 Thread Luc Michel
On 11:08 Sun 27 Sep , Philippe Mathieu-Daudé wrote: > Instead of directly aborting, display a hint to help the developer > figure out the problem (likely trying to connect a clock to a device > pre-dating the Clock API, thus not expecting clocks). > > Signed-off-by: Philippe Mathieu-Daudé Re

Re: [PATCH v5 13/14] hw/block/nvme: Use zone metadata file for persistence

2020-09-28 Thread Klaus Jensen
On Sep 28 11:35, Dmitry Fomichev wrote: > A ZNS drive that is emulated by this module is currently initialized > with all zones Empty upon startup. However, actual ZNS SSDs save the > state and condition of all zones in their internal NVRAM in the event > of power loss. When such a drive is powered

Re: [PATCH] aspeed: Add support for the g220a-bmc board

2020-09-28 Thread Cédric Le Goater
On 9/28/20 8:12 AM, John Wang wrote: > G220A is a 2 socket x86 motherboard supported by OpenBMC. > Strapping configuration was obtained from hardware. > > Signed-off-by: John Wang > --- > hw/arm/aspeed.c | 35 +++ > 1 file changed, 35 insertions(+) > > diff --git

Re: [PATCH v3 1/1] accel/tcg: Fix computing of is_write for MIPS

2020-09-28 Thread Aleksandar Markovic
On Sunday, September 27, 2020, Kele Huang wrote: > Sorry about that, I only got maintainers by './scripts/get_maintainer.pl > -f accel/tcg/user-exec.c' and missed your advice about maintainers. > In another words, I thought I had Cc'ed the TCG MIPS maintainers. 😅 > And sorry to maintainers. 😅 > >

Re: [PATCH v7 08/13] qapi: Add a 'coroutine' flag for commands

2020-09-28 Thread Markus Armbruster
Kevin Wolf writes: > Am 14.09.2020 um 17:15 hat Markus Armbruster geschrieben: >> Kevin Wolf writes: >> >> > This patch adds a new 'coroutine' flag to QMP command definitions that >> > tells the QMP dispatcher that the command handler is safe to be run in a >> > coroutine. >> > >> > The documen

Re: [PATCH v7 09/13] qmp: Move dispatcher to a coroutine

2020-09-28 Thread Markus Armbruster
Kevin Wolf writes: > Am 14.09.2020 um 17:30 hat Markus Armbruster geschrieben: >> Kevin Wolf writes: >> >> > This moves the QMP dispatcher to a coroutine and runs all QMP command >> > handlers that declare 'coroutine': true in coroutine context so they >> > can avoid blocking the main loop whil

[Bug 1502884] Re: Super important feature req: QEMU VNC server: Introduce a keyboard "norepeat" option!

2020-09-28 Thread Daniel Berrange
The VNC server doesn't get involved in key repeat functionality, it just passes keys from the client onto the guest OS. The client can indicate that it is doing key repeat by sending a series of "key down" events, and only 1 "key up" event to indicate end of auto-repeat. The guest OS can itself im

Re: [PATCH 06/12] tests/qtest/qos-test: add environment variable QTEST_DEBUG

2020-09-28 Thread Paolo Bonzini
On 27/09/20 12:40, Christian Schoenebeck wrote: > For now this new environment variable QTEST_DEBUG will cause the > assembled qemu command line to be printed before running each test. > > Signed-off-by: Christian Schoenebeck > --- > tests/qtest/qos-test.c | 3 +++ > 1 file changed, 3 insertions

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

2020-09-28 Thread Paolo Bonzini
On 27/09/20 12:40, Christian Schoenebeck wrote: > +qos_node_produces("virtio-9p-device-synth", "virtio-synth"); This is wrong, since it disables the generic virtio device tests (right now there is only one in virtio-test.c). Paolo

Re: [PATCH 4/4] block/export: add BlockExportOptions->iothread member

2020-09-28 Thread Stefan Hajnoczi
On Fri, Sep 25, 2020 at 05:01:42PM +0200, Kevin Wolf wrote: > Am 25.09.2020 um 15:42 hat Stefan Hajnoczi geschrieben: > > Make it possible to specify the iothread where the export will run. > > > > Signed-off-by: Stefan Hajnoczi > > --- > > Note the x-blockdev-set-iothread QMP command can be used

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

2020-09-28 Thread Paolo Bonzini
On 27/09/20 12:40, Christian Schoenebeck wrote: > +qos_node_consumes("virtio-9p-device-local", "virtio-bus", &opts); > +qos_node_produces("virtio-9p-device-local", "virtio-local"); This should produce "virtio", similar to what I remarked in the previous patch. > +qos_node_produces("vi

Re: [PATCH 01/14] hw/core/clock: provide the VMSTATE_ARRAY_CLOCK macro

2020-09-28 Thread Damien Hedde
On 9/25/20 12:17 PM, Luc Michel wrote: > Signed-off-by: Luc Michel Reviewed-by: Damien Hedde > --- > include/hw/clock.h | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/include/hw/clock.h b/include/hw/clock.h > index d357594df9..c93e6113cd 100644 > --- a/include/hw/clock.h > +

Re: [PATCH 04/14] hw/arm/raspi: add a skeleton implementation of the cprman

2020-09-28 Thread Luc Michel
On 23:05 Sat 26 Sep , Philippe Mathieu-Daudé wrote: > On 9/25/20 12:17 PM, Luc Michel wrote: > > The BCM2835 cprman is the clock manager of the SoC. It is composed of a > > Can we use CPRMAN in caps? > > > main oscillator, and several sub-components (PLLs, multiplexers, ...) to > > generate t

Re: [PATCH v7 00/13] monitor: Optionally run handlers in coroutines

2020-09-28 Thread Stefan Hajnoczi
On Fri, Sep 25, 2020 at 07:15:41PM +0200, Kevin Wolf wrote: > Am 10.09.2020 um 15:24 hat Stefan Hajnoczi geschrieben: > > On Wed, Sep 09, 2020 at 05:11:36PM +0200, Kevin Wolf wrote: > > > Some QMP command handlers can block the main loop for a relatively long > > > time, for example because they pe

Re: [PATCH 02/14] hw/core/clock: trace clock values in Hz instead of ns

2020-09-28 Thread Damien Hedde
On 9/26/20 10:36 PM, Philippe Mathieu-Daudé wrote: > On 9/25/20 12:17 PM, Luc Michel wrote: >> The nanosecond unit greatly limits the dynamic range we can display in >> clock value traces, for values in the order of 1GHz and more. The >> internal representation can go way beyond this value and i

Re: [PATCH 2/3] qdev-monitor: Display frequencies scaled to SI unit

2020-09-28 Thread Damien Hedde
On 9/28/20 9:52 AM, Luc Michel wrote: > On 11:08 Sun 27 Sep , Philippe Mathieu-Daudé wrote: >> Since commit 9f2ff99c7f2 ("qdev-monitor: print the device's clock >> with info qtree") we can display the clock frequencies in the >> monitor. Use the recently introduced freq_to_str() to display >

Re: [PATCH v5 01/14] hw/block/nvme: Report actual LBA data shift in LBAF

2020-09-28 Thread Klaus Jensen
On Sep 28 11:35, Dmitry Fomichev wrote: > Calculate the data shift value to report based on the set value of > logical_block_size device property. > > In the process, use a local variable to calculate the LBA format > index instead of the hardcoded value 0. This makes the code more > readable and

[PATCH 1/2] virtio-vga: implement big-endian-framebuffer property

2020-09-28 Thread Gerd Hoffmann
Allows to switch the (vga mode) framebuffer into bigendian mode by setting the property, simliar to stdvga. Signed-off-by: Gerd Hoffmann --- hw/display/virtio-vga.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/hw/display/virtio-vga.c b/hw/display/virtio-vga.c index f9

[PATCH 2/2] ppc/pseries: enable big-endian-framebuffer quirk for bochs-display and virtio-vga

2020-09-28 Thread Gerd Hoffmann
Already done for stdvga and secondary-vga, bochs-display and virtio-vga support the big-endian-framebuffer property too. Fixes blue console background at boot (offb firmware console). Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1881912 Signed-off-by: Gerd Hoffmann --- hw/ppc/spapr_pci.

[PATCH 0/2] virtio-vga: fix blue boot console @ ppc

2020-09-28 Thread Gerd Hoffmann
Gerd Hoffmann (2): virtio-vga: implement big-endian-framebuffer property ppc/pseries: enable big-endian-framebuffer quirk for bochs-display and virtio-vga hw/display/virtio-vga.c | 19 +++ hw/ppc/spapr_pci.c | 4 +++- 2 files changed, 22 insertions(+), 1 deletion(-

Re: [PATCH v1 1/5] virtio-mem: Probe THP size to determine default block size

2020-09-28 Thread David Hildenbrand
On 25.09.20 15:46, Pankaj Gupta wrote: >> Let's allow a minimum block size of 1 MiB in all configurations. Use >> a default block size based on the THP size, and warn if something >> smaller is configured by the user. >> >> VIRTIO_MEM only supports Linux (depends on LINUX), so we can probe the >> T

Re: [PATCH v7 12/13] block: Add bdrv_co_move_to_aio_context()

2020-09-28 Thread Stefan Hajnoczi
On Fri, Sep 25, 2020 at 06:00:51PM +0200, Kevin Wolf wrote: > Am 15.09.2020 um 16:31 hat Stefan Hajnoczi geschrieben: > > On Wed, Sep 09, 2020 at 05:11:48PM +0200, Kevin Wolf wrote: > > > Add a function to move the current coroutine to the AioContext of a > > > given BlockDriverState. > > > > > >

Re: [PATCH v7 13/13] block: Convert 'block_resize' to coroutine

2020-09-28 Thread Stefan Hajnoczi
On Fri, Sep 25, 2020 at 06:07:50PM +0200, Kevin Wolf wrote: > Am 15.09.2020 um 16:57 hat Stefan Hajnoczi geschrieben: > > On Wed, Sep 09, 2020 at 05:11:49PM +0200, Kevin Wolf wrote: > > > @@ -2456,8 +2456,7 @@ void qmp_block_resize(bool has_device, const char > > > *device, > > > return;

Re: [PATCH 5/5] memory: Skip bad range assertion if notifier is DEVIOTLB_UNMAP type

2020-09-28 Thread Eugenio Perez Martin
On Fri, Sep 4, 2020 at 6:34 AM Jason Wang wrote: > > > On 2020/9/4 上午12:14, Eugenio Pérez wrote: > > Device IOTLB invalidations can unmap arbitrary ranges, eiter outside of > > the memory region or even [0, ~0ULL] for all the space. The assertion > > could be hit by a guest, and rhel7 guest effect

[PULL 1/8] vhost-vdpa: fix indentation in vdpa_ops

2020-09-28 Thread Laurent Vivier
From: Stefano Garzarella This patch fixes wrong indentation of some vdpa_ops fields introduced with the initial commit 108a64818e ("vhost-vdpa: introduce vhost-vdpa backend") Signed-off-by: Stefano Garzarella Reviewed-by: Li Qiang Reviewed-by: Laurent Vivier Message-Id: <20200916152634.56917-

[PULL 6/8] timer: Fix timer_mod_anticipate() documentation

2020-09-28 Thread Laurent Vivier
From: Philippe Mathieu-Daudé timer_mod_anticipate() will be scaled to the timer unit, which is not always nanosecond. Fix the documentation. Fixes: add40e9777d ("timer: add timer_mod_anticipate*") Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20200920155042.

[PULL 5/8] vhost-vdpa: remove useless variable

2020-09-28 Thread Laurent Vivier
From: Laurent Vivier in vhost_vdpa_listener_region_del(), try_unmap is always true and so, vhost_vdpa_dma_unmap() is always called. We can remove the variable Signed-off-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Li Qiang Message-Id: <20200920152024.860172-1-lviv...@r

[PULL 2/8] meson: fix static flag summary

2020-09-28 Thread Laurent Vivier
From: Laurent Vivier 'static build:' must display value of CONFIG_STATIC rather than value of CONFIG_TOOLS. Signed-off-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20200917140700.673171-1-lviv...@redhat.com> Signed-off-by: Laurent Vivier --- meson.build | 2 +- 1 file

[PULL 0/8] Trivial branch for 5.2 patches

2020-09-28 Thread Laurent Vivier
branch-for-5.2-pull-request for you to fetch changes up to c66790b5dfc2430c04bf5876cf485e1f538af7f2: docs/system/deprecated: Move lm32 and unicore32 to the right section (2020-= 09-23 19:19:57 +0200) Trivial Patches Pull reques

[PULL 4/8] Add *.pyc back to the .gitignore file

2020-09-28 Thread Laurent Vivier
From: Thomas Huth Python still dumps its bytecode into the source directory, so we should continue to ignore the *.pyc files. Fixes: 0e72b7df4d ("Simplify the .gitignore file") Reported-by: Peter Maydell Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Message-Id: <2020091910185

[PULL 7/8] migration/multifd: Remove superfluous semicolons

2020-09-28 Thread Laurent Vivier
From: Philippe Mathieu-Daudé checkpatch.pl report superfluous semicolons since commit ee0f3c09e01, but this one was missed: scripts/checkpatch.pl d32ca5ad798~..d32ca5ad798 ERROR: superfluous trailing semicolon #498: FILE: migration/multifd.c:308: +ram_counters.transferred += transfer

[PULL 8/8] docs/system/deprecated: Move lm32 and unicore32 to the right section

2020-09-28 Thread Laurent Vivier
From: Thomas Huth lm32 and unicore32 are softmmut targets, and not linux-user targets. Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20200923080015.77373-1-th...@redhat.com> Signed-off-by: Laurent Vivier --- docs/system/deprecated.rst | 32 --

[PULL 3/8] virtio: vdpa: omit check return of g_malloc

2020-09-28 Thread Laurent Vivier
From: Li Qiang If g_malloc fails, the application will be terminated. No need to check the return value of g_malloc. Signed-off-by: Li Qiang Reviewed-by: Laurent Vivier Reviewed-by: Alex Bennée Message-Id: <20200819144309.67579-1-liq...@163.com> Signed-off-by: Laurent Vivier --- hw/virtio/v

Re: [RFC PATCH v5 2/2] hw/riscv: sifive_u: Add backend drive support

2020-09-28 Thread Green Wan
Hi Alistair, Thanks for the review. See the reply inline below. On Sat, Sep 26, 2020 at 5:52 AM Alistair Francis wrote: > > On Tue, Sep 1, 2020 at 8:49 AM Green Wan wrote: > > > > Add '-drive' support to OTP device. Allow users to assign a raw file > > as OTP image. > > Do you mind writing an

Outline for VHOST_USER_PROTOCOL_F_VDPA

2020-09-28 Thread Stefan Hajnoczi
Hi, Thanks for the positive responses to the initial discussion about introducing VHOST_USER_PROTOCOL_F_VDPA to use vDPA semantics and bring the full VIRTIO device model to vhost-user: https://lists.gnu.org/archive/html/qemu-devel/2020-08/msg05181.html Below is an inlined version of the more detai

Re: [PATCH 01/10] qdev: add "check if address free" callback for buses

2020-09-28 Thread Stefan Hajnoczi
On Fri, Sep 25, 2020 at 01:25:55PM -0400, Paolo Bonzini wrote: > diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h > index 72064f4dd4..e62da68a26 100644 > --- a/include/hw/qdev-core.h > +++ b/include/hw/qdev-core.h > @@ -217,6 +217,7 @@ struct BusClass { > */ > char *(*get_fw_

Re: [PATCH v1 1/5] virtio-mem: Probe THP size to determine default block size

2020-09-28 Thread Pankaj Gupta
> >> Let's allow a minimum block size of 1 MiB in all configurations. Use > >> a default block size based on the THP size, and warn if something > >> smaller is configured by the user. > >> > >> VIRTIO_MEM only supports Linux (depends on LINUX), so we can probe the > >> THP size unconditionally. >

Re: [PATCH v7 00/13] monitor: Optionally run handlers in coroutines

2020-09-28 Thread Markus Armbruster
Kevin Wolf writes: > Am 10.09.2020 um 15:24 hat Stefan Hajnoczi geschrieben: >> On Wed, Sep 09, 2020 at 05:11:36PM +0200, Kevin Wolf wrote: >> > Some QMP command handlers can block the main loop for a relatively long >> > time, for example because they perform some I/O. This is quite nasty. >> >

Re: [PATCH] hw/arm/sbsa-ref : Fix SMMUv3 Initialisation

2020-09-28 Thread Graeme Gregory
On Sat, Sep 26, 2020 at 09:45:24AM +0200, Philippe Mathieu-Daudé wrote: > Hi Gregory, > > On 9/25/20 4:00 PM, Auger Eric wrote: > > Hi Gregory, > > > > On 9/25/20 3:39 PM, Graeme Gregory wrote: > >> SMMUv3 has an error in previous patch where a i was transposed to a 1 > >> meaning interrupts woul

Re: [PATCH v1 1/5] virtio-mem: Probe THP size to determine default block size

2020-09-28 Thread David Hildenbrand
On 28.09.20 11:31, Pankaj Gupta wrote: Let's allow a minimum block size of 1 MiB in all configurations. Use a default block size based on the THP size, and warn if something smaller is configured by the user. VIRTIO_MEM only supports Linux (depends on LINUX), so we can prob

Re: [PATCH v26 04/17] vfio: Add migration region initialization and finalize function

2020-09-28 Thread Cornelia Huck
On Fri, 25 Sep 2020 14:20:06 -0600 Alex Williamson wrote: > On Wed, 23 Sep 2020 04:54:06 +0530 > Kirti Wankhede wrote: > > +int vfio_migration_probe(VFIODevice *vbasedev, Error **errp) > > +{ > > +struct vfio_region_info *info = NULL; > > Not sure this initialization is strictly necessar

Re: [PATCH 02/10] scsi: switch to bus->check_address

2020-09-28 Thread Stefan Hajnoczi
On Fri, Sep 25, 2020 at 01:25:56PM -0400, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > hw/scsi/scsi-bus.c | 122 - > 1 file changed, 75 insertions(+), 47 deletions(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signatu

Re: [PATCH v7 00/13] monitor: Optionally run handlers in coroutines

2020-09-28 Thread Kevin Wolf
Am 28.09.2020 um 10:46 hat Stefan Hajnoczi geschrieben: > On Fri, Sep 25, 2020 at 07:15:41PM +0200, Kevin Wolf wrote: > > Am 10.09.2020 um 15:24 hat Stefan Hajnoczi geschrieben: > > > On Wed, Sep 09, 2020 at 05:11:36PM +0200, Kevin Wolf wrote: > > > > Some QMP command handlers can block the main lo

[PATCH V12 0/8] mips: Add Loongson-3 machine support

2020-09-28 Thread Huacai Chen
Loongson-3 CPU family include Loongson-3A R1/R2/R3/R4 and Loongson-3B R1/R2. Loongson-3A R1 is the oldest and its ISA is the smallest, while Loongson-3A R4 is the newest and its ISA is almost the superset of all others. To reduce complexity, in QEMU we just define two CPU types: 1, "Loongson-3A100

[PATCH V12 1/8] linux-headers: Update MIPS KVM type defintition

2020-09-28 Thread Huacai Chen
Update MIPS KVM type defintition from Linux 5.9-rc6. Signed-off-by: Huacai Chen --- linux-headers/linux/kvm.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h index a28c366..36a480f 100644 --- a/linux-headers/linux/kvm

[PATCH V12 3/8] target/mips: Add loongson-ext lswc2 group of instructions (Part 1)

2020-09-28 Thread Huacai Chen
From: Jiaxun Yang LWC2 & SWC2 have been rewritten by Loongson EXT vendor ASE as "load/store quad word" and "shifted load/store" groups of instructions. This patch add implementation of these instructions: gslq: load 16 bytes to GPR gssq: store 16 bytes from GPR gslqc1: load 16 bytes to FPR gssqc

[PATCH V12 2/8] target/mips: Fix PageMask with variable page size

2020-09-28 Thread Huacai Chen
From: Jiaxun Yang Our current code assumed the target page size is always 4k when handling PageMask and VPN2, however, variable page size was just added to mips target and that's no longer true. Fixes: ee3863b9d414 ("target/mips: Support variable page size") Signed-off-by: Huacai Chen Signed-of

[PATCH V12 4/8] target/mips: Add loongson-ext lswc2 group of instructions (Part 2)

2020-09-28 Thread Huacai Chen
From: Jiaxun Yang LWC2 & SWC2 have been rewritten by Loongson EXT vendor ASE as "load/store quad word" and "shifted load/store" groups of instructions. This patch add implementation of these instructions: gslwlc1: similar to lwl but RT is FPR instead of GPR gslwrc1: similar to lwr but RT is FPR

[PATCH V12 5/8] target/mips: Add loongson-ext lsdc2 group of instructions

2020-09-28 Thread Huacai Chen
From: Jiaxun Yang LDC2/SDC2 opcodes have been rewritten as "load & store with offset" group of instructions by loongson-ext ASE. This patch add implementation of these instructions: gslbx: load 1 bytes to GPR gslhx: load 2 bytes to GPR gslwx: load 4 bytes to GPR gsldx: load 8 bytes to GPR gslwxc

[PATCH V12 6/8] hw/mips: Implement fw_cfg_arch_key_name()

2020-09-28 Thread Huacai Chen
Implement fw_cfg_arch_key_name(), which returns the name of a mips-specific key. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Huacai Chen Co-developed-by: Jiaxun Yang --- hw/mips/fw_cfg.c| 35 +++ hw/mips/fw_cfg.h| 19 +++ hw/mips/m

[PATCH V12 7/8] hw/mips: Add Loongson-3 machine support

2020-09-28 Thread Huacai Chen
Add Loongson-3 based machine support, it use liointc as the interrupt controler and use GPEX as the pci controller. Currently it can work with both TCG and KVM. As the machine model is not based on any exiting physical hardware, the name of the machine is "loongson3-virt". It may be superseded in

[PATCH V12 8/8] docs/system: Update MIPS machine documentation

2020-09-28 Thread Huacai Chen
Add Loongson-3A CPU models and Loongson-3 based machine description. Signed-off-by: Huacai Chen --- docs/system/cpu-models-mips.rst.inc | 10 -- docs/system/target-mips.rst | 10 ++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/docs/system/cpu-models-mip

RE: [PATCH v4] introduce vfio-user protocol specification

2020-09-28 Thread Thanos Makatos
> -Original Message- > From: Stefan Hajnoczi > Sent: 24 September 2020 09:22 > To: Thanos Makatos > Cc: qemu-devel@nongnu.org; Michael S. Tsirkin ; > alex.william...@redhat.com; benjamin.wal...@intel.com; > elena.ufimts...@oracle.com; jag.ra...@oracle.com; Swapnil Ingle > ; james.r.har

[PATCH] tests/venv: force compatible avocado-framework-plugin-result-html version

2020-09-28 Thread Gerd Hoffmann
Without this avocado doesn't start in case an incompatible avocado-framework-plugin-result-html version happens to be installed in system (/usr/lib) or user ($HOME/.local/lib) directory. Signed-off-by: Gerd Hoffmann --- tests/requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/t

Re: [External] Re: [PATCH] aspeed: Add support for the g220a-bmc board

2020-09-28 Thread Cédric Le Goater
>> Isn't it possible to add some default I2C devices ? temperature sensors ? > > hmm, G220A BMC uses emc1413 as the temperature sensor. I can not find > it in qemu. Could it be compatible with the tm105 or TM421 ? > I can't find an i2c chip that qemu has and that the g220a uses. :( Try to mode

[RFC PATCH v6 2/2] hw/misc/sifive_u_otp: Add backend drive support

2020-09-28 Thread Green Wan
Add '-drive' support to OTP device. Allow users to assign a raw file as OTP image. test commands for 16k otp.img filled with zero: dd if=/dev/zero of=./otp.img bs=1k count=16 ./qemu-system-riscv64 -M sifive_u -m 256M -nographic -bios none \ -kernel ../opensbi/build/platform/sifive/fu540/firmware/

[RFC PATCH v6 1/2] hw/misc/sifive_u_otp: Add write function and write-once protection

2020-09-28 Thread Green Wan
- Add write operation to update fuse data bit when PWE bit is on. - Add array, fuse_wo, to store the 'written' status for all bits of OTP to block the write operation. Signed-off-by: Green Wan Reviewed-by: Alistair Francis --- hw/misc/sifive_u_otp.c | 30 +++

[RFC PATCH v6 0/2] Add file-backed and write-once features to OTP

2020-09-28 Thread Green Wan
Changelogs: v5 to v6: - Rebase to latest. (sifive_u_otp.* are moved to hw/misc) - Put the example command to commit message. - Refine errp handle when check backend drive. - Remove unnecessary debug message. v4 to v5: - Change the patch order - Add write operation to update pdin to fuse[] bi

[PATCH] vfio-ccw: plug memory leak while getting region info

2020-09-28 Thread Cornelia Huck
vfio_get_dev_region_info() unconditionally allocates memory for a passed-in vfio_region_info structure (and does not re-use an already allocated structure). Therefore, we have to free the structure we pass to that function in vfio_ccw_get_region() for every region we successfully obtained informati

Re: [PATCH v7 12/13] block: Add bdrv_co_move_to_aio_context()

2020-09-28 Thread Kevin Wolf
Am 28.09.2020 um 10:59 hat Stefan Hajnoczi geschrieben: > On Fri, Sep 25, 2020 at 06:00:51PM +0200, Kevin Wolf wrote: > > Am 15.09.2020 um 16:31 hat Stefan Hajnoczi geschrieben: > > > On Wed, Sep 09, 2020 at 05:11:48PM +0200, Kevin Wolf wrote: > > > > Add a function to move the current coroutine to

Re: [PATCH v7 13/13] block: Convert 'block_resize' to coroutine

2020-09-28 Thread Kevin Wolf
Am 28.09.2020 um 11:05 hat Stefan Hajnoczi geschrieben: > On Fri, Sep 25, 2020 at 06:07:50PM +0200, Kevin Wolf wrote: > > Am 15.09.2020 um 16:57 hat Stefan Hajnoczi geschrieben: > > > On Wed, Sep 09, 2020 at 05:11:49PM +0200, Kevin Wolf wrote: > > > > @@ -2456,8 +2456,7 @@ void qmp_block_resize(boo

Re: [PATCH v7 07/13] monitor: Make current monitor a per-coroutine property

2020-09-28 Thread Kevin Wolf
Am 28.09.2020 um 09:47 hat Markus Armbruster geschrieben: > Kevin Wolf writes: > > > Am 14.09.2020 um 17:11 hat Markus Armbruster geschrieben: > >> Kevin Wolf writes: > >> > >> > This way, a monitor command handler will still be able to access the > >> > current monitor, but when it yields, all

Re: [PATCH] vfio-ccw: plug memory leak while getting region info

2020-09-28 Thread Eric Farman
On 9/28/20 6:17 AM, Cornelia Huck wrote: > vfio_get_dev_region_info() unconditionally allocates memory > for a passed-in vfio_region_info structure (and does not re-use > an already allocated structure). Therefore, we have to free > the structure we pass to that function in vfio_ccw_get_region()

[PATCH v3 06/12] microvm/pcie: add 64bit mmio window

2020-09-28 Thread Gerd Hoffmann
Place the 64bit window at the top of the physical address space, assign 25% of the avaiable address space. Force cpu.host-phys-bits=on for microvm machine typs so this actually works reliable. Signed-off-by: Gerd Hoffmann Reviewed-by: Michael S. Tsirkin --- hw/i386/microvm.c | 9 + 1 f

[PATCH v3 02/12] acpi: add acpi_dsdt_add_gpex

2020-09-28 Thread Gerd Hoffmann
Add helper function to generate dsdt aml code for the gpex pci host. Largely copied from arm/virt. Configuration is handled by passing a config struct instead of looked up from memory map. Signed-off-by: Gerd Hoffmann Reviewed-by: Michael S. Tsirkin --- include/hw/pci-host/gpex.h | 11 +++ hw

[PATCH v3 03/12] arm: use acpi_dsdt_add_gpex

2020-09-28 Thread Gerd Hoffmann
Fill gpex config struct from memory map, then call the new acpi_dsdt_add_gpex helper function. No functional change. Signed-off-by: Gerd Hoffmann Reviewed-by: Michael S. Tsirkin --- hw/arm/virt-acpi-build.c | 175 ++- 1 file changed, 9 insertions(+), 166 del

Re: [PATCH v5 09/14] hw/block/nvme: Support Zoned Namespace Command Set

2020-09-28 Thread Klaus Jensen
On Sep 28 11:35, Dmitry Fomichev wrote: > The emulation code has been changed to advertise NVM Command Set when > "zoned" device property is not set (default) and Zoned Namespace > Command Set otherwise. > > Handlers for three new NVMe commands introduced in Zoned Namespace > Command Set specifica

[PATCH v3 07/12] tests/acpi: allow updates for expected data files

2020-09-28 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann Reviewed-by: Michael S. Tsirkin --- tests/qtest/bios-tables-test-allowed-diff.h | 5 + 1 file changed, 5 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523c8bf4..53109c22a56f 100644

[PATCH v3 04/12] microvm: add irq table

2020-09-28 Thread Gerd Hoffmann
Add a comment with a table listing the IRQs, both legacy pc and microvm side-by-side. Signed-off-by: Gerd Hoffmann Reviewed-by: Michael S. Tsirkin --- include/hw/i386/microvm.h | 22 ++ 1 file changed, 22 insertions(+) diff --git a/include/hw/i386/microvm.h b/include/hw/i38

[PATCH v3 12/12] tests/acpi: update expected data files

2020-09-28 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann Reviewed-by: Michael S. Tsirkin --- tests/qtest/bios-tables-test-allowed-diff.h | 5 - tests/data/acpi/microvm/DSDT.pcie | Bin 0 -> 3023 bytes tests/data/acpi/virt/DSDT | Bin 5200 -> 5196 bytes tests/data/acpi/virt/DSDT.memhp

[PATCH v3 11/12] acpi/gpex: no reason to use a method for _CRS

2020-09-28 Thread Gerd Hoffmann
... just to return something which is constant anyway. -Method (_CRS, 0, NotSerialized) // _CRS: Current Resource Settings -{ -Return (ResourceTemplate () -{ -WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecod

Re: [PATCH 3/3] hw/qdev-clock: Display error hint when clock is missing from device

2020-09-28 Thread Damien Hedde
On 9/28/20 9:53 AM, Luc Michel wrote: > On 11:08 Sun 27 Sep , Philippe Mathieu-Daudé wrote: >> Instead of directly aborting, display a hint to help the developer >> figure out the problem (likely trying to connect a clock to a device >> pre-dating the Clock API, thus not expecting clocks). >

[PATCH v3 08/12] tests/acpi: add empty tests/data/acpi/microvm/DSDT.pcie file

2020-09-28 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann Reviewed-by: Michael S. Tsirkin --- tests/data/acpi/microvm/DSDT.pcie | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 tests/data/acpi/microvm/DSDT.pcie diff --git a/tests/data/acpi/microvm/DSDT.pcie b/tests/data/acpi/microvm/DSDT.pcie new f

[PATCH v3 10/12] tests/acpi: add microvm pcie test

2020-09-28 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann Reviewed-by: Michael S. Tsirkin --- tests/qtest/bios-tables-test.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index cc4579d914e7..bf34be5decf3 100644 --- a/tests/qtest/bios-tabl

[PATCH v3 01/12] move MemMapEntry

2020-09-28 Thread Gerd Hoffmann
It is defined twice already. Move to a common header file to remove duplication and make it available to everybody. Signed-off-by: Gerd Hoffmann Reviewed-by: Michael S. Tsirkin --- include/exec/hwaddr.h | 5 + include/hw/arm/virt.h | 5 - hw/arm/sbsa-ref.c | 5 - 3 files change

[PATCH v3 05/12] microvm: add pcie support

2020-09-28 Thread Gerd Hoffmann
Uses the existing gpex device which is also used as pcie host bridge on arm/aarch64. For now only a 32bit mmio window and no ioport support. It is disabled by default, use "-machine microvm,pcie=on" to enable. ACPI support must be enabled too because the bus is declared in the DSDT table. Signed

[PATCH v3 09/12] tests/acpi: factor out common microvm test setup

2020-09-28 Thread Gerd Hoffmann
... into new test_acpi_microvm_prepare helper Signed-off-by: Gerd Hoffmann Reviewed-by: Michael S. Tsirkin --- tests/qtest/bios-tables-test.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c inde

[PATCH v3 00/12] microvm: add pcie support

2020-09-28 Thread Gerd Hoffmann
v2: - move aml generator to gpex and have arm virt + microvm share it. - add 64bit window. - add testcase. v3: - fix testcase: force tcg, disable on i386. Gerd Hoffmann (12): move MemMapEntry acpi: add acpi_dsdt_add_gpex arm: use acpi_dsdt_add_gpex microvm: add irq table microvm: add

Re: [RFC PATCH 0/7] block-backend: Introduce I/O hang

2020-09-28 Thread Kevin Wolf
Am 27.09.2020 um 15:04 hat Ying Fang geschrieben: > A VM in the cloud environment may use a virutal disk as the backend storage, > and there are usually filesystems on the virtual block device. When backend > storage is temporarily down, any I/O issued to the virtual block device will > cause an er

Re: [PATCH v6] nvme: allow cmb and pmr emulation on same device

2020-09-28 Thread Klaus Jensen
On Jul 29 15:01, Andrzej Jakowski wrote: > Resending series recently posted on mailing list related to nvme device > extension with couple of fixes after review. > > This patch series does following: > - Fixes problem where CMBS bit was not set in controller capabilities >register, so support

Re: [PATCH 3/3] hw/qdev-clock: Display error hint when clock is missing from device

2020-09-28 Thread Edgar E. Iglesias
On Mon, Sep 28, 2020 at 12:45:15PM +0200, Damien Hedde wrote: > > > On 9/28/20 9:53 AM, Luc Michel wrote: > > On 11:08 Sun 27 Sep , Philippe Mathieu-Daudé wrote: > >> Instead of directly aborting, display a hint to help the developer > >> figure out the problem (likely trying to connect a clo

Re: [PATCH] pci: check bus pointer before dereference

2020-09-28 Thread P J P
Hello, +-- On Wed, 16 Sep 2020, Peter Maydell wrote --+ | On Wed, 16 Sep 2020 at 07:28, P J P wrote: | > -> https://ruhr-uni-bochum.sciebo.de/s/NNWP2GfwzYKeKwE?path=%2Flsi_nullptr1 | > ==1183858==Hint: address points to the zero page. | > #0 pci_change_irq_level hw/pci/pci.c:259 | > #1 pci_irq_

Re: [PATCH] tests/venv: force compatible avocado-framework-plugin-result-html version

2020-09-28 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200928100902.28638-1-kra...@redhat.com/ Hi, This series failed the docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #

Re: Outline for VHOST_USER_PROTOCOL_F_VDPA

2020-09-28 Thread Marc-André Lureau
Hi 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 device models. It is possible to go further by creating a > qemu-dev launc

Re: [PATCH v4 0/4] Introducing QMP query-netdev command

2020-09-28 Thread Alexey Kirillov
Ping 21.09.2020 22:19, Alexey Kirillov writes:> This patch series introduces a new QMP command "query-netdev" to get> information about currently attached backend network devices (netdevs).> Also, since the "info_str" field of "NetClientState" is now deprecated,> we no longer use it for netdevs, on

Re: [PATCH] vfio-ccw: plug memory leak while getting region info

2020-09-28 Thread Philippe Mathieu-Daudé
On 9/28/20 12:17 PM, Cornelia Huck wrote: > vfio_get_dev_region_info() unconditionally allocates memory > for a passed-in vfio_region_info structure (and does not re-use > an already allocated structure). Therefore, we have to free > the structure we pass to that function in vfio_ccw_get_region() >

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

2020-09-28 Thread Markus Armbruster
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 handler, so monitor_set_cur() needs to >> > be called in qmp_dispatch(). >>

Re: [RFC PATCH v6 0/2] Add file-backed and write-once features to OTP

2020-09-28 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200928101146.12786-1-green@sifive.com/ Hi, This series failed the docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN =

Re: [PATCH v2 02/38] qapi-gen: Separate arg-parsing from generation

2020-09-28 Thread Markus Armbruster
John Snow writes: > On 9/25/20 7:34 AM, Markus Armbruster wrote: >> Cleber Rosa writes: >> >>> On Tue, Sep 22, 2020 at 05:00:25PM -0400, John Snow wrote: This is a minor re-work of the entrypoint script. It isolates a generate() method from the actual command-line mechanism.

[PATCH v2 0/5] virtio-mem: block size and address-assignment optimizations

2020-09-28 Thread David Hildenbrand
Let's try to detect the actual THP size and use it as default block size (unless the page size of the backend indicates that THP don't apply). Always allow to set a block size of 1 MiB, but warn if the configured block size is smaller than the default. Handle large block sizes better, avoiding a vi

[PATCH v2 1/5] virtio-mem: Probe THP size to determine default block size

2020-09-28 Thread David Hildenbrand
Let's allow a minimum block size of 1 MiB in all configurations. Select the default block size based on - The page size of the memory backend. - The THP size if the memory backend size corresponds to the real hsot page size. - The global minimum of 1 MiB. and warn if something smaller is configur

[PATCH v2 4/5] memory-device: Add get_min_alignment() callback

2020-09-28 Thread David Hildenbrand
Add a callback that can be used to express additional alignment requirements (exceeding the ones from the memory region). Will be used by virtio-mem to express special alignment requirements due to manually configured, big block sizes (e.g., 1GB with an ordinary memory-backend-ram). This avoids fa

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

2020-09-28 Thread Markus Armbruster
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 need a one-liner > summary. They do! >

[PATCH v2 2/5] virtio-mem: Check that "memaddr" is multiples of the block size

2020-09-28 Thread David Hildenbrand
The spec requires us to set the "addr" in guest physical address space to multiples of the block size. In some cases, this is not the case right now: For example, when starting a VM with 4 GiB boot memory and a virtio-mem device with a block size of 2 GiB, "memaddr" will be auto-assigned to 0x14000

  1   2   3   4   >