Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KVM #40

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft

KVM #40

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ VERSION = $(file <version)
help:
@echo "make all -- compile all binaries"
@echo "make rpms-vm -- generate binary rpm packages for VM"
@echo "make rpms-dom0 -- generate binary rpm packages for Dom0"
@echo "make rpms-dom0 -- generate binary rpm packages for Dom0"

rpms-dom0:
PACKAGE_SET=dom0 rpmbuild --define "_rpmdir $(RPMS_DIR)" -bb rpm_spec/qubes-db.spec
Expand Down
7 changes: 5 additions & 2 deletions daemon/db-daemon.c
Original file line number Diff line number Diff line change
Expand Up @@ -557,9 +557,11 @@ int init_vchan(struct db_daemon_data *d) {
#ifndef WIN32
d->vchan = libvchan_server_init(d->remote_domid, QUBESDB_VCHAN_PORT, 4096, 4096);
#else
usleep(5 * 1000 * 1000); // Hack: give libkvmchan some time to acknowledge the new domain
// We give a 5 minute timeout here because xeniface can take some time
// to load the first time after reboot after pvdrivers installation.
d->vchan = VchanInitServer(d->remote_domid, QUBESDB_VCHAN_PORT, 4096, 5 * 60 * 1000);
////d->vchan = VchanInitServer(d->remote_domid, QUBESDB_VCHAN_PORT, 4096, 5 * 60 * 1000);
d->vchan = libvchan_server_init(d->remote_domid, QUBESDB_VCHAN_PORT, 4096, 4096);
#endif
if (!d->vchan)
return 0;
Expand All @@ -571,7 +573,8 @@ int init_vchan(struct db_daemon_data *d) {
#else
// We give a 5 minute timeout here because xeniface can take some time
// to load the first time after reboot after pvdrivers installation.
d->vchan = VchanInitClient(d->remote_domid, QUBESDB_VCHAN_PORT, 5 * 60 * 1000);
////d->vchan = VchanInitClient(d->remote_domid, QUBESDB_VCHAN_PORT, 5 * 60 * 1000);
d->vchan = libvchan_client_init(d->remote_domid, QUBESDB_VCHAN_PORT);
#endif
if (!d->vchan)
return 0;
Expand Down
4 changes: 4 additions & 0 deletions daemon/qubes-db.service.d/30_qubes-kvm.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[Unit]
ConditionPathExists=/var/run/qubes-service/hypervisor-kvm
After=kvmchand.service
Requires=kvmchand.service
4 changes: 2 additions & 2 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ Build-Depends:
python3-all-dev,
python-setuptools,
quilt,
libvchan-xen-dev,
libvchan-xen-dev|libvchan-kvm-dev,
pkg-config
Standards-Version: 4.4.0.1
Homepage: http://www.qubes-os.org

Package: qubesdb
Section: admin
Architecture: amd64
Depends: libqubesdb, libvchan-xen, ${shlibs:Depends}, ${misc:Depends}
Depends: libqubesdb, libvchan-xen|libvchan-kvm, ${shlibs:Depends}, ${misc:Depends}
Description: QubesDB management tools and daemon.

Package: qubesdb-vm
Expand Down
5 changes: 5 additions & 0 deletions rpm_spec/qubes-db-vm.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ QubesDB daemon service.
%install
install -d %{buildroot}%{_unitdir}
install -p -m 644 daemon/qubes-db.service %{buildroot}%{_unitdir}/
install -d %{buildroot}%{_unitdir}/qubes-db.service.d/
install -p -m 644 daemon/qubes-db.service.d/*.conf %{buildroot}%{_unitdir}/qubes-db.service.d/

%post
%systemd_post qubes-db.service
Expand All @@ -66,5 +68,8 @@ install -p -m 644 daemon/qubes-db.service %{buildroot}%{_unitdir}/
%doc
%{_unitdir}/qubes-db.service

%dir %{_unitdir}/qubes-db.service.d
%{_unitdir}/qubes-db.service.d/30_qubes-kvm.conf

%changelog
@CHANGELOG@
3 changes: 2 additions & 1 deletion rpm_spec/qubes-db.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ License: GPL
URL: http://www.qubes-os.org/

BuildRequires: gcc
BuildRequires: qubes-libvchan-devel
#BuildRequires: qubes-libvchan-devel
BuildRequires: qubes-libvchan-kvm-devel
BuildRequires: systemd-devel
BuildRequires: python%{python3_pkgversion}-devel
Requires: qubes-libvchan
Expand Down