Re: [PATCH 1/2] util: Drop obsolete compatibility code

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

 



On Fri, Jun 24, 2016 at 07:34:37PM +0200, Andrea Bolognani wrote:
All operating system releases we support include these
definitions.

Do we have a list of supported OSes somewhere? :)

Also, it seems the virHostCPUGetKVMMaxVCPUs function is built
unconditionally, so it might need to be wrapped in HAVE_LINUX_KVM_H.

Have you tried building it on non-Linux?

---
src/util/virhostcpu.c | 11 -----------
1 file changed, 11 deletions(-)

diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c
index fed5be7..a34d983 100644
--- a/src/util/virhostcpu.c
+++ b/src/util/virhostcpu.c
@@ -65,17 +65,6 @@ VIR_LOG_INIT("util.hostcpu");

#define KVM_DEVICE "/dev/kvm"

-/* add definitions missing in older linux/kvm.h */
-#ifndef KVMIO
-# define KVMIO 0xAE
-#endif
-#ifndef KVM_CHECK_EXTENSION
-# define KVM_CHECK_EXTENSION       _IO(KVMIO,   0x03)
-#endif
-#ifndef KVM_CAP_NR_VCPUS
-# define KVM_CAP_NR_VCPUS 9       /* returns max vcpus per vm */
-#endif
-

Introduced in libvirt by:
commit 04e9e1b2a63f4255d6fddbd5990a0a0cde0ccf1b
Author:     Richard W.M. Jones <rjones@xxxxxxxxxx>
CommitDate: 2008-09-17 14:07:49 +0000

   configure.in, src/qemu_driver.h, src/qemu_driver.c: KVM
             can determine max VCPUs at runtime (Guido Günther).

git describe: v0.4.4-212-g04e9e1b contains: v0.4.6~17

And in kernel by:
commit f725230af9ea03f6cc6f4a90e87aa428df46ec19
Author:     Avi Kivity <avi@xxxxxxxxxxxx>
CommitDate: 2008-04-27 11:53:23 +0300

   KVM: Add API to retrieve the number of supported vcpus per vm

   Signed-off-by: Avi Kivity <avi@xxxxxxxxxxxx>
git describe: v2.6.25-5338-gf725230 contains: v2.6.26-rc1~1028^2~110

So I think we're safe to drop the redefinitions if we have linux/kvm.h.

Jan

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