mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-21 08:50:27 +00:00
HV: instr_emul: make integer conversion explicit
This patch makes necessary integer narrowing and/or signedness conversion explicit. While some narrowing are expected behavior, the correctness of the others relies on the specifications of some interfaces (e.g. the higher 32-bit of what exec_vmread() returns is all 0s if the given field is 32-bit). Add a stub for now to avoid missing them. Signed-off-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
@@ -402,7 +402,18 @@
|
||||
|
||||
/* External Interfaces */
|
||||
int exec_vmxon_instr(uint16_t pcpu_id);
|
||||
|
||||
/**
|
||||
* Read field from VMCS.
|
||||
*
|
||||
* Refer to Chapter 24, Vol. 3 in SDM for the width of VMCS fields.
|
||||
*
|
||||
* @return full contents in IA-32e mode for 64-bit fields.
|
||||
* @return the lower 32-bit outside IA-32e mode for 64-bit fields.
|
||||
* @return full contents for 32-bit fields, with higher 32-bit set to 0.
|
||||
*/
|
||||
uint64_t exec_vmread(uint32_t field);
|
||||
|
||||
uint64_t exec_vmread64(uint32_t field_full);
|
||||
void exec_vmwrite(uint32_t field, uint64_t value);
|
||||
void exec_vmwrite64(uint32_t field_full, uint64_t value);
|
||||
|
Reference in New Issue
Block a user