HV: replace lapic_pt with guest flag in vm_config

The member of lapic_pt in acrn_vm_config will be replaced by
guest_flag of LAPIC_PASSTHROUGH;

Tracked-On: #2291

Signed-off-by: Victor Sun <victor.sun@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Victor Sun
2019-01-21 02:29:46 +08:00
committed by Eddie Dong
parent 68aa718ca0
commit 18dbdfd5d7
5 changed files with 5 additions and 6 deletions

View File

@@ -2089,7 +2089,7 @@ static int32_t vlapic_x2apic_access(struct acrn_vcpu *vcpu, uint32_t msr, bool w
#ifdef CONFIG_PARTITION_MODE
struct acrn_vm_config *vm_config = get_vm_config(vcpu->vm->vm_id);
if (vm_config->lapic_pt) {
if((vm_config->guest_flags & LAPIC_PASSTHROUGH) != 0U ) {
if (msr == MSR_IA32_EXT_APIC_ICR) {
error = vlapic_x2apic_pt_icr_access(vcpu->vm, *val);
}

View File

@@ -576,7 +576,7 @@ void switch_apicv_mode_x2apic(struct acrn_vcpu *vcpu)
uint32_t value32;
struct acrn_vm_config *vm_config = get_vm_config(vcpu->vm->vm_id);
if(vm_config->lapic_pt) {
if((vm_config->guest_flags & LAPIC_PASSTHROUGH) != 0U ) {
/*
* Disable external interrupt exiting and irq ack
* Disable posted interrupt processing