On 2025-03-10 04:21, Jan Beulich wrote:
On 10.03.2025 09:17, Juergen Gross wrote:
On 10.03.25 09:01, Jan Beulich wrote:
On 06.03.2025 23:03, Jason Andryuk wrote:
+ shared_entry_v1(gt, idx).flags = flags;
+ shared_entry_v1(gt, idx).domid = be_domid;
+ shared_entry_v1(gt, idx).frame = frame;
+}
In common code there shouldn't be an assumption that gnttab v1 is in use.
But isn't the grant table in V1 format until the guest potentially switches
to V2?
Strictly speaking it's in v0 format initially. But yes, I see your point.
Provided this function is made clear that it may only ever be used on a
domain that wasn't started yet (perhaps proven by way of an assertion).
Yes, this is what I was relying on.
If d is still passed in, we could do
ASSERT(!d->creation_finished);
Hmmm, the function might could be marked __init, too, I think.
struct grant_table and shared_entry_v1 are defined in
xen/common/grant_table.c, which is why the function lives there (and
it'll be useful for hyperlaunch). To avoid unreachable code, I guess
I'll wrap it inside #ifdef CONFIG_DOM0LESS_BOOT.
Regards,
Jason