public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sitsofe Wheeler <sitsofe@gmail.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Dexuan Cui <decui@microsoft.com>,
	KY Srinivasan <kys@microsoft.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devel@linuxdriverproject.org" <devel@linuxdriverproject.org>
Subject: Re: [PANIC, hyperv] BUG: unable to handle kernel paging request at ffff880077800004 (hv_ringbuffer_write)
Date: Fri, 29 Aug 2014 12:20:10 +0100	[thread overview]
Message-ID: <20140829112009.GD11445@sucs.org> (raw)
In-Reply-To: <20140829102411.GE5071@mwanda>

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/

  reply	other threads:[~2014-08-29 11:20 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-20  9:26 [PANIC, hyperv] BUG: unable to handle kernel paging request at ffff880077800004 (hv_ringbuffer_write) Sitsofe Wheeler
2014-08-20 11:15 ` Dexuan Cui
2014-08-20 11:40   ` Sitsofe Wheeler
2014-08-20 13:42     ` Dexuan Cui
2014-08-25 14:02 ` Dexuan Cui
2014-08-25 17:41   ` Sitsofe Wheeler
2014-08-26 10:30     ` Dexuan Cui
2014-08-27 10:44       ` Sitsofe Wheeler
2014-08-27 11:30         ` Dexuan Cui
2014-08-27 12:15           ` Sitsofe Wheeler
2014-08-27 14:14             ` Dexuan Cui
2014-08-27 16:19               ` Sitsofe Wheeler
2014-08-27 18:45                 ` KY Srinivasan
2014-08-27 22:57                   ` Sitsofe Wheeler
2014-08-27 23:13                     ` KY Srinivasan
2014-08-28  3:21                       ` Dexuan Cui
2014-08-28  3:41                         ` KY Srinivasan
2014-08-28 12:48                         ` Sitsofe Wheeler
2014-08-29  3:39                           ` Dexuan Cui
2014-08-29  9:49                   ` Dan Carpenter
2014-08-29 10:16                     ` Dexuan Cui
2014-08-29 10:24                       ` Dan Carpenter
2014-08-29 11:20                         ` Sitsofe Wheeler [this message]
2014-08-29 14:48                           ` Dexuan Cui

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140829112009.GD11445@sucs.org \
    --to=sitsofe@gmail.com \
    --cc=dan.carpenter@oracle.com \
    --cc=decui@microsoft.com \
    --cc=devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=haiyangz@microsoft.com \
    --cc=kys@microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox