|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] cxenstored: wait until after reset to notify dom0less domains
On 18.10.2023 23:31, Stefano Stabellini wrote:
> On Wed, 17 Oct 2023, Jan Beulich wrote:
>>
>> On 14.10.2023 01:06, Stefano Stabellini wrote:
>>> From: George Dunlap <george.dunlap@xxxxxxxxx>
>>>
>>> Commit fc2b57c9a ("xenstored: send an evtchn notification on
>>> introduce_domain") introduced the sending of an event channel to the
>>> guest when first introduced, so that dom0less domains waiting for the
>>> connection would know that xenstore was ready to use.
>>>
>>> Unfortunately, it was introduced in introduce_domain(), which 1) is
>>> called by other functions, where such functionality is unneeded, and
>>> 2) after the main XS_INTRODUCE call, calls domain_conn_reset(). This
>>> introduces a race condition, whereby if xenstored is delayed, a domain
>>> can wake up, send messages to the buffer, only to have them deleted by
>>> xenstore before finishing its processing of the XS_INTRODUCE message.
>>>
>>> Move the connect-and-notfy call into do_introduce() instead, after the
>>> domain_conn_rest(); predicated on the state being in the
>>> XENSTORE_RECONNECT state.
>>>
>>> (We don't need to check for "restoring", since that value is always
>>> passed as "false" from do_domain_introduce()).
>>>
>>> Also take the opportunity to add a missing wmb barrier after resetting
>>> the indexes of the ring in domain_conn_reset.
>>>
>>> This change will also remove an extra event channel notification for
>>> dom0 (because the notification is now done by do_introduce which is not
>>> called for dom0.) The extra dom0 event channel notification was only
>>> introduced by fc2b57c9a and was never present before. It is not needed
>>> because dom0 is the one to tell xenstored the connection parameters, so
>>> dom0 has to know that the ring page is setup correctly by the time
>>> xenstored starts looking at it. It is dom0 that performs the ring page
>>> init.
>>>
>>> Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxx>
>>> Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxx>
>>
>> Should this have had a Fixes: tag thus marking it to pick up for
>> backport?
>
> Sorry this was committed already
That's why I used "have had". I still need an answer to the question
though; your reply only hints towards "yes".
Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |