[PATCH] target/loongarch: Add timer information dump support

2023-12-06 Thread Bibo Mao
Timer emulation sometimes is problematic especially when vm is running in kvm mode. This patch adds registers dump support relative with timer hardware, so that it is easier to find the problems. Signed-off-by: Bibo Mao --- target/loongarch/cpu.c | 2 ++ 1 file changed, 2 insertions(+) diff --g

Re: [PATCH for-8.2] ui/vnc-clipboard: fix inflate_buffer

2023-12-06 Thread Fiona Ebner
Am 04.12.23 um 08:30 schrieb Marc-André Lureau: > Hi > > On Tue, Nov 28, 2023 at 2:52 PM Marc-André Lureau > wrote: >> >> >> It's hard to make the best decision. >> >> We could return the uncompressed data so far, that would fix the >> regression. But potentially, we have incomplete data returned

Re: [PATCH] target/loongarch: Add timer information dump support

2023-12-06 Thread gaosong
在 2023/12/6 下午4:18, Bibo Mao 写道: Timer emulation sometimes is problematic especially when vm is running in kvm mode. This patch adds registers dump support relative with timer hardware, so that it is easier to find the problems. Signed-off-by: Bibo Mao --- target/loongarch/cpu.c | 2 ++ 1 fi

[PATCH] migration: using qapi_free_SocketAddress instead of g_free

2023-12-06 Thread lijiejun
use unified function qapi_free_SocketAddress to free SocketAddress object. Signed-off-by: lijiejun --- migration/migration.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/migration.c b/migration/migration.c index 3ce04b2aaf..e78d31bbbf 100644 --- a/migration/migra

Re: [PATCH v6 2/3] hw/ppc: Add N1 chiplet model

2023-12-06 Thread Chalapathi V
On 28-11-2023 12:18, Cédric Le Goater wrote: On 11/27/23 18:13, Chalapathi V wrote: The N1 chiplet handle the high speed i/o traffic over PCIe and others. The N1 chiplet consists of PowerBus Fabric controller, nest Memory Management Unit, chiplet control unit and more. This commit creates a N

Re: [PULL 20/20] tracing: install trace events file only if necessary

2023-12-06 Thread Carlos Santos
On Thu, Apr 20, 2023 at 9:10 AM Stefan Hajnoczi wrote: > > From: Carlos Santos > > It is not useful when configuring with --enable-trace-backends=nop. > > Signed-off-by: Carlos Santos > Signed-off-by: Stefan Hajnoczi > Message-Id: <20230408010410.281263-1-casan...@redhat.com> > --- > trace/mes

Re: [PATCH] migration: using qapi_free_SocketAddress instead of g_free

2023-12-06 Thread Daniel P . Berrangé
On Wed, Dec 06, 2023 at 06:01:11PM +0800, lijiejun wrote: > use unified function qapi_free_SocketAddress to free SocketAddress > object. > > Signed-off-by: lijiejun > --- > migration/migration.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/migration/migration.c b/mig

Re: [PATCH 02/11] tests/avocado: fix typo in replay_linux

2023-12-06 Thread Philippe Mathieu-Daudé
On 5/12/23 21:40, Alex Bennée wrote: Signed-off-by: Alex Bennée --- tests/avocado/replay_linux.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH 04/11] scripts/replay_dump: track total number of instructions

2023-12-06 Thread Philippe Mathieu-Daudé
On 5/12/23 21:40, Alex Bennée wrote: This will help in tracking where we are in the stream when debugging. Signed-off-by: Alex Bennée --- scripts/replay-dump.py | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH 06/11] replay: add proper kdoc for ReplayState

2023-12-06 Thread Philippe Mathieu-Daudé
On 5/12/23 21:41, Alex Bennée wrote: Remove the non-standard comment formatting and move the descriptions into a proper kdoc comment. Signed-off-by: Alex Bennée --- replay/replay-internal.h | 27 -- ~~~ roms/SLOF | 2 +-

Re: [PATCH 07/11] replay: make has_unread_data a bool

2023-12-06 Thread Philippe Mathieu-Daudé
On 5/12/23 21:41, Alex Bennée wrote: For clarity given it only has two states. Signed-off-by: Alex Bennée --- replay/replay-internal.h | 4 ++-- replay/replay-internal.c | 4 ++-- replay/replay-snapshot.c | 6 +++--- replay/replay.c | 2 +- 4 files changed, 8 insertions(+), 8 del

Re: [PATCH 05/11] replay: remove host_clock_last

2023-12-06 Thread Philippe Mathieu-Daudé
On 5/12/23 21:41, Alex Bennée wrote: Fixes: a02fe2ca70 (replay: Remove host_clock_last) Signed-off-by: Alex Bennée --- replay/replay-internal.h | 2 -- 1 file changed, 2 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH 08/11] replay: introduce a central report point for sync errors

2023-12-06 Thread Philippe Mathieu-Daudé
Hi Alex, On 5/12/23 21:41, Alex Bennée wrote: Figuring out why replay has failed is tricky at the best of times. Lets centralise the reporting of a replay sync error and add a little bit of extra information to help with debugging. Signed-off-by: Alex Bennée --- replay/replay-internal.h | 12

Re: [PATCH v2 for-8.2?] i386/sev: Avoid SEV-ES crash due to missing MSR_EFER_LMA bit

