From: Peter Xu <peterx@redhat.com>
To: David Hildenbrand <david@redhat.com>
Cc: "Chenyi Qiang" <chenyi.qiang@intel.com>,
"Alexey Kardashevskiy" <aik@amd.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
qemu-devel@nongnu.org, "Gao Chao" <chao.gao@intel.com>,
"Li Xiaoyao" <xiaoyao.li@intel.com>,
"Farrah Chen" <farrah.chen@intel.com>
Subject: Re: [PATCH v2 1/2] ram-block-attributes: Avoid the overkill of shared memory with hugetlbfs backend
Date: Thu, 23 Oct 2025 09:47:05 -0400 [thread overview]
Message-ID: <aPox2bGvDplUdPFe@x1.local> (raw)
In-Reply-To: <3035c1a0-78b7-44a4-a9d8-4e84b9732262@redhat.com>
On Thu, Oct 23, 2025 at 12:16:46PM +0200, David Hildenbrand wrote:
> On 23.10.25 11:55, Chenyi Qiang wrote:
>
> Subject should probably rather be:
>
> "ram-block-attributes: fix interaction with hugetlb memory backends"
>
> Maybe that can be fixed up when applying.
I also agree the old subject is slightly confusing..
I queued the two patches with all the small fixups.
Thanks,
>
> > Currently, CoCo VMs can perform conversion at the base page granularity,
> > which is the granularity that has to be tracked. In relevant setups, the
> > target page size is assumed to be equal to the host page size, thus
> > fixing the block size to the host page size.
> >
> > However, since private memory and shared memory have different backend
> > at present, users can specify shared memory with a hugetlbfs backend
> > while private memory with guest_memfd backend only supports 4K page
> > size. In this scenario, ram_block->page_size is different from the host
> > page size which will trigger an assertion when retrieving the block
> > size.
> >
> > To address this, return the host page size directly to relax the
> > restriction. This changes fixes a regression of using hugetlbfs backend
> > for shared memory within CoCo VMs, with or without VFIO devices' presence.
> >
> > Acked-by: David Hildenbrand <david@redhat.com>
> > Tested-by: Farrah Chen <farrah.chen@intel.com>
> > Signed-off-by: Chenyi Qiang <chenyi.qiang@intel.com>
> > ---
>
>
> --
> Cheers
>
> David / dhildenb
>
--
Peter Xu
next prev parent reply other threads:[~2025-10-23 13:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-23 9:55 [PATCH v2 0/2] Fix a regression with hugetlbfs for shared memory in CoCo VMs Chenyi Qiang
2025-10-23 9:55 ` [PATCH v2 1/2] ram-block-attributes: Avoid the overkill of shared memory with hugetlbfs backend Chenyi Qiang
2025-10-23 10:16 ` David Hildenbrand
2025-10-23 13:47 ` Peter Xu [this message]
2025-10-24 0:16 ` Xiaoyao Li
2025-10-23 9:55 ` [PATCH v2 2/2] ram-block-attributes: Unify the retrieval of the block size Chenyi Qiang
2025-10-23 10:17 ` David Hildenbrand
2025-10-23 11:52 ` Chenyi Qiang
2025-10-24 0:16 ` Xiaoyao Li
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=aPox2bGvDplUdPFe@x1.local \
--to=peterx@redhat.com \
--cc=aik@amd.com \
--cc=chao.gao@intel.com \
--cc=chenyi.qiang@intel.com \
--cc=david@redhat.com \
--cc=farrah.chen@intel.com \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=xiaoyao.li@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).