Re: [PATCH v3 1/2] tpm: CRB: Use ram_device for "tpm-crb-cmd" region

2022-01-20 Thread Eric Auger
Hi Philippe, On 1/20/22 1:12 AM, Philippe Mathieu-Daudé wrote: > From: Eric Auger > > Representing the CRB cmd/response buffer as a standard > RAM region causes some trouble when the device is used > with VFIO. Indeed VFIO attempts to DMA_MAP this region > as usual RAM but this latter does not ha

Re: [PATCH v8 09/23] target/riscv: Implement AIA local interrupt priorities

2022-01-20 Thread Frank Chang
Anup Patel 於 2022年1月19日 週三 下午11:33寫道: > From: Anup Patel > > The AIA spec defines programmable 8-bit priority for each local interrupt > at M-level, S-level and VS-level so we extend local interrupt processing > to consider AIA interrupt priorities. The AIA CSRs which help software > configure l

Re: [PATCH 0/3] m68k: virt: fix reboot

2022-01-20 Thread Laurent Vivier
Le 15/01/2022 à 21:37, Laurent Vivier a écrit : This series fixes the reboot of the virt-m68k machine by correctly initializing the start address and fixing the ELF kernel image. The two first patches were already sent last year and never merged: https://patchwork.kernel.org/project/qemu-devel/

[PATCH] hw/nvme: fix CVE-2021-3929

2022-01-20 Thread Klaus Jensen
From: Klaus Jensen This fixes CVE-2021-3929 "locally" by denying DMA to the iomem of the device itself. This still allows DMA to MMIO regions of other devices (e.g. doing P2P DMA to the controller memory buffer of another NVMe device). Fixes: CVE-2021-3929 Reported-by: Qiuhao Li Signed-off-by:

Re: [PATCH v11 3/4] softmmu/dirtylimit: implement virtual CPU throttle

2022-01-20 Thread Hyman Huang
在 2022/1/17 15:32, Peter Xu 写道: On Wed, Jan 05, 2022 at 01:14:08AM +0800, huang...@chinatelecom.cn wrote: ## +# @DirtyLimitInfo: +# +# Dirty page rate limit information of virtual CPU. +# +# @cpu-index: index of virtual CPU. +# +# @limit-rate: upper limit of dirty page rate for virtual CPU.

Re: [PATCH v13 2/7] net/vmnet: add vmnet backends to qapi/net

2022-01-20 Thread Roman Bolshakov
On Thu, Jan 13, 2022 at 08:22:14PM +0300, Vladislav Yaroshchuk wrote: > Create separate netdevs for each vmnet operating mode: > - vmnet-host > - vmnet-shared > - vmnet-bridged > Sure I'm late to the party but what if we add only one backend - vmnet with default mode set to shared and all paramet

[PULL 1/3] exec/memory: Extract address_space_set() from dma_memory_set()

2022-01-20 Thread Laurent Vivier
From: Philippe Mathieu-Daudé dma_memory_set() does a DMA barrier, set the address space with a constant value. The constant value filling code is not specific to DMA and can be used for AddressSpace. Extract it as a new helper: address_space_set(). Signed-off-by: Philippe Mathieu-Daudé Reviewed

[PULL 2/3] hw/elf_ops: clear uninitialized segment space

2022-01-20 Thread Laurent Vivier
When the mem_size of the segment is bigger than the file_size, and if this space doesn't overlap another segment, it needs to be cleared. This bug is very similar to the one we had for linux-user, 22d113b52f41 ("linux-user: Fix loading of BSS segments"), where .bss section is encoded as an extensi

Re: [PATCH v8 18/23] hw/intc: Add RISC-V AIA APLIC device emulation

2022-01-20 Thread Frank Chang
On Thu, Jan 20, 2022 at 12:20 AM Anup Patel wrote: > Hi Frank, > > On Wed, Jan 19, 2022 at 9:07 PM Frank Chang > wrote: > > > > On Wed, Jan 19, 2022 at 11:27 PM Anup Patel wrote: > >> > >> From: Anup Patel > >> > >> The RISC-V AIA (Advanced Interrupt Architecture) defines a new > >> interrupt

[PULL 0/3] M68k for 7.0 patches

2022-01-20 Thread Laurent Vivier
tags/m68k-for-7.0-pull-request for you to fetch changes up to e48b140eef9775986cc18038c7bc68f8d2b7fe1d: m68k: virt: correctly set the initial PC (2022-01-20 09:09:37 +0100) m68k pull request 20220120 Fix virt-m

Re: MP tables do not report multiple CPUs in Qemu 6.2.0 on x86 when given -smp cpus=n flag

2022-01-20 Thread Igor Mammedov
On Wed, 19 Jan 2022 15:48:20 + Peter Maydell wrote: > On Wed, 19 Jan 2022 at 14:44, Godmar Back wrote: > > after upgrading to 6.2.0, I observed that code such as MIT's xv6 (see > > [1]) is no longer able to detect multiple CPUs. Their code works in > > 6.1.1, however. > > Hi; this isn't

[PULL 3/3] m68k: virt: correctly set the initial PC

2022-01-20 Thread Laurent Vivier
According to QEMU parameter, set initial PC to the entry of the loaded kernel. Signed-off-by: Laurent Vivier Message-Id: <20220115203725.3834712-4-laur...@vivier.eu> --- hw/m68k/virt.c | 22 +- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/hw/m68k/virt.c b/hw

[PATCH 1/1] Allow setting up to 8 bytes with the generic loader

