mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-23 14:07:42 +00:00
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:
parent
68aa718ca0
commit
18dbdfd5d7
@ -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);
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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,
|
||||
},
|
||||
}
|
||||
};
|
||||
|
@ -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,
|
||||
},
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user