[PATCH 1/6] target/ppc: Implement ASDR register for ISA v3.0 for HPT

2023-07-26 Thread Nicholas Piggin
The ASDR register was introduced in ISA v3.0. It has not been implemented for HPT. With HPT, ASDR is the format of the slbmte RS operand (containing VSID), which matches the ppc_slb_t field. Fixes: 3367c62f522b ("target/ppc: Support for POWER9 native hash") Signed-off-by: Nicholas Piggin --- tar

Re: [PATCH v1] migration: refactor migration_completion

2023-07-26 Thread Peter Xu
On Fri, Jul 21, 2023 at 11:14:55AM +, Wang, Wei W wrote: > On Friday, July 21, 2023 4:38 AM, Peter Xu wrote: > > Looks good to me, after addressing Isaku's comments. > > > > The current_active_state is very unfortunate, along with most of the calls > > to > > migrate_set_state() - I bet most

[PATCH 4/6] hw/ppc: Avoid decrementer rounding errors

2023-07-26 Thread Nicholas Piggin
The decrementer register contains a relative time in timebase units. When writing to DECR this is converted and stored as an absolute value in nanosecond units, reading DECR converts back to relative timebase. The tb<->ns conversion of the relative part can cause rounding such that a value writen

Re: [PATCH v6 4/5] intel_iommu: allow Extended Interrupt Mode when using userspace APIC

2023-07-26 Thread Peter Xu
On Fri, Jul 21, 2023 at 10:35:01PM +0700, Bui Quang Minh wrote: > On 7/21/23 03:47, Peter Xu wrote: > > On Mon, Jul 17, 2023 at 11:29:56PM +0700, Bui Quang Minh wrote: > > > On 7/17/23 17:47, Joao Martins wrote: > > > > +Peter, +Jason (intel-iommu maintainer/reviewer) > > > > Thanks for copying me

[PATCH 4/7] spapr: Fix record-replay machine reset consuming too many events

2023-07-26 Thread Nicholas Piggin
spapr_machine_reset gets a random number to populate the device-tree rng seed with. When loading a snapshot for record-replay, the machine is reset again, and that tries to consume the random event record again, crashing due to inconsistent record Fix this by saving the seed to populate the device

[PATCH 2/7] target/ppc: Fix timebase reset with record-replay

2023-07-26 Thread Nicholas Piggin
Timebase save uses a random number for a legacy vmstate field, which makes rr snapshot loading unbalanced. The easiest way to deal with this is just to skip the rng if record-replay is active. Reviewed-by: Pavel Dovgalyuk Signed-off-by: Nicholas Piggin --- hw/ppc/ppc.c | 11 +-- 1 file

Re: [PATCH] gitlab: remove duplication between msys jobs

2023-07-26 Thread Thomas Huth
On 26/07/2023 18.19, Daniel P. Berrangé wrote: Although they share a common parent, the two msys jobs still have massive duplication in their script definitions that can easily be collapsed. Signed-off-by: Daniel P. Berrangé --- .gitlab-ci.d/windows.yml | 132 +++--

[PATCH 3/6] target/ppc: Fix pending HDEC when entering PM state

2023-07-26 Thread Nicholas Piggin
HDEC is defined to not wake from PM state. There is a check in the HDEC timer to avoid setting the interrupt if we are in a PM state, but no check on PM entry to lower HDEC if it already fired. This can cause a HDECR wake up and QEMU abort with unsupported exception in Power Save mode. Fixes: 4b2

[PATCH 5/7] tests/avocado: boot ppc64 pseries replay-record test to Linux VFS mount

2023-07-26 Thread Nicholas Piggin
This the ppc64 record-replay test is able to replay the full kernel boot so try enabling it. Cc: Pavel Dovgalyuk Signed-off-by: Nicholas Piggin --- tests/avocado/replay_kernel.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/avocado/replay_kernel.py b/tests/avocado

[PATCH 6/6] target/ppc: Migrate DECR SPR

2023-07-26 Thread Nicholas Piggin
TCG does not maintain the DEC reigster in the SPR array, so it does get migrated. TCG also needs to re-start the decrementer timer on the destination machine. Load and store the decrementer into the SPR when migrating. This works for the level-triggered (book3s) decrementer, and should be compatib

Re: [PATCH] memory: avoid updating ioeventfds for some address_space

2023-07-26 Thread Peter Xu
On Tue, Jul 25, 2023 at 07:20:37PM +0800, hongmianquan wrote: > When updating ioeventfds, we need to iterate all address spaces, > but some address spaces do not register eventfd_add|del call when > memory_listener_register() and they do nothing when updating ioeventfds. > So we can skip these AS i

Re: [PATCH v7 4/4] tests/qtest: Introduce tests for UFS

