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
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
在 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
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
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
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
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
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é
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é
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 +-
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
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é
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
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
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 --
>
> ~~~
>
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
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
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
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
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
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
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
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
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/-
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
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
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[
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
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
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
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
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
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_
> 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
~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
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
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
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 ++
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~
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
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
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
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
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~
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~
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 +
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"
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
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:
- 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
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
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
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
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 +
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:
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
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
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
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
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
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
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.
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/
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é
---
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é
---
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
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
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,
---
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
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 +--
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/
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 +--
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,
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
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
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
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
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(-)
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(-)
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
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
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
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
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
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
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
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
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.
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
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
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(-)
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
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,
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é
---
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
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
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
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
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/
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 - 100 of 123 matches
Mail list logo