Please see KVM: Difference between revisions - Whonix
@Patrick where do I add the kvm kernel command?
Merged.
Uploaded newer images to our server. How long before they appear on download.whonix.org?
Symlink was missing. This is now fixed.
In future should be after 1-2 minutes.
We can probably disable hugepages entirely with the vm.nr_hugepages=0
sysctl rather than using the kvm.nx_huge_pages
mitigation.
Alright go for it.
Whatās the rationale / advantage of this?
iTLB multihit ā The Linux Kernel documentation mentions only kvm.nx_huge_pages
but not vm.nr_hugepages=0
. It should be the same in theory but I havenāt seen vm.nr_hugepages=0
mentioned in context of, search term:
"iTLB multihit" "vm.nr_hugepages"
Hugepages have more security issues (see Whonix for KVM). The kvm.nx_huge_pages
mitigation only fixes a specific issue by marking certain memory pages as non-executable. vm.nr_hugepages=0
disables hugepages altogether, preventing all of its issues.
https://www.kernel.org/doc/Documentation/admin-guide/mm/hugetlbpage.rst
/proc/sys/vm/nr_hugepages
indicates the current number of āpersistentā huge pages in the kernelās huge page pool. āPersistentā huge pages will be returned to the huge page pool when freed by a task. A user with root privileges can dynamically allocate more or free some persistent huge pages by increasing or decreasing the value ofnr_hugepages
.
The default should be 0
anyway but this isnāt guaranteed on other distros.
The sysctl isnāt specific to that issue but hugepages in general.
Speaking of KVM spectre mitigations, thereās more work planned ahead for safe HT use
That would lessen the risk but I donāt think HT should ever be enabled as itās still going to be full of vulnerabilities.
Indeed. Good to know there is more active work in this space though. IIUC it can provide stronger guest-host separation than currently available.
Could you please check this commit wonāt break KVM?
sudo apt install xserver-xorg-video-vmware
Apt tells me it is already installed and the newest version and nothing is broken.
Inside VM already installed?
Yep and Iām sure I didnāt manually put it there
Could you please check that Whonix ā¢ for KVM does use / does not use sudo
whenever appropriate?
It uses sudo virsh start
but also non-sudo virsh -c qemu:///system net-autostart default
which is not obvious to me.
background: ā T914 Whonix Host Live - enable KVM readonly mode - virt-xml vm-name --edit --disk readonly=on
Thereās no way this command works without sudo while the latter does. Going by principle of least privilege in the guide, I only use sudo for commands that wonāt work without it.