2023-07-26 Thread Stefan Hajnoczi
On Wed, Jul 26, 2023 at 02:30:53PM +0900, Jeuk Kim wrote: > +static void *ufs_blk_test_setup(GString *cmd_line, void *arg) > +{ > +char *tmp_path = drive_create(); > + > +g_string_append_printf(cmd_line, > + " -drive if=none,id=drv1,file=%s," > +

Re: [PATCH v7 0/4] hw/ufs: Add Universal Flash Storage (UFS) support

2023-07-26 Thread Stefan Hajnoczi
On Wed, Jul 26, 2023 at 02:30:49PM +0900, Jeuk Kim wrote: > Since v6: > - Add tests/qtest/ufs-test.c to test ufs initialisation and I/O > - Add struct UtpTaskReqDesc to include/block/ufs.h > - Fix ufs_log2() logic > - Fix ufs-lu to use 4K as default block size to match the ufs spec > > Since I cre

[PATCH QEMU 0/2] migration: craft the doc comments

2023-07-26 Thread ~hyman
Hi, Markus, This patchset aims to reformat migration doc comments as commit a937b6aa739. Meanwhile, add myself to the dirty-limit feature maintainer list. Please review, Thanks. Yong Hyman Huang(黄勇) (2): qapi: Reformat and craft the migration doc comments MAINTAINERS: Add Hyman Huang to di

[PATCH QEMU 1/2] qapi: Reformat and craft the migration doc comments

2023-07-26 Thread ~hyman
From: Hyman Huang(黄勇) Reformat migration doc comments to conform to current conventions as commit a937b6aa739 (qapi: Reformat doc comments to conform to current conventions). Also, craft the dirty-limit capability comment. Signed-off-by: Hyman Huang(黄勇) --- qapi/migration.json | 66 ++

[PATCH QEMU 2/2] MAINTAINERS: Add Hyman Huang to dirty-limit feature

2023-07-26 Thread ~hyman
From: Hyman Huang(黄勇) Signed-off-by: Hyman Huang(黄勇) --- MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 12e59b6b27..d72fd63a8e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3437,6 +3437,12 @@ F: hw/core/clock-vmstate.c F: hw/core/qdev-clo

Re: [PATCH V1 2/3] migration: fix suspended runstate

2023-07-26 Thread Peter Xu
On Fri, Jun 30, 2023 at 09:50:41AM -0400, Steven Sistare wrote: > On 6/26/2023 2:27 PM, Peter Xu wrote: > > On Fri, Jun 23, 2023 at 02:25:05PM -0400, Steven Sistare wrote: > >> On 6/21/2023 4:28 PM, Peter Xu wrote: > >>> On Wed, Jun 21, 2023 at 03:15:42PM -0400, Steven Sistare wrote: > On 6/20

Implementing "tee" in python asyncio

2023-07-26 Thread John Snow
Hi folks, I'm currently wondering how to take a StreamReader as found on https://docs.python.org/3/library/asyncio-subprocess.html#asyncio.subprocess.Process and to consume the data while optionally re-streaming it to a secondary consumer. What I'd like to do is create a StreamWatcher class that

[PATCH v2 2/2] i386: Fix MCE support for AMD hosts

2023-07-26 Thread John Allen
For the most part, AMD hosts can use the same MCE injection code as Intel but, there are instances where the qemu implementation is Intel specific. First, MCE deliviery works differently on AMD and does not support broadcast. Second, kvm_mce_inject generates MCEs that include a number of Intel spec

[PATCH v2 1/2] i386: Add support for SUCCOR feature

2023-07-26 Thread John Allen
Add cpuid bit definition for the SUCCOR feature. This cpuid bit is required to be exposed to guests to allow them to handle machine check exceptions on AMD hosts. Reported-by: William Roche Signed-off-by: John Allen --- v2: - Add "succor" feature word. - Add case to kvm_arch_get_supported_cp

[PATCH for-8.1] accel/tcg: Clear tcg_ctx->gen_tb on buffer overflow

2023-07-26 Thread Richard Henderson
On overflow of code_gen_buffer, we unlock the guest pages we had been translating, but failed to clear gen_tb. On restart, if we cannot allocate a TB, we exit to the main loop to perform the flush of all TBs as soon as possible. With garbage in gen_tb, we hit an assert: ../src/accel/tcg/tb-maint

[PATCH v2 0/2] Fix MCE handling on AMD hosts

2023-07-26 Thread John Allen
In the event that a guest process attempts to access memory that has been poisoned in response to a deferred uncorrected MCE, an AMD system will currently generate a SIGBUS error which will result in the entire guest being shutdown. Ideally, we only want to kill the guest process that accessed pois

Re: [PATCH v2 2/8] machine: Introduce helper is_cpu_type_supported()

2023-07-26 Thread Richard Henderson
On 7/25/23 17:31, Gavin Shan wrote: The logic of checking if the specified CPU type is supported in machine_run_board_init() is independent enough. Factor it out into helper is_cpu_type_supported(). With this, machine_run_board_init() looks a bit clean. Since we're here, @machine_class is renamed

Re: [PATCH v2 3/8] machine: Print supported CPU models instead of typenames

2023-07-26 Thread Richard Henderson
On 7/25/23 17:32, Gavin Shan wrote: -static const char *q800_machine_valid_cpu_types[] = { +static const char * const q800_machine_valid_cpu_types[] = { M68K_CPU_TYPE_NAME("m68040"), NULL }; +static const char * const q800_machine_valid_cpu_models[] = { +"m68040", +NULL

Re: how to build qemu 8.1 - keycodemapdb?

2023-07-26 Thread Michael Roth
Quoting Daniel P. Berrangé (2023-07-26 04:18:37) > On Wed, Jul 26, 2023 at 12:05:41PM +0300, Michael Tokarev wrote: > > 26.07.2023 11:50, Daniel P. Berrangé wrote: > > .. > > > > make-release.sh apparently does the right thing. But the published > > > > tarball does not include the 3 required sub-p

[PATCH] tests/migration-test: Remove arch_target

2023-07-26 Thread Peter Xu
It is always NULL, so drop it. Cc: Juan Quintela Fixes: Coverity CID 1518101 Signed-off-by: Peter Xu --- tests/qtest/migration-test.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index 62d3f37021..7ce1379ba8 1

Re: [PATCH 0/8] Adds CPU hot-plug support to Loongarch

2023-07-26 Thread Gavin Shan
Hi Xianglai, On 7/20/23 17:15, xianglai li wrote: Hello everyone, We refer to the implementation of ARM CPU Hot-Plug to add GED-based CPU Hot-Plug support to Loongarch. The first 4 patches are changes to the QEMU common code, including adding GED support for CPU Hot-Plug, updating the ACPI tabl

Re: [PATCH] target/i386: Fix reporting of CPU dies when nr_cores=nr_threads=1

2023-07-26 Thread Xiaoyao Li
On 7/24/2023 2:59 AM, 小太 wrote: When QEMU is started with `-smp D,sockets=1,dies=D,cores=1,threads=1` (that is, 1 socket with D dies but each die contains just a single thread), both Linux and Windows guests incorrectly interprets the system as having D sockets with 1 die each Ultimately this is

Re: [PATCH v7 0/4] hw/ufs: Add Universal Flash Storage (UFS) support

2023-07-26 Thread Jeuk Kim
On 7/27/2023 4:36 AM, Stefan Hajnoczi wrote: On Wed, Jul 26, 2023 at 02:30:49PM +0900, Jeuk Kim wrote: Since v6: - Add tests/qtest/ufs-test.c to test ufs initialisation and I/O - Add struct UtpTaskReqDesc to include/block/ufs.h - Fix ufs_log2() logic - Fix ufs-lu to use 4K as default block size

Re: [PATCH] migrate/multifd: fix coredump when the multifd thread cleanup

2023-07-26 Thread chenyuhui (A)
On 2023/7/26 0:53, Peter Xu wrote: > On Tue, Jul 25, 2023 at 04:43:28PM +0800, chenyuhui (A) wrote: >> @Peter Xu @Fabiano Rosas >> Kindly ping on this. > > Ah I see what's missing - please copy maintainer (Juan) for any migration > patches, especially multifd ones.. I'm doing that for this one

Re: [PATCH 0/8] Adds CPU hot-plug support to Loongarch

2023-07-26 Thread lixianglai
Hi Gavin and Salil, On 7/27/23 8:57 AM, Gavin Shan wrote: Hi Xianglai, On 7/20/23 17:15, xianglai li wrote: Hello everyone, We refer to the implementation of ARM CPU Hot-Plug to add GED-based CPU Hot-Plug support to Loongarch. The first 4 patches are changes to the QEMU common code, including

Re: [External] Re: [PATCH] memory: avoid updating ioeventfds for some address_space

2023-07-26 Thread hongmainquan
在 2023/7/27 1:45 上午, Peter Xu 写道: On Tue, Jul 25, 2023 at 07:20:37PM +0800, hongmianquan wrote: When updating ioeventfds, we need to iterate all address spaces, but some address spaces do not register eventfd_add|del call when memory_listener_register() and they do nothing when updating ioeve

Re: [PATCH v2 3/8] machine: Print supported CPU models instead of typenames

2023-07-26 Thread Gavin Shan
On 7/27/23 09:08, Richard Henderson wrote: On 7/25/23 17:32, Gavin Shan wrote: -static const char *q800_machine_valid_cpu_types[] = { +static const char * const q800_machine_valid_cpu_types[] = {   M68K_CPU_TYPE_NAME("m68040"),   NULL   }; +static const char * const q800_machine_valid_

Re: [PATCH v2 4/6] python/machine: use socketpair() for console connections

2023-07-26 Thread Ani Sinha
> On 26-Jul-2023, at 10:51 PM, John Snow wrote: > > > > On Wed, Jul 26, 2023, 6:50 AM Ani Sinha wrote: > > > > On 25-Jul-2023, at 11:33 PM, John Snow wrote: > > > > Create a socketpair for the console output. This should help eliminate > > race conditions around console text early in th

Re: [PATCH v2 3/6] python/console_socket: accept existing FD in initializer

2023-07-26 Thread Ani Sinha
> On 25-Jul-2023, at 11:33 PM, John Snow wrote: > > Useful if we want to use ConsoleSocket() for a socket created by > socketpair(). > > Signed-off-by: John Snow Reviewed-by: Ani Sinha > --- > python/qemu/machine/console_socket.py | 29 +++ > 1 file changed, 21 inse

<    1   2   3