RE: [PANIC, hyperv] BUG: unable to handle kernel paging request at ffff880077800004 (hv_ringbuffer_write)

From: Dexuan Cui
Date: Fri Aug 29 2014 - 06:17:32 EST


> -----Original Message-----
> From: Dan Carpenter
> Sent: Friday, August 29, 2014 17:50 PM
> To: KY Srinivasan
> Cc: Sitsofe Wheeler; Dexuan Cui; Greg Kroah-Hartman; Haiyang Zhang;
> linux-kernel@xxxxxxxxxxxxxxx; devel@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Re: [PANIC, hyperv] BUG: unable to handle kernel paging request at
> ffff880077800004 (hv_ringbuffer_write)
>
> It's sort of weird that this is an alignment issue. The config that
> was posted earlier was an x86_64 config and on that system then the
> pointers from kmalloc() should already be aligned correctly at
> sizeof(u64).
>
> Earlier I said I suspected the code is racy, so possibly changing from
> kmalloc() to get_zeroed_page() just changes the timing enough so we
> don't see the race condition.
>
> regards,
> dan carpenter

Hi Dan,

Section 4.11.3 of Hypervisor Top Level Functional Specification(available at
http://blogs.msdn.com/b/virtual_pc_guy/archive/2014/02/17/updated-hypervisor-top-level-functional-specification.aspx)
says HV_STATUS_INVALID_ALIGNMENT can also be returned for a hypercall if
"the specified input or output parameter lists spans pages."

My understanding is: the input's memory range shouldn't cross a page
boundary.

Thanks,
-- Dexuan

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/