mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
include/hw/cxl/cxl_device: Rename mem_size as static_mem_size for type3 memory devices
Rename mem_size as static_mem_size for type3 memdev to cover static RAM and pmem capacity, preparing for the introduction of dynamic capacity to support dynamic capacity devices. Reviewed-by: Gregory Price <gregory.price@memverge.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Fan Ni <fan.ni@samsung.com> Message-Id: <20240523174651.1089554-6-nifan.cxl@gmail.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
0f0f140b10
commit
2585108077
3 changed files with 7 additions and 7 deletions
|
@ -803,7 +803,7 @@ static CXLRetCode cmd_identify_memory_device(const struct cxl_cmd *cmd,
|
|||
snprintf(id->fw_revision, 0x10, "BWFW VERSION %02d", 0);
|
||||
|
||||
stq_le_p(&id->total_capacity,
|
||||
cxl_dstate->mem_size / CXL_CAPACITY_MULTIPLIER);
|
||||
cxl_dstate->static_mem_size / CXL_CAPACITY_MULTIPLIER);
|
||||
stq_le_p(&id->persistent_capacity,
|
||||
cxl_dstate->pmem_size / CXL_CAPACITY_MULTIPLIER);
|
||||
stq_le_p(&id->volatile_capacity,
|
||||
|
@ -1179,7 +1179,7 @@ static CXLRetCode cmd_media_clear_poison(const struct cxl_cmd *cmd,
|
|||
struct clear_poison_pl *in = (void *)payload_in;
|
||||
|
||||
dpa = ldq_le_p(&in->dpa);
|
||||
if (dpa + CXL_CACHE_LINE_SIZE > cxl_dstate->mem_size) {
|
||||
if (dpa + CXL_CACHE_LINE_SIZE > cxl_dstate->static_mem_size) {
|
||||
return CXL_MBOX_INVALID_PA;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue