From e53db1386ddfddd292360399d4078e12a5161492 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Sat, 18 Nov 2017 02:42:11 +0100 Subject: [PATCH] Dumb down meminfo-writer enabling logic Let dom0 decide whether it should be enabled or not, regardless of PCI devices or any other factor. Fixes QubesOS/qubes-issues#3207 --- vm-systemd/qubes-sysinit.sh | 35 ++++------------------------------- 1 file changed, 4 insertions(+), 31 deletions(-) diff --git a/vm-systemd/qubes-sysinit.sh b/vm-systemd/qubes-sysinit.sh index eef4235..01bf9f5 100755 --- a/vm-systemd/qubes-sysinit.sh +++ b/vm-systemd/qubes-sysinit.sh @@ -5,38 +5,11 @@ . /usr/lib/qubes/init/functions # List of services enabled by default (in case of absence of qubesdb entry) -DEFAULT_ENABLED_NETVM="network-manager qubes-network qubes-update-check qubes-updates-proxy" -DEFAULT_ENABLED_PROXYVM="qubes-network qubes-firewall qubes-update-check" -DEFAULT_ENABLED_APPVM="cups qubes-update-check" +DEFAULT_ENABLED_NETVM="network-manager qubes-network qubes-update-check qubes-updates-proxy meminfo-writer" +DEFAULT_ENABLED_PROXYVM="qubes-network qubes-firewall qubes-update-check meminfo-writer" +DEFAULT_ENABLED_APPVM="cups qubes-update-check meminfo-writer" DEFAULT_ENABLED_TEMPLATEVM="$DEFAULT_ENABLED_APPVM updates-proxy-setup" -DEFAULT_ENABLED="" - -# devices emulated by qemu, first list of vendor IDs then list of device IDs: -qemu_devices="0x8086 -0x8086 -0x8086 -0x8086 -0x8086 -0x5853 -0x1013 -0x1237 -0x7000 -0x7010 -0x7020 -0x7113 -0x0001 -0x00b8 -" -if [ -z "$(ls /sys/bus/pci/devices/)" ] || \ - [ "$(cat /sys/bus/pci/devices/*/{vendor,device})" != "$qemu_devices" ]; then - # do not enable meminfo-writer (so qmemman for this domain) when any real PCI - # device is present - DEFAULT_ENABLED="$DEFAULT_ENABLED meminfo-writer" - DEFAULT_ENABLED_APPVM="$DEFAULT_ENABLED_APPVM meminfo-writer" - DEFAULT_ENABLED_PROXYVM="$DEFAULT_ENABLED_PROXYVM meminfo-writer" - DEFAULT_ENABLED_TEMPLATEVM="$DEFAULT_ENABLED_TEMPLATEVM meminfo-writer" -fi - +DEFAULT_ENABLED="meminfo-writer" if systemd_version_changed ; then # Ensure we're running right version of systemd (the one started by initrd may be different)