On 11/13/2019 11:07 AM, Stefan Hajnoczi wrote:
On Thu, Oct 24, 2019 at 05:08:50AM -0400, Jagannathan Raman wrote:+static void remote_host_realize(DeviceState *dev, Error **errp) +{ + PCIHostState *pci = PCI_HOST_BRIDGE(dev); + RemPCIHost *s = REMOTE_HOST_DEVICE(dev); + + /* + * TODO: the name of the bus would be provided by QEMU. Use + * "pcie.0" for now. + */ + pci->bus = pci_root_bus_new(DEVICE(s), "pcie.0", + s->mr_pci_mem, s->mr_sys_io, + 0, TYPE_PCIE_BUS);The PCI bus name could be a property and then whatever instantiates RemPCIHost could set it. Machine types usually hardcode the name because they assume there is only one machine instance. In the case of mpqemu this is an okay starting point, but maybe multiple busses will become necessary if the device emulation process handles multiple device instances - especially if they are served to multiple guests like in a software-defined network switch use case.
Are you referring to a case where a single remote process will emulate devices from multiple guests? We haven't thought about that application. But we will certainly add the ability to specify the name of the bus as a parameter. Thank you very much! -- Jag
