xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: xen-devel@lists.xenproject.org
Cc: George.Dunlap@eu.citrix.com, keir@xen.org, tim@xen.org,
	JBeulich@suse.com
Subject: P2M aliasing check
Date: Fri, 1 Apr 2016 19:18:16 +0200	[thread overview]
Message-ID: <alpine.OSX.2.20.1604011908340.9476@mac> (raw)

Hello,

While trying to get hotplug scripts to work on FreeBSD, I've realized that 
there's a check in the P2M code that prevents having multiple gfn pointing 
to the same mfn. The check in question is performed at 
guest_physmap_add_entry, and it means that the existing gfn -> mfn is 
removed and the new one is added, leaving the previous gfn without a valid 
mfn.

This is a problem specially for PVH Dom0, since it means local-attach of 
virtual disk devices lead to a crash of the Dom0. This happens because 
Dom0 is sharing a grant with itself, and then the original gfn -> mfn 
assignment gets destroyed in favor of the new one created by mapping the 
grant reference.

I would like to understand the reason why this check is in place, and why 
aliased gfn -> mfn mappings are not permitted. This is a different behavior 
as compared to PV guests, where multiple VA -> mfn mappings are permitted.

Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

             reply	other threads:[~2016-04-01 17:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-01 17:18 Roger Pau Monné [this message]
2016-04-04  8:23 ` P2M aliasing check Jan Beulich

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.OSX.2.20.1604011908340.9476@mac \
    --to=roger.pau@citrix.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=JBeulich@suse.com \
    --cc=keir@xen.org \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xenproject.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;
as well as URLs for NNTP newsgroup(s).