From: Steven Sistare <steven.sistare@oracle.com>
To: Zhenzhong Duan <zhenzhong.duan@intel.com>, qemu-devel@nongnu.org
Cc: alex.williamson@redhat.com, clg@redhat.com,
eric.auger@redhat.com, Markus Armbruster <armbru@redhat.com>
Subject: Re: [PATCH v2 5/6] accel/kvm: Fix an erroneous check on coalesced_mmio_ring
Date: Mon, 29 Sep 2025 09:34:53 -0400 [thread overview]
Message-ID: <011cdcf9-f918-4ceb-8ef0-acfc20d15c11@oracle.com> (raw)
In-Reply-To: <20250928085432.40107-6-zhenzhong.duan@intel.com>
On 9/28/2025 4:54 AM, Zhenzhong Duan wrote:
> According to KVM uAPI, coalesced mmio page is KVM_COALESCED_MMIO_PAGE_OFFSET
> offset from kvm_run pages. For x86 it's 2 pages offset, for arm it's 1 page
> offset currently. We shouldn't presume it's hardcoded 1 page or else
> coalesced_mmio_ring will not be cleared in do_kvm_destroy_vcpu() in x86.
>
> Fixes: 7ed0919119b0 ("migration: close kvm after cpr")
> Cc: Markus Armbruster <armbru@redhat.com>
> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Steve Sistare <steven.sistare@oracle.com>
> ---
> accel/kvm/kvm-all.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
> index 9060599cd7..23fd491441 100644
> --- a/accel/kvm/kvm-all.c
> +++ b/accel/kvm/kvm-all.c
> @@ -523,7 +523,8 @@ static int do_kvm_destroy_vcpu(CPUState *cpu)
> }
>
> /* If I am the CPU that created coalesced_mmio_ring, then discard it */
> - if (s->coalesced_mmio_ring == (void *)cpu->kvm_run + PAGE_SIZE) {
> + if (s->coalesced_mmio_ring ==
> + (void *)cpu->kvm_run + s->coalesced_mmio * PAGE_SIZE) {
> s->coalesced_mmio_ring = NULL;
> }
>
next prev parent reply other threads:[~2025-09-29 13:42 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-28 8:54 [PATCH v2 0/6] VFIO: cpr-transfer fixes Zhenzhong Duan
2025-09-28 8:54 ` [PATCH v2 1/6] vfio/container: Remap only populated parts in a section Zhenzhong Duan
2025-09-28 8:54 ` [PATCH v2 2/6] vfio/cpr-legacy: drop an erroneous assert Zhenzhong Duan
2025-09-28 8:54 ` [PATCH v2 3/6] vfio/iommufd: Set cpr.ioas_id on source side for CPR transfer Zhenzhong Duan
2025-09-28 8:54 ` [PATCH v2 4/6] vfio/iommufd: Restore vbasedev's reference to hwpt after " Zhenzhong Duan
2025-09-28 8:54 ` [PATCH v2 5/6] accel/kvm: Fix an erroneous check on coalesced_mmio_ring Zhenzhong Duan
2025-09-29 13:34 ` Steven Sistare [this message]
2025-09-28 8:54 ` [PATCH v2 6/6] accel/kvm: Fix SIGSEGV when execute "query-balloon" after CPR transfer Zhenzhong Duan
2025-09-29 13:54 ` Steven Sistare
2025-09-30 6:00 ` Duan, Zhenzhong
2025-09-30 12:52 ` Steven Sistare
2025-10-08 10:22 ` Duan, Zhenzhong
2025-10-09 14:11 ` Steven Sistare
2025-10-09 14:19 ` Daniel P. Berrangé
2025-10-09 14:32 ` Steven Sistare
2025-10-09 14:36 ` Daniel P. Berrangé
2025-10-10 3:54 ` Duan, Zhenzhong
2025-10-10 8:39 ` Daniel P. Berrangé
2025-10-10 3:45 ` Duan, Zhenzhong
2025-10-10 3:39 ` Duan, Zhenzhong
2025-10-07 15:39 ` [PATCH v2 0/6] VFIO: cpr-transfer fixes Cédric Le Goater
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=011cdcf9-f918-4ceb-8ef0-acfc20d15c11@oracle.com \
--to=steven.sistare@oracle.com \
--cc=alex.williamson@redhat.com \
--cc=armbru@redhat.com \
--cc=clg@redhat.com \
--cc=eric.auger@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=zhenzhong.duan@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).