Skip to content

Commit 18dbdfd

Browse files
jsun26intelEddie Dong
authored andcommitted
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>
1 parent 68aa718 commit 18dbdfd

File tree

5 files changed

+5
-6
lines changed

5 files changed

+5
-6
lines changed

hypervisor/arch/x86/guest/vlapic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2089,7 +2089,7 @@ static int32_t vlapic_x2apic_access(struct acrn_vcpu *vcpu, uint32_t msr, bool w
20892089
#ifdef CONFIG_PARTITION_MODE
20902090
struct acrn_vm_config *vm_config = get_vm_config(vcpu->vm->vm_id);
20912091

2092-
if (vm_config->lapic_pt) {
2092+
if((vm_config->guest_flags & LAPIC_PASSTHROUGH) != 0U ) {
20932093
if (msr == MSR_IA32_EXT_APIC_ICR) {
20942094
error = vlapic_x2apic_pt_icr_access(vcpu->vm, *val);
20952095
}

hypervisor/arch/x86/vmcs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ void switch_apicv_mode_x2apic(struct acrn_vcpu *vcpu)
576576
uint32_t value32;
577577
struct acrn_vm_config *vm_config = get_vm_config(vcpu->vm->vm_id);
578578

579-
if(vm_config->lapic_pt) {
579+
if((vm_config->guest_flags & LAPIC_PASSTHROUGH) != 0U ) {
580580
/*
581581
* Disable external interrupt exiting and irq ack
582582
* Disable posted interrupt processing

hypervisor/include/arch/x86/guest/vm.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,6 @@ struct acrn_vm_config {
218218
#ifdef CONFIG_PARTITION_MODE
219219
bool vm_vuart;
220220
struct vpci_vdev_array *vpci_vdev_array;
221-
bool lapic_pt;
222221
#endif
223222

224223
} __aligned(8);

hypervisor/partition/apl-mrb/vm_description.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,14 +155,14 @@ struct vm_config_arraies vm_config_partition = {
155155
{
156156
.type = PRE_LAUNCHED_VM,
157157
.pcpu_bitmap = (PLUG_CPU(1) | PLUG_CPU(3)),
158+
.guest_flags = LAPIC_PASSTHROUGH,
158159
.memory.start_hpa = 0x120000000UL,
159160
.memory.size = 0x20000000UL, /* uses contiguous memory from host */
160161
.vm_vuart = true,
161162
.os_config.bootargs = "root=/dev/sda3 rw rootwait noxsave maxcpus=2 nohpet console=hvc0 \
162163
console=ttyS2 no_timer_check ignore_loglevel log_buf_len=16M \
163164
consoleblank=0 tsc=reliable xapic_phys",
164165
.vpci_vdev_array = &vpci_vdev_array2,
165-
.lapic_pt = true,
166166
},
167167
}
168168
};

hypervisor/partition/dnv-cb2/vm_description.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,27 +177,27 @@ struct vm_config_arraies vm_config_partition = {
177177
{
178178
.type = PRE_LAUNCHED_VM,
179179
.pcpu_bitmap = (PLUG_CPU(0) | PLUG_CPU(2) | PLUG_CPU(4) | PLUG_CPU(6)),
180+
.guest_flags = LAPIC_PASSTHROUGH,
180181
.memory.start_hpa = 0x100000000UL,
181182
.memory.size = 0x80000000UL, /* uses contiguous memory from host */
182183
.vm_vuart = true,
183184
.os_config.bootargs = "root=/dev/sda rw rootwait noxsave maxcpus=4 nohpet console=hvc0 " \
184185
"console=ttyS0 no_timer_check ignore_loglevel log_buf_len=16M "\
185186
"consoleblank=0 tsc=reliable xapic_phys apic_debug",
186187
.vpci_vdev_array = &vpci_vdev_array1,
187-
.lapic_pt = true,
188188
},
189189

190190
{
191191
.type = PRE_LAUNCHED_VM,
192192
.pcpu_bitmap = (PLUG_CPU(1) | PLUG_CPU(3) | PLUG_CPU(5) | PLUG_CPU(7)),
193+
.guest_flags = LAPIC_PASSTHROUGH,
193194
.memory.start_hpa = 0x180000000UL,
194195
.memory.size = 0x80000000UL, /* uses contiguous memory from host */
195196
.vm_vuart = true,
196197
.os_config.bootargs = "root=/dev/sda2 rw rootwait noxsave maxcpus=4 nohpet console=hvc0 "\
197198
"console=ttyS0 no_timer_check ignore_loglevel log_buf_len=16M "\
198199
"consoleblank=0 tsc=reliable xapic_phys apic_debug",
199200
.vpci_vdev_array = &vpci_vdev_array2,
200-
.lapic_pt = true,
201201
},
202202
}
203203
};

0 commit comments

Comments
 (0)