When the same machine boots into Debian on bare metal, with no BIOS changes, top shows it as having four.
The Intel spec is 2 cores running 4 threads, so the difference is clearly about hyperthreading.
Is it possible to get Xen in Qubes to enable hyperthreading?
And if so how?
Are there any obvs pitfalls or technical issues to explain why Xen turns it off?
Thanks for that explanation - yes that's sensible.
With the option set to allow HT, I'm now wondering if there is a Xen setting to force Xen to allocate both virtual cores in the same physical core together?
That would mean you'd always get an even number of virtual cores, they would always be "core buddies", and this it's only that VMs own code that can attempt those exploits. That would give almost the same level of security but allow the extra performance.
Or am I missing some nasty potential exploit?
> I don't know but I wouldn't expect one to appear in an old xen.
> Given R4.0 is 4.8 so if such feature is there, most likely that's not
available until some future Qubes version.
Turns out that's exactly so. The Xen wizards were working on it August 2019, and it's now in a testing or unstable build, so it will be a while before it gets into a stable Xen release, and then longer till Qubes adopts it.
https://patchwork.kernel.org/cover/11086677/
The parameter is sched-gran=core (or socket or cpu) with the default bring CPU.
The version of Xen currently used by Qubes 4.0.1 accepts the parameter without giving an error, but also without complying.