mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-25 15:02:13 +00:00
HV: remove vcpu arch lock, not needed.
the pcpu just write its own vmcs, not need spinlock. and the arch.lock not used other places, remove it too. Tracked-On: #3130 Signed-off-by: Minggui Cao <minggui.cao@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
parent
9876138b69
commit
fc1cbebe31
@ -9,7 +9,6 @@
|
||||
#include <page.h>
|
||||
#include <cpufeatures.h>
|
||||
#include <cpuid.h>
|
||||
#include <spinlock.h>
|
||||
#include <cpu.h>
|
||||
#include <per_cpu.h>
|
||||
#include <vmx.h>
|
||||
|
@ -135,19 +135,16 @@ void vcpu_set_vmcs_eoi_exit(struct acrn_vcpu *vcpu)
|
||||
{
|
||||
pr_dbg("%s", __func__);
|
||||
|
||||
spinlock_obtain(&(vcpu->arch.lock));
|
||||
if (is_apicv_advanced_feature_supported()) {
|
||||
exec_vmwrite64(VMX_EOI_EXIT0_FULL, vcpu->arch.eoi_exit_bitmap[0]);
|
||||
exec_vmwrite64(VMX_EOI_EXIT1_FULL, vcpu->arch.eoi_exit_bitmap[1]);
|
||||
exec_vmwrite64(VMX_EOI_EXIT2_FULL, vcpu->arch.eoi_exit_bitmap[2]);
|
||||
exec_vmwrite64(VMX_EOI_EXIT3_FULL, vcpu->arch.eoi_exit_bitmap[3]);
|
||||
}
|
||||
spinlock_release(&(vcpu->arch.lock));
|
||||
}
|
||||
|
||||
/*
|
||||
* Set the eoi_exit_bitmap bit for specific vector
|
||||
* called with vcpu->arch.lock held
|
||||
* @pre vcpu != NULL && vector <= 255U
|
||||
*/
|
||||
void vcpu_set_eoi_exit_bitmap(struct acrn_vcpu *vcpu, uint32_t vector)
|
||||
@ -172,7 +169,6 @@ void vcpu_clear_eoi_exit_bitmap(struct acrn_vcpu *vcpu, uint32_t vector)
|
||||
|
||||
/*
|
||||
* Reset all eoi_exit_bitmaps
|
||||
* called with vcpu->arch.lock held
|
||||
*/
|
||||
void vcpu_reset_eoi_exit_bitmaps(struct acrn_vcpu *vcpu)
|
||||
{
|
||||
@ -402,8 +398,6 @@ int32_t create_vcpu(uint16_t pcpu_id, struct acrn_vm *vm, struct acrn_vcpu **rtn
|
||||
init_vmtrr(vcpu);
|
||||
}
|
||||
|
||||
spinlock_init(&(vcpu->arch.lock));
|
||||
|
||||
/* Populate the return handle */
|
||||
*rtn_vcpu_handle = vcpu;
|
||||
|
||||
|
@ -7,7 +7,6 @@
|
||||
#include <types.h>
|
||||
#include <msr.h>
|
||||
#include <cpufeatures.h>
|
||||
#include <spinlock.h>
|
||||
#include <cpu.h>
|
||||
#include <per_cpu.h>
|
||||
#include <cpu_caps.h>
|
||||
|
@ -298,7 +298,6 @@ struct acrn_vcpu_arch {
|
||||
|
||||
/* EOI_EXIT_BITMAP buffer, for the bitmap update */
|
||||
uint64_t eoi_exit_bitmap[EOI_EXIT_BITMAP_SIZE >> 6U];
|
||||
spinlock_t lock;
|
||||
} __aligned(PAGE_SIZE);
|
||||
|
||||
struct acrn_vm;
|
||||
|
Loading…
Reference in New Issue
Block a user