From 5ce2d7f8e90911ae6d7a9be295881c74f64706f2 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Wed, 19 Nov 2025 12:51:32 +0100 Subject: [PATCH 2/2] ram-block-attributes: Unify the retrieval of the block size RH-Author: Paolo Bonzini RH-MergeRequest: 425: SNP fixes for RHEL 9.8 RH-Jira: RHEL-126693 RH-Acked-by: Bandan Das RH-Acked-by: Eric Blake RH-Acked-by: Peter Xu RH-Commit: [2/2] 56381c838d3f1269f7129140f0fa19c40f9f09f0 (bonzini/qemu-kvm-centos) JIRA: https://issues.redhat.com/browse/RHEL-126693 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 Signed-off-by: Chenyi Qiang Link: https://lore.kernel.org/r/20251023095526.48365-3-chenyi.qiang@intel.com [peterx: fix double spaces, per david] Signed-off-by: Peter Xu (cherry picked from commit b2ceb87b1a210d91a29d525590eb164d1121b8a1) Signed-off-by: Paolo Bonzini --- 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 a7579de5b4..fb7c5c2746 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.51.1