Re: [RFC PATCH v5 4/4] x86/acrn: Add hypercall for ACRN guest

2019-04-29 Thread Zhao, Yakui
On 2019年04月29日 15:36, Borislav Petkov wrote: On Mon, Apr 29, 2019 at 09:24:12AM +0800, Zhao, Yakui wrote: Yes. "movq" only indicates explicitly that it is 64-bit mov as ACRN guest only works under 64-bit mode. I also check the usage of "mov" and "movq" in this scenario. There is no

Re: [RFC PATCH v5 4/4] x86/acrn: Add hypercall for ACRN guest

2019-04-29 Thread Borislav Petkov
On Mon, Apr 29, 2019 at 09:24:12AM +0800, Zhao, Yakui wrote: > Yes. "movq" only indicates explicitly that it is 64-bit mov as ACRN guest > only works under 64-bit mode. > I also check the usage of "mov" and "movq" in this scenario. There is no > difference except that the movq is an explicit

Re: [RFC PATCH v5 4/4] x86/acrn: Add hypercall for ACRN guest

2019-04-28 Thread Zhao, Yakui
On 2019年04月28日 18:03, Borislav Petkov wrote: On Sun, Apr 28, 2019 at 09:56:35AM +0800, Zhao, Yakui wrote: Thanks for the reminder about the access width. It is 64-bit register. What I said is the "movq", not "movl". (I understand that movl is incorrect for 64-bit register). I didn't say

Re: [RFC PATCH v5 4/4] x86/acrn: Add hypercall for ACRN guest

2019-04-28 Thread Borislav Petkov
On Sun, Apr 28, 2019 at 09:56:35AM +0800, Zhao, Yakui wrote: > Thanks for the reminder about the access width. > It is 64-bit register. What I said is the "movq", not "movl". > (I understand that movl is incorrect for 64-bit register). I didn't say anything about movl. I think what you're trying

Re: [RFC PATCH v5 4/4] x86/acrn: Add hypercall for ACRN guest

2019-04-27 Thread Zhao, Yakui
On 2019年04月27日 16:58, Borislav Petkov wrote: On Fri, Apr 26, 2019 at 11:18:48AM +0800, Zhao, Yakui wrote: It seems that it is seldom used in kernel although the explicit register variable is supported by GCC and makes the code look simpler. And it seems that the explicit register variable is

Re: [RFC PATCH v5 4/4] x86/acrn: Add hypercall for ACRN guest

2019-04-27 Thread Borislav Petkov
On Fri, Apr 26, 2019 at 11:18:48AM +0800, Zhao, Yakui wrote: > It seems that it is seldom used in kernel although the explicit register > variable is supported by GCC and makes the code look simpler. And it seems > that the explicit register variable is not suppoorted by CLAG. The more reason not

Re: [RFC PATCH v5 4/4] x86/acrn: Add hypercall for ACRN guest

2019-04-25 Thread Zhao, Yakui
On 2019年04月25日 19:00, Borislav Petkov wrote: On Thu, Apr 25, 2019 at 06:16:02PM +0800, Zhao, Yakui wrote: The parameter register for the VMCALL is predefined in ACRN hypervisor. Now the R8 is used to pass the hcall_id. It seems that there is no special constraint for R8~R15. So the explicit

Re: [RFC PATCH v5 4/4] x86/acrn: Add hypercall for ACRN guest

2019-04-25 Thread Borislav Petkov
On Thu, Apr 25, 2019 at 06:16:02PM +0800, Zhao, Yakui wrote: > The parameter register for the VMCALL is predefined in ACRN hypervisor. Now > the R8 is used to pass the hcall_id. > It seems that there is no special constraint for R8~R15. > So the explicit register variable is used so that the R8

Re: [RFC PATCH v5 4/4] x86/acrn: Add hypercall for ACRN guest

2019-04-25 Thread Zhao, Yakui
On 2019年04月25日 15:07, Ingo Molnar wrote: Thanks for the review. * Zhao Yakui wrote: When ACRN hypervisor is detected, the hypercall is needed so that the ACRN guest can query/config some settings. For example: it can be used to query the resources in hypervisor and manage the

Re: [RFC PATCH v5 4/4] x86/acrn: Add hypercall for ACRN guest

2019-04-25 Thread Ingo Molnar
* Zhao Yakui wrote: > When ACRN hypervisor is detected, the hypercall is needed so that the > ACRN guest can query/config some settings. For example: it can be used > to query the resources in hypervisor and manage the CPU/memory/device/ > interrupt for the guest operating system. > > So add

[RFC PATCH v5 4/4] x86/acrn: Add hypercall for ACRN guest

2019-04-23 Thread Zhao Yakui
When ACRN hypervisor is detected, the hypercall is needed so that the ACRN guest can query/config some settings. For example: it can be used to query the resources in hypervisor and manage the CPU/memory/device/ interrupt for the guest operating system. So add the hypercall so that ACRN guest can