From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= Subject: Re: Grant table version Date: Wed, 30 Oct 2013 13:26:30 +0100 Message-ID: <5270FAF6.30600__24385.3013533682$1383136113$gmane$org@gmail.com> References: <526EA78A.6020104@gmail.com> <526EAF78.2070408@citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0740236859048805142==" Return-path: In-Reply-To: <526EAF78.2070408@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: The development of GRUB 2 , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --===============0740236859048805142== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="----enig2DADMBLHWRWXHKGRUEROP" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2DADMBLHWRWXHKGRUEROP Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 28.10.2013 19:39, Andrew Cooper wrote: > On 28/10/13 18:06, Vladimir '=CF=86-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 vers= ion. >> 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 grant= s >> or this call would discard all current grants. >=20 > You can change back and forth with grant table versions using the > GNTTABOP_set_version hypercall, so long as you have no active grants. >=20 > 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. >=20 > For compatibility reasons it is not strictly required, but it is > certainly expected that a new kernel explicitly chooses a gnttab versio= n > using the hypercall. There is certainly an area for problems if pvgrub= 2 > uses grant v2, then leaves v2 active and hands off to an older kernel > who expects v1 and doesn't explicitly set the version. >=20 > 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. >=20 Thank you, that's what I did now. > ~Andrew >=20 >> >> >> >> _______________________________________________ >> Xen-devel mailing list >> Xen-devel@lists.xen.org >> http://lists.xen.org/xen-devel >=20 ------enig2DADMBLHWRWXHKGRUEROP Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (GNU/Linux) Comment: Using GnuPG with Icedove - http://www.enigmail.net/ iF4EAREKAAYFAlJw+vYACgkQNak7dOguQgmBIgD+M5NkwTqQ/bzU31jQ0t8/nmq1 Z4+7TWA0WTubaHOe9UwA/iM07FbUKNiK89XpO+2d+PNE9+qXwwvwYqvVZ/bLVBOM =nax/ -----END PGP SIGNATURE----- ------enig2DADMBLHWRWXHKGRUEROP-- --===============0740236859048805142== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============0740236859048805142==--