hw/cxl: Check for multiple mappings of memory backends.
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Fri, 5 Jul 2024 11:39:56 +0000 (12:39 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Sun, 21 Jul 2024 18:31:59 +0000 (14:31 -0400)
commit9de2049c95e1a94e27430e71a9d9ace07ec8eda6
treebc3f12b459439149004c27c0a879d8a32fe1d12c
parentb7dbfe4f47884e67a309c206b3eadec339a0d3b6
hw/cxl: Check for multiple mappings of memory backends.

Similar protection to that provided for -numa memdev=x
to make sure that memory used to back a type3 device is not also mapped
as normal RAM, or for multiple type3 devices.

This is an easy footgun to remove and seems multiple people have
run into it.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Message-Id: <20240705113956.941732-4-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/mem/cxl_type3.c