[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231220005156.2rymnxu5bv6wdwlx@box.shutemov.name>
Date: Wed, 20 Dec 2023 03:51:56 +0300
From: kirill.shutemov@...ux.intel.com
To: Alexey Makhalov <alexey.makhalov@...adcom.com>
Cc: linux-kernel@...r.kernel.org, virtualization@...ts.linux.dev,
bp@...en8.de, hpa@...or.com, dave.hansen@...ux.intel.com,
mingo@...hat.com, tglx@...utronix.de, x86@...nel.org,
netdev@...r.kernel.org, richardcochran@...il.com,
linux-input@...r.kernel.org, dmitry.torokhov@...il.com,
zackr@...are.com, linux-graphics-maintainer@...are.com,
pv-drivers@...are.com, namit@...are.com, timothym@...are.com,
akaher@...are.com, jsipek@...are.com,
dri-devel@...ts.freedesktop.org, daniel@...ll.ch, airlied@...il.com,
tzimmermann@...e.de, mripard@...nel.org,
maarten.lankhorst@...ux.intel.com, horms@...nel.org
Subject: Re: [PATCH v3 2/6] x86/vmware: Introduce vmware_hypercall API
On Tue, Dec 19, 2023 at 04:17:40PM -0800, Alexey Makhalov wrote:
>
>
> On 12/19/23 3:20 PM, kirill.shutemov@...ux.intel.com wrote:
> > On Tue, Dec 19, 2023 at 01:57:47PM -0800, Alexey Makhalov wrote:
> > > +static inline
> > > +unsigned long vmware_hypercall1(unsigned long cmd, unsigned long in1)
> > ...
> > > +static inline
> > > +unsigned long vmware_hypercall3(unsigned long cmd, unsigned long in1,
> > > + uint32_t *out1, uint32_t *out2)
> > ...
> > > +static inline
> > > +unsigned long vmware_hypercall4(unsigned long cmd, unsigned long in1,
> > > + uint32_t *out1, uint32_t *out2,
> > > + uint32_t *out3)
> > ...
> > > +static inline
> > > +unsigned long vmware_hypercall5(unsigned long cmd, unsigned long in1,
> > > + unsigned long in3, unsigned long in4,
> > > + unsigned long in5, uint32_t *out2)
> > ...
> > > +static inline
> > > +unsigned long vmware_hypercall6(unsigned long cmd, unsigned long in1,
> > > + unsigned long in3, uint32_t *out2,
> > > + uint32_t *out3, uint32_t *out4,
> > > + uint32_t *out5)
> > ...
> > > +static inline
> > > +unsigned long vmware_hypercall7(unsigned long cmd, unsigned long in1,
> > > + unsigned long in3, unsigned long in4,
> > > + unsigned long in5, uint32_t *out1,
> > > + uint32_t *out2, uint32_t *out3)
> >
> > Naming is weird. The number in the name doesn't help much as there seems
> > no system on how many of the parameters are ins and outs.
>
> There was internal discussion on hypercall API naming. One of proposals was
> using 2 digits - number of input and number of output arguments.
> And it definitely looked weird. So, we agreed to have just single number -
> total number of arguments excluding cmd.
Have you considered naming them by number of input parameters? Number of
output parameters as demanded by users.
So vmware_hypercall4() will become vmware_hypercall1() and current
vmware_hypercall1() and vmware_hypercall3() will go away.
It is still awful, but /maybe/ better that this, I donno.
--
Kiryl Shutsemau / Kirill A. Shutemov
Powered by blists - more mailing lists