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

View File

@ -218,7 +218,6 @@ struct acrn_vm_config {
#ifdef CONFIG_PARTITION_MODE
bool vm_vuart;
struct vpci_vdev_array *vpci_vdev_array;
bool lapic_pt;
#endif
} __aligned(8);

View File

@ -155,6 +155,7 @@ struct vm_config_arraies vm_config_partition = {
{
.type = PRE_LAUNCHED_VM,
.pcpu_bitmap = (PLUG_CPU(1) | PLUG_CPU(3)),
.guest_flags = LAPIC_PASSTHROUGH,
.memory.start_hpa = 0x120000000UL,
.memory.size = 0x20000000UL, /* uses contiguous memory from host */
.vm_vuart = true,
@ -162,7 +163,6 @@ struct vm_config_arraies vm_config_partition = {
console=ttyS2 no_timer_check ignore_loglevel log_buf_len=16M \
consoleblank=0 tsc=reliable xapic_phys",
.vpci_vdev_array = &vpci_vdev_array2,
.lapic_pt = true,
},
}
};

View File

@ -177,6 +177,7 @@ struct vm_config_arraies vm_config_partition = {
{
.type = PRE_LAUNCHED_VM,
.pcpu_bitmap = (PLUG_CPU(0) | PLUG_CPU(2) | PLUG_CPU(4) | PLUG_CPU(6)),
.guest_flags = LAPIC_PASSTHROUGH,
.memory.start_hpa = 0x100000000UL,
.memory.size = 0x80000000UL, /* uses contiguous memory from host */
.vm_vuart = true,
@ -184,12 +185,12 @@ struct vm_config_arraies vm_config_partition = {
"console=ttyS0 no_timer_check ignore_loglevel log_buf_len=16M "\
"consoleblank=0 tsc=reliable xapic_phys apic_debug",
.vpci_vdev_array = &vpci_vdev_array1,
.lapic_pt = true,
},
{
.type = PRE_LAUNCHED_VM,
.pcpu_bitmap = (PLUG_CPU(1) | PLUG_CPU(3) | PLUG_CPU(5) | PLUG_CPU(7)),
.guest_flags = LAPIC_PASSTHROUGH,
.memory.start_hpa = 0x180000000UL,
.memory.size = 0x80000000UL, /* uses contiguous memory from host */
.vm_vuart = true,
@ -197,7 +198,6 @@ struct vm_config_arraies vm_config_partition = {
"console=ttyS0 no_timer_check ignore_loglevel log_buf_len=16M "\
"consoleblank=0 tsc=reliable xapic_phys apic_debug",
.vpci_vdev_array = &vpci_vdev_array2,
.lapic_pt = true,
},
}
};