mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-21 05:02:24 +00:00
hv: apicv: change the apicv related API with vlapic_apicv prefix
The apicv is one hardware acceleration feature of vlapic. All vlapic APIs should keep vlapic_ as the prefix. Signed-off-by: Yu Wang <yu1.wang@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
parent
74ff712085
commit
a0c625b85a
@ -2056,7 +2056,7 @@ int vlapic_create(struct vcpu *vcpu)
|
|||||||
|
|
||||||
if (is_vcpu_bsp(vcpu)) {
|
if (is_vcpu_bsp(vcpu)) {
|
||||||
ept_mr_add(vcpu->vm,
|
ept_mr_add(vcpu->vm,
|
||||||
apicv_get_apic_access_addr(vcpu->vm),
|
vlapic_apicv_get_apic_access_addr(vcpu->vm),
|
||||||
DEFAULT_APIC_BASE, CPU_PAGE_SIZE,
|
DEFAULT_APIC_BASE, CPU_PAGE_SIZE,
|
||||||
IA32E_EPT_W_BIT | IA32E_EPT_R_BIT |
|
IA32E_EPT_W_BIT | IA32E_EPT_R_BIT |
|
||||||
IA32E_EPT_UNCACHED);
|
IA32E_EPT_UNCACHED);
|
||||||
@ -2209,7 +2209,7 @@ apicv_batch_set_tmr(struct acrn_vlapic *vlapic)
|
|||||||
*APIC-v: Get the HPA to APIC-access page
|
*APIC-v: Get the HPA to APIC-access page
|
||||||
* **/
|
* **/
|
||||||
uint64_t
|
uint64_t
|
||||||
apicv_get_apic_access_addr(__unused struct vm *vm)
|
vlapic_apicv_get_apic_access_addr(__unused struct vm *vm)
|
||||||
{
|
{
|
||||||
if (apicv_apic_access_addr == NULL) {
|
if (apicv_apic_access_addr == NULL) {
|
||||||
apicv_apic_access_addr = alloc_page();
|
apicv_apic_access_addr = alloc_page();
|
||||||
@ -2225,7 +2225,7 @@ apicv_get_apic_access_addr(__unused struct vm *vm)
|
|||||||
*APIC-v: Get the HPA to virtualized APIC registers page
|
*APIC-v: Get the HPA to virtualized APIC registers page
|
||||||
* **/
|
* **/
|
||||||
uint64_t
|
uint64_t
|
||||||
apicv_get_apic_page_addr(struct acrn_vlapic *vlapic)
|
vlapic_apicv_get_apic_page_addr(struct acrn_vlapic *vlapic)
|
||||||
{
|
{
|
||||||
return HVA2HPA(&(vlapic->apic_page));
|
return HVA2HPA(&(vlapic->apic_page));
|
||||||
}
|
}
|
||||||
@ -2236,7 +2236,7 @@ apicv_get_apic_page_addr(struct acrn_vlapic *vlapic)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
void
|
||||||
apicv_inject_pir(struct acrn_vlapic *vlapic)
|
vlapic_apicv_inject_pir(struct acrn_vlapic *vlapic)
|
||||||
{
|
{
|
||||||
struct vlapic_pir_desc *pir_desc;
|
struct vlapic_pir_desc *pir_desc;
|
||||||
struct lapic_regs *lapic;
|
struct lapic_regs *lapic;
|
||||||
|
@ -116,7 +116,7 @@ static int vcpu_do_pending_event(struct vcpu *vcpu)
|
|||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
if (is_vapic_intr_delivery_supported()) {
|
if (is_vapic_intr_delivery_supported()) {
|
||||||
apicv_inject_pir(vlapic);
|
vlapic_apicv_inject_pir(vlapic);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1026,12 +1026,13 @@ static void init_exec_ctrl(struct vcpu *vcpu)
|
|||||||
|
|
||||||
if (is_vapic_supported()) {
|
if (is_vapic_supported()) {
|
||||||
/*APIC-v, config APIC-access address*/
|
/*APIC-v, config APIC-access address*/
|
||||||
value64 = apicv_get_apic_access_addr(vcpu->vm);
|
value64 = vlapic_apicv_get_apic_access_addr(vcpu->vm);
|
||||||
exec_vmwrite64(VMX_APIC_ACCESS_ADDR_FULL,
|
exec_vmwrite64(VMX_APIC_ACCESS_ADDR_FULL,
|
||||||
value64);
|
value64);
|
||||||
|
|
||||||
/*APIC-v, config APIC virtualized page address*/
|
/*APIC-v, config APIC virtualized page address*/
|
||||||
value64 = apicv_get_apic_page_addr(vcpu->arch_vcpu.vlapic);
|
value64 = vlapic_apicv_get_apic_page_addr(
|
||||||
|
vcpu->arch_vcpu.vlapic);
|
||||||
exec_vmwrite64(VMX_VIRTUAL_APIC_PAGE_ADDR_FULL,
|
exec_vmwrite64(VMX_VIRTUAL_APIC_PAGE_ADDR_FULL,
|
||||||
value64);
|
value64);
|
||||||
|
|
||||||
|
@ -122,9 +122,9 @@ void vlapic_init(struct acrn_vlapic *vlapic);
|
|||||||
void vlapic_reset(struct acrn_vlapic *vlapic);
|
void vlapic_reset(struct acrn_vlapic *vlapic);
|
||||||
void vlapic_restore(struct acrn_vlapic *vlapic, struct lapic_regs *regs);
|
void vlapic_restore(struct acrn_vlapic *vlapic, struct lapic_regs *regs);
|
||||||
bool vlapic_enabled(struct acrn_vlapic *vlapic);
|
bool vlapic_enabled(struct acrn_vlapic *vlapic);
|
||||||
uint64_t apicv_get_apic_access_addr(__unused struct vm *vm);
|
uint64_t vlapic_apicv_get_apic_access_addr(__unused struct vm *vm);
|
||||||
uint64_t apicv_get_apic_page_addr(struct acrn_vlapic *vlapic);
|
uint64_t vlapic_apicv_get_apic_page_addr(struct acrn_vlapic *vlapic);
|
||||||
void apicv_inject_pir(struct acrn_vlapic *vlapic);
|
void vlapic_apicv_inject_pir(struct acrn_vlapic *vlapic);
|
||||||
int apic_access_vmexit_handler(struct vcpu *vcpu);
|
int apic_access_vmexit_handler(struct vcpu *vcpu);
|
||||||
int apic_write_vmexit_handler(struct vcpu *vcpu);
|
int apic_write_vmexit_handler(struct vcpu *vcpu);
|
||||||
int veoi_vmexit_handler(struct vcpu *vcpu);
|
int veoi_vmexit_handler(struct vcpu *vcpu);
|
||||||
|
Loading…
Reference in New Issue
Block a user