We want to allow to specify (similar as for a DIMM), to which node a virtio-mem device (and, therefore, its memory) belongs. Add a new virtio-mem feature flag and export pxm_to_node, so it can be used in kernel module context.
Showing the changes to include/uapi/linux (1 of 3 files). Show all
Unified · Split
| @@ -83,6 +83,12 @@ · 82 unmodified lines | |||
| 83 | * device is busy. | 83 | * device is busy. |
| 84 | */ | 84 | */ |
| 85 | 85 | ||
| 86 | /* --- virtio-mem: feature bits --- */ | ||
| 87 | |||
| 88 | /* node_id is an ACPI PXM and is valid */ | ||
| 89 | #define VIRTIO_MEM_F_ACPI_PXM 0 | ||
| 90 | |||
| 91 | |||
| 86 | /* --- virtio-mem: guest -> host requests --- */ | 92 | /* --- virtio-mem: guest -> host requests --- */ |
| 87 | 93 | ||
| 88 | /* request to plug memory blocks */ | 94 | /* request to plug memory blocks */ |
| @@ -177,7 +183,9 @@ struct virtio_mem_resp { · 88 unmodified lines | |||
| 177 | struct virtio_mem_config { | 183 | struct virtio_mem_config { |
| 178 | /* Block size and alignment. Cannot change. */ | 184 | /* Block size and alignment. Cannot change. */ |
| 179 | __u32 block_size; | 185 | __u32 block_size; |
| 180 | __u32 padding; | 186 | /* Valid with VIRTIO_MEM_F_ACPI_PXM. Cannot change. */ |
| 187 | __u16 node_id; | ||
| 188 | __u16 padding; | ||
| 181 | /* Start address of the memory region. Cannot change. */ | 189 | /* Start address of the memory region. Cannot change. */ |
| 182 | __u64 addr; | 190 | __u64 addr; |
| 183 | /* Region size (maximum). Cannot change. */ | 191 | /* Region size (maximum). Cannot change. */ |