|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2 3/7] x86: extend update_intpte() to support atomic get-and-update
On 16.09.2026 10:23, Kevin Lampis wrote:
>> The "flag set, pointer non-NULL" case wouldn't hit the "return 0" path
>
> Correct.
>
> But what about the "flag not set" case. When PTE_UPDATE_SWAP is not set then
> UPDATE_ENTRY may return 0.
>
> If UPDATE_ENTRY() returns 0 then mod_l1_entry() will give
> the wrong ol1e value to put_page_from_l1e().
>
> static int mod_l1_entry( ... )
> {
> ...
> ol1e = UPDATE_ENTRY(l1, pl1e, ol1e, ...);
> ...
> put_page_from_l1e(ol1e, pt_dom);
> ...
> }
>
> I think mod_l1_entry may need to store a copy of ol1e incase UPDATE_ENTRY()
> returns 0. Or add some extra if/else around every call to UPDATE_ENTRY() to
> only assign ol1e if we know we're on the new PTE_UPDATE_SWAP path.
Possibly, yes. Or even have a separate helper for the SWAP case. What may
be possible with the returning of 0 is
ol1e = UPDATE_ENTRY(l1, pl1e, ol1e, ...) ?: ol1e;
when the return value is relevant in both cases. Question is: Is it, in the
first place when SWAP isn't set?
Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |