qemu-softmmu -cpu help broken

2022-03-10 Thread Max Filippov
Hello, I've noticed that the command qemu-system-xtensa -cpu help no longer prints anything. Apparently because cpu_list is no longer defined in list_cpus inside softmmu/cpus.c Bisection points to the following commit: e0220bb5b200 ("softmmu: Build target-agnostic objects once") Reverting the

[PATCH v2 4/9] dump: Remove the section if when calculating the memory offset

2022-03-10 Thread Janosch Frank
When s->shdr_num is 0 we'll add 0 bytes of section headers which is equivalent to not adding section headers but with the multiplication we can remove a if/else. Signed-off-by: Janosch Frank --- dump/dump.c | 24 1 file changed, 8 insertions(+), 16 deletions(-) diff

[PATCH v2 8/9] dump: Cleanup dump_begin write functions

2022-03-10 Thread Janosch Frank
There's no need to have a gigantic if in there let's move the elf 32/64 bit logic into the section, segment or note code. Signed-off-by: Janosch Frank --- dump/dump.c | 42 +++--- 1 file changed, 11 insertions(+), 31 deletions(-) diff --git a/dump/dump.c

[PATCH v2 9/9] dump: Consolidate elf note function

2022-03-10 Thread Janosch Frank
Just like with the other write functions let's move the 32/64 bit elf handling to a function to improve readability. Signed-off-by: Janosch Frank --- dump/dump.c | 23 --- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/dump/dump.c b/dump/dump.c index

[PATCH v2 6/9] dump: Introduce dump_is_64bit() helper function

2022-03-10 Thread Janosch Frank
Checking d_class in dump_info leads to lengthy conditionals so let's shorten things a bit by introducing a helper function. Signed-off-by: Janosch Frank --- dump/dump.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/dump/dump.c b/dump/dump.c index

[PATCH v2 2/9] dump: Remove the sh_info variable

2022-03-10 Thread Janosch Frank
There's no need to have phdr_num and sh_info at the same time. We can make phdr_num 32 bit and set PN_XNUM when we write the header if phdr_num >= PN_XNUM. Signed-off-by: Janosch Frank --- dump/dump.c | 34 ++ include/sysemu/dump.h | 3 +-- 2 files

[PATCH v2 0/9] dump: Cleanup and consolidation

2022-03-10 Thread Janosch Frank
The dump/dump.c file has lots of duplicated code for handling 64 and 32 bit elf files. Additionally there are many instances where code can be improved by adding a variable to avoid having to specify the same calculation or check over and over. This series is the cleanup step onto which my series

[PATCH v2 5/9] dump: Add more offset variables

2022-03-10 Thread Janosch Frank
Offset calculations are easy enough to get wrong. Let's add a few variables to make moving around elf headers and data sections easier. Signed-off-by: Janosch Frank Reviewed-by: Marc-André Lureau --- dump/dump.c | 35 +++ include/sysemu/dump.h | 4

Re: MAINTAINERS: macOS host support (was: MAINTAINERS: take edk2)

2022-03-10 Thread Christian Schoenebeck
On Mittwoch, 9. März 2022 12:44:16 CET Daniel P. Berrangé wrote: > On Wed, Mar 09, 2022 at 11:40:42AM +0100, Christian Schoenebeck wrote: > > On Mittwoch, 9. März 2022 11:05:02 CET Philippe Mathieu-Daudé wrote: > > > Not sure what you have in mind. I'm totally new to the macOS/Darwin > > > world,

Re: MAINTAINERS: macOS host support (was: MAINTAINERS: take edk2)

2022-03-10 Thread Daniel P . Berrangé
On Thu, Mar 10, 2022 at 12:00:35PM +0100, Christian Schoenebeck wrote: > On Mittwoch, 9. März 2022 12:44:16 CET Daniel P. Berrangé wrote: > > On Wed, Mar 09, 2022 at 11:40:42AM +0100, Christian Schoenebeck wrote: > > > On Mittwoch, 9. März 2022 11:05:02 CET Philippe Mathieu-Daudé wrote: > > > >

Re: [PATCH 08/18] tests: merge code for UNIX and TCP migration pre-copy tests

