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

[libvirt] [PATCHv5 8/9] Revert "RFC: spicevmc: call out vdagent as a channel target"



This reverts commit e73f3dfd7ec15b635c2c97f8d57957f5aaff3e74.
---

Nothing to see here...

 docs/formatdomain.html.in                          |   12 +++++-----
 docs/schemas/domain.rng                            |   13 ------------
 src/conf/domain_conf.c                             |   20 ++----------------
 src/conf/domain_conf.h                             |    1 -
 src/qemu/qemu_command.c                            |   21 --------------------
 .../qemuxml2argv-channel-spicevmc.args             |    4 +-
 .../qemuxml2argv-channel-spicevmc.xml              |    2 +-
 7 files changed, 12 insertions(+), 61 deletions(-)

diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index a9d2f84..d91fdb9 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -1735,7 +1735,7 @@ qemu-kvm -net nic,model=? /dev/null
       <target type='virtio' name='arbitrary.virtio.serial.port.name'/>
     </channel>
     <channel type='spicevmc'>
-      <target type='vdagent' name='com.redhat.spice.0'/>
+      <target type='virtio' name='com.redhat.spice.0'/>
     </channel>
   </devices>
   ...</pre>
@@ -1767,11 +1767,11 @@ qemu-kvm -net nic,model=? /dev/null
       <dd>Paravirtualized SPICE channel. The domain must also have a
         SPICE server as a <a href="#elementsGraphics">graphics
         device</a>, at which point the host piggy-backs messages
-        across the <code>main</code> channel.  For now, the only
-        supported channel is vdagent, so the <code>target</code>
-        element must have attribute <code>type='vdagent'</code>; an
-        optional attribute <code>name</code> controls how the guest
-        will have access to the channel, and defaults
+        across the <code>main</code> channel.  The <code>target</code>
+        element must be present, with
+        attribute <code>type='virtio'</code>; an optional
+        attribute <code>name</code> controls how the guest will have
+        access to the channel, and defaults
         to <code>name='com.redhat.spice.0'</code>.  The
         optional <code>address</code> element can tie the channel to a
         particular <code>type='virtio-serial'</code> controller.
diff --git a/docs/schemas/domain.rng b/docs/schemas/domain.rng
index 40f33e8..9ffcf21 100644
--- a/docs/schemas/domain.rng
+++ b/docs/schemas/domain.rng
@@ -1619,18 +1619,6 @@
       </optional>
     </element>
   </define>
-  <define name="vdagentTarget">
-    <element name="target">
-      <attribute name="type">
-        <value>vdagent</value>
-      </attribute>
-      <optional>
-        <attribute name="name">
-          <value>com.redhat.spice.0</value>
-        </attribute>
-      </optional>
-    </element>
-  </define>
   <define name="channel">
     <element name="channel">
       <ref name="qemucdevSrcType"/>
@@ -1639,7 +1627,6 @@
         <choice>
           <ref name="guestfwdTarget"/>
           <ref name="virtioTarget"/>
-          <ref name="vdagentTarget"/>
         </choice>
         <optional>
           <ref name="address"/>
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 3d7d63e..9b4ef8d 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -201,8 +201,7 @@ VIR_ENUM_IMPL(virDomainNetBackend, VIR_DOMAIN_NET_BACKEND_TYPE_LAST,
 VIR_ENUM_IMPL(virDomainChrChannelTarget,
               VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_LAST,
               "guestfwd",
-              "virtio",
-              "vdagent")
+              "virtio")

 VIR_ENUM_IMPL(virDomainChrConsoleTarget,
               VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_LAST,
@@ -2945,16 +2944,6 @@ virDomainChrDefParseTargetXML(virCapsPtr caps,
         case VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_VIRTIO:
             def->target.name = virXMLPropString(cur, "name");
             break;
-
-        case VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_VDAGENT:
-            if (def->source.type != VIR_DOMAIN_CHR_TYPE_SPICEVMC) {
-                virDomainReportError(VIR_ERR_XML_ERROR, "%s",
-                                     _("vdagent only valid with spicevmc "
-                                       "channel"));
-                goto error;
-            }
-
-            break;
         }
         break;

@@ -3268,9 +3257,9 @@ virDomainChrDefParseXML(virCapsPtr caps,
     }

     if (def->source.type == VIR_DOMAIN_CHR_TYPE_SPICEVMC &&
-        def->targetType != VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_VDAGENT) {
+        def->targetType != VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_VIRTIO) {
         virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
-                             _("spicevmc device type only supports vdagent"));
+                             _("spicevmc device type only supports virtio"));
         goto error;
     }

