All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dexuan Cui <decui@microsoft.com>
To: Sitsofe Wheeler <sitsofe@gmail.com>
Cc: KY Srinivasan <kys@microsoft.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	"devel@linuxdriverproject.org" <devel@linuxdriverproject.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PANIC, hyperv] BUG: unable to handle kernel paging request at ffff880077800004 (hv_ringbuffer_write)
Date: Wed, 27 Aug 2014 11:30:54 +0000	[thread overview]
Message-ID: <EE124450C0AAF944A40DD71E61F878C996493E@SINEX14MBXC419.southpacific.corp.microsoft.com> (raw)
In-Reply-To: <20140827104408.GC1827@sucs.org>

> -----Original Message-----
> From: Sitsofe Wheeler
> On Tue, Aug 26, 2014 at 10:30:54AM +0000, Dexuan Cui wrote:
> 
> > Actually I found the direct cause of the panic: sometimes
> > vmbus_post_msg() can return 4 (HV_STATUS_INVALID_ALIGNMENT), but
> > vmbus_open() doesn't propagate this error to the caller
> > synthvid_connect_vsp(), and vmbus_open() " goto error1"  and frees the
> > ringbuffer! So later the access to ring_buffer->read_index is caught
> > by CONFIG_DEBUG_PAGEALLOC.
> >
> > I don't see any "invalid alignment" here... and I can't explain why
> > vcpus=4 seems OK... Debugging WIP.
I think I found out why we got HV_STATUS_INVALID_ALIGNMENT:
according to 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),
do_hypercall() fails due to HV_STATUS_INVALID_ALIGNMENT, if "the
specified input or output GPA pointer is not aligned to 8 bytes",
or, "the specified input or output parameter lists spans pages".
Here the 'input' can rarely across the page boundary, especially when 
CONFIG_DEBUG_PAGEALLOC is on.

I'm making a patch for this. 

> >
> > BTW, please try the attached patch.  With it, the VM doesn't panic in
> > my side with vcpus=1 and can boot to shell prompt(looks the boot-up is
> > very slow. I have to wait for several minutes...)
> 
> A quick tip: inline patches tend to be better than attachments on LKML.
> This is because if the mimetype of the attachment is something like
> octet/stream then various tools (e.g.
> https://lkml.org/lkml/2014/8/26/271 and
> https://patchwork.kernel.org/project/LKML/list/?submitter=100981 ) won't
> archive/extract the patch...
OK, thanks for the reminder! 
I'll use inline patches(I hope my mail client has been configured to be smart
enough to not "auto-format" my inline patches...).

> I rebased your patch on top of the K.Y.'s "Drivers: hv: vmbus: Eliminate
> calls to BUG_ON()" patch set (see below). The combination no longer
> triggers the bug and it doesn't take too long to boot but the network
> interface fails to work (which I believe is .
the sentence is accidently trimmed here? :-)

> 
> Rebased vmbus open fixes patch.
The patch doesn't resolve all the issues.

> Boot dmesg output (there's no line that mentions retries). The
> framebuffer window also didn't resize itself:
> 
> [    7.848030] hv_vmbus: registering driver hyperv_fb
> [    7.859759] hyperv_fb: Unable to open vmbus channel
> [    7.871812] hyperv_fb: Unable to connect to VSP
We still see hyperv_fb can't work.

Thanks,
-- Dexuan

  reply	other threads:[~2014-08-27 11:31 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 [this message]
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
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=EE124450C0AAF944A40DD71E61F878C996493E@SINEX14MBXC419.southpacific.corp.microsoft.com \
    --to=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 \
    --cc=sitsofe@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.