Re: virHostdevIsPCINodeDeviceUsed

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


On 5/19/21 1:38 PM, Simon Fairweather wrote:
> Thanks, I will raise an issue and look to see if I can raise a patch.
> Regards
> Simon
> On Wed, May 19, 2021 at 11:38 AM Michal Prívozník <mprivozn@xxxxxxxxxx>
> wrote:
>> On 5/17/21 8:36 PM, Simon Fairweather wrote:
>>> I am looking to be able to check if a specific PCI device is allocated
>> to a
>>> guest.
>>> An error is produced if a domain is started and the device is in use
>> within
>>> another domain via this function.
>>> I cannot see a publicly available function to use to get this
>> information,
>>> is there one available or is there another way to check the state of the
>>> PCI device.
>> Yeah, there's no public API. So far we recommended mgmt apps to track
>> the usage themselves, however I don't see why we shouldn't have a new
>> API, say:
>> int virNodeDeviceGetUsed(virNodeDevicePtr dev, char **drvname, char
>> **domname);

Just a note - of course I forgot the mandatory flags argument, so this
can be:

int virNodeDeviceGetUsed(virNodeDevicePtr dev, char **drvname, char
**domname, unsigned int flags);

Even though we don't have any flags to pass yet the argument needs to be
there as it ensures future extension.

In general this is a good start:


[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux