x86/kvmclock: Remove memblock dependency and further cleanups
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest7 patches 19 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | x86/kvmclock: Remove memblock dependencyarch/ arch/ arch/ | +12 | 0 replies | |
| 2/7 | x86/kvmclock: Remove page size requirement from wall_clockarch/ | +4 | 1 reply | |
| 3/7 | x86/kvmclock: Decrapify kvm_register_clock()arch/ arch/ | +11 | 3 replies | |
| 4/7 | x86/kvmclock: Cleanup the codearch/ | +23 | 4 replies | |
| 5/7 | x86/kvmclock: Mark variables __initdata and __ro_after_initarch/ | +5 | 1 reply | |
| 6/7 | x86/kvmclock: Move kvmclock vsyscall param and init to kvmclockarch/ arch/ arch/ | +31 | 3 replies | |
| 7/7 | x86/kvmclock: Switch kvmclock data to a PER_CPU variablearch/ | +60 | 1 reply |
Reviews trailers per patch
5 of 7 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Paolo Bonzini | Pavel Tatashin |
|---|---|---|
| Series | A-b | |
| 1/7 | ||
| 2/7 | R-b | |
| 3/7 | R-b | |
| 4/7 | ||
| 5/7 | R-b | |
| 6/7 | R-b | |
| 7/7 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [patch 0/7] x86/kvmclock: Remove memblock dependency and further cleanups
To allow early utilization of kvmclock it is required to remove the memblock dependency. memblock is currently used to allocate the per cpu data for kvmclock.
The first patch replaces the memblock with a static array sized 64bytes * NR_CPUS and was posted by Pavel. That patch allocates everything statically which is a waste when kvmclock is not used.
The rest of the series cleans up the code and converts it to per cpu variables but does not put the kvmclock data into the per cpu area as that has an issue vs. mapping the boot cpu data into the VDSO (leaks arbitrary data, unless page sized).
The per cpu data consists of pointers to the actual data. For the boot cpu a page sized array is statically allocated which can be mapped into the VDSO. That array is used for initializing the first 64 CPU pointers. If there are more CPUs the pvclock data is allocated during CPU bringup.
So this still will have some overhead when kvmclock is not in use, but bringing it down to zero would be a massive trainwreck and even more indirections.
Thanks,
tglx
8<--------------
a/arch/x86/include/asm/kvm_guest.h | 7 arch/x86/include/asm/kvm_para.h | 1 arch/x86/kernel/kvm.c | 14 - arch/x86/kernel/kvmclock.c | 262 ++++++++++++++----------------------- arch/x86/kernel/setup.c | 4 5 files changed, 105 insertions(+), 183 deletions(-)