2022-03-10 Thread Daniel P . Berrangé
On Mon, Mar 07, 2022 at 11:11:07AM +0100, Thomas Huth wrote: > On 02/03/2022 18.49, Daniel P. Berrangé wrote: > > The test cases differ only in the URI they provide to the migration > > commands, and the ability to set the dirty_ring mode. This code is > > trivially merged into a common helper. >

Re: [PATCH 04/18] tests: print newline after QMP response in qtest logs

2022-03-10 Thread Daniel P . Berrangé
On Mon, Mar 07, 2022 at 11:09:37AM +0100, Thomas Huth wrote: > On 07/03/2022 11.06, Daniel P. Berrangé wrote: > > On Mon, Mar 07, 2022 at 02:51:23PM +0800, Peter Xu wrote: > > > On Wed, Mar 02, 2022 at 05:49:18PM +, Daniel P. Berrangé wrote: > > > > The QMP commands have a trailing newline,

Re: [PATCH v2 4/4] util/event-loop-base: Introduce options to set the thread pool size

2022-03-10 Thread Stefan Hajnoczi
On Thu, Mar 03, 2022 at 04:13:07PM +0100, Nicolas Saenz Julienne wrote: > @@ -537,10 +546,19 @@ > # 0 means that the engine will use its default > # (default:0, since 6.1) > # > +# @thread-pool-min: minimum number of threads readily available in the thread > +#

Re: [RFC PATCH] tests/tcg: drop -cpu max from s390x sha512-mvx invocation

2022-03-10 Thread Thomas Huth
On 10/03/2022 11.34, Alex Bennée wrote: Thomas Huth writes: On 09/03/2022 12.22, Alex Bennée wrote: With -cpu max we get a warning: qemu-s390x: warning: 'msa5-base' requires 'kimd-sha-512'. But dropping the -cpu max and it still runs fine. Signed-off-by: Alex Bennée Cc: Thomas Huth

Re: [RFC PATCH] tests/tcg: drop -cpu max from s390x sha512-mvx invocation

2022-03-10 Thread Alex Bennée
Thomas Huth writes: > On 09/03/2022 12.22, Alex Bennée wrote: >> With -cpu max we get a warning: >>qemu-s390x: warning: 'msa5-base' requires 'kimd-sha-512'. >> But dropping the -cpu max and it still runs fine. >> Signed-off-by: Alex Bennée >> Cc: Thomas Huth >> --- >>

Re: [PATCH v2 3/4] util/main-loop: Introduce the main loop into QOM

2022-03-10 Thread Stefan Hajnoczi
On Thu, Mar 03, 2022 at 03:58:21PM +0100, Nicolas Saenz Julienne wrote: > 'event-loop-base' provides basic property handling for all 'AioContext' > based event loops. So let's define a new 'MainLoopClass' that inherits > from it. This will permit tweaking the main loop's properties through > qapi

Re: [PATCH v5 19/20] job.c: enable job lock/unlock and remove Aiocontext locks

2022-03-10 Thread Emanuele Giuseppe Esposito
Am 08/03/2022 um 15:04 schrieb Stefan Hajnoczi: > On Tue, Feb 08, 2022 at 09:35:12AM -0500, Emanuele Giuseppe Esposito wrote: >> diff --git a/include/qemu/job.h b/include/qemu/job.h >> index ca46e46f5b..574110a1f2 100644 >> --- a/include/qemu/job.h >> +++ b/include/qemu/job.h >> @@ -75,11

Re: [PATCH v2 2/4] Introduce event-loop-base abstract class

2022-03-10 Thread Stefan Hajnoczi
On Thu, Mar 03, 2022 at 03:58:20PM +0100, Nicolas Saenz Julienne wrote: > @@ -2935,13 +2947,6 @@ qemu_syms = custom_target('qemu.syms', output: > 'qemu.syms', > capture: true, > command: [undefsym, nm, '@INPUT@']) > > -qom_ss =

Re: [RFC PATCH] tests/tcg: drop -cpu max from s390x sha512-mvx invocation

2022-03-10 Thread Thomas Huth
On 10/03/2022 09.36, Thomas Huth wrote: On 09/03/2022 12.22, Alex Bennée wrote: With -cpu max we get a warning:    qemu-s390x: warning: 'msa5-base' requires 'kimd-sha-512'. But dropping the -cpu max and it still runs fine. Signed-off-by: Alex Bennée Cc: Thomas Huth ---  

