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

Re: [PATCH 09/12] x86/shadow: Rework write_atomic() call in shadow_write_entries()


  • To: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Wed, 25 Feb 2026 12:53:03 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=AAWosXe15ohU5tfzB4UY/2tLcZYGffUxvyx11m/su6o=; b=GSqEKAN3zukUTjPO5ImyN5uzY0vsqCSeWss93wzVWGGRIhS5Q93q9zMZ6FzAAqrpfBjKo7rTPiJVl2y6DYm5rvtnnCS5rqMj6mhecz5b6tfiWwAw+iCqkM/yeVfmT3mTqB1Xfmj1Z6Bv7nCm8ivT5tRHDK3dBEEqZpF7lTwH1XhOr1BEpMfllvwSa1OCRToPlKx+zhgXOWzqTH5X/rvcsWnsIziefMNq4hlogNea8lT7sZ2JW7uckavO6dqyJ/LaDkPmthcCiQUuxL372Lku2uuXBztLnepUF91FpgLpL3HEQaQjmEzd0zgdLcqtNBuvNM1IcFIswJKwP15+EeQZdA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=XnK/h3jNEL9IrKBO2lAykbaHq42eFBGHLGckt+JkxmPNhvtGBKwlX6LpKpGGDW0OYWo4xGbBVg47cjcccg7IDP8l9bxk6EJUFPpapCPDoZzmE0heorVtdWVLxRYCbs+jUreZg7PhDIHe9w7DkhWfClUPZmH6K3dOxQvMWgUdjA5kl551NrBjLTz0MqTf6oEeZND3z8G3x9Oc906wINhEuKxWlV7dB9y8aVB6RrQCTaP9IwNtgZP+v9rPEFbxfhqFHApMBdxHerQST/BSi4wDJ3cMoY4DLed70phYPsxOWqIlvYxnaRQU170VqwjDKSwEjsXbwynIGtG6XLDyKCcmCA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roberto Bagnara <roberto.bagnara@xxxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, "consulting @ bugseng . com" <consulting@xxxxxxxxxxx>
  • Delivery-date: Wed, 25 Feb 2026 12:53:22 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 25/02/2026 12:35 pm, Nicola Vetrini wrote:
> On 2026-02-25 13:14, Andrew Cooper wrote:
>> On 23/02/2026 7:26 am, Roberto Bagnara wrote: 
>>>
>>> Note that in recent versions of MISRA C that rule is no longer
>>> mandatory.  More generally, note also that, IMHO, switching to
>>> a more modern version of MISRA C would simplify compliance.
>>
>> Ok.  Making things simpler for compliance sounds like a good thing. 
>> What would this entail?
>>
>> Presumably we've got to adapt to all changes in this newer revision of
>> MISRA C.
>>
>> ~Andrew
>
> Most likely new violations on new non-clean guidelines, generally
> rules for features that were standardized in C11/C18 and were
> previously widely available extensions (e.g. _Noreturn, _Alignof,
> threads, ...), 

We use noreturn a lot, and alignof() a little.  No threading at all
(well - not as C understands it).

> alongside some minor changes in existing ones, such as the
> classification change mentioned by Roberto. The exact impact depends
> on the target MISRA revision, however. Making an experiment should be
> only a matter of s/MC3A2/MC4/ (or whichever MISRA revision is chosen:
> MC4 in ECLAIR refers to the latest published MISRA revision, that is,
> MISRA C:2025. Perhaps also a few regressions (as in newly introduced
> violations) on clean ones, but I do not expect the results to be
> radically different.
>
> Side note here: are the efforts to make Xen compile with
> -stc=c11/gnu11 still ongoing? I say this because any MISRA revision
> other than the one currently used by Xen by default is based on C11,
> as it introduces guidelines for C11/C18 features. Not that this would
> matter a whole lot for Xen, but it is something to consider in the
> broader picture.
>

Funny you should ask.  I had a paragraph about it in my reply but
dropped it, thinking it was getting off track.

https://gitlab.com/xen-project/xen/-/issues/201

I've just updated it to note that we did start using auto, by way of the
__auto_type language extension.

>From the Xen side, switching to gnu11 is a one-line change.  However
"ongoing" is really just me in my copious free time, and I'm not able to
do the ECLAIR/MISRA config side of the work.

It sounds to me like we want a dedicated work item switch to gnu11 and
some newer MISRA revision, but I will have to defer to you on how large
a task this is.

I suppose we should start with an experiment to see what shows up in the
*-amd target builds, and go from there?

~Andrew



 


Rackspace

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