2022-01-20 Thread Petr Tesarik
The documentation for the generic loader says that "the maximum size of the data is 8 bytes". However, attempts to set data-len=8 trigger the following assertion failure: ../hw/core/generic-loader.c:59: generic_loader_reset: Assertion `s->data_len < sizeof(s->data)' failed. The type of s->data i

Re: [PATCH v2] qapi: Cleanup SGX related comments and restore @section-size

2022-01-20 Thread Daniel P . Berrangé
On Wed, Jan 19, 2022 at 06:57:20PM -0500, Yang Zhong wrote: > The SGX NUMA patches were merged into Qemu 7.0 release, we need > clarify detailed version history information and also change > some related comments, which make SGX related comments clearer. > > The QMP command schema promises backwar

Re: [PATCH v2 5/5] python/aqmp: add socket bind step to legacy.py

2022-01-20 Thread Daniel P . Berrangé
On Wed, Jan 19, 2022 at 02:39:16PM -0500, John Snow wrote: > The old QMP library would actually bind to the server address during > __init__(). The new library delays this to the accept() call, because > binding occurs inside of the call to start_[unix_]server(), which is an > async method -- so it

Re: [PATCH V2 for-6.2 0/2] fixes for bdrv_co_block_status

2022-01-20 Thread Peter Lieven
Am 19.01.22 um 15:57 schrieb Stefano Garzarella: > On Fri, Jan 14, 2022 at 11:58:40AM +0100, Ilya Dryomov wrote: >> On Thu, Jan 13, 2022 at 3:44 PM Peter Lieven wrote: >>> >>> V1->V2: >>>  Patch 1: Treat a hole just like an unallocated area. [Ilya] >>>  Patch 2: Apply workaround only for pre-Quinc

Re: [PATCH v2] qapi: Cleanup SGX related comments and restore @section-size

2022-01-20 Thread Yang Zhong
On Thu, Jan 20, 2022 at 09:10:34AM +, Daniel P. Berrangé wrote: > On Wed, Jan 19, 2022 at 06:57:20PM -0500, Yang Zhong wrote: > > The SGX NUMA patches were merged into Qemu 7.0 release, we need > > clarify detailed version history information and also change > > some related comments, which mak

Re: [PATCH v11 3/4] softmmu/dirtylimit: implement virtual CPU throttle

2022-01-20 Thread Peter Xu
On Thu, Jan 20, 2022 at 04:26:09PM +0800, Hyman Huang wrote: > Hi,Peter. I'm working on this problem and found the reason is kind of the > same as i metioned in cover letter of v10, the following is what i posted: > > 2. The new implementaion of throttle algo enlightened by Peter > responds

Re: [PATCH] exec/cpu: Make host pages variables / macros 'target agnostic'

2022-01-20 Thread David Hildenbrand
On 20.01.22 01:08, Philippe Mathieu-Daudé wrote: > "host" pages are related to the *host* not the *target*, > thus the qemu_host_page_size / qemu_host_page_mask variables > and the HOST_PAGE_ALIGN() / REAL_HOST_PAGE_ALIGN() macros > can be moved to "exec/cpu-common.h" which is target agnostic. > >

Re: Fwd: VirtioSound device emulation implementation

2022-01-20 Thread Laurent Vivier
Le 29/12/2021 à 06:52, Shreyansh Chouhan a écrit : Hi, I am sorry for the absence of activity on this. A couple of people very close to me died, and I also got busy with the linux kernel mentorship program for a while. It was a weird year. But I am back on this now. I have the basic function

Re: [PATCH v2 00/14] target/ppc: powerpc_excp improvements [40x] (3/n)

2022-01-20 Thread Cédric Le Goater
On 1/18/22 19:44, Fabiano Rosas wrote: changes from v1: - New patch that renames MSR_POW to MSR_WE for the 405. - New patch that adds just MSR_ME to the msr_mask. - New patches to cleanup exceptions I missed the first time around. - Dropped the patch that added all the missing MSR bits. We ha

Re: [PATCH v11 3/4] softmmu/dirtylimit: implement virtual CPU throttle

2022-01-20 Thread Peter Xu
On Thu, Jan 20, 2022 at 06:39:01PM +0800, Hyman Huang wrote: > > It only runs once per second so it shouldn't bring a lot of differences, but > > I'm also wondering whether we should also turn that temporarily off too when > > dirtylimit is enabled - we can simply let it keep sleeping if dirtylimit

Re: MP tables do not report multiple CPUs in Qemu 6.2.0 on x86 when given -smp cpus=n flag

2022-01-20 Thread Ani Sinha
On Thu, 20 Jan 2022, Ani Sinha wrote: > +qemu-devel > > On Thu, 20 Jan 2022, Ani Sinha wrote: > > > > > > > On Wed, 19 Jan 2022, Peter Maydell wrote: > > > > > On Wed, 19 Jan 2022 at 14:44, Godmar Back wrote: > > > > after upgrading to 6.2.0, I observed that code such as MIT's xv6 (see > > > >

Re: [PATCH v2] qapi: Cleanup SGX related comments and restore @section-size

2022-01-20 Thread Daniel P . Berrangé
On Thu, Jan 20, 2022 at 05:16:01PM +0800, Yang Zhong wrote: > On Thu, Jan 20, 2022 at 09:10:34AM +, Daniel P. Berrangé wrote: > > On Wed, Jan 19, 2022 at 06:57:20PM -0500, Yang Zhong wrote: > > > The SGX NUMA patches were merged into Qemu 7.0 release, we need > > > clarify detailed version hist

Re: [PATCH v11 3/4] softmmu/dirtylimit: implement virtual CPU throttle

2022-01-20 Thread Peter Xu
On Thu, Jan 20, 2022 at 06:03:45PM +0800, Hyman Huang wrote: > > > 在 2022/1/20 17:25, Peter Xu 写道: > > On Thu, Jan 20, 2022 at 04:26:09PM +0800, Hyman Huang wrote: > > > Hi,Peter. I'm working on this problem and found the reason is kind of the > > > same as i metioned in cover letter of v10, the

Re: [PATCH 1/1] Allow setting up to 8 bytes with the generic loader

2022-01-20 Thread Philippe Mathieu-Daudé via
On 1/20/22 10:27, Petr Tesarik wrote: > The documentation for the generic loader says that "the maximum size of > the data is 8 bytes". However, attempts to set data-len=8 trigger the > following assertion failure: > > ../hw/core/generic-loader.c:59: generic_loader_reset: Assertion `s->data_len >

