[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 7/7] gnttab: unreachable code when GNTTAB_MAX_VERSION < 2
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Mykola Kvach <xakep.amatop@xxxxxxxxx>
- Date: Thu, 24 Sep 2026 21:54:45 +0300
- Arc-authentication-results: i=1; mx.google.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=PWAUwpPka71Oo5qcp6BYgkJIhV/r3ITppA9B+gt/k5U=; fh=RwOOD8FwKHtBBkobGpKkroeNqvZU5mMoUlw2sGgs4aY=; b=sAsN00f5z0cWW5MmPL2DxBZYG5oVznYX4jo12SQKtXrNKp+AHsgaqnrbUrxZJ/JrC3 om5QJiFpn9Nigdcc1pz2grOxXJYrQr+8v3T2k9KttD0R65PG9gYQmSMWmaec2o5lCYWH XvYrdhK4LhpAe2XfDEtUSlbh8YUvHmDX3BEJlBPw6I0+Zci6rIa6WX1JQ1fFmNt5884G IJyDvFPUIwL47RbuyrxsZMoeIEnUlPqdxZTkXhdy4U2j8eWP/MIvMgs3VH5rkBRZ6QTI fpm9uFqILEADNqlK8DnorTeps91sKsdW8z3x9o8geJjNc8HqjmmjFgM7HuBIMj4xl3ae nA4g==; darn=lists.xenproject.org
- Arc-seal: i=1; a=rsa-sha256; t=1790276098; cv=none; d=google.com; s=arc-20260327; b=dzfAcTWRA9iad2obB4Q3R2xOkb24XEr7vITkHLi3cV4XfutX+Jp0IelOIng3NdK0iu JSlZuGuc/THdSNSuEAdgOWiuhj/IagBX4hOGIj+iyFKRGRwKThrqLrV62iOJtg5pztAb 8NZobjvzTahoTkg6sRKJzBsBU2n8giAt3e4yuTEQgi4GUI/N3x6B+/ihpL2IZ6RBbXU7 9vesfCwUy3TSBo9me+uTSvn14UT1C3bNx9uhwHXzWDbwK3D2rlxjVBYJ5otbhiJCcZCK D3KWws3sYek2K21VCXdCJ+cUUlzZkODqmMsaF1kafwAx9PeVptwp5LXIFX0POGzcDFzy up0A==
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=20251104 header.d=gmail.com header.i="@gmail.com" header.h="Content-Transfer-Encoding:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To:References:MIME-Version"
- Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
- Delivery-date: Thu, 24 Sep 2026 18:55:06 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Thu, Sep 24, 2026 at 9:39 PM Mykola Kvach <xakep.amatop@xxxxxxxxx> wrote:
>
> Hi,
>
> On Tue, Jul 28, 2026 at 4:53 PM Jan Beulich <jbeulich@xxxxxxxx> wrote:
> >
> > I'm surprised Eclair doesn't spot the large chunks of unreachable code on
> > Arm, i.e. violations of Misra C:2012 rule 2.1.
> >
> > Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> > ---
> > This pretty certainly isn't dealing with everything. For example, with
> > another helper the gt_version field could likely also become conditional.
> > With some more effort the nr_status_frames field similarly could become
> > conditional.
>
> Could we also skip the gt->status allocation and cleanup on Arm?
> grant_table_init() still allocates this pointer array, although status
> pages are only used by v2. This could be done in a follow-up patch,
> together with the fields you mentioned.
Sorry, I missed that gnttab=max-ver:2 can still enable v2 on Arm.
My suggestion to skip the status allocation would only apply if v2 were
completely disabled on Arm.
~Mykola
|