Li Fei1
2b7168da9e
hv: vmtrr: remove vcpu structure pointer from vmtrr
...
We could use container_of to get vcpu structure pointer from vmtrr. So vcpu
structure pointer is no need in vmtrr structure.
Tracked-On: #4550
Signed-off-by: Li Fei1 <fei1.li@intel.com>
2020-03-31 10:57:47 +08:00
Yonghua Huang
e51386fe04
hv: refine 'uint64_t' string print format in x86 moudle
...
Use "0x%lx" string to format 'uint64_t' type value,
instead of "0x%llx".
Tracked-On: #4020
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
2019-11-09 11:42:38 +08:00
Li, Fei1
9960ff98c5
hv: ept: unify EPT API name to verb-object style
...
Rename ept_mr_add to ept_add_mr
Rename ept_mr_modify to ept_modify_mr
Rename ept_mr_del to ept_del_mr
Tracked-On: #1842
Signed-off-by: Li, Fei1 <fei1.li@intel.com>
2019-06-14 14:40:25 +08:00
Li, Fei1
c018b853e9
hv: vmtrr: hide mtrr if hide_mtrr is true
...
Now we only configure "hide MTRR" explicitly to false for SOS. For other VMs,
we don't configure it which means hide_mtrr is false by default.
And remove global config MTRR_ENABLED
Tracked-On: #1842
Signed-off-by: Li, Fei1 <fei1.li@intel.com>
2019-03-16 17:14:12 +08:00
Mingqiang Chi
b24a8a0f59
hv:cleanup header file for guest folder
...
cleanup arch/x86/guest, only include some necessary
header files, doesn't include hypervisor.h
Tracked-On: #1842
Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
modified: arch/x86/guest/assign.c
modified: arch/x86/guest/ept.c
modified: arch/x86/guest/guest_memory.c
modified: arch/x86/guest/instr_emul.c
modified: arch/x86/guest/io_emul.c
modified: arch/x86/guest/pm.c
modified: arch/x86/guest/trusty.c
modified: arch/x86/guest/ucode.c
modified: arch/x86/guest/vcpu.c
modified: arch/x86/guest/vcpuid.c
modified: arch/x86/guest/virq.c
modified: arch/x86/guest/virtual_cr.c
modified: arch/x86/guest/vlapic.c
modified: arch/x86/guest/vm.c
modified: arch/x86/guest/vmcall.c
modified: arch/x86/guest/vmcs.c
modified: arch/x86/guest/vmexit.c
modified: arch/x86/guest/vmsr.c
modified: arch/x86/guest/vmtrr.c
modified: arch/x86/pm.c
modified: include/arch/x86/guest/assign.h
modified: include/arch/x86/guest/ept.h
modified: include/arch/x86/guest/guest_memory.h
modified: include/arch/x86/guest/instr_emul.h
modified: include/arch/x86/guest/io_emul.h
modified: include/arch/x86/guest/trusty.h
modified: include/arch/x86/guest/vcpu.h
modified: include/arch/x86/guest/vmcs.h
modified: include/arch/x86/io_req.h
modified: include/arch/x86/irq.h
modified: include/arch/x86/lapic.h
modified: include/arch/x86/mmu.h
modified: include/arch/x86/pgtable.h
modified: include/common/ptdev.h
modified: include/debug/console.h
2019-02-21 10:38:30 +08:00
Victor Sun
49e6deaf26
HV: rename the term of vm0 to sos vm
...
Under sharing mode, VM0 is identical with SOS VM. But the coupling of
SOS VM and VM 0 is not friendly for partition mode.
This patch is a pure term change of vm0 to sos VM, it does not change
any code logic or senmantic.
Tracked-On: #2291
Signed-off-by: Victor Sun <victor.sun@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2019-01-21 18:03:31 +08:00
Zide Chen
4c28e98dc4
hv: refine a few functions to only one exit point
...
IEC 61508,ISO 26262 standards highly recommend single-exit rule.
7C: Procedure has more than one exit point.
Tracked-On: #861
Signed-off-by: Zide Chen <zide.chen@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2018-12-19 09:17:30 +08:00
Zide Chen
c89d6e6526
modularization: clean up namings in vMTRR module
...
- rename 3 module interface APIs
init_mtrr() -> init_vmtrr()
mtrr_rdmsr -> read_vmtrr()
mtrr_wrmsr() -> write_vmtrr()
- follow naming convention for other modules, rename struct mtrr_state
to struct acrn_vmtrr. And add acrn_vcpu to it.
- because MTRR is x86 architecture specific, move struct acrn_vmtrr to
struct acrn_vcpu_arch.
Tracked-on: #1842
Signed-off-by: Zide Chen <zide.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-12-14 09:43:06 +08:00
Zide Chen
6bbd0129c3
modularization: move vMTRR code to guest directory
...
MTRR emulation belongs to virtual CPU component.
- rename mtrr.c to vmtrr.c and move it to arch/x86/guest
- rename mtrr.h to vmtrr.h and move it to include/arch/x86/guest
Tracked-On: #1842
Signed-off-by: Zide Chen <zide.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-12-14 09:43:06 +08:00