[PATCH v2 3/6] tests/lcitool: Install libibumad to cover RDMA on Debian based distros

2022-01-20 Thread Philippe Mathieu-Daudé via
On Debian we also need libibumad to enable RDMA: $ ../configure --enable-rdma ERROR: OpenFabrics librdmacm/libibverbs/libibumad not present. Your options: (1) Fast: Install infiniband packages (devel) from your distro. (2) Cleanest: Install libraries from www.

Re: [PATCH] Remove unnecessary minimum_version_id_old fields

2022-01-20 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > The migration code will not look at a VMStateDescription's > minimum_version_id_old field unless that VMSD has set the > load_state_old field to something non-NULL. (The purpose of > minimum_version_id_old is to specify what migration version is

[PATCH v2 1/6] MAINTAINERS: Cover lcitool submodule with build test / automation

2022-01-20 Thread Philippe Mathieu-Daudé via
lcitool is used by build test / automation, we want maintainers to get notified if the submodule is updated. Reviewed-by: Daniel P. Berrangé Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 893a5567100..fb7

Re: MP tables do not report multiple CPUs in Qemu 6.2.0 on x86 when given -smp cpus=n flag

2022-01-20 Thread Ani Sinha
+qemu-devel On Thu, 20 Jan 2022, Ani Sinha wrote: > > > On Wed, 19 Jan 2022, Peter Maydell wrote: > > > On Wed, 19 Jan 2022 at 14:44, Godmar Back wrote: > > > after upgrading to 6.2.0, I observed that code such as MIT's xv6 (see > > > [1]) is no longer able to detect multiple CPUs. Their code w

Re: [RFC PATCH v3 1/3] hw/intc/arm_gicv3: Check for !MEMTX_OK instead of MEMTX_ERROR

2022-01-20 Thread Peter Maydell
On Wed, 19 Jan 2022 at 17:34, Philippe Mathieu-Daudé wrote: > > Hi Peter, > > Can you take this single patch via your arm tree? Sure. Applied to target-arm.next, thanks. -- PMM

Re: [PATCH v2 3/3] roms/opensbi: Remove ELF images

2022-01-20 Thread Anup Patel
On Wed, Jan 19, 2022 at 12:26 PM Bin Meng wrote: > > On Tue, Jan 18, 2022 at 7:18 PM Anup Patel wrote: > > > > Now that all RISC-V machines can use OpenSBI BIN images, we remove > > OpenSBI ELF images and also exclude these images from BIOS build. > > > > Signed-off-by: Anup Patel > > --- > > p

Re: [PATCH v2 6/6] tests: Manually remove libxml2 on MSYS2 targets

2022-01-20 Thread Philippe Mathieu-Daudé via
Oops, 's/targets/runners/' in Subject... On 1/20/22 12:05, Philippe Mathieu-Daudé wrote: > lcitool doesn't support MSYS2 targets, so manually remove > this now unnecessary library. > > Signed-off-by: Philippe Mathieu-Daudé > --- > .cirrus.yml | 1 - > .gitlab-ci.d/windows.yml | 2 -

Re: [PATCH 0/2] virtio: Add vhost-user-gpio device's support

2022-01-20 Thread Michael S. Tsirkin
On Thu, Jan 20, 2022 at 09:32:34AM +0530, Viresh Kumar wrote: > On 17-01-22, 10:11, Alex Bennée wrote: > > > > "Michael S. Tsirkin" writes: > > > > > On Wed, Jan 12, 2022 at 05:04:57PM +0530, Viresh Kumar wrote: > > >> Hello, > > >> > > >> This patchset adds vhost-user-gpio device's support in

Re: [PATCH v11 3/4] softmmu/dirtylimit: implement virtual CPU throttle

2022-01-20 Thread Hyman Huang
在 2022/1/20 17:25, Peter Xu 写道: On Thu, Jan 20, 2022 at 04:26:09PM +0800, Hyman Huang wrote: Hi,Peter. I'm working on this problem and found the reason is kind of the same as i metioned in cover letter of v10, the following is what i posted: 2. The new implementaion of throttle algo enlig

Re: [PATCH v2 5/6] tests/lcitool: Remove libxml2

2022-01-20 Thread Daniel P . Berrangé
On Thu, Jan 20, 2022 at 12:05:44PM +0100, Philippe Mathieu-Daudé wrote: > The previous commit removed all uses of libxml2. > > Signed-off-by: Philippe Mathieu-Daudé > --- > tests/docker/dockerfiles/alpine.docker| 1 - > tests/docker/dockerfiles/centos8.docker | 1 - > tests/docker/

Re: [RESEND] target/riscv: fix RV128 lq encoding

