| 1 | /* |
| 2 | * Specific Purpose Memory (SPM) device |
| 3 | * |
| 4 | * TYPE_MEMORY_DEVICE subclass for boot-time-only memory exposed to the |
| 5 | * guest as an E820 SOFT_RESERVED range with a SRAT memory-affinity entry. |
| 6 | * |
| 7 | * Copyright (c) 2026 Advanced Micro Devices, Inc. |
| 8 | * |
| 9 | * Authors: |
| 10 | * FangSheng Huang <FangSheng.Huang@amd.com> |
| 11 | * |
| 12 | * SPDX-License-Identifier: GPL-2.0-or-later |
| 13 | */ |
| 14 | |
| 15 | #ifndef QEMU_SP_MEM_H |
| 16 | #define QEMU_SP_MEM_H |
| 17 | |
| 18 | #include "hw/core/qdev.h" |
| 19 | #include "qom/object.h" |
| 20 | |
| 21 | #define TYPE_SP_MEM "sp-mem" |
| 22 | |
| 23 | OBJECT_DECLARE_SIMPLE_TYPE(SpMemDevice, SP_MEM) |
| 24 | |
| 25 | struct SpMemDevice { |
| 26 | DeviceState parent_obj; |
| 27 | |
| 28 | HostMemoryBackend *hostmem; |
| 29 | uint32_t node; |
| 30 | uint64_t addr; |
| 31 | }; |
| 32 | |
| 33 | #endif /* QEMU_SP_MEM_H */ |