Re: [RFC v4 01/21] vfio-user: introduce vfio-user protocol specification

2022-03-10 Thread John Levon
On Wed, Mar 09, 2022 at 03:34:53PM -0700, Alex Williamson wrote: > > +The only device-specific region type and subtype supported by vfio-user is > > +``VFIO_REGION_TYPE_MIGRATION`` (3) and ``VFIO_REGION_SUBTYPE_MIGRATION`` > > (1). > > These should be considered deprecated from the kernel

Re: [PATCH v5 18/20] jobs: protect job.aio_context with BQL and job_mutex

2022-03-10 Thread Emanuele Giuseppe Esposito
Am 08/03/2022 um 14:41 schrieb Stefan Hajnoczi: > It's not clear to me that .get_parent_aio_context() should only be > called from the main thread. The API is read-only so someone might try > to call from I/O code in the future expecting it to work like other > read-only graph APIs that are

Re: [PATCH v2 1/4] util/thread-pool: Fix thread pool freeing locking

2022-03-10 Thread Nicolas Saenz Julienne
On Thu, 2022-03-10 at 09:20 +, Stefan Hajnoczi wrote: > On Thu, Mar 03, 2022 at 03:58:19PM +0100, Nicolas Saenz Julienne wrote: > > Upon freeing a thread pool we need to get rid of any remaining worker. > > This is achieved by setting the thread pool's topping flag, waking the > >

Re: [PATCH 2/2] i386: Add notify VM exit support