2022-01-20 Thread Christoph Müllner
Hi Frédéric, you are right, I misunderstood the "LQ is added to the MISC-MEM major opcode" part of the spec. I saw the encoding conflict with the CBO instructions and thought of a bug in qemu's LQ encoding. Philipp already highlighted that cbo.* instructions are actually LQ with rd=0. Thanks, Chr

[PATCH v2 0/6] tests: Refresh lcitool submodule & remove libxml2

2022-01-20 Thread Philippe Mathieu-Daudé via
Refresh lcitool to latest and remove libxml2 (mjt). v2: - rebased (testing/next) - include mjt's libxml2 removal patch Supersedes: <20220110124638.610145-1-f4...@amsat.org> Michael Tokarev (1): drop libxml2 checks since libxml is not actually used (for parallels) Philippe Mathieu-Daudé (5):

Re: [PATCH v2 6/6] tests: Manually remove libxml2 on MSYS2 targets

2022-01-20 Thread Daniel P . Berrangé
On Thu, Jan 20, 2022 at 12:05:45PM +0100, Philippe Mathieu-Daudé wrote: > lcitool doesn't support MSYS2 targets, so manually remove > this now unnecessary library. > > Signed-off-by: Philippe Mathieu-Daudé > --- > .cirrus.yml | 1 - > .gitlab-ci.d/windows.yml | 2 -- > 2 files chang

Re: [PATCH v11 3/4] softmmu/dirtylimit: implement virtual CPU throttle

2022-01-20 Thread Hyman Huang
在 2022/1/20 18:56, Peter Xu 写道: On Thu, Jan 20, 2022 at 06:39:01PM +0800, Hyman Huang wrote: It only runs once per second so it shouldn't bring a lot of differences, but I'm also wondering whether we should also turn that temporarily off too when dirtylimit is enabled - we can simply let it k

[PATCH v2 5/6] tests/lcitool: Remove libxml2

2022-01-20 Thread Philippe Mathieu-Daudé via
The previous commit removed all uses of libxml2. Signed-off-by: Philippe Mathieu-Daudé --- tests/docker/dockerfiles/alpine.docker| 1 - tests/docker/dockerfiles/centos8.docker | 1 - tests/docker/dockerfiles/fedora.docker| 1 - tests/docker/dockerfiles/opensuse-leap.docker

Re: [PATCH 0/2] Improved support for AMD SEV firmware loading

2022-01-20 Thread Daniel P . Berrangé
On Mon, Jan 17, 2022 at 06:12:50AM -0600, Brijesh Singh wrote: > > On 1/17/22 1:34 AM, Dov Murik wrote: > > [+cc Tom, Brijesh, Ashish - see SEV-related changes in this series] > > > > > > On 13/01/2022 18:55, Daniel P. Berrangé wrote: > >> The AMD SEV build of EDK2 only emits a single file, intend

[PATCH v2 2/6] tests: Refresh lcitool submodule

2022-01-20 Thread Philippe Mathieu-Daudé via
Refresh lcitool submodule and the generated files by running: $ make lcitool-refresh Reviewed-by: Daniel P. Berrangé Signed-off-by: Philippe Mathieu-Daudé --- tests/docker/dockerfiles/alpine.docker| 3 ++- tests/docker/dockerfiles/centos8.docker | 3 +-- tests/docker/dockerfile

Re: [PATCH v2 5/6] tests/lcitool: Remove libxml2

2022-01-20 Thread Philippe Mathieu-Daudé via
(+Andrea) On 1/20/22 12:18, Philippe Mathieu-Daudé wrote: > On 1/20/22 12:14, Daniel P. Berrangé wrote: >> On Thu, Jan 20, 2022 at 12:05:44PM +0100, Philippe Mathieu-Daudé wrote: >>> The previous commit removed all uses of libxml2. >>> >>> Signed-off-by: Philippe Mathieu-Daudé >>> --- >>> tests/

Re: Cross Architecture Kernel Modules?

2022-01-20 Thread Peter Maydell
On Wed, 19 Jan 2022 at 19:53, Kenneth Adam Miller wrote: > > The source for it isn't available in order that it be compiled to the desired > architecture. In general kernel modules need to be built not just for the right architecture but even for the specific kernel version you're going to load

[PATCH v2 6/6] tests: Manually remove libxml2 on MSYS2 targets

2022-01-20 Thread Philippe Mathieu-Daudé via
lcitool doesn't support MSYS2 targets, so manually remove this now unnecessary library. Signed-off-by: Philippe Mathieu-Daudé --- .cirrus.yml | 1 - .gitlab-ci.d/windows.yml | 2 -- 2 files changed, 3 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 02c43a074a1..7552d70974

Re: [PATCH v11 3/4] softmmu/dirtylimit: implement virtual CPU throttle

2022-01-20 Thread Hyman Huang
在 2022/1/19 20:16, Markus Armbruster 写道: huang...@chinatelecom.cn writes: From: Hyman Huang(黄勇) Setup a negative feedback system when vCPU thread handling KVM_EXIT_DIRTY_RING_FULL exit by introducing throttle_us_per_full field in struct CPUState. Sleep throttle_us_per_full microseconds to

Re: Cross Architecture Kernel Modules?

2022-01-20 Thread Alex Bennée
Kenneth Adam Miller writes: > Would it be possible somehow to save the TCG cache, as with user binaries, > but for a kernel module, before then loading that kernel > module into memory the target architecture whether in or outside of > QEMU? OK let me stop you right there - TCG generated code

Re: [PATCH 0/2] virtio: Add vhost-user-gpio device's support