2023-12-06 Thread Philippe Mathieu-Daudé
Hi Michael, (Cc'ing Lara, Vitaly and Maxim) On 5/12/23 23:28, Michael Roth wrote: Commit 7191f24c7fcf ("accel/kvm/kvm-all: Handle register access errors") added error checking for KVM_SET_SREGS/KVM_SET_SREGS2. In doing so, it exposed a long-running bug in current KVM support for SEV-ES where th

Re: [PATCH 06/11] replay: add proper kdoc for ReplayState

2023-12-06 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > On 5/12/23 21:41, Alex Bennée wrote: >> Remove the non-standard comment formatting and move the descriptions >> into a proper kdoc comment. >> Signed-off-by: Alex Bennée >> --- >> replay/replay-internal.h | 27 -- > > ~~~ >

Re: [RFC PATCH-for-8.2?] accel/tcg: Implement tcg_unregister_thread()

2023-12-06 Thread Michal Suchánek
On Tue, Dec 05, 2023 at 11:09:59AM +0100, Michal Suchánek wrote: > On Mon, Dec 04, 2023 at 03:02:45PM -0800, Richard Henderson wrote: > > On 12/4/23 12:09, Michal Suchánek wrote: > > > On Mon, Dec 04, 2023 at 02:50:17PM -0500, Stefan Hajnoczi wrote: > > > > On Mon, 4 Dec 2023 at 14:40, Philippe Mat

Re: [PATCH v2 for-8.2?] i386/sev: Avoid SEV-ES crash due to missing MSR_EFER_LMA bit

2023-12-06 Thread Michael Roth via
On Wed, Dec 06, 2023 at 12:48:35PM +0100, Philippe Mathieu-Daudé wrote: > Hi Michael, > > (Cc'ing Lara, Vitaly and Maxim) > > On 5/12/23 23:28, Michael Roth wrote: > > Commit 7191f24c7fcf ("accel/kvm/kvm-all: Handle register access errors") > > added error checking for KVM_SET_SREGS/KVM_SET_SREGS

[PATCH] target/i386: Add new CPU model SierraForest

2023-12-06 Thread Tao Su
SierraForest is Intel's first generation E-core based Xeon server processor, which will be released in the first half of 2024. SierraForest mainly adds the following new features based on GraniteRapids: - CMPCCXADD CPUID.(EAX=7,ECX=1):EAX[bit 7] - AVX-IFMA CPUID.(EAX=7,ECX=1):EAX[bit 23] - AVX-VN

Re: [PATCH v2 for-8.2?] i386/sev: Avoid SEV-ES crash due to missing MSR_EFER_LMA bit

2023-12-06 Thread Paolo Bonzini
On Tue, Dec 5, 2023 at 11:28 PM Michael Roth wrote: > @@ -3637,12 +3638,18 @@ static int kvm_get_sregs(X86CPU *cpu) > env->gdt.limit = sregs.gdt.limit; > env->gdt.base = sregs.gdt.base; > > +cr0_old = env->cr[0]; > env->cr[0] = sregs.cr0; > env->cr[2] = sregs.cr2; > en

Re: [PATCH v2 for-8.2?] i386/sev: Avoid SEV-ES crash due to missing MSR_EFER_LMA bit

2023-12-06 Thread Paolo Bonzini
On Wed, Dec 6, 2023 at 2:13 PM Michael Roth wrote: > > This 'Fixes:' tag is misleading, since as you mentioned this commit > > only exposes the issue. > > That's true, a "Workaround-for: " tag or something like that might be more > appropriate. I just wanted to make it clear that SEV-ES support is

[PATCH] [PATCH v4] ui/gtk-clipboard: async owner_change clipboard_request

2023-12-06 Thread Edmund Raile
Previous implementation of both functions was blocking and caused guest freezes / crashes on host clipboard owner change. * use callbacks instead of waiting for GTK to deliver clipboard content type evaluation and contents * evaluate a serial in the info struct to discard old events Fixes: d1

Re: [RFC PATCH-for-8.2?] accel/tcg: Implement tcg_unregister_thread()

2023-12-06 Thread Miguel Luis
Hi! On 04/12/2023 18:40, Philippe Mathieu-Daudé wrote: > Unplugging vCPU triggers the following assertion in > tcg_register_thread(): > > 796 void tcg_register_thread(void) > 797 { > ... > 812 /* Claim an entry in tcg_ctxs */ > 813 n = qatomic_fetch_inc(&tcg_cur_ctxs); > 814 g_as

[PATCH v4] ui/gtk-clipboard: async owner_change clipboard_request

2023-12-06 Thread Edmund Raile
Previous implementation of both functions was blocking and caused guest freezes / crashes on host clipboard owner change. * use callbacks instead of waiting for GTK to deliver clipboard content type evaluation and contents * evaluate a serial in the info struct to discard old events Fixes: d1

Re: [PATCH 10/11] chardev: force write all when recording replay logs

2023-12-06 Thread Philippe Mathieu-Daudé
On 5/12/23 21:41, Alex Bennée wrote: This is mostly a problem within avocado as serial generally isn't busy enough to overfill pipes. However the consequences of recording a failed write will haunt us on replay when causing the log to go out of sync. Fixes: https://gitlab.com/qemu-project/qemu/-

Re: [RFC PATCH-for-8.2?] accel/tcg: Implement tcg_unregister_thread()

2023-12-06 Thread Philippe Mathieu-Daudé
Hi Stefan, On 6/12/23 13:56, Michal Suchánek wrote: On Tue, Dec 05, 2023 at 11:09:59AM +0100, Michal Suchánek wrote: On Mon, Dec 04, 2023 at 03:02:45PM -0800, Richard Henderson wrote: On 12/4/23 12:09, Michal Suchánek wrote: On Mon, Dec 04, 2023 at 02:50:17PM -0500, Stefan Hajnoczi wrote: On

Re: [PATCH 1/1] hw/i2c: add pca9543 i2c-mux switch

2023-12-06 Thread Corey Minyard
On Tue, Dec 05, 2023 at 11:05:33AM -0800, Patrick Venture wrote: > On Tue, Nov 14, 2023 at 3:30 PM Corey Minyard wrote: > > > On Mon, Nov 13, 2023 at 02:31:56PM +0800, Potin Lai wrote: > > > Add pca9543 2-channel i2c-mux switch support. > > > > > > Signed-off-by: Potin Lai > > > > Looks good to

Re: [PATCH v2 for-8.2?] i386/sev: Avoid SEV-ES crash due to missing MSR_EFER_LMA bit

2023-12-06 Thread Michael Roth
On Wed, Dec 06, 2023 at 02:41:13PM +0100, Paolo Bonzini wrote: > On Tue, Dec 5, 2023 at 11:28 PM Michael Roth wrote: > > @@ -3637,12 +3638,18 @@ static int kvm_get_sregs(X86CPU *cpu) > > env->gdt.limit = sregs.gdt.limit; > > env->gdt.base = sregs.gdt.base; > > > > +cr0_old = env->cr[

Re: [PATCH v2 for-8.2?] i386/sev: Avoid SEV-ES crash due to missing MSR_EFER_LMA bit

2023-12-06 Thread Paolo Bonzini
On Wed, Dec 6, 2023 at 3:46 PM Michael Roth wrote: > > There is no need to check cr0_old or sev_es_enabled(); EFER.LMA is > > simply EFER.LME && CR0.PG. > > Yah, I originally had it like that, but svm_set_cr0() in the kernel only > sets it in vcpu->arch.efer it when setting CR0.PG, so I thought it

Re: [PATCH] target/i386: Add new CPU model SierraForest

2023-12-06 Thread Zhao Liu
On Wed, Dec 06, 2023 at 09:19:23PM +0800, Tao Su wrote: > Date: Wed, 6 Dec 2023 21:19:23 +0800 > From: Tao Su > Subject: [PATCH] target/i386: Add new CPU model SierraForest > X-Mailer: git-send-email 2.34.1 > > SierraForest is Intel's first generation E-core based Xeon server > processor, which

Re: [RFC PATCH-for-8.2?] accel/tcg: Implement tcg_unregister_thread()

2023-12-06 Thread Stefan Hajnoczi
On Wed, 6 Dec 2023 at 09:29, Philippe Mathieu-Daudé wrote: > > Hi Stefan, > > On 6/12/23 13:56, Michal Suchánek wrote: > > On Tue, Dec 05, 2023 at 11:09:59AM +0100, Michal Suchánek wrote: > >> On Mon, Dec 04, 2023 at 03:02:45PM -0800, Richard Henderson wrote: > >>> On 12/4/23 12:09, Michal Sucháne

Re: [PATCH v2 for-8.2?] i386/sev: Avoid SEV-ES crash due to missing MSR_EFER_LMA bit

2023-12-06 Thread Michael Roth
On Wed, Dec 06, 2023 at 04:04:43PM +0100, Paolo Bonzini wrote: > On Wed, Dec 6, 2023 at 3:46 PM Michael Roth wrote: > > > There is no need to check cr0_old or sev_es_enabled(); EFER.LMA is > > > simply EFER.LME && CR0.PG. > > > > Yah, I originally had it like that, but svm_set_cr0() in the kernel

Re: [RFC PATCH-for-8.2?] accel/tcg: Implement tcg_unregister_thread()

2023-12-06 Thread Michal Suchánek
On Wed, Dec 06, 2023 at 01:17:08PM -0100, Miguel Luis wrote: > Hi! > > On 04/12/2023 18:40, Philippe Mathieu-Daudé wrote: > > Unplugging vCPU triggers the following assertion in > > tcg_register_thread(): > > > > 796 void tcg_register_thread(void) > > 797 { > > ... > > 812 /* Claim an entr

Re: [RFC PATCH-for-8.2?] accel/tcg: Implement tcg_unregister_thread()

2023-12-06 Thread Alex Bennée
Miguel Luis writes: > Hi! > > On 04/12/2023 18:40, Philippe Mathieu-Daudé wrote: >> Unplugging vCPU triggers the following assertion in >> tcg_register_thread(): >> >> 796 void tcg_register_thread(void) >> 797 { >> ... >> 812 /* Claim an entry in tcg_ctxs */ >> 813 n = qatomic_fetch_

Re: [RFC PATCH-for-8.2?] accel/tcg: Implement tcg_unregister_thread()

2023-12-06 Thread Miguel Luis
> On 6 Dec 2023, at 14:25, Michal Suchánek wrote: > > On Wed, Dec 06, 2023 at 01:17:08PM -0100, Miguel Luis wrote: >> Hi! >> >> On 04/12/2023 18:40, Philippe Mathieu-Daudé wrote: >>> Unplugging vCPU triggers the following assertion in >>> tcg_register_thread(): >>> >>> 796 void tcg_register_t

Re: [PATCH qemu v3 02/20] Fixing the basic functionality of STM32 timers

2023-12-06 Thread Alex Bennée
~lbryndza writes: > From: Lucjan Bryndza > > The current implementation of timers does not work properly > even in basic functionality. A counter configured to report > an interrupt every 10ms reports the first interrupts after a > few seconds. There are also no properly implemented count up an

[PATCH v3 for-8.2] i386/sev: Avoid SEV-ES crash due to missing MSR_EFER_LMA bit

2023-12-06 Thread Michael Roth
Commit 7191f24c7fcf ("accel/kvm/kvm-all: Handle register access errors") added error checking for KVM_SET_SREGS/KVM_SET_SREGS2. In doing so, it exposed a long-running bug in current KVM support for SEV-ES where the kernel assumes that MSR_EFER_LMA will be set explicitly by the guest kernel, in whic

Re: [PATCH qemu 1/2] hw/arm: Add minimal support for the STM32L4x5 SoC

2023-12-06 Thread Alex Bennée
Alistair Francis writes: > On Mon, Nov 27, 2023 at 12:44 AM ~inesvarhol wrote: >> >> From: Inès Varhol >> >> This patch adds a new STM32L4x5 SoC, it is necessary to add support for >> the B-L475E-IOT01A board. >> The implementation is derived from the STM32F405 SoC. >> The implementation contai

Re: [PATCH 01/11] tests/avocado: add a simple i386 replay kernel test

2023-12-06 Thread Richard Henderson
On 12/5/23 12:40, Alex Bennée wrote: There are a number of bugs against 32 bit x86 on the tracker. Lets at least establish a baseline pure kernel boot can do record/replay before we start looking at the devices. Signed-off-by: Alex Bennée --- tests/avocado/replay_kernel.py | 16 ++

Re: [PATCH 02/11] tests/avocado: fix typo in replay_linux

2023-12-06 Thread Richard Henderson
On 12/5/23 12:40, Alex Bennée wrote: Signed-off-by: Alex Bennée --- tests/avocado/replay_linux.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Richard Henderson r~

Re: [PATCH 1/4] scsi: only access SCSIDevice->requests from one thread

2023-12-06 Thread Stefan Hajnoczi
On Tue, 5 Dec 2023 at 05:01, Kevin Wolf wrote: > > Am 04.12.2023 um 17:30 hat Stefan Hajnoczi geschrieben: > > On Fri, Dec 01, 2023 at 05:03:13PM +0100, Kevin Wolf wrote: > > > Am 23.11.2023 um 20:49 hat Stefan Hajnoczi geschrieben: > > > > Stop depending on the AioContext lock and instead access

Re: [PATCH 03/11] scripts/replay-dump: update to latest format

2023-12-06 Thread Richard Henderson
On 12/5/23 12:40, Alex Bennée wrote: @@ -268,6 +279,49 @@ def decode_clock(eid, name, dumpfile): Decoder(28, "EVENT_CP_RESET", decode_checkpoint), ] +# Shutdown cause added +v12_event_table = [Decoder(0, "EVENT_INSTRUCTION", decode_instruction), This comment applied to

Re: [RFC PATCH-for-8.2?] accel/tcg: Implement tcg_unregister_thread()

2023-12-06 Thread Michal Suchánek
On Wed, Dec 06, 2023 at 03:49:28PM +, Miguel Luis wrote: > > > > On 6 Dec 2023, at 14:25, Michal Suchánek wrote: > > > > On Wed, Dec 06, 2023 at 01:17:08PM -0100, Miguel Luis wrote: > >> Hi! > >> > >> On 04/12/2023 18:40, Philippe Mathieu-Daudé wrote: > >>> Unplugging vCPU triggers the fol

Re: [RFC PATCH v2 17/19] heki: x86: Update permissions counters during text patching

2023-12-06 Thread Madhavan T. Venkataraman
On 11/30/23 05:33, Peter Zijlstra wrote: > On Wed, Nov 29, 2023 at 03:07:15PM -0600, Madhavan T. Venkataraman wrote: > >> Kernel Lockdown >> --- >> >> But, we must provide at least some security in V2. Otherwise, it is useless. >> >> So, we have implemented what we call a kernel loc

Re: [PATCH 04/11] scripts/replay_dump: track total number of instructions

2023-12-06 Thread Richard Henderson
On 12/5/23 12:40, Alex Bennée wrote: This will help in tracking where we are in the stream when debugging. Signed-off-by: Alex Bennée --- scripts/replay-dump.py | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) Reviewed-by: Richard Henderson r~

Re: [PATCH 05/11] replay: remove host_clock_last

2023-12-06 Thread Richard Henderson
On 12/5/23 12:41, Alex Bennée wrote: Fixes: a02fe2ca70 (replay: Remove host_clock_last) Signed-off-by: Alex Bennée --- replay/replay-internal.h | 2 -- 1 file changed, 2 deletions(-) Reviewed-by: Richard Henderson r~

[v2 1/4] crypto: Introduce option and structure for detached LUKS header

2023-12-06 Thread Hyman Huang
Add the "header" option for the LUKS format. This field would be used to identify the blockdev's position where a detachable LUKS header is stored. In addition, introduce header field in struct BlockCrypto Signed-off-by: Hyman Huang --- block/crypto.c | 1 + qapi/block-core.json | 6 +

[v2 4/4] block: Support detached LUKS header creation for blockdev-create

2023-12-06 Thread Hyman Huang
Provide the "detached-mode" option for detached LUKS header formatting. To format the LUKS header on the pre-creating disk, example as follows: 1. add a protocol blockdev node of LUKS header $ virsh qemu-monitor-command vm '{"execute":"blockdev-add", > "arguments":{"node-name":"libvirt-1-storage"

[v2 3/4] crypto: Support generic LUKS encryption

2023-12-06 Thread Hyman Huang
By enhancing the LUKS driver, it is possible to enable the detachable LUKS header and, as a result, achieve general encryption for any disk format that QEMU has supported. Take the qcow2 as an example, the usage of the generic LUKS encryption as follows: 1. add a protocol blockdev node of data di

[v2 2/4] crypto: Introduce payload offset set function

2023-12-06 Thread Hyman Huang
Signed-off-by: Hyman Huang --- crypto/block.c | 4 include/crypto/block.h | 1 + 2 files changed, 5 insertions(+) diff --git a/crypto/block.c b/crypto/block.c index 7bb4b74a37..3dcf22a69f 100644 --- a/crypto/block.c +++ b/crypto/block.c @@ -319,6 +319,10 @@ QCryptoHashAlgorithm qcr

[v2 0/4] Support generic Luks encryption

2023-12-06 Thread Hyman Huang
v2: - Simplify the design by reusing the LUKS driver to implement the generic Luks encryption, thank Daniel for the insightful advice. - rebase on master. This functionality was motivated by the following to-do list seen in crypto documents: https://wiki.qemu.org/Features/Block/Crypto The

Re: [RFC PATCH v2 17/19] heki: x86: Update permissions counters during text patching

2023-12-06 Thread Madhavan T. Venkataraman
On 11/30/23 18:45, Edgecombe, Rick P wrote: > On Wed, 2023-11-29 at 15:07 -0600, Madhavan T. Venkataraman wrote: >> Threat Model >> >> >> In the threat model in Heki, the attacker is a user space attacker >> who exploits >> a kernel vulnerability to gain more privileges or bypass th

Re: [PATCH 07/11] replay: make has_unread_data a bool

2023-12-06 Thread Richard Henderson
On 12/5/23 12:41, Alex Bennée wrote: For clarity given it only has two states. Signed-off-by: Alex Bennée --- replay/replay-internal.h | 4 ++-- replay/replay-internal.c | 4 ++-- replay/replay-snapshot.c | 6 +++--- replay/replay.c | 2 +- 4 files changed, 8 insertions(+), 8 del

[PATCH] meson: sort C warning flags alphabetically

2023-12-06 Thread Daniel P . Berrangé
When scanning the list of warning flags to see if one is present, it is helpful if they are in alphabetical order. It is further helpful to separate out the 'no-' prefixed warnings. Signed-off-by: Daniel P. Berrangé --- The diff looks horrendous, so look at the resulting meson.build to see the b

Re: [PATCH 08/11] replay: introduce a central report point for sync errors

2023-12-06 Thread Richard Henderson
On 12/5/23 12:41, Alex Bennée wrote: Figuring out why replay has failed is tricky at the best of times. Lets centralise the reporting of a replay sync error and add a little bit of extra information to help with debugging. Signed-off-by: Alex Bennée --- replay/replay-internal.h | 12 +

Re: [PATCH 08/11] replay: introduce a central report point for sync errors

2023-12-06 Thread Richard Henderson
On 12/6/23 03:35, Philippe Mathieu-Daudé wrote: Hi Alex, On 5/12/23 21:41, Alex Bennée wrote: Figuring out why replay has failed is tricky at the best of times. Lets centralise the reporting of a replay sync error and add a little bit of extra information to help with debugging. Signed-off-by:

Re: [PATCH 09/11] replay: stop us hanging in rr_wait_io_event

2023-12-06 Thread Richard Henderson
On 12/5/23 12:41, Alex Bennée wrote: A lot of the hang I see are when we end up spinning in rr_wait_io_event for an event that will never come in playback. As a new check functions which can see if we are in PLAY mode and kick us us the wait function so the event can be processed. This fixes mos

Re: [PATCH V7 3/8] hw/acpi: Update ACPI GED framework to support vCPU Hotplug

2023-12-06 Thread Zhao Liu
Hi Salil, On Mon, Nov 13, 2023 at 08:12:31PM +, Salil Mehta via wrote: > Date: Mon, 13 Nov 2023 20:12:31 + > From: Salil Mehta via > Subject: [PATCH V7 3/8] hw/acpi: Update ACPI GED framework to support vCPU > Hotplug > X-Mailer: git-send-email 2.8.3 > [snip] > @@ -400,6 +411,12 @@ st

Re: [PATCH] meson: sort C warning flags alphabetically

2023-12-06 Thread Philippe Mathieu-Daudé
On 6/12/23 17:44, Daniel P. Berrangé wrote: When scanning the list of warning flags to see if one is present, it is helpful if they are in alphabetical order. It is further helpful to separate out the 'no-' prefixed warnings. I was sure this was already done eh... Reviewed-by: Philippe Mathieu

Re: [PATCH v4 2/6] xen: backends: don't overwrite XenStore nodes created by toolstack

2023-12-06 Thread Anthony PERARD
On Sat, Dec 02, 2023 at 01:41:21AM +, Volodymyr Babchuk wrote: > Xen PV devices in QEMU can be created in two ways: either by QEMU > itself, if they were passed via command line, or by Xen toolstack. In > the latter case, QEMU scans XenStore entries and configures devices > accordingly. > > In

[PATCH V7 04/12] cpus: vm_resume

2023-12-06 Thread Steve Sistare
Define the vm_resume helper, for use in subsequent patches. Signed-off-by: Steve Sistare Reviewed-by: Peter Xu --- include/sysemu/runstate.h | 9 + system/cpus.c | 9 + 2 files changed, 18 insertions(+) diff --git a/include/sysemu/runstate.h b/include/sysemu/runstat

[PATCH 05/14] cpus: check running not RUN_STATE_RUNNING

2023-12-06 Thread Steve Sistare
When a vm transitions from running to suspended, runstate notifiers are not called, so the notifiers still think the vm is running. Hence, when we call vm_start to restore the suspended state, we call vm_state_notify with running=1. However, some notifiers check for RUN_STATE_RUNNING. They must c

[PATCH V7 00/12] fix migration of suspended runstate

2023-12-06 Thread Steve Sistare
Migration of a guest in the suspended runstate is broken. The incoming migration code automatically tries to wake the guest, which is wrong; the guest should end migration in the same runstate it started. Further, after saving a snapshot in the suspended state and loading it, the vm_start fails.

[PATCH V7 05/12] migration: propagate suspended runstate

2023-12-06 Thread Steve Sistare
If the outgoing machine was previously suspended, propagate that to the incoming side via global_state, so a subsequent vm_start restores the suspended state. To maintain backward and forward compatibility, reclaim some space from the runstate member. Signed-off-by: Steve Sistare --- migration/

[PATCH V7 09/12] tests/qtest: migration events

2023-12-06 Thread Steve Sistare
Define a state object to capture events seen by migration tests, to allow more events to be captured in a subsequent patch, and simplify event checking in wait_for_migration_pass. No functional change. Signed-off-by: Steve Sistare Reviewed-by: Fabiano Rosas Reviewed-by: Daniel P. Berrangé ---

[PATCH 11/14] tests/qtest: migration events

2023-12-06 Thread Steve Sistare
Define a state object to capture events seen by migration tests, to allow more events to be captured in a subsequent patch, and simplify event checking in wait_for_migration_pass. No functional change. Signed-off-by: Steve Sistare Reviewed-by: Fabiano Rosas Reviewed-by: Daniel P. Berrangé ---

[PATCH V7 03/12] cpus: check running not RUN_STATE_RUNNING

2023-12-06 Thread Steve Sistare
When a vm transitions from running to suspended, runstate notifiers are not called, so the notifiers still think the vm is running. Hence, when we call vm_start to restore the suspended state, we call vm_state_notify with running=1. However, some notifiers check for RUN_STATE_RUNNING. They must c

[PATCH 09/14] migration: preserve suspended for snapshot

2023-12-06 Thread Steve Sistare
Restoring a snapshot can break a suspended guest. Snapshots suffer from the same suspended-state issues that affect live migration, plus they must handle an additional problematic scenario, which is that a running vm must remain running if it loads a suspended snapshot. To save, the existing vm_s

[PATCH V7 02/12] cpus: stop vm in suspended runstate

2023-12-06 Thread Steve Sistare
Currently, a vm in the suspended state is not completely stopped. The VCPUs have been paused, but the cpu clock still runs, and runstate notifiers for the transition to stopped have not been called. This causes problems for live migration. Stale cpu timers_state is saved to the migration stream,

[PATCH 01/14] temporary: define CLONE_NEWCGROUP qemu-8.2.0

2023-12-06 Thread Steve Sistare
--- system/qemu-seccomp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/system/qemu-seccomp.c b/system/qemu-seccomp.c index 4d7439e..9e1ff85 100644 --- a/system/qemu-seccomp.c +++ b/system/qemu-seccomp.c @@ -22,6 +22,7 @@ #include #include "sysemu/seccomp.h" #include +#define CLONE_NEWC

[PATCH 10/14] migration: preserve suspended for bg_migration

2023-12-06 Thread Steve Sistare
Do not wake a suspended guest during bg_migration, and restore the prior state at finish rather than unconditionally running. Allow the additional state transitions that occur. Signed-off-by: Steve Sistare Reviewed-by: Fabiano Rosas Reviewed-by: Peter Xu --- migration/migration.c | 7 +--

[PATCH 07/14] migration: propagate suspended runstate

2023-12-06 Thread Steve Sistare
If the outgoing machine was previously suspended, propagate that to the incoming side via global_state, so a subsequent vm_start restores the suspended state. To maintain backward and forward compatibility, reclaim some space from the runstate member. Signed-off-by: Steve Sistare --- migration/

[PATCH V7 08/12] migration: preserve suspended for bg_migration

2023-12-06 Thread Steve Sistare
Do not wake a suspended guest during bg_migration, and restore the prior state at finish rather than unconditionally running. Allow the additional state transitions that occur. Signed-off-by: Steve Sistare Reviewed-by: Fabiano Rosas Reviewed-by: Peter Xu --- migration/migration.c | 7 +--

[PATCH 04/14] cpus: stop vm in suspended runstate

2023-12-06 Thread Steve Sistare
Currently, a vm in the suspended state is not completely stopped. The VCPUs have been paused, but the cpu clock still runs, and runstate notifiers for the transition to stopped have not been called. This causes problems for live migration. Stale cpu timers_state is saved to the migration stream,

[PATCH V7 01/12] cpus: vm_was_suspended

2023-12-06 Thread Steve Sistare
Add a state variable to remember if a vm previously transitioned into a suspended state. Signed-off-by: Steve Sistare Reviewed-by: Peter Xu --- include/sysemu/runstate.h | 2 ++ system/cpus.c | 15 +++ 2 files changed, 17 insertions(+) diff --git a/include/sysemu/runst

[PATCH 03/14] cpus: vm_was_suspended

2023-12-06 Thread Steve Sistare
Add a state variable to remember if a vm previously transitioned into a suspended state. Signed-off-by: Steve Sistare Reviewed-by: Peter Xu --- include/sysemu/runstate.h | 2 ++ system/cpus.c | 15 +++ 2 files changed, 17 insertions(+) diff --git a/include/sysemu/runst

[PATCH 12/14] tests/qtest: option to suspend during migration

2023-12-06 Thread Steve Sistare
Add an option to suspend the src in a-b-bootblock.S, which puts the guest in S3 state after one round of writing to memory. The option is enabled by poking a 1 into the suspend_me word in the boot block prior to starting the src vm. Generate symbol offsets in a-b-bootblock.h so that the suspend_m

Re: [PATCH V7 00/12] fix migration of suspended runstate

2023-12-06 Thread Steven Sistare
Gack, there was cruft in my send mail directory. Please ignore this threaded series, and I will resend. Sorry for the noise. - Steve On 12/6/2023 12:12 PM, Steve Sistare wrote: > Migration of a guest in the suspended runstate is broken. The incoming > migration code automatically tries to wak

[PATCH V7 12/12] tests/qtest: postcopy migration with suspend

2023-12-06 Thread Steve Sistare
Add a test case to verify that the suspended state is handled correctly by live migration postcopy. The test suspends the src, migrates, then wakes the dest. Signed-off-by: Steve Sistare --- tests/qtest/migration-test.c | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-)

[PATCH 14/14] tests/qtest: postcopy migration with suspend

2023-12-06 Thread Steve Sistare
Add a test case to verify that the suspended state is handled correctly by live migration postcopy. The test suspends the src, migrates, then wakes the dest. Signed-off-by: Steve Sistare --- tests/qtest/migration-test.c | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-)

[PATCH V7 07/12] migration: preserve suspended for snapshot

2023-12-06 Thread Steve Sistare
Restoring a snapshot can break a suspended guest. Snapshots suffer from the same suspended-state issues that affect live migration, plus they must handle an additional problematic scenario, which is that a running vm must remain running if it loads a suspended snapshot. To save, the existing vm_s

[PATCH V7 11/12] tests/qtest: precopy migration with suspend

2023-12-06 Thread Steve Sistare
Add a test case to verify that the suspended state is handled correctly during live migration precopy. The test suspends the src, migrates, then wakes the dest. Signed-off-by: Steve Sistare --- tests/qtest/migration-helpers.c | 3 ++ tests/qtest/migration-helpers.h | 2 ++ tests/qtest/migrati

[PATCH V7 10/12] tests/qtest: option to suspend during migration

2023-12-06 Thread Steve Sistare
Add an option to suspend the src in a-b-bootblock.S, which puts the guest in S3 state after one round of writing to memory. The option is enabled by poking a 1 into the suspend_me word in the boot block prior to starting the src vm. Generate symbol offsets in a-b-bootblock.h so that the suspend_m

[PATCH 08/14] migration: preserve suspended runstate

2023-12-06 Thread Steve Sistare
A guest that is migrated in the suspended state automaticaly wakes and continues execution. This is wrong; the guest should end migration in the same state it started. The root cause is that the outgoing migration code automatically wakes the guest, then saves the RUNNING runstate in global_state

[PATCH 13/14] tests/qtest: precopy migration with suspend

2023-12-06 Thread Steve Sistare
Add a test case to verify that the suspended state is handled correctly during live migration precopy. The test suspends the src, migrates, then wakes the dest. Signed-off-by: Steve Sistare --- tests/qtest/migration-helpers.c | 3 ++ tests/qtest/migration-helpers.h | 2 ++ tests/qtest/migrati

[PATCH 06/14] cpus: vm_resume

2023-12-06 Thread Steve Sistare
Define the vm_resume helper, for use in subsequent patches. Signed-off-by: Steve Sistare Reviewed-by: Peter Xu --- include/sysemu/runstate.h | 9 + system/cpus.c | 9 + 2 files changed, 18 insertions(+) diff --git a/include/sysemu/runstate.h b/include/sysemu/runstat

[PATCH V7 06/12] migration: preserve suspended runstate

2023-12-06 Thread Steve Sistare
A guest that is migrated in the suspended state automaticaly wakes and continues execution. This is wrong; the guest should end migration in the same state it started. The root cause is that the outgoing migration code automatically wakes the guest, then saves the RUNNING runstate in global_state

Re: [PATCH v2 for-8.2?] i386/sev: Avoid SEV-ES crash due to missing MSR_EFER_LMA bit

2023-12-06 Thread Maxim Levitsky
On Tue, 2023-12-05 at 16:28 -0600, Michael Roth wrote: > Commit 7191f24c7fcf ("accel/kvm/kvm-all: Handle register access errors") > added error checking for KVM_SET_SREGS/KVM_SET_SREGS2. In doing so, it > exposed a long-running bug in current KVM support for SEV-ES where the > kernel assumes that M

[PATCH V7 00/12] fix migration of suspended runstate

2023-12-06 Thread Steve Sistare
Migration of a guest in the suspended runstate is broken. The incoming migration code automatically tries to wake the guest, which is wrong; the guest should end migration in the same runstate it started. Further, after saving a snapshot in the suspended state and loading it, the vm_start fails.

[PATCH V7 10/12] tests/qtest: option to suspend during migration

2023-12-06 Thread Steve Sistare
Add an option to suspend the src in a-b-bootblock.S, which puts the guest in S3 state after one round of writing to memory. The option is enabled by poking a 1 into the suspend_me word in the boot block prior to starting the src vm. Generate symbol offsets in a-b-bootblock.h so that the suspend_m

[PATCH V7 04/12] cpus: vm_resume

2023-12-06 Thread Steve Sistare
Define the vm_resume helper, for use in subsequent patches. Signed-off-by: Steve Sistare Reviewed-by: Peter Xu --- include/sysemu/runstate.h | 9 + system/cpus.c | 9 + 2 files changed, 18 insertions(+) diff --git a/include/sysemu/runstate.h b/include/sysemu/runstat

[PATCH V7 12/12] tests/qtest: postcopy migration with suspend

2023-12-06 Thread Steve Sistare
Add a test case to verify that the suspended state is handled correctly by live migration postcopy. The test suspends the src, migrates, then wakes the dest. Signed-off-by: Steve Sistare --- tests/qtest/migration-test.c | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-)

