Re: [PATCH v6 4/4] x86/acrn: Add hypercall for ACRN guest
From: Zhao, Yakui
Date: Mon May 27 2019 - 21:15:24 EST
On 2019å05æ28æ 06:46, Borislav Petkov wrote:
On Mon, May 27, 2019 at 10:57:09AM +0800, Zhao, Yakui wrote:
I refer to the Xen/KVM hypercall to add the ACRN hypercall in one separate
header.
And?
The ACRN hypercall is defined in one separate acrn_hypercall.h and can be
included explicitly by the *.c that needs the hypercall.
Sure but what else will need the hypercall definition except stuff which
already needs acrn.h? I.e., why is the separate header needed?
In fact there is no much difference that it is defined in acrn.h or one
separate header file.
When it is sent with the driver stuff, I will add the hypercall into
acrn.h. If the further extension is needed, we can then consider whether
it is necessary to be moved into the separate header file.
My initial thought is that the acrn.h/acrn_hypercall.h defines the
different contents. Then the each source file in ACRN driver part can
include "acrn.h" or "acrn_hypercall.h" based on its requirement.
Of course it is also ok that they are added in one header file. Then it
is always included.
The hypercall will be used in driver part. Before the driver part is added,
it seems that the defined ACRN hypercall functions are not used.
Do I need to add these functions together with driver part?
Yes, send functions together with the stuff which uses them pls.
Sure.
Thx.