Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 May 2021 13:37:41 GMT
From:      Dave Cottlehuber <dch@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 563d5929d5f2 - main - sysutils/kvmclock-kmod: new port - call for testing
Message-ID:  <202105301337.14UDbfxG056349@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by dch:

URL: https://cgit.FreeBSD.org/ports/commit/?id=563d5929d5f28631999a32d2aab4e72e1bf2c323

commit 563d5929d5f28631999a32d2aab4e72e1bf2c323
Author:     Dave Cottlehuber <dch@FreeBSD.org>
AuthorDate: 2021-05-30 13:35:19 +0000
Commit:     Dave Cottlehuber <dch@FreeBSD.org>
CommitDate: 2021-05-30 13:35:19 +0000

    sysutils/kvmclock-kmod: new port - call for testing
    
    Improved performance on KVM paravirtualised systems. Testing
    welcomed; please report successes and issues to:
    
    https://reviews.freebsd.org/D29733
    
    kvmclock-kmod is experimental and currently under development. This port
    provides an easy and quick method for users to test this code for early
    testing, feedback and bug reports.
    
    This driver enables FreeBSD to use a more efficient paravirtualized
    hardware clock, instead of emulating one, or abusing hypervisor
    interrupts, when running as a virtualized OS under Linux KVM
    (Kernel-based Virtual Machine).
    
    Reviewed by:    allanjude
    Sponsored by:   Klara Inc.
    Sponsored by:   SkunkWerks, GmbH
    Differential Revision:  https://reviews.freebsd.org/D30459
    PR:                     216759
---
 sysutils/Makefile                  |  1 +
 sysutils/kvmclock-kmod/Makefile    | 25 +++++++++++++++++++++++++
 sysutils/kvmclock-kmod/distinfo    |  3 +++
 sysutils/kvmclock-kmod/pkg-descr   | 11 +++++++++++
 sysutils/kvmclock-kmod/pkg-message | 24 ++++++++++++++++++++++++
 5 files changed, 64 insertions(+)

diff --git a/sysutils/Makefile b/sysutils/Makefile
index dda66170e644..98481ed67421 100644
--- a/sysutils/Makefile
+++ b/sysutils/Makefile
@@ -581,6 +581,7 @@
     SUBDIR += kshutdown
     SUBDIR += ksystemlog
     SUBDIR += kubectl
+    SUBDIR += kvmclock-kmod
     SUBDIR += lava
     SUBDIR += lbl-cf
     SUBDIR += lbl-hf
diff --git a/sysutils/kvmclock-kmod/Makefile b/sysutils/kvmclock-kmod/Makefile
new file mode 100644
index 000000000000..6a1c5ec2d222
--- /dev/null
+++ b/sysutils/kvmclock-kmod/Makefile
@@ -0,0 +1,25 @@
+PORTNAME=	kvmclock
+DISTVERSION=	0.0.0-a2
+CATEGORIES=	sysutils
+PKGNAMESUFFIX=	-kmod
+
+MAINTAINER=	dch@FreeBSD.org
+COMMENT=	Paravirtualized Linux KVM clock support
+
+LICENSE=	BSD2CLAUSE
+
+ONLY_FOR_ARCHS=	amd64 i386
+ONLY_FOR_ARCHS_REASON=	not yet tested for non-x86
+
+USES=		kmod uidfix
+KMOD=		kvmclock
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	klarasystems
+
+PLIST_FILES=	${KMODDIR}/kvmclock.ko
+
+OPTIONS_DEFINE=	DEBUG
+OPTIONS_SUB=	yes
+
+.include <bsd.port.mk>
diff --git a/sysutils/kvmclock-kmod/distinfo b/sysutils/kvmclock-kmod/distinfo
new file mode 100644
index 000000000000..7e6f54fc3840
--- /dev/null
+++ b/sysutils/kvmclock-kmod/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1621967719
+SHA256 (klarasystems-kvmclock-0.0.0-a2_GH0.tar.gz) = 1497f3eca5bc1f1d9708aa601f5fdbdea08852e16b6c9c1d55bc6d0262baf708
+SIZE (klarasystems-kvmclock-0.0.0-a2_GH0.tar.gz) = 7676
diff --git a/sysutils/kvmclock-kmod/pkg-descr b/sysutils/kvmclock-kmod/pkg-descr
new file mode 100644
index 000000000000..7eca429ebc59
--- /dev/null
+++ b/sysutils/kvmclock-kmod/pkg-descr
@@ -0,0 +1,11 @@
+Development version of kvmclock FreeBSD driver for virtual machines.
+
+References and prior art:
+
+https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/virtualization_deployment_and_administration_guide/chap-kvm_guest_timing_management
+https://www.vmware.com/files/pdf/techpaper/Timekeeping-In-VirtualMachines.pdf
+http://oliveryang.net/2015/09/pitfalls-of-TSC-usage/#33-tsc-emulation-on-different-hypervisors
+https://reviews.freebsd.org/D29531
+https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216759
+
+WWW: https://reviews.freebsd.org/D29733
diff --git a/sysutils/kvmclock-kmod/pkg-message b/sysutils/kvmclock-kmod/pkg-message
new file mode 100644
index 000000000000..d410eecdba03
--- /dev/null
+++ b/sysutils/kvmclock-kmod/pkg-message
@@ -0,0 +1,24 @@
+[
+{ type: install
+  message: <<EOM
+kvmclock-kmod is experimental and currently under development. This port
+provides an easy and quick method for users to test this code for early
+testing, feedback and bug reports.
+
+This driver enables FreeBSD to use a more efficient paravirtualized
+hardware clock, instead of emulating one, or abusing hypervisor
+interrupts, when running as a virtualized OS under Linux KVM
+(Kernel-based Virtual Machine).
+
+Usage:
+
+# kldload kvmclock
+# sysctl kern.timecounter
+kern.timecounter.choice: kvmclock(975) i8254(0) ...
+kern.timecounter.hardware: kvmclock
+...
+
+Please report successes and issues to: https://reviews.freebsd.org/D29733
+EOM
+}
+]



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202105301337.14UDbfxG056349>