[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] public/gnttab: relax v2 recommendation

Hi Jan,

On 05/05/2021 11:57, Jan Beulich wrote:
On 05.05.2021 10:51, Julien Grall wrote:
On 05/05/2021 09:24, Jan Beulich wrote:
On 05.05.2021 10:12, Julien Grall wrote:
Hi Jan,

On 30/04/2021 09:36, Jan Beulich wrote:
On 30.04.2021 10:19, Julien Grall wrote:
On 29/04/2021 14:10, Jan Beulich wrote:
With there being a way to disable v2 support, telling new guests to use
v2 exclusively is not a good suggestion.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

--- a/xen/include/public/grant_table.h
+++ b/xen/include/public/grant_table.h
@@ -121,8 +121,10 @@ typedef uint32_t grant_ref_t;
- * Version 1 of the grant table entry structure is maintained purely
- * for backwards compatibility.  New guests should use version 2.
+ * Version 1 of the grant table entry structure is maintained largely for
+ * backwards compatibility.  New guests are recommended to support using
+ * version 2 to overcome version 1 limitations, but to be able to fall back
+ * to version 1.

v2 is not supported on Arm and I don't see it coming anytime soon.
AFAIK, Linux will also not use grant table v2 unless the guest has a
address space larger than 44 (?) bits.

Yes, as soon as there are frame numbers not representable in 32 bits.

I can't remember why Linux decided to not use it everywhere, but this is
a sign that v2 is not always desired.

So I think it would be better to recommend new guest to use v1 unless
they hit the limitations (to be details).

IOW you'd prefer s/be able to fall back/default/? I'd be fine that way


Okay, I've changed that part, but ...

We would also need to document the limitations as they don't seem
to be (clearly?) written down in the headers.

... I'm struggling to see where (and perhaps even why) this would be
needed. The v1 and v2 grant table entry formats are all there. I'm
inclined to consider this an orthogonal addition to make by whoever
thinks such an addition is needed in the first place.

The current comment is not mentionning about limitations but instead say
"new OS should use v2". Your proposal is to say "default to v1 but use
v2 if you hit limitations".

I've intentionally not said "if you hit limitations".

This doesn't really change the point I made. :)

This is not a very friendly way to work on Xen. FAOD, I am not saying
that the other headers are perfect... Instead, I am saying we ought to
improve new wording to make the project a bit more welcoming.

I don't think the public header is the place to go into such lengths,
especially when all the information is already there. Textually
describing the same aspects should be done elsewhere imo.

The goal of comments is to document anything that cannot be easily inferred. This is the case of the limitations you mention but don't describe.

 I'm of the
firm opinion that the patch as is represents an improvement.

I haven't suggested that patch wasn't improvement. However, I think it can easily be improved further.

no suggestion anywhere that things couldn't be further improved, as
is the case about always.

Since I created this patch only because my request to correct the
statement led to me being asked to provide the suggested new text,
may I suggest that you pick up this patch or create one from scratch
to accommodate all your wishes, if you believe this extra information
really belongs there? All I'm after is to correct a statement that's
actively misleading.

I am a bit confused with this answer. Are you saying you are not willing to write it but if someone else does you will accept it?


Julien Grall



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.