Re: [patch 7/7] x86/kvmclock: Switch kvmclock data to a PER_CPU variable

From: Pavel Tatashin
Date: Wed Jul 11 2018 - 23:13:25 EST


> /* Aligned to page sizes to match whats mapped via vsyscalls to userspace */
> #define HV_CLOCK_SIZE (sizeof(struct pvclock_vsyscall_time_info) * NR_CPUS)

HV_CLOCK_SIZE is not used anywhere anymore, can be deleted.

> +#define HVC_BOOT_ARRAY_SIZE \
> + (PAGE_SIZE / sizeof(struct pvclock_vsyscall_time_info))

This works, because sizeof(struct pvclock_vsyscall_time_info)) == 64
bytes, but static assert that verifies that IS_ALIGNED(PAGESIZE,
sizeof(struct pvclock_vsyscall_time_info)) would guarantee that no
random data is ever exposed to vdso.

Otherwise looks good to me:
Reviewed-by: Pavel Tatashin <pasha.tatashin@xxxxxxxxxx>