2022-01-20 Thread Michael S. Tsirkin
On Mon, Jan 17, 2022 at 10:11:21AM +, Alex Bennée wrote: > > "Michael S. Tsirkin" writes: > > > On Wed, Jan 12, 2022 at 05:04:57PM +0530, Viresh Kumar wrote: > >> Hello, > >> > >> This patchset adds vhost-user-gpio device's support in Qemu. The support > >> for the > >> same has already be

[PATCH v11 2/8] virtio: add vhost support for virtio devices

2022-01-20 Thread Jonah Palmer
This patch adds a get_vhost() callback function for VirtIODevices that returns the device's corresponding vhost_dev structure, if the vhost device is running. This patch also adds a vhost_started flag for VirtIODevices. Previously, a VirtIODevice wouldn't be able to tell if its corresponding vhost

[PATCH] target/ppc: 603: fix restore of GPRs 0-3 on rfi

2022-01-20 Thread Christophe Leroy
After a TLB miss exception, GPRs 0-3 must be restored on rfi. This is managed by hreg_store_msr() which is called by do_rfi() However, hreg_store_msr() does it if MSR[TGPR] is unset in the passed MSR value. The problem is that do_rfi() is given the content of SRR1 as the value to be set in MSR,

[PATCH v3 0/7] tests: Refresh lcitool submodule & remove libxml2

2022-01-20 Thread Philippe Mathieu-Daudé via
Refresh lcitool to latest and remove libxml2 (mjt). v3: - fix 'refresh' helper to update cirrus-ci files (danpb) v2: - rebased (testing/next) - include mjt's libxml2 removal patch Michael Tokarev (1): drop libxml2 checks since libxml is not actually used (for parallels) Philippe Mathieu-Daudé

Re: [PATCH v2 3/6] tests/lcitool: Install libibumad to cover RDMA on Debian based distros

2022-01-20 Thread Daniel P . Berrangé
On Thu, Jan 20, 2022 at 12:05:42PM +0100, Philippe Mathieu-Daudé wrote: > On Debian we also need libibumad to enable RDMA: > > $ ../configure --enable-rdma > > ERROR: OpenFabrics librdmacm/libibverbs/libibumad not present. > Your options: >(1) Fast: Install infiniband p

[PATCH v3 6/7] tests/lcitool: Remove libxml2

2022-01-20 Thread Philippe Mathieu-Daudé via
The previous commit removed all uses of libxml2. Update lcitool's qemu.yml and refresh the generated files by running: $ make lcitool-refresh Signed-off-by: Philippe Mathieu-Daudé --- .gitlab-ci.d/cirrus/freebsd-12.vars | 2 +- .gitlab-ci.d/cirrus/freebsd-13.vars | 2 +-

Re: [PATCH v11 3/4] softmmu/dirtylimit: implement virtual CPU throttle

2022-01-20 Thread Hyman Huang
在 2022/1/20 17:25, Peter Xu 写道: ... I think what you explained makes sense to me. Note that there's also the reaper thread running in the background that can reap all the cores too. It only runs once per second so it shouldn't bring a lot of differences, but I'm also wondering whether we s

Re: [PATCH v11 3/4] softmmu/dirtylimit: implement virtual CPU throttle

2022-01-20 Thread Peter Xu
On Thu, Jan 20, 2022 at 07:03:30PM +0800, Hyman Huang wrote: > Ok, i'll try this out. You could even add a unit test if you want: see test_migrate_auto_converge() in migration-test.c. -- Peter Xu

[PATCH v11 4/8] qmp: add QMP command x-query-virtio-status

2022-01-20 Thread Jonah Palmer
From: Laurent Vivier This new command shows the status of a VirtIODevice, including its corresponding vhost device's status (if active). Next patch will improve output by decoding feature bits, including vhost device's feature bits (backend, protocol, acked, and features). Also will decode statu

[PATCH v11 7/8] qmp: add QMP command x-query-virtio-queue-element

