Re: [PANIC, hyperv] BUG: unable to handle kernel paging request at ffff880077800004 (hv_ringbuffer_write)
From: Sitsofe Wheeler
Date: Fri Aug 29 2014 - 07:20:21 EST
On Fri, Aug 29, 2014 at 01:24:11PM +0300, Dan Carpenter wrote:
> On Fri, Aug 29, 2014 at 10:16:32AM +0000, Dexuan Cui wrote:
> >
> > 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.
>
> Ah. That makes sense then. Thanks.
This got me too.
Because this particular return code is overloaded with multiple meanings
that can't necessarily be deduced from its name perhaps this
documentation patch would be helpful:
diff --git a/arch/x86/include/uapi/asm/hyperv.h b/arch/x86/include/uapi/asm/hyperv.h
index 462efe7..04894d5 100644
--- a/arch/x86/include/uapi/asm/hyperv.h
+++ b/arch/x86/include/uapi/asm/hyperv.h
@@ -213,6 +213,12 @@
#define HV_STATUS_SUCCESS 0
#define HV_STATUS_INVALID_HYPERCALL_CODE 2
#define HV_STATUS_INVALID_HYPERCALL_INPUT 3
+/*
+ * HV_STATUS_INVALID_ALIGNMENT indicates one of the following:
+ * The input or output pointer is not aligned to 8 bytes.
+ * The input or output lists span more than one page.
+ * The input or output pointer is out of bounds.
+ */
#define HV_STATUS_INVALID_ALIGNMENT 4
#define HV_STATUS_INSUFFICIENT_BUFFERS 19
Dexuan: Does this mean that if input/output pointer is well aligned and
the (payload start) is in the same page as (payload start + payload
size) all will be well? If so it won't matter what the length of payload
size is right?
--
Sitsofe | http://sucs.org/~sits/
--
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/