From: Chenyi Qiang <chenyi.qiang@intel.com>
To: "David Hildenbrand" <david@redhat.com>,
"Peter Xu" <peterx@redhat.com>,
"Alexey Kardashevskiy" <aik@amd.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: <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 2/2] ram-block-attributes: Unify the retrieval of the block size
Date: Thu, 23 Oct 2025 19:52:18 +0800 [thread overview]
Message-ID: <ef16f86d-c899-448f-863f-0da872a354aa@intel.com> (raw)
In-Reply-To: <ab265378-6e08-480c-92b5-640f84bc6706@redhat.com>
On 10/23/2025 6:17 PM, David Hildenbrand wrote:
> On 23.10.25 11:55, Chenyi Qiang wrote:
>> 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();
>
> Double space before the " " can be removed while you touch this.
Oops, so careless I was. To fixup this patch:
===
From 3c224dfb946feccf6f94af8aa1068cc72bf5ddc7 Mon Sep 17 00:00:00 2001
From: Chenyi Qiang <chenyi.qiang@intel.com>
Date: Thu, 23 Oct 2025 19:43:52 +0800
Subject: [PATCH] fixup! ram-block-attributes: Unify the retrieval of the block
size
Signed-off-by: Chenyi Qiang <chenyi.qiang@intel.com>
---
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 cf8f5f41966..fb7c5c27467 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 = ram_block_attributes_get_block_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 11:53 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 ` [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 [this message]
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=ef16f86d-c899-448f-863f-0da872a354aa@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.