HV: Remove goto in vlapic_read()
remove goto statement in vlapic_read() routine Tracked-On: #861 Signed-off-by: Chaohong guo <chaohong.guo@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
parent
7a04db7cd8
commit
9efbdc829d
|
@ -1025,10 +1025,7 @@ vlapic_calcdest(struct acrn_vm *vm, uint64_t *dmask, uint32_t dest,
|
||||||
* Broadcast in both logical and physical modes.
|
* Broadcast in both logical and physical modes.
|
||||||
*/
|
*/
|
||||||
*dmask = vm_active_cpus(vm);
|
*dmask = vm_active_cpus(vm);
|
||||||
return;
|
} else if (phys) {
|
||||||
}
|
|
||||||
|
|
||||||
if (phys) {
|
|
||||||
/*
|
/*
|
||||||
* Physical mode: destination is LAPIC ID.
|
* Physical mode: destination is LAPIC ID.
|
||||||
*/
|
*/
|
||||||
|
@ -1464,8 +1461,7 @@ vlapic_read(struct acrn_vlapic *vlapic, uint32_t offset_arg,
|
||||||
|
|
||||||
if (offset > sizeof(*lapic)) {
|
if (offset > sizeof(*lapic)) {
|
||||||
*data = 0UL;
|
*data = 0UL;
|
||||||
goto done;
|
} else {
|
||||||
}
|
|
||||||
|
|
||||||
offset &= ~0x3UL;
|
offset &= ~0x3UL;
|
||||||
switch (offset) {
|
switch (offset) {
|
||||||
|
@ -1548,9 +1544,7 @@ vlapic_read(struct acrn_vlapic *vlapic, uint32_t offset_arg,
|
||||||
*data = vlapic_get_lvt(vlapic, offset);
|
*data = vlapic_get_lvt(vlapic, offset);
|
||||||
#ifdef INVARIANTS
|
#ifdef INVARIANTS
|
||||||
reg = vlapic_get_lvtptr(vlapic, offset);
|
reg = vlapic_get_lvtptr(vlapic, offset);
|
||||||
ASSERT(*data == *reg,
|
ASSERT(*data == *reg, "inconsistent lvt value at offset %#x: %#lx/%#x", offset, *data, *reg);
|
||||||
"inconsistent lvt value at offset %#x: %#lx/%#x",
|
|
||||||
offset, *data, *reg);
|
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case APIC_OFFSET_TIMER_ICR:
|
case APIC_OFFSET_TIMER_ICR:
|
||||||
|
@ -1572,7 +1566,8 @@ vlapic_read(struct acrn_vlapic *vlapic, uint32_t offset_arg,
|
||||||
*data = 0UL;
|
*data = 0UL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
done:
|
}
|
||||||
|
|
||||||
dev_dbg(ACRN_DBG_LAPIC,
|
dev_dbg(ACRN_DBG_LAPIC,
|
||||||
"vlapic read offset %#x, data %#lx", offset, *data);
|
"vlapic read offset %#x, data %#lx", offset, *data);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue