[libvirt] [PATCH] remove remains of kqemu

Ján Tomko posted 1 patch 5 years, 9 months ago
Test syntax-check passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/28ce1c93d749793a6a5df7746a59df395667491f.1550502916.git.jtomko@redhat.com
docs/drvqemu.html.in               | 2 +-
docs/formatdomain.html.in          | 2 +-
src/qemu/qemu.conf                 | 2 +-
src/qemu/qemu_cgroup.c             | 2 +-
src/qemu/qemu_driver.c             | 3 ---
src/qemu/test_libvirtd_qemu.aug.in | 5 ++---
src/security/apparmor/libvirt-qemu | 1 -
7 files changed, 6 insertions(+), 11 deletions(-)
[libvirt] [PATCH] remove remains of kqemu
Posted by Ján Tomko 5 years, 9 months ago
We dropped support in commit 8e91a40 (November 2015), but some
occurrences still remained, even in live code.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reported-by: Thomas Huth <thuth@redhat.com>
---
 docs/drvqemu.html.in               | 2 +-
 docs/formatdomain.html.in          | 2 +-
 src/qemu/qemu.conf                 | 2 +-
 src/qemu/qemu_cgroup.c             | 2 +-
 src/qemu/qemu_driver.c             | 3 ---
 src/qemu/test_libvirtd_qemu.aug.in | 5 ++---
 src/security/apparmor/libvirt-qemu | 1 -
 7 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/docs/drvqemu.html.in b/docs/drvqemu.html.in
index 5ad956740f..0218b5a7a9 100644
--- a/docs/drvqemu.html.in
+++ b/docs/drvqemu.html.in
@@ -395,7 +395,7 @@ chmod o+x /path/to/directory
 <pre>
 /dev/null, /dev/full, /dev/zero,
 /dev/random, /dev/urandom,
-/dev/ptmx, /dev/kvm, /dev/kqemu,
+/dev/ptmx, /dev/kvm,
 /dev/rtc, /dev/hpet
 </pre>
 
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 2ae5006849..7882c54bc1 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -22,7 +22,7 @@
       <a id="attributeDomainType"><code>type</code></a>
       specifies the hypervisor used for running
       the domain. The allowed values are driver specific, but
-      include "xen", "kvm", "qemu", "lxc" and "kqemu". The
+      include "xen", "kvm", "qemu" and "lxc". The
       second attribute is <code>id</code> which is a unique
       integer identifier for the running guest machine. Inactive
       machines have no id value.
diff --git a/src/qemu/qemu.conf b/src/qemu/qemu.conf
index 7820e72dd8..334b4cd4ee 100644
--- a/src/qemu/qemu.conf
+++ b/src/qemu/qemu.conf
@@ -489,7 +489,7 @@
 #cgroup_device_acl = [
 #    "/dev/null", "/dev/full", "/dev/zero",
 #    "/dev/random", "/dev/urandom",
-#    "/dev/ptmx", "/dev/kvm", "/dev/kqemu",
+#    "/dev/ptmx", "/dev/kvm",
 #    "/dev/rtc","/dev/hpet"
 #]
 #
diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c
index e88cb8c45f..c23f0af2aa 100644
--- a/src/qemu/qemu_cgroup.c
+++ b/src/qemu/qemu_cgroup.c
@@ -45,7 +45,7 @@ VIR_LOG_INIT("qemu.qemu_cgroup");
 const char *const defaultDeviceACL[] = {
     "/dev/null", "/dev/full", "/dev/zero",
     "/dev/random", "/dev/urandom",
-    "/dev/ptmx", "/dev/kvm", "/dev/kqemu",
+    "/dev/ptmx", "/dev/kvm",
     "/dev/rtc", "/dev/hpet",
     NULL,
 };
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 024ee5b62d..5118f4ad42 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -1260,9 +1260,6 @@ qemuConnectGetMaxVcpus(virConnectPtr conn ATTRIBUTE_UNUSED, const char *type)
     if (STRCASEEQ(type, "kvm"))
         return virHostCPUGetKVMMaxVCPUs();
 
