qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Zenghui Yu <yuzenghui@huawei.com>,
	qemu-devel@nongnu.org, qemu-arm@nongnu.org
Cc: wanghaibin.wang@huawei.com,
	Alex Williamson <alex.williamson@redhat.com>,
	Cornelia Huck <cohuck@redhat.com>,
	Kirti Wankhede <kwankhede@nvidia.com>,
	kvmarm@lists.cs.columbia.edu
Subject: Re: [RFC] vfio-pci/migration: Dirty logging of the Memory BAR region?
Date: Sun, 15 Nov 2020 16:03:01 +0100	[thread overview]
Message-ID: <2825e816-9ade-07f9-19e3-ccfd57ffb568@redhat.com> (raw)
In-Reply-To: <fd18627a-e012-1af8-9d9f-9ae8a1415258@huawei.com>

On 15/11/20 15:31, Zenghui Yu wrote:
> diff --git a/softmmu/memory.c b/softmmu/memory.c
> index 71951fe4dc..0958db1a08 100644
> --- a/softmmu/memory.c
> +++ b/softmmu/memory.c
> @@ -1806,7 +1806,10 @@ bool memory_region_is_ram_device(MemoryRegion *mr)
>   uint8_t memory_region_get_dirty_log_mask(MemoryRegion *mr)
>   {
>       uint8_t mask = mr->dirty_log_mask;
> -    if (global_dirty_log && (mr->ram_block || 
> memory_region_is_iommu(mr))) {
> +    RAMBlock *rb = mr->ram_block;
> +
> +    if (global_dirty_log && ((rb && qemu_ram_is_migratable(rb)) ||
> +                             memory_region_is_iommu(mr))) {
>           mask |= (1 << DIRTY_MEMORY_MIGRATION);
>       }
>       return mask;

Yes, this makes sense.  Please send it as a patch, thanks!

Paolo



  reply	other threads:[~2020-11-15 15:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-15 14:31 [RFC] vfio-pci/migration: Dirty logging of the Memory BAR region? Zenghui Yu
2020-11-15 15:03 ` Paolo Bonzini [this message]
2020-11-16  8:16   ` Zenghui Yu

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=2825e816-9ade-07f9-19e3-ccfd57ffb568@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=alex.williamson@redhat.com \
    --cc=cohuck@redhat.com \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=kwankhede@nvidia.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=wanghaibin.wang@huawei.com \
    --cc=yuzenghui@huawei.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).