[PATCH V7 07/12] migration: preserve suspended for snapshot

2023-12-06 Thread Steve Sistare
Restoring a snapshot can break a suspended guest. Snapshots suffer from the same suspended-state issues that affect live migration, plus they must handle an additional problematic scenario, which is that a running vm must remain running if it loads a suspended snapshot. To save, the existing vm_s

[PATCH V7 02/12] cpus: stop vm in suspended runstate

2023-12-06 Thread Steve Sistare
Currently, a vm in the suspended state is not completely stopped. The VCPUs have been paused, but the cpu clock still runs, and runstate notifiers for the transition to stopped have not been called. This causes problems for live migration. Stale cpu timers_state is saved to the migration stream,

[PATCH V7 09/12] tests/qtest: migration events

2023-12-06 Thread Steve Sistare
Define a state object to capture events seen by migration tests, to allow more events to be captured in a subsequent patch, and simplify event checking in wait_for_migration_pass. No functional change. Signed-off-by: Steve Sistare Reviewed-by: Fabiano Rosas Reviewed-by: Daniel P. Berrangé ---

[PATCH V7 03/12] cpus: check running not RUN_STATE_RUNNING

2023-12-06 Thread Steve Sistare
When a vm transitions from running to suspended, runstate notifiers are not called, so the notifiers still think the vm is running. Hence, when we call vm_start to restore the suspended state, we call vm_state_notify with running=1. However, some notifiers check for RUN_STATE_RUNNING. They must c