-    if (STRCASEEQ(type, "kqemu"))
-        return 1;
-
     virReportError(VIR_ERR_INVALID_ARG,
                    _("unknown type '%s'"), type);
     return -1;
diff --git a/src/qemu/test_libvirtd_qemu.aug.in b/src/qemu/test_libvirtd_qemu.aug.in
index 51a7ad5892..fea1d308b7 100644
--- a/src/qemu/test_libvirtd_qemu.aug.in
+++ b/src/qemu/test_libvirtd_qemu.aug.in
@@ -60,9 +60,8 @@ module Test_libvirtd_qemu =
     { "5" = "/dev/urandom" }
     { "6" = "/dev/ptmx" }
     { "7" = "/dev/kvm" }
-    { "8" = "/dev/kqemu" }
-    { "9" = "/dev/rtc" }
-    { "10" = "/dev/hpet" }
+    { "8" = "/dev/rtc" }
+    { "9" = "/dev/hpet" }
 }
 { "save_image_format" = "raw" }
 { "dump_image_format" = "raw" }
diff --git a/src/security/apparmor/libvirt-qemu b/src/security/apparmor/libvirt-qemu
index eaa5167525..7d28faa163 100644
--- a/src/security/apparmor/libvirt-qemu
+++ b/src/security/apparmor/libvirt-qemu
@@ -23,7 +23,6 @@
   /dev/net/tun rw,
   /dev/kvm rw,
   /dev/ptmx rw,
-  /dev/kqemu rw,
   @{PROC}/*/status r,
   # When qemu is signaled to terminate, it will read cmdline of signaling
   # process for reporting purposes. Allowing read access to a process
-- 
2.19.2

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] remove remains of kqemu
Posted by Erik Skultety 5 years, 9 months ago
On Mon, Feb 18, 2019 at 04:15:21PM +0100, Ján Tomko wrote:
> We dropped support in commit 8e91a40 (November 2015), but some
> occurrences still remained, even in live code.
>
> Signed-off-by: Ján Tomko <jtomko@redhat.com>
> Reported-by: Thomas Huth <thuth@redhat.com>
> ---

Can we at least get rid of X_QEMU_CAPS_KQEMU and X_QEMU_CAPS_ENABLE_KQEMU enums
as per: "When a flag is no longer needed we temporarily give it an X_ prefix to
indicate it should no longer be used in code. Periodically we can then purge
all the X_ flags..."

No other comments:
Reviewed-by: Erik Skultety <eskultet@redhat.com>

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] remove remains of kqemu
Posted by Daniel P. Berrangé 5 years, 9 months ago
On Mon, Feb 18, 2019 at 05:05:01PM +0100, Erik Skultety wrote:
> On Mon, Feb 18, 2019 at 04:15:21PM +0100, Ján Tomko wrote:
> > We dropped support in commit 8e91a40 (November 2015), but some
> > occurrences still remained, even in live code.
> >
> > Signed-off-by: Ján Tomko <jtomko@redhat.com>
> > Reported-by: Thomas Huth <thuth@redhat.com>
> > ---
> 
> Can we at least get rid of X_QEMU_CAPS_KQEMU and X_QEMU_CAPS_ENABLE_KQEMU enums
> as per: "When a flag is no longer needed we temporarily give it an X_ prefix to
> indicate it should no longer be used in code. Periodically we can then purge
> all the X_ flags..."

Have we ever actually deleted such flags ? I added that comment
a few years ago, but didn't think we'd ever deleted any flags,
as doing so will prevent us from loading the saved state XML of
any previously running QEMU.

Now, we won't actually support managing such an outdated QEMU
since it is going to lack features that current code assumes
will exist. 

In the case of kqemu we can be confident no such running VMs
exist anywhere in the world, but other features it is not so
clearcut.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

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