2022-01-20 Thread Jonah Palmer
From: Laurent Vivier This new command shows the information of a VirtQueue element. [Note: Up until v10 of this patch series, virtio.json had many (15+) enums defined (e.g. decoded device features, statuses, etc.). In v10 most of these enums were removed and replaced with string literals. By

Re: [PATCH v2 5/6] tests/lcitool: Remove libxml2

2022-01-20 Thread Philippe Mathieu-Daudé via
On 1/20/22 12:05, Philippe Mathieu-Daudé wrote: > The previous commit removed all uses of libxml2. Here I will amend: Update lcitool's qemu.yml and refresh the generated files by running: $ make lcitool-refresh > Signed-off-by: Philippe Mathieu-Daudé > --- > tests/docker/dockerfiles/alp

[PATCH v2 4/6] drop libxml2 checks since libxml is not actually used (for parallels)

2022-01-20 Thread Philippe Mathieu-Daudé via
From: Michael Tokarev For a long time, we assumed that libxml2 is neecessary for parallels block format support (block/parallels*). However, this format actually does not use libxml [*]. Since this is the only user of libxml2 in while qemu tree, we can drop all libxml2 checks and dependencies too

[PATCH v11 6/8] qmp: add QMP commands for virtio/vhost queue-status

2022-01-20 Thread Jonah Palmer
From: Laurent Vivier These new commands show the internal status of a VirtIODevice's VirtQueue and a vhost device's vhost_virtqueue (if active). Signed-off-by: Jonah Palmer --- hw/virtio/virtio-stub.c | 14 +++ hw/virtio/virtio.c | 103 qapi/virtio.json| 252

Re: [PATCH v2 5/6] tests/lcitool: Remove libxml2

2022-01-20 Thread Daniel P . Berrangé
On Thu, Jan 20, 2022 at 12:21:01PM +0100, Philippe Mathieu-Daudé wrote: > (+Andrea) > > On 1/20/22 12:18, Philippe Mathieu-Daudé wrote: > > On 1/20/22 12:14, Daniel P. Berrangé wrote: > >> On Thu, Jan 20, 2022 at 12:05:44PM +0100, Philippe Mathieu-Daudé wrote: > >>> The previous commit removed all

[PATCH v11 8/8] hmp: add virtio commands

2022-01-20 Thread Jonah Palmer
From: Laurent Vivier This patch implements the HMP versions of the virtio QMP commands. Signed-off-by: Jonah Palmer --- hmp-commands-info.hx | 70 include/monitor/hmp.h | 5 + monitor/hmp-cmds.c| 311 ++ 3 files changed, 386

Re: [PATCH v2 5/6] tests/lcitool: Remove libxml2

2022-01-20 Thread Philippe Mathieu-Daudé via
On 1/20/22 12:14, Daniel P. Berrangé wrote: > On Thu, Jan 20, 2022 at 12:05:44PM +0100, Philippe Mathieu-Daudé wrote: >> The previous commit removed all uses of libxml2. >> >> Signed-off-by: Philippe Mathieu-Daudé >> --- >> tests/docker/dockerfiles/alpine.docker| 1 - >> tests/docker/dock

[PATCH v2 4/4] check-block: replace -makecheck with TAP output

2022-01-20 Thread Paolo Bonzini
Let "meson test" take care of showing the results of the individual tests, consistently with other output from "make check V=1". Signed-off-by: Paolo Bonzini --- tests/check-block.sh | 6 ++-- tests/qemu-iotests/check | 6 ++-- tests/qemu-iotests/meson.build | 1 + tests

[PATCH v11 0/8] hmp,qmp: Add commands to introspect virtio devices

2022-01-20 Thread Jonah Palmer
This series introduces new QMP/HMP commands to dump the status of a virtio device at different levels. [Jonah: Rebasing from previous patchset from Dec. 9 (v10). Original patches are by Laurnet Vivier from May 2020. Rebase from v10 to v11 mainly includes a check when querying or gathering any

[PATCH v3 5/7] drop libxml2 checks since libxml is not actually used (for parallels)

2022-01-20 Thread Philippe Mathieu-Daudé via
From: Michael Tokarev For a long time, we assumed that libxml2 is neecessary for parallels block format support (block/parallels*). However, this format actually does not use libxml [*]. Since this is the only user of libxml2 in while qemu tree, we can drop all libxml2 checks and dependencies too

[PATCH v3 7/7] tests: Manually remove libxml2 on MSYS2 runners

2022-01-20 Thread Philippe Mathieu-Daudé via
lcitool doesn't support MSYS2 targets, so manually remove this now unnecessary library. Reviewed-by: Daniel P. Berrangé Signed-off-by: Philippe Mathieu-Daudé --- .cirrus.yml | 1 - .gitlab-ci.d/windows.yml | 2 -- 2 files changed, 3 deletions(-) diff --git a/.cirrus.yml b/.cirrus.

Re: [PATCH v3 2/7] tests/lcitool: Include local qemu.yml when refreshing cirrus-ci files

2022-01-20 Thread Daniel P . Berrangé
On Thu, Jan 20, 2022 at 12:30:11PM +0100, Philippe Mathieu-Daudé wrote: > The script only include the local qemu.yml for Dockerfiles. > Since we want to keep the Cirrus-CI generated files in sync, > also use the --data-dir option in generate_cirrus(). > > Fixes: c45a540f4bd (".gitlab-ci.d/cirrus:

[PATCH v3 4/7] tests/lcitool: Install libibumad to cover RDMA on Debian based distros

2022-01-20 Thread Philippe Mathieu-Daudé via
On Debian we also need libibumad to enable RDMA: $ ../configure --enable-rdma ERROR: OpenFabrics librdmacm/libibverbs/libibumad not present. Your options: (1) Fast: Install infiniband packages (devel) from your distro. (2) Cleanest: Install libraries from www.

[PATCH v3 3/7] tests: Refresh lcitool submodule

2022-01-20 Thread Philippe Mathieu-Daudé via
Refresh lcitool submodule and the generated files by running: $ make lcitool-refresh Reviewed-by: Daniel P. Berrangé Signed-off-by: Philippe Mathieu-Daudé --- .gitlab-ci.d/cirrus/freebsd-12.vars | 2 +- .gitlab-ci.d/cirrus/freebsd-13.vars | 2 +- tests/docker/dockerfiles/

[PATCH v11 5/8] qmp: decode feature & status bits in virtio-status

2022-01-20 Thread Jonah Palmer
From: Laurent Vivier Display feature names instead of bitmaps for host, guest, and backend for VirtIODevices. Display status names instead of bitmaps for VirtIODevices. Display feature names instead of bitmaps for backend, protocol, acked, and features (hdev->features) for vhost devices. Decod

[PATCH v11 1/8] virtio: drop name parameter for virtio_init()

2022-01-20 Thread Jonah Palmer
This patch drops the name parameter for the virtio_init function. The pair between the numeric device ID and the string device ID (name) of a virtio device already exists, but not in a way that lets us map between them. This patch lets us do this and removes the need for the name parameter in the

[PATCH v3 1/7] MAINTAINERS: Cover lcitool submodule with build test / automation

2022-01-20 Thread Philippe Mathieu-Daudé via
lcitool is used by build test / automation, we want maintainers to get notified if the submodule is updated. Reviewed-by: Daniel P. Berrangé Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 893a5567100..fb7

[PATCH v3 2/7] tests/lcitool: Include local qemu.yml when refreshing cirrus-ci files

2022-01-20 Thread Philippe Mathieu-Daudé via
The script only include the local qemu.yml for Dockerfiles. Since we want to keep the Cirrus-CI generated files in sync, also use the --data-dir option in generate_cirrus(). Fixes: c45a540f4bd (".gitlab-ci.d/cirrus: auto-generate variables with lcitool") Reported-by: Daniel P. Berrangé Signed-off

[PATCH v2 1/4] scripts/mtest2make: add support for SPEED=thorough

2022-01-20 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- meson.build | 5 +++-- scripts/mtest2make.py | 10 +++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/meson.build b/meson.build index 97c6fd6f1b..dcd2a1d5e3 100644 --- a/meson.build +++ b/meson.build @@ -3,8 +3,9 @@ project('qemu

[PATCH v3 1/3] hw/riscv: spike: Allow using binary firmware as bios

2022-01-20 Thread Anup Patel
Currently, we have to use OpenSBI firmware ELF as bios for the spike machine because the HTIF console requires ELF for parsing "fromhost" and "tohost" symbols. The latest OpenSBI can now optionally pick-up HTIF register address from HTIF DT node so using this feature spike machine can now use Open

[PATCH v11 3/8] qmp: add QMP command x-query-virtio

2022-01-20 Thread Jonah Palmer
From: Laurent Vivier This new command lists all the instances of VirtIODevices with their canonical QOM path and name. [Jonah: @virtio_list duplicates information that already exists in the QOM composition tree. However, extracting necessary information from this tree seems to be a bit convolu

[PATCH v2 0/4] make check-block a meson test

2022-01-20 Thread Paolo Bonzini
This series makes "meson test" run the block layer tests, reporting their outcome in the same way as the other TAP tests. Based-on: <20211223183933.1497037-1-vsement...@virtuozzo.com> v1->v2: make qcow2 the "quick" test, skip on Windows Paolo Bonzini (4): scripts/mtest2make: add support for SP

[PATCH v3 2/3] hw/riscv: Remove macros for ELF BIOS image names

2022-01-20 Thread Anup Patel
Now that RISC-V Spike machine can use BIN BIOS images, we remove the macros used for ELF BIOS image names. Signed-off-by: Anup Patel Reviewed-by: Alistair Francis Reviewed-by: Bin Meng --- hw/riscv/spike.c| 4 ++-- include/hw/riscv/boot.h | 2 -- 2 files changed, 2 insertions(+), 4 del

[PATCH v2 2/4] build: make check-block a meson test

2022-01-20 Thread Paolo Bonzini
"meson test" can be asked to run tests verbosely; this makes it usable also for qemu-iotests's own harness, and it lets "make check-block" reuse mtest2make.py's infrastructure to find and build test dependencies. Adjust check-block.sh to use the standard exit code that reports a test as skipped.

[PATCH v2 3/4] qemu-iotests: require at least an argument to check-block.sh

2022-01-20 Thread Paolo Bonzini
This is anyway how check-block.sh is used in practice, and by removing the list of formats in the script we avoid duplication between meson.build and check-block.sh. Signed-off-by: Paolo Bonzini --- tests/check-block.sh | 21 + 1 file changed, 9 insertions(+), 12 deletions(-)

Re: [PATCH v3 6/7] tests/lcitool: Remove libxml2

2022-01-20 Thread Daniel P . Berrangé
On Thu, Jan 20, 2022 at 12:30:15PM +0100, Philippe Mathieu-Daudé wrote: > The previous commit removed all uses of libxml2. > > Update lcitool's qemu.yml and refresh the generated files by running: > > $ make lcitool-refresh > > Signed-off-by: Philippe Mathieu-Daudé > --- > .gitlab-ci.d/cirru

Re: [PATCH] Add --with-branding-prefix and QEMU_BRANDING_PREFIX

2022-01-20 Thread Liviu Ionescu
> On 20 Jan 2022, at 13:35, Liviu Ionescu wrote: > > It is usual for various distributions to identify themselves by > prepending a string to the greeting message, for example > 'xPack QEMU emulator version 6.2.0 (v6.2.0-2-xpack-arm)'. > > To achieve this, a new configuration option (--with-b

Re: [PATCH v2 5/6] tests/lcitool: Remove libxml2

2022-01-20 Thread Daniel P . Berrangé
On Thu, Jan 20, 2022 at 12:18:34PM +0100, Philippe Mathieu-Daudé wrote: > On 1/20/22 12:14, Daniel P. Berrangé wrote: > > On Thu, Jan 20, 2022 at 12:05:44PM +0100, Philippe Mathieu-Daudé wrote: > >> The previous commit removed all uses of libxml2. > >> > >> Signed-off-by: Philippe Mathieu-Daudé >

Re: [PATCH v8 18/23] hw/intc: Add RISC-V AIA APLIC device emulation

2022-01-20 Thread Anup Patel
On Thu, Jan 20, 2022 at 1:49 PM Frank Chang wrote: > > On Thu, Jan 20, 2022 at 12:20 AM Anup Patel wrote: >> >> Hi Frank, >> >> On Wed, Jan 19, 2022 at 9:07 PM Frank Chang wrote: >> > >> > On Wed, Jan 19, 2022 at 11:27 PM Anup Patel wrote: >> >> >> >> From: Anup Patel >> >> >> >> The RISC-V AI

[PATCH] Add --with-branding-prefix and QEMU_BRANDING_PREFIX

2022-01-20 Thread Liviu Ionescu
It is usual for various distributions to identify themselves by prepending a string to the greeting message, for example 'xPack QEMU emulator version 6.2.0 (v6.2.0-2-xpack-arm)'. To achieve this, a new configuration option (--with-branding-prefix=) was added, which, if not empty, adds a string pre

[PATCH v3 0/3] Improve RISC-V spike machine bios support

2022-01-20 Thread Anup Patel
This series aims at improving RISC-V spike machine BIOS support by allowing use of binary firmware as bios. Further, this also allows us to totally remove the ELF bios images shipped with QEMU RISC-V. These patches can also be found in riscv_spike_imp_v3 branch at: https://github.com/avpatel/qemu.

[PATCH v8 00/23] Support UXL filed in xstatus

2022-01-20 Thread LIU Zhiwei
In this patch set, we process the pc reigsters writes, gdb reads and writes, and address calculation under different UXLEN settings. The patch set v8 has been tested by running rv64 Linux with rv32 rootfs in compat mode. You can almost follow the test [1] given by GuoRen, except using the branch

Re: MP tables do not report multiple CPUs in Qemu 6.2.0 on x86 when given -smp cpus=n flag

2022-01-20 Thread Daniel P . Berrangé
On Thu, Jan 20, 2022 at 03:38:26PM +0530, Ani Sinha wrote: > Actually I am not quite right. This is the real change which changed the > preference. The previous change was a code re-org that preserved the > behavior: > > commit 4a0af2930a4e4f64ce551152fdb4b9e7be106408 > Author: Yanan Wang > Date:

Re: [PATCH] target/arm: Allow only specific instructions based on the SCTLR_EL1.UCI bit

2022-01-20 Thread Idan Horowitz
On Thu, 20 Jan 2022 at 13:42, Peter Maydell wrote: > > > But for all of these instructions the reginfo struct > sets ".access = PL1_W". The .access field is always > checked before the .accessfn, so for any of these instructions > executed from EL0 I think we will always fail the .access > check a

[PATCH v8 05/23] target/riscv: Create xl field in env

2022-01-20 Thread LIU Zhiwei
Current xlen has been used in helper functions and many other places. The computation of current xlen is not so trivial, so that we should recompute it as little as possible. Fortunately, xlen only changes in very seldom cases, such as exception, misa write, mstatus write, cpu reset, migration loa

Re: [PATCH] target/arm: Allow only specific instructions based on the SCTLR_EL1.UCI bit

2022-01-20 Thread Peter Maydell
On Fri, 14 Jan 2022 at 00:40, Idan Horowitz wrote: > > The SCTLR_EL1.UCI bit only affects a subset of cache maintenance > instructions as specified by the specification. Any other cache > maintenance instructions must still be trapped from EL0. Hi; thanks for this patch. Do you have a test case w

[PATCH v8 06/23] target/riscv: Ignore the pc bits above XLEN

2022-01-20 Thread LIU Zhiwei
The read from PC for translation is in cpu_get_tb_cpu_state, before translation. Signed-off-by: LIU Zhiwei Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/cpu_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/riscv/cpu_helper.c b/

Re: [PATCH v8 00/23] QEMU RISC-V AIA support

2022-01-20 Thread Anup Patel
Hi Alistair, On Wed, Jan 19, 2022 at 8:56 PM Anup Patel wrote: > > From: Anup Patel > > The advanced interrupt architecture (AIA) extends the per-HART local > interrupt support. Along with this, it also adds IMSIC (MSI contrllor) > and Advanced PLIC (wired interrupt controller). > > The latest A

Re: [PULL 0/2] Seabios 20220118 patches

2022-01-20 Thread Peter Maydell
On Tue, 18 Jan 2022 at 11:38, Gerd Hoffmann wrote: > > The following changes since commit 6621441db50d5bae7e34dbd04bf3c57a27a71b32: > > Merge remote-tracking branch 'remotes/mcayland/tags/qemu-openbios-20220115' > into staging (2022-01-16 20:12:23 +) > > are available in the Git repository

[PATCH v8 02/23] target/riscv: Don't save pc when exception return

2022-01-20 Thread LIU Zhiwei
As pc will be written by the xepc in exception return, just ignore pc in translation. Signed-off-by: LIU Zhiwei Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/helper.h | 4 ++-- target/riscv/insn_trans/trans_privileged.c.inc | 7 ++-

[PATCH] i386: Set MCG_STATUS_RIPV bit for mce SRAR error

2022-01-20 Thread luofei
In the physical machine environment, when a SRAR error occurs, the IA32_MCG_STATUS RIPV bit is set, but qemu does not set this bit. When qemu injects an SRAR error into virtual machine, the virtual machine kernel just call do_machine_check() to kill the current task, but not call memory_failure() t

[PATCH v8 07/23] target/riscv: Extend pc for runtime pc write

2022-01-20 Thread LIU Zhiwei
In some cases, we must restore the guest PC to the address of the start of the TB, such as when the instruction counter hits zero. So extend pc register according to current xlen for these cases. Signed-off-by: LIU Zhiwei Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- target/

Re: TR: Openstack NOVA - Improve the time of file system freeze during live-snapshot

2022-01-20 Thread Kevin Wolf
Am 20.01.2022 um 09:02 hat Pierre Libeau geschrieben: > Hello > > I'm forwarding to you my question because I have pushed on the wrong > mailing list at the beginning. Can you give me your opinion or forward > me to the right people who can help me. > > Thx. > > Pierre > > > __

  1   2   3   >