grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: The development of GRUB 2 <grub-devel@gnu.org>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [Xen-devel] Grant table version
Date: Wed, 30 Oct 2013 13:26:30 +0100	[thread overview]
Message-ID: <5270FAF6.30600@gmail.com> (raw)
In-Reply-To: <526EAF78.2070408@citrix.com>

[-- Attachment #1: Type: text/plain, Size: 1738 bytes --]

On 28.10.2013 19:39, Andrew Cooper wrote:
> On 28/10/13 18:06, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
>> Hello, all. I'm working on pvgrub2 and my problem is following:
>> When you first use grant tables you commit yourself to a particular
>> grant table version. GRUB has to read from disk and hence use grant
>> tables. By doing so it commits anything that it loads to the same version.
>> Would it be possible to have a hypercall to reset grant table version?
>> Of course, before doing such a call one would need to revoke all grants
>> or this call would discard all current grants.
> 
> You can change back and forth with grant table versions using the
> GNTTABOP_set_version hypercall, so long as you have no active grants.
> 
> It is not possible to revoke a grant, as the grant ABI guarantees that a
> successful grant stays mapped until explicitly unmapped.  Otherwise, a
> reset would cause unexpected pagefaults in the mapper domain.
> 
> For compatibility reasons it is not strictly required, but it is
> certainly expected that a new kernel explicitly chooses a gnttab version
> using the hypercall.  There is certainly an area for problems if pvgrub2
> uses grant v2, then leaves v2 active and hands off to an older kernel
> who expects v1 and doesn't explicitly set the version.
> 
> From this point of view, the safe course of action is to use whichever
> type of grants you want, then tear down all the front/back pairs, and
> reset the version to v1 before handing off.
> 
Thank you, that's what I did now.
> ~Andrew
> 
>>
>>
>>
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.xen.org
>> http://lists.xen.org/xen-devel
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 291 bytes --]

  reply	other threads:[~2013-10-30 12:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-28 18:06 Grant table version Vladimir 'φ-coder/phcoder' Serbinenko
2013-10-28 18:39 ` [Xen-devel] " Andrew Cooper
2013-10-30 12:26   ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]
2013-10-31 15:48     ` Ian Campbell
2013-12-15 22:02       ` Matt Wilson

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=5270FAF6.30600@gmail.com \
    --to=phcoder@gmail.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=grub-devel@gnu.org \
    --cc=xen-devel@lists.xen.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).