[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 15/18] hw/cxl: fix physical address field in get scan media result
From: |
Michael S. Tsirkin |
Subject: |
[PULL 15/18] hw/cxl: fix physical address field in get scan media results output |
Date: |
Wed, 11 Sep 2024 09:52:11 -0400 |
From: peng guo <engguopeng@buaa.edu.cn>
When using the mailbox command get scan media results, the scan media
restart physical address field in the ouput palyload is not 64-byte
aligned.
This patch removed the error source of the restart physical address.
The Scan Media Restart Physical Address is the location from which the
host should restart the Scan Media operation. [5:0] bits are reserved.
Refer to CXL spec r3.1 Table 8-146
Fixes: 89b5cfcc31e6 ("hw/cxl: Add get scan media results cmd support")
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link:
https://lore.kernel.org/linux-cxl/20240819154206.16456-1-engguopeng@buaa.edu.cn/
Signed-off-by: peng guo <engguopeng@buaa.edu.cn>
Message-Id: <20240825102212.3871-1-engguopeng@buaa.edu.cn>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/cxl/cxl-mailbox-utils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/cxl/cxl-mailbox-utils.c b/hw/cxl/cxl-mailbox-utils.c
index 3ebbd32e10..9258e48f95 100644
--- a/hw/cxl/cxl-mailbox-utils.c
+++ b/hw/cxl/cxl-mailbox-utils.c
@@ -2076,7 +2076,7 @@ static CXLRetCode cmd_media_get_scan_media_results(const
struct cxl_cmd *cmd,
start = ROUND_DOWN(ent->start, 64ull);
stop = ROUND_DOWN(ent->start, 64ull) + ent->length;
- stq_le_p(&out->records[i].addr, start | (ent->type & 0x7));
+ stq_le_p(&out->records[i].addr, start);
stl_le_p(&out->records[i].length, (stop - start) /
CXL_CACHE_LINE_SIZE);
i++;
--
MST
- [PULL 00/18] virtio,pc,pci: features, fixes, cleanups, Michael S. Tsirkin, 2024/09/11
- [PULL 13/18] vhost_net: configure all host notifiers in a single MR transaction, Michael S. Tsirkin, 2024/09/11
- [PULL 16/18] hw/audio/virtio-sound: fix heap buffer overflow, Michael S. Tsirkin, 2024/09/11
- [PULL 06/18] hw/pci/pci-hmp-cmds: Avoid displaying bogus size in 'info pci', Michael S. Tsirkin, 2024/09/11
- [PULL 01/18] virtio: Allow .get_vhost() without vhost_started, Michael S. Tsirkin, 2024/09/11
- [PULL 14/18] virtio-pci: Add lookup subregion of VirtIOPCIRegion MR, Michael S. Tsirkin, 2024/09/11
- [PULL 07/18] virtio: rename virtio_split_packed_update_used_idx, Michael S. Tsirkin, 2024/09/11
- [PULL 15/18] hw/cxl: fix physical address field in get scan media results output,
Michael S. Tsirkin <=
- [PULL 12/18] tests/acpi: pc: update golden masters for DSDT, Michael S. Tsirkin, 2024/09/11
- [PULL 08/18] intel_iommu: Fix invalidation descriptor type field, Michael S. Tsirkin, 2024/09/11
- [PULL 11/18] hw/i386/acpi-build: Return a pre-computed _PRT table, Michael S. Tsirkin, 2024/09/11
- [PULL 02/18] virtio: Always reset vhost devices, Michael S. Tsirkin, 2024/09/11
- [PULL 04/18] hw/isa/vt82c686.c: Embed i8259 irq in device state instead of allocating, Michael S. Tsirkin, 2024/09/11
- [PULL 09/18] intel_iommu: Make PASID-cache and PIOTLB type invalid in legacy mode, Michael S. Tsirkin, 2024/09/11
- [PULL 10/18] tests/acpi: pc: allow DSDT acpi table changes, Michael S. Tsirkin, 2024/09/11
- [PULL 17/18] virtio-mem: don't warn about THP sizes on a kernel without THP support, Michael S. Tsirkin, 2024/09/11
- [PULL 03/18] hw: Move declaration of IRQState to header and add init function, Michael S. Tsirkin, 2024/09/11
- [PULL 05/18] pci: don't skip function 0 occupancy verification for devfn auto assign, Michael S. Tsirkin, 2024/09/11