[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] vPCI: make vpci_add_register() an out-of-line function
- To: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
- From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Date: Tue, 23 Dec 2025 16:28:59 +0100
- 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=fSyDiyWSDKUTgV1t9GfaDAwenOHIaspIc0I0p4xdfuM=; b=MCAUe/+1t8HuwXlvsVimyJCjHRySg5iNnI7bEkaapYyLoxYlFsAXg29WM3qrptA2AXi/Hq2/0tdBAJrkm8cvvBAyT90WNV9dKx24G3V5vY5jbjAbNHAwZflBl+5SVvj9ucb83SbPexMbqQaGSHcPaA5eo1VAgj3RLsyDSUahPNjA4FMlB89amWXVkASwVbtbLkEW9ANCvbK7qG2/6D7fYNzA1cB2I1bPZweNaO65ZQ2Rb6oJ28ltSvx3aJXYeDZodiQgmCIE6xbIo6ioU7ZjoGVPlGjCerVnKPqukpOYvZdn/za0q6XgEJ4t5Qoa0n5zncDigtFyKDdPd0QC19Rrlg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=RU6v/q7HVuCWYPlmh40cqnsmLiOD5uBkAm9syO8EN386kw2C1gCZwdXyzkzC0V5sBFDUdVA8De7K3d68J88Fh7aQ53+iMkeOJQYROf89s+LbJdQE5qFtUS4B1jYBwclvwRvhT9H0CEUpRYi5+S8bew6X9t4juMzcYyYR0gzUmSipmy6zRYsg3MUJI3R3yjTmGnYns218hk6yFvpz588z6K/iGN3rzn8vFVJ6J6ifBC6l2YOOvEMCDRUDcTcUbOmk3ZSTYP+NECq+eJcsoSIVoB91VRC4B4lMZ8zY659wnEHbqtLSVrh4PVet42FceQFPdcePu2SY25yuPYmRucd6rQ==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: Jan Beulich <jbeulich@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Tue, 23 Dec 2025 15:29:16 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Thu, Dec 18, 2025 at 11:02:40AM -0500, Stewart Hildebrand wrote:
> On 12/18/25 05:45, Jan Beulich wrote:
> > Calling a function with 10 arguments is inefficient on many architectures:
> > x86-64 allows for up to 6 register parameters, Arm64 for up to 8.
> > Everything else needs passing on the stack, i.e. forcing the compiler to
> > emit stack manipulation insns at every call site.
> >
> > Shrinks generated code on x86 (with gcc15) by over 250 bytes. The gains on
> > Arm64 are a little less.
> >
> > Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
>
> Reviewed-by: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
Acked-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> > ---
> > Why is it, btw, that the declarations live in xen/vpci.h? These functions
> > aren't supposed to be called from outside xen/drivers/vpci/, are they? In
> > which case their decls may better live in a private header?
>
> You have a good point, they could very well live in a private header IMO.
In fact most of vpci.h could become private.
vpci_{,de}assign_device() must obviously be public, plus a couple more
to satisfy calls from external sites: vpci_{read,write}(),
vpci_dump_msi(), vpci_process_pending() and vpci_reset_device().
Maybe something else I'm missing, but not a lot more.
Thanks, Roger.
|