qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH V2 06/11] migration: fix mismatched GPAs during cpr


From: Steven Sistare
Subject: Re: [PATCH V2 06/11] migration: fix mismatched GPAs during cpr
Date: Wed, 7 Aug 2024 17:04:26 -0400
User-agent: Mozilla Thunderbird

On 7/19/2024 12:28 PM, Peter Xu wrote:
On Sun, Jun 30, 2024 at 12:40:29PM -0700, Steve Sistare wrote:
For new cpr modes, ramblock_is_ignored will always be true, because the
memory is preserved in place rather than copied.  However, for an ignored
block, parse_ramblock currently requires that the received address of the
block must match the address of the statically initialized region on the
target.  This fails for a PCI rom block, because the memory region address
is set when the guest writes to a BAR on the source, which does not occur
on the target, causing a "Mismatched GPAs" error during cpr migration.

Is this a common fix with/without cpr mode?

It looks to me mr->addr (for these ROMs) should only be set in PCI config
region updates as you mentioned.  But then I didn't figure out when they're
updated on dest in live migration: the ramblock info was sent at the
beginning of migration, so it doesn't even have PCI config space migrated;
I thought the real mr->addr should be in there.

I also failed to understand yet on why the mr->addr check needs to be done
by ignore-shared only.  Some explanation would be greatly helpful around
this area..

The error_report does not bite for normal migration because 
migrate_ram_is_ignored()
is false for the problematic blocks, so the block->mr->addr check is not
performed.  However, mr->addr is never fixed up in this case, which is a
quiet potential bug, and this patch fixes that with the "has_addr" check.

For cpr-exec, migrate_ram_is_ignored() is true for all blocks,
because we do not copy the contents over the migration stream, we preserve the
memory in place.  So we fall into the block->mr->addr sanity check and fail
with the original code.

I will add this to the commit message.

- Steve



reply via email to

[Prev in Thread] Current Thread [Next in Thread]