2022-03-10 Thread Daniel P . Berrangé
On Thu, Mar 10, 2022 at 05:53:05PM +0800, Chenyi Qiang wrote: > > > On 3/10/2022 5:17 PM, Daniel P. Berrangé wrote: > > On Thu, Mar 10, 2022 at 05:02:05PM +0800, Chenyi Qiang wrote: > > > There are cases that malicious virtual machine can cause CPU stuck (due > > > to event windows don't open

Re: [PATCH 2/2] i386: Add notify VM exit support

2022-03-10 Thread Chenyi Qiang
On 3/10/2022 5:17 PM, Daniel P. Berrangé wrote: On Thu, Mar 10, 2022 at 05:02:05PM +0800, Chenyi Qiang wrote: There are cases that malicious virtual machine can cause CPU stuck (due to event windows don't open up), e.g., infinite loop in microcode when nested #AC (CVE-2015-5307). No event

Re: [PULL 0/9] I²C / SMBus / PMBus patches for 2022-03-08

2022-03-10 Thread Peter Maydell
On Tue, 8 Mar 2022 at 18:22, Philippe Mathieu-Daudé wrote: > > From: Philippe Mathieu-Daudé > > The following changes since commit 9740b907a5363c06ecf61e08b21966a81eb0dab4: > > Merge remote-tracking branch > 'remotes/pmaydell/tags/pull-target-arm-20220307' into staging (2022-03-08 > 15:26:10

Re: [PATCH v2 1/4] util/thread-pool: Fix thread pool freeing locking

2022-03-10 Thread Stefan Hajnoczi
On Thu, Mar 03, 2022 at 03:58:19PM +0100, Nicolas Saenz Julienne wrote: > Upon freeing a thread pool we need to get rid of any remaining worker. > This is achieved by setting the thread pool's topping flag, waking the s/topping/stopping/ > workers up, and waiting for them to exit one by one. The

Re: [PATCH 2/2] i386: Add notify VM exit support

2022-03-10 Thread Daniel P . Berrangé
On Thu, Mar 10, 2022 at 05:02:05PM +0800, Chenyi Qiang wrote: > There are cases that malicious virtual machine can cause CPU stuck (due > to event windows don't open up), e.g., infinite loop in microcode when > nested #AC (CVE-2015-5307). No event window means no event (NMI, SMI and > IRQ) can be

Re: [PATCH 5/6] 9pfs: fix 'Twalk' to only send error if no component walked

2022-03-10 Thread Christian Schoenebeck
On Mittwoch, 9. März 2022 18:57:39 CET Christian Schoenebeck wrote: > Current implementation of 'Twalk' request handling always sends an 'Rerror' > response if any error occured. The 9p2000 protocol spec sais though: > > " > If the first element cannot be walked for any reason, Rerror is

Re: [PATCH 4/6] 9pfs: refactor 'name_idx' -> 'nvalid' in v9fs_walk()

2022-03-10 Thread Christian Schoenebeck
On Mittwoch, 9. März 2022 18:12:17 CET Christian Schoenebeck wrote: > The local variable 'name_idx' is used in two loops in function v9fs_walk(). > Let the first loop use its own variable 'nvalid' instead, which we will use > in subsequent patches as the number of (requested) path components >

[PATCH 1/2] linux-headers: Sync the linux headers

2022-03-10 Thread Chenyi Qiang
Signed-off-by: Chenyi Qiang --- linux-headers/asm-x86/kvm.h | 4 linux-headers/linux/kvm.h | 29 - 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/linux-headers/asm-x86/kvm.h b/linux-headers/asm-x86/kvm.h index 2da3316bb5..44757bd612 100644 ---

Re: [PATCH 3/6] tests/9pfs: compare QIDs in fs_walk_none() test

2022-03-10 Thread Christian Schoenebeck
On Mittwoch, 9. März 2022 15:49:04 CET Christian Schoenebeck wrote: > Extend previously added fs_walk_none() test by comparing the QID > of the root fid with the QID of the cloned fid. They should be > equal. > > Signed-off-by: Christian Schoenebeck > --- > tests/qtest/virtio-9p-test.c | 70

[PATCH 2/2] i386: Add notify VM exit support

2022-03-10 Thread Chenyi Qiang
There are cases that malicious virtual machine can cause CPU stuck (due to event windows don't open up), e.g., infinite loop in microcode when nested #AC (CVE-2015-5307). No event window means no event (NMI, SMI and IRQ) can be delivered. It leads the CPU to be unavailable to host or other VMs.

[PATCH 0/2] Enable notify VM exit

2022-03-10 Thread Chenyi Qiang
Notify VM exit is introduced to mitigate the potential DOS attach from malicious VM. This series is the userspace part to enable this feature through a new KVM capability KVM_CAP_X86_NOTIFY_VMEXIT. The corresponding KVM patch series is available at

Re: [PATCH 2/6] tests/9pfs: Twalk with nwname=0

2022-03-10 Thread Christian Schoenebeck
On Mittwoch, 9. März 2022 14:24:24 CET Christian Schoenebeck wrote: > Send Twalk request with nwname=0. In this case no QIDs should > be returned by 9p server; this is equivalent to walking to dot. > > Signed-off-by: Christian Schoenebeck > --- > tests/qtest/virtio-9p-test.c | 22

Re: [RFC PATCH] tests/tcg: drop -cpu max from s390x sha512-mvx invocation

2022-03-10 Thread Thomas Huth
On 09/03/2022 12.22, Alex Bennée wrote: With -cpu max we get a warning: qemu-s390x: warning: 'msa5-base' requires 'kimd-sha-512'. But dropping the -cpu max and it still runs fine. Signed-off-by: Alex Bennée Cc: Thomas Huth --- tests/tcg/s390x/Makefile.target | 2 -- 1 file changed, 2

Re: [RFC PATCH 2/2] tests: Add dirty page rate limit test

2022-03-10 Thread Peter Xu
On Wed, Mar 09, 2022 at 11:58:01PM +0800, huang...@chinatelecom.cn wrote: > From: Hyman Huang(黄勇) > > Add dirty page rate limit test if kernel support dirty ring, > create a standalone file to implement the test case. Thanks for writting this test case. > > Signed-off-by: Hyman Huang(黄勇) >

Re: [PATCH v7 00/46] CXl 2.0 emulation Support

2022-03-10 Thread Peter Xu
On Wed, Mar 09, 2022 at 11:28:27AM +, Jonathan Cameron wrote: > Hi Peter, Hi, Jonathan, > > > > > https://lore.kernel.org/qemu-devel/20220306174137.5707-35-jonathan.came...@huawei.com/ > > > > Having mr->ops set but with memory_access_is_direct() returning true sounds > > weird to me. > >

<    1   2   3   4