mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
To: Konrad Rzeszutek Wilk <konrad@darnok.org>
Cc: Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [Xen-devel] [PATCH v3] xen-blkfront: set pages are FOREIGN_FRAME when sharing them
Date: Tue, 8 May 2012 18:29:32 +0100	[thread overview]
Message-ID: <alpine.DEB.2.00.1205081826300.26786@kaball-desktop> (raw)
In-Reply-To: <20120507212536.GA24344@andromeda.dapyr.net>

On Mon, 7 May 2012, Konrad Rzeszutek Wilk wrote:
> On Tue, Apr 17, 2012 at 11:58:58AM +0100, Stefano Stabellini wrote:
> > On Mon, 16 Apr 2012, Konrad Rzeszutek Wilk wrote:
> > > On Tue, Apr 10, 2012 at 05:25:19PM +0100, Stefano Stabellini wrote:
> > > > Set pages as FOREIGN_FRAME whenever blkfront shares them with another
> > > > domain. Then when blkfront un-share them, also removes the
> > > > FOREIGN_FRAME_BIT from the p2m.
> > > >
> > > > We do it so that when the source and the destination domain are the same
> > > > (blkfront connected to blkback in the same domain) we can more easily
> 
> So I've been testing it with my mini config and it worked great. But
> when I started using a distro .config it blew up. I am not really
> sure why it does that, but here is the dmesg and .config.
> 
> Nothing fancy with the guest config:
> 
> cat /crash.xm  | grep -v \#
> memory = 4096
> name = "OL6_X86_64_PVHVM"
> vcpus=12
> vif = [ 'mac=00:0f:4b:00:00:72,bridge=switch' ]
> disk= ['phy:/dev/guests/OL6_X86_64_PVHVM,hda,w']
> vfb = [ 'vnc=1, vnclisten=0.0.0.0,vncunused=1']
> vnc=1
> vnclisten="0.0.0.0"
> hvm_loader="/usr/bin/pygrub"
> 
> 
> This is the #testing branch, but just using my #linux-next along
> with stable/for-jens-3.5 should reproduce this.
> 
> I added a bit of debug statement and found that 0xffffffffffffffff
> was passed in as a PFN in the set_phys_to_machine.

I have been unable to reproduce this problem (I haven't given up yet)
but I bet that the following patch fixes it:


diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index e3a9945..88e9304 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -333,7 +333,7 @@ static int blkif_queue_request(struct request *req)
 					buffer_mfn,
 					rq_data_dir(req));
 
-			info->shadow[id].frame[i] = mfn_to_pfn(buffer_mfn);
+			info->shadow[id].frame[i] = buffer_pfn;
 			ring_req->u.rw.seg[i] =
 					(struct blkif_request_segment) {
 						.gref       = ref,


The idea is that the request contains a page for which

pfn->mfn->pfn == 0xffffffffffffffff

I am not sure exactly how it could be possible to get into this state in
blkfront, I hope that some more tracing and code reading will be able to
shed some lights on the issue.

  parent reply	other threads:[~2012-05-08 17:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-10 16:25 Stefano Stabellini
2012-04-16 19:52 ` Konrad Rzeszutek Wilk
2012-04-17 10:58   ` Stefano Stabellini
2012-05-07 21:25     ` [Xen-devel] " Konrad Rzeszutek Wilk
2012-05-07 21:37       ` Konrad Rzeszutek Wilk
2012-05-08 17:29       ` Stefano Stabellini [this message]
2012-05-09 18:42         ` Stefano Stabellini
2012-05-10 16:12           ` Konrad Rzeszutek Wilk

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=alpine.DEB.2.00.1205081826300.26786@kaball-desktop \
    --to=stefano.stabellini@eu.citrix.com \
    --cc=konrad.wilk@oracle.com \
    --cc=konrad@darnok.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xen-devel@lists.xensource.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®