Commit Graph

10 Commits

Author SHA1 Message Date
M. Vefa Bicakci
5a83961a88
u2mfn: Make compatible with kernel versions >= 5.3.y 2019-08-17 03:46:45 -04:00
Marek Marczykowski-Górecki
e7c90c705f
Declare u2mfn module version, skip build for qubes kernels
This will allow dkms to skip u2mfn module install if one is already
shipped with the kernel package - which is the case for kernels
delivered through dom0.
Make the version high enough to be considered newer than dkms package.

Sadly, it does not prevent module build. And the build fails becaue of
mismatching compiler version (kernel headers include gcc plugins).
Skip the build by setting BUILD_EXCLUSIVE_KERNEL in dkms.conf. Ideally,
we'd set some value indicating "don't build on kernel *qubes*", but
this variable does not support negation. So, set this variable to a
dummy value after manually checking $kernelver variable.

Fixes QubesOS/qubes-issues#4963
2019-06-05 18:21:49 +02:00
HW42
f14637a615 u2mfn: get mfn via pte
Before this commit u2mfn got the address via kmap(get_user_pages(...)).
This has the problem that get_user_pages() does not work in some cases.
For example when qemu in a stubdom tries to get the mfn for a page which
is mapped from the target domain u2mfn fails because get_user_pages()
cannot be used for such mappings.

So get the address from the pte with apply_to_page_range(). Since we are
only interested in one page get_locked_pte() would be simpler but it's
not available to modules.
2017-07-05 20:21:22 +02:00
Johanna A
e01745f66f Builds against 4.9
The function signature for get_user_pages() has changed in linux 4.9.
2016-10-29 10:01:01 +02:00
Marek Marczykowski-Górecki
98aed38ec5
u2mfn: build for both 4.6+ and older kernels 2016-05-09 14:31:36 +02:00
Johanna A
79cb426825 Builds against linux v4.6-rc4
get_user*() migration helpers are removed in v4.6-rc4 and thus calls to
get_user_pages() are made differently.
2016-05-05 19:47:32 +02:00
Marek Marczykowski-Górecki
aaf84ba305
kernel-modules: build/install u2mfn module by default
The module is required by gui-agent, so make sure it will be actually
installed. This would also install the module in dom0 (when
qubes-kernel-vm-support is installed there), but this this is harmless.

QubesOS/qubes-issues#1354
2015-11-08 03:51:18 +01:00
qubesuser
71ce41cf61
Fix u2mfn.ko for > 16TB RAM by not truncating to 32-bit improperly
At the moment, Xen has a 16TB limit on x86, so this has no practical
impact, aside for silencing compiler truncation warnings.

Also, the rest of the GUI/u2mfn code and protocol would need to be
expanded to use 64-bit mfns for Qubes to actually work there.
2015-10-26 20:00:08 +01:00
Marek Marczykowski-Górecki
a30d583249
dracut: initialize volatile.img partitions
Do not rely on dom0 initializing that device. Actually volatile.img
content should be none of dom0 business.

QubesOS/qubes-issues#1308
2015-10-26 20:00:08 +01:00
Marek Marczykowski-Górecki
0c4c2323c0 Add VM kernel related files as qubes-core-vm-kernel-support package
This is preparation for pvgrub support, where all VM kernel files will
be installed inside of VM instead of dom0.
But also the same could be used to prepare VM kernel image from any dom0
kernel.
2015-03-25 23:25:33 +01:00