@@ -7004,9 +6993,6 @@ virDomainChrDefFormat(virBufferPtr buf,
             break;
         }

-        case VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_VDAGENT:
-            break;
-
         }
         virBufferAddLit(buf, "/>\n");
         break;
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 0728dc3..9dff580 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -389,7 +389,6 @@ enum virDomainChrDeviceType {
 enum virDomainChrChannelTargetType {
     VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_GUESTFWD = 0,
     VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_VIRTIO,
-    VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_VDAGENT,

     VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_LAST,
 };
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index ba60d0a..1903c70 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -3694,27 +3694,6 @@ qemuBuildCommandLine(virConnectPtr conn,
             virCommandAddArg(cmd, devstr);
             VIR_FREE(devstr);
             break;
-
-        case VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_VDAGENT:
-            if (!(qemuCmdFlags & QEMUD_CMD_FLAG_DEVICE)) {
-                qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
-                    _("virtio channel requires QEMU to support -device"));
-                goto error;
-            }
-            virCommandAddArg(cmd, "-chardev");
-            if (!(devstr = qemuBuildChrChardevStr(&channel->source,
-                                                  channel->info.alias,
-                                                  qemuCmdFlags)))
-                goto error;
-            virCommandAddArg(cmd, devstr);
-            VIR_FREE(devstr);
-
-            virCommandAddArg(cmd, "-device");
-            if (!(devstr = qemuBuildVirtioSerialPortDevStr(channel)))
-                goto error;
-            virCommandAddArg(cmd, devstr);
-            VIR_FREE(devstr);
-            break;
         }
     }

diff --git a/tests/qemuxml2argvdata/qemuxml2argv-channel-spicevmc.args b/tests/qemuxml2argvdata/qemuxml2argv-channel-spicevmc.args
index 3e1eaed..681f7c2 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-channel-spicevmc.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-channel-spicevmc.args
@@ -3,7 +3,7 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=spice \
 -monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -device \
 virtio-serial-pci,id=virtio-serial1,bus=pci.0,addr=0xa -hda \
 /dev/HostVG/QEMUGuest1 -chardev spicevmc,id=charchannel0,name=vdagent -device \
-virtserialport,bus=virtio-serial1.0,nr=3,chardev=charchannel0,id=channel0 \
--usb -spice port=5903,tls-port=5904,addr=127.0.0.1,\
+virtserialport,bus=virtio-serial1.0,nr=3,chardev=charchannel0,id=channel0\
+,name=com.redhat.spice.0 -usb -spice port=5903,tls-port=5904,addr=127.0.0.1,\
 x509-dir=/etc/pki/libvirt-spice,tls-channel=main -device \
 virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-channel-spicevmc.xml b/tests/qemuxml2argvdata/qemuxml2argv-channel-spicevmc.xml
index b99f3ce..0e82394 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-channel-spicevmc.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-channel-spicevmc.xml
@@ -26,7 +26,7 @@
       <channel name='main' mode='secure'/>
     </graphics>
     <channel type='spicevmc'>
-      <target type='vdagent'/>
+      <target type='virtio' name='com.redhat.spice.0'/>
       <address type='virtio-serial' controller='1' bus='0' port='3'/>
     </channel>
     <memballoon model='virtio'/>
-- 
1.7.4


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