[PATCH 6/6 v2] Forward Mode 'Hostdev' qemu driver implementation

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

 



Signed-off-by: Shradha Shah <sshah@xxxxxxxxxxxxxx>
---
 src/qemu/qemu_command.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 93c018d..0f6b714 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -5030,6 +5030,20 @@ qemuBuildCommandLine(virConnectPtr conn,
                  * code here that adds the newly minted hostdev to the
                  * hostdevs array).
                  */
+                if (qemuAssignDeviceHostdevAlias(def,
+                                                 virDomainNetGetActualHostdev(net),
+                                                 (def->nhostdevs-1)) < 0) {
+                    qemuReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+                                    _("Could not assign alias to Net Hostdev"));
+                    goto error;
+                }
+                
+                if (virDomainHostdevInsert(def, 
+                                           virDomainNetGetActualHostdev(net)) < 0) {
+                    qemuReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+                                    _("Hostdev not inserted into the array"));
+                    goto error;
+                }
                 continue;
             }
 
-- 
1.7.4.4

--
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]