[PATCH V7 11/12] tests/qtest: precopy migration with suspend

2023-12-06 Thread Steve Sistare
Add a test case to verify that the suspended state is handled correctly during live migration precopy. The test suspends the src, migrates, then wakes the dest. Signed-off-by: Steve Sistare --- tests/qtest/migration-helpers.c | 3 ++ tests/qtest/migration-helpers.h | 2 ++ tests/qtest/migrati

[PATCH V7 01/12] cpus: vm_was_suspended

2023-12-06 Thread Steve Sistare
Add a state variable to remember if a vm previously transitioned into a suspended state. Signed-off-by: Steve Sistare Reviewed-by: Peter Xu --- include/sysemu/runstate.h | 2 ++ system/cpus.c | 15 +++ 2 files changed, 17 insertions(+) diff --git a/include/sysemu/runst

[PATCH V7 06/12] migration: preserve suspended runstate

2023-12-06 Thread Steve Sistare
A guest that is migrated in the suspended state automaticaly wakes and continues execution. This is wrong; the guest should end migration in the same state it started. The root cause is that the outgoing migration code automatically wakes the guest, then saves the RUNNING runstate in global_state

[PATCH V7 05/12] migration: propagate suspended runstate

2023-12-06 Thread Steve Sistare
If the outgoing machine was previously suspended, propagate that to the incoming side via global_state, so a subsequent vm_start restores the suspended state. To maintain backward and forward compatibility, reclaim some space from the runstate member. Signed-off-by: Steve Sistare --- migration/

[PATCH V7 08/12] migration: preserve suspended for bg_migration

2023-12-06 Thread Steve Sistare
Do not wake a suspended guest during bg_migration, and restore the prior state at finish rather than unconditionally running. Allow the additional state transitions that occur. Signed-off-by: Steve Sistare Reviewed-by: Fabiano Rosas Reviewed-by: Peter Xu --- migration/migration.c | 7 +--

  1   2   >