Re: [RFC] qemu: Check for changes in qemu modules directory

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

 



On 8/26/20 3:31 AM, Daniel P. Berrangé wrote:
On Thu, Aug 20, 2020 at 05:03:44PM -0600, Jim Fehlig wrote:
Add a configuration option for specifying location of the qemu modules
directory, defaulting to /usr/lib64/qemu. Then use this location to
check for changes in the directory, indicating that a qemu module has
changed and capabilities need to be reprobed.

Signed-off-by: Jim Fehlig <jfehlig@xxxxxxxx>
---

This is a mildly tested impl of the idea discussed here (and elsewhere
in the thread)

https://www.redhat.com/archives/libvir-list/2020-August/msg00684.html

I've checked that both system and session caches are updated when a
qemu modules package is updated. I'll do some more testing but wanted
to send the patch for early comments. Testing in other environments
would be much appreciated. Thanks!

  meson.build                  |  6 ++++++
  meson_options.txt            |  1 +
  src/qemu/qemu_capabilities.c | 35 +++++++++++++++++++++++++++++++++++
  3 files changed, 42 insertions(+)

diff --git a/meson.build b/meson.build
index a72d0c0e85..16928482aa 100644
--- a/meson.build
+++ b/meson.build
@@ -1745,6 +1745,12 @@ if not get_option('driver_qemu').disabled()
    if use_qemu
      conf.set('WITH_QEMU', 1)
+ qemu_moddir = get_option('qemu_moddir')
+    if qemu_moddir == ''
+      qemu_moddir = '/usr/lib64/qemu'

We sholdn't hardcode lib64 - use  libdir variable, eg

"/usr" / libdir / "qemu"

Good point. I've squashed in the below diff. While testing it I remembered to also test specifying the option, e.g. meson configure -Dqemu_moddir=/var/run/qemu/modules


diff --git a/meson.build b/meson.build
index 928f6a0bad..70a33cf5e4 100644
--- a/meson.build
+++ b/meson.build
@@ -1760,7 +1760,7 @@ if not get_option('driver_qemu').disabled()

     qemu_moddir = get_option('qemu_moddir')
     if qemu_moddir == ''
-      qemu_moddir = '/usr/lib64/qemu'
+      qemu_moddir = '/usr' / libdir / 'qemu'
     endif
     conf.set_quoted('QEMU_MODDIR', qemu_moddir)


Reviewed-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>

Thanks. I see we've entered freeze for 6.7.0. I'll wait until after the release before pushing this and the xen PCI permissive patches you reviewed.

Regards,
Jim





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

  Powered by Linux