On 01/04/2016 04:07 PM, Boris Ostrovsky wrote:
On 12/28/2015 04:52 PM, Joao Martins wrote:Yeah, I can use get_zeroed_page() (struct pvclock_vsyscall_time_info is always
+Can you just use get_zeroed_page()? (struct pvclock_vsyscall_time_info
+ size = PAGE_ALIGN(sizeof(struct pvclock_vsyscall_time_info));
+ mem = memblock_alloc(size, PAGE_SIZE);
+ if (!mem)
+ return -ENOMEM;
+
+ ti = __va(mem);
+ memset(ti, 0, size);
is always less than a page, isn't it?).
less than a page).
Additionally perhaps this region shouldn't be freed if PVCLOCK_TSC_STABLE_BIT
isn't supported, because otherwise I would end up corrupting data elsewhere
since the pvti would still be periodically updated by Xen, right?