HV: instr_emul: Rearrange logic of instr_emul*

Originally, there is cross-references between instr_emul.h and instr_emul_wrapper.h.
User must include both of them when calling instruction emulation functions. This
will raise up some confusion and inconvenience.

So we rearrange the logic of instruction emulation code as following:

  - External API -- defined in instr_emul.h
     * decode_instruction(struct vcpu *vcpu)
     * emulate_instruction(struct vcpu *vcpu)

  - Make all other functions as static in instr_emul.c

  - Remove instr_emul_wrapper.c/h

No functional change.

Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Eddie Dong <eddie.dong@intel.com>
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
This commit is contained in:
Kaige Fu
2018-08-06 08:40:10 +08:00
committed by lijinxia
parent ce79d3aa24
commit f03ae8d09c
9 changed files with 671 additions and 788 deletions

View File

@@ -16,7 +16,7 @@
#include <gdt.h>
#include <timer.h>
#include <logmsg.h>
#include "arch/x86/guest/instr_emul_wrapper.h"
#include "arch/x86/guest/instr_emul.h"
struct per_cpu_region {
uint64_t *sbuf[ACRN_SBUF_ID_MAX];