From: Chenyi Qiang <chenyi.qiang@intel.com>
To: "Peter Xu" <peterx@redhat.com>,
"David Hildenbrand" <david@redhat.com>,
"Alexey Kardashevskiy" <aik@amd.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: Chenyi Qiang <chenyi.qiang@intel.com>,
qemu-devel@nongnu.org, Gao Chao <chao.gao@intel.com>,
Li Xiaoyao <xiaoyao.li@intel.com>,
Farrah Chen <farrah.chen@intel.com>
Subject: [PATCH v2 2/2] ram-block-attributes: Unify the retrieval of the block size
Date: Thu, 23 Oct 2025 17:55:25 +0800 [thread overview]
Message-ID: <20251023095526.48365-3-chenyi.qiang@intel.com> (raw)
In-Reply-To: <20251023095526.48365-1-chenyi.qiang@intel.com>
There's an existing helper function designed to obtain the block size.
Modify ram_block_attribute_create() to use this function for
consistency.
Tested-by: Farrah Chen <farrah.chen@intel.com>
Signed-off-by: Chenyi Qiang <chenyi.qiang@intel.com>
---
Changes in v2:
- Newly added.
---
system/ram-block-attributes.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/system/ram-block-attributes.c b/system/ram-block-attributes.c
index a7579de5b46..cf8f5f41966 100644
--- a/system/ram-block-attributes.c
+++ b/system/ram-block-attributes.c
@@ -390,7 +390,7 @@ int ram_block_attributes_state_change(RamBlockAttributes *attr,
RamBlockAttributes *ram_block_attributes_create(RAMBlock *ram_block)
{
- const int block_size = qemu_real_host_page_size();
+ const int block_size = ram_block_attributes_get_block_size();
RamBlockAttributes *attr;
MemoryRegion *mr = ram_block->mr;
--
2.43.5
next prev parent reply other threads:[~2025-10-23 9:56 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
2025-10-24 0:16 ` Xiaoyao Li
2025-10-23 9:55 ` Chenyi Qiang [this message]
2025-10-23 10:17 ` [PATCH v2 2/2] ram-block-attributes: Unify the retrieval of the block size 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=20251023095526.48365-3-chenyi.qiang@intel.com \
--to=chenyi.qiang@intel.com \
--cc=aik@amd.com \
--cc=chao.gao@intel.com \
--cc=david@redhat.com \
--cc=farrah.chen@intel.com \
--cc=pbonzini@redhat.com \
--cc=peterx@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.