On 18/10/2017 07:57, Zhong Yang wrote: > Your suggestion can avoid DMA target to nvdimm if the nvdimm memory region > was skipped during VFIO hotplug. It is valuable to try this solution. by the > way, please share me some clue for PCI address space related with memory > region, > below address_space_mem is right? Many thanks! > > static void pci_bus_init(PCIBus *bus, DeviceState *parent, > MemoryRegion *address_space_mem, > MemoryRegion *address_space_io, > uint8_t devfn_min)
Yes. You would have to add the region directly to the CPU address space, and not to address_space_memory (which is included in both the CPU and PCI address spaces). Paolo