Re: [libvirt] [PATCH 2/5] Add virNodeDeviceAttach()/ReAttach()/Reset() APIs

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

 



On Tue, Feb 24, 2009 at 10:21:48PM +0000, Mark McLoughlin wrote:
> Before starting a guest virNodeDeviceAttach() is intended
> to be called on all node devices to be assigned to a guest,
> followed by virNodeDeviceReset() on those devices.
> 
> Once the guest has been shutdown, virNodeDeviceReset()
> followed by virNodeDeviceReAttach() should be called in
> order to make the device available to the host again.
> 
> This patch merely adds the APIs and stubs out the driver
> implementations.

While I can see a point in providing public APIs to attach/detach
drivers to devices - because we need this for Xen driver PCI 
passthrough, I'm not sure theres a compelling need for exposing
a reset function, because both Xen & your KVM impl are quite
happy doing the resets themselves.

I think the attach/detach functions should be in the nodedev
driver too, because they're not really part of the HV functionality.
On modern Linux kernels, both Xen & KVM (and any other users) have 
the same pci-stub.ko code for managed driver binding. On older Xen
kernels, there is the functionally equivalent pci-back.ko.

A similar capability is really needed for USB devices, to disconnect
them from any host USB driver, and that's not HV specific either.

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]