qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v8 03/20] multi-process: setup PCI host bridge for remote dev


From: Stefan Hajnoczi
Subject: Re: [PATCH v8 03/20] multi-process: setup PCI host bridge for remote device
Date: Tue, 4 Aug 2020 11:47:46 +0100

On Fri, Jul 31, 2020 at 02:20:10PM -0400, Jagannathan Raman wrote:
> + * This PCI host is purely a container for PCI devices. It's fake in the
> + * sense that the guest never sees this PCI host and has no way of
> + * accessing it. It's job is just to provide the environment that QEMU

s/It's/Its/ :)

> +static void remote_pcihost_realize(DeviceState *dev, Error **errp)
> +{
> +    char *busname = g_strdup_printf("remote-pci-%ld", (unsigned 
> long)getpid());

Why is the pid used here? I don't understand why this helps. If
additional instances are created in this process then the name won't be
unique. The name isn't exposed outside the process, so there is no need
to uniquely identify the process either.

g_free(busname) is missing. A nice way to fix this is:

  g_autofree char *busname = ...

This avoids the need to manually call g_free().

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]