RE: [RFC PATCH 3/3] arch/x86/acrn: add hypercall for acrn_hypervisor

From: Thomas Gleixner
Date: Mon Mar 25 2019 - 04:30:52 EST


On Mon, 25 Mar 2019, Zhao, Yakui wrote:
>
> >-----Original Message-----
> >From: Thomas Gleixner [mailto:tglx@xxxxxxxxxxxxx]
> >Sent: Saturday, March 23, 2019 12:02 AM
> >To: Zhao, Yakui <yakui.zhao@xxxxxxxxx>
> >Cc: linux-kernel@xxxxxxxxxxxxxxx; x86@xxxxxxxxxx; Chen, Jason CJ
> ><jason.cj.chen@xxxxxxxxx>
> >Subject: Re: [RFC PATCH 3/3] arch/x86/acrn: add hypercall for acrn_hypervisor


Can you please fix your mail client not to copy the full email headers on
the reply?

The simple: On $DATE, someone wrote: like the below is sufficient.

> >> +static inline long acrn_hypercall0(unsigned long hcall_id) {
> >> +
> >> + /* x86-64 System V ABI register usage */
> >
> >Well, yes. But can you please provide a link to the hypercall specification in the
> >changelog?
> >
> >Also instead of repeating the same comment over and over, explain the calling
> >convention in a top level comment.
>
> This is the low-level implementation of low-level hypercall. It is similar to
> Kvm_hypercall1/2/3 in arch/x86/include/asm/kvm_para.h.
> Does it make sense that the below comments are added before acrn_hypercall0/1/2?
> /*
> * Hypercalls for ACRN Guest
> *
> * Hypercall number is passed in r8 register.
> * Return value will be placed in rax.
> * Up to 2 arguments are passed in rdi, rsi.
> */

Yes, that's much more helpful.

Thanks,

tglx