@@ -115,7 +115,7 @@ vm_lapic_from_pcpuid(struct vm *vm, uint16_t pcpu_id)
115
115
struct vcpu * vcpu ;
116
116
117
117
vcpu = vcpu_from_pid (vm , pcpu_id );
118
- ASSERT (vcpu != NULL , "vm%d, pcpu%d " , vm -> attr .id , pcpu_id );
118
+ ASSERT (vcpu != NULL , "vm%d, pcpu%hu " , vm -> attr .id , pcpu_id );
119
119
120
120
return vcpu -> arch_vcpu .vlapic ;
121
121
}
@@ -131,7 +131,7 @@ static uint16_t vm_apicid2vcpu_id(struct vm *vm, uint8_t lapicid)
131
131
}
132
132
}
133
133
134
- pr_err ("%s: bad lapicid %d " , __func__ , lapicid );
134
+ pr_err ("%s: bad lapicid %hhu " , __func__ , lapicid );
135
135
136
136
return phys_cpu_num ;
137
137
}
@@ -451,20 +451,20 @@ vlapic_set_intr_ready(struct vlapic *vlapic, uint32_t vector, bool level)
451
451
uint32_t idx ;
452
452
453
453
ASSERT (vector <= NR_MAX_VECTOR ,
454
- "invalid vector %d " , vector );
454
+ "invalid vector %u " , vector );
455
455
456
456
lapic = vlapic -> apic_page ;
457
457
if ((lapic -> svr & APIC_SVR_ENABLE ) == 0U ) {
458
458
dev_dbg (ACRN_DBG_LAPIC ,
459
- "vlapic is software disabled, ignoring interrupt %d " ,
459
+ "vlapic is software disabled, ignoring interrupt %u " ,
460
460
vector );
461
461
return 0 ;
462
462
}
463
463
464
464
if (vector < 16U ) {
465
465
vlapic_set_error (vlapic , APIC_ESR_RECEIVE_ILLEGAL_VECTOR );
466
466
dev_dbg (ACRN_DBG_LAPIC ,
467
- "vlapic ignoring interrupt to vector %d " , vector );
467
+ "vlapic ignoring interrupt to vector %u " , vector );
468
468
return 1 ;
469
469
}
470
470
@@ -488,7 +488,7 @@ vlapic_set_intr_ready(struct vlapic *vlapic, uint32_t vector, bool level)
488
488
tmrptr = & lapic -> tmr [0 ];
489
489
if ((tmrptr [idx ].val & mask ) != (level ? mask : 0U )) {
490
490
dev_dbg (ACRN_DBG_LAPIC ,
491
- "vlapic TMR[%d ] is 0x%08x but interrupt is %s-triggered" ,
491
+ "vlapic TMR[%u ] is 0x%08x but interrupt is %s-triggered" ,
492
492
idx , tmrptr [idx ].val , level ? "level" : "edge" );
493
493
}
494
494
@@ -527,7 +527,7 @@ lvt_off_to_idx(uint32_t offset)
527
527
break ;
528
528
}
529
529
ASSERT (index <= VLAPIC_MAXLVT_INDEX ,
530
- "%s: invalid lvt index %d for offset %#x" ,
530
+ "%s: invalid lvt index %u for offset %#x" ,
531
531
__func__ , index , offset );
532
532
533
533
return index ;
@@ -804,7 +804,7 @@ vlapic_process_eoi(struct vlapic *vlapic)
804
804
}
805
805
isrptr [i ].val &= ~(1U << bitpos );
806
806
vector = i * 32U + bitpos ;
807
- dev_dbg (ACRN_DBG_LAPIC , "EOI vector %d " , vector );
807
+ dev_dbg (ACRN_DBG_LAPIC , "EOI vector %u " , vector );
808
808
vlapic_dump_isr (vlapic , "vlapic_process_eoi" );
809
809
vlapic -> isrvec_stk_top -- ;
810
810
vlapic_update_ppr (vlapic );
@@ -1067,7 +1067,7 @@ vlapic_icrlo_write_handler(struct vlapic *vlapic)
1067
1067
1068
1068
if (mode == APIC_DELMODE_FIXED && vec < 16U ) {
1069
1069
vlapic_set_error (vlapic , APIC_ESR_SEND_ILLEGAL_VECTOR );
1070
- dev_dbg (ACRN_DBG_LAPIC , "Ignoring invalid IPI %d " , vec );
1070
+ dev_dbg (ACRN_DBG_LAPIC , "Ignoring invalid IPI %u " , vec );
1071
1071
return 0 ;
1072
1072
}
1073
1073
@@ -1108,7 +1108,7 @@ vlapic_icrlo_write_handler(struct vlapic *vlapic)
1108
1108
vlapic_set_intr (target_vcpu , vec ,
1109
1109
LAPIC_TRIG_EDGE );
1110
1110
dev_dbg (ACRN_DBG_LAPIC ,
1111
- "vlapic sending ipi %d to vcpu_id %hu" ,
1111
+ "vlapic sending ipi %u to vcpu_id %hu" ,
1112
1112
vec , vcpu_id );
1113
1113
} else if (mode == APIC_DELMODE_NMI ){
1114
1114
vcpu_inject_nmi (target_vcpu );
@@ -1120,7 +1120,7 @@ vlapic_icrlo_write_handler(struct vlapic *vlapic)
1120
1120
}
1121
1121
1122
1122
dev_dbg (ACRN_DBG_LAPIC ,
1123
- "Sending INIT from VCPU %d to %hu" ,
1123
+ "Sending INIT from VCPU %hu to %hu" ,
1124
1124
vlapic -> vcpu -> vcpu_id , vcpu_id );
1125
1125
1126
1126
/* put target vcpu to INIT state and wait for SIPI */
@@ -1139,7 +1139,7 @@ vlapic_icrlo_write_handler(struct vlapic *vlapic)
1139
1139
}
1140
1140
1141
1141
dev_dbg (ACRN_DBG_LAPIC ,
1142
- "Sending SIPI from VCPU %d to %hu with vector %d " ,
1142
+ "Sending SIPI from VCPU %hu to %hu with vector %u " ,
1143
1143
vlapic -> vcpu -> vcpu_id , vcpu_id , vec );
1144
1144
1145
1145
target_vcpu -> arch_vcpu .nr_sipi -- ;
@@ -1149,7 +1149,7 @@ vlapic_icrlo_write_handler(struct vlapic *vlapic)
1149
1149
1150
1150
target_vcpu -> arch_vcpu .cpu_mode = CPU_MODE_REAL ;
1151
1151
target_vcpu -> arch_vcpu .sipi_vector = vec ;
1152
- pr_err ("Start Secondary VCPU%d for VM[%d]..." ,
1152
+ pr_err ("Start Secondary VCPU%hu for VM[%d]..." ,
1153
1153
target_vcpu -> vcpu_id ,
1154
1154
target_vcpu -> vm -> attr .id );
1155
1155
schedule_vcpu (target_vcpu );
@@ -1223,7 +1223,7 @@ vlapic_intr_accepted(struct vlapic *vlapic, uint32_t vector)
1223
1223
1224
1224
stk_top = vlapic -> isrvec_stk_top ;
1225
1225
if (stk_top >= ISRVEC_STK_SIZE ) {
1226
- panic ("isrvec_stk_top overflow %d " , stk_top );
1226
+ panic ("isrvec_stk_top overflow %u " , stk_top );
1227
1227
}
1228
1228
1229
1229
vlapic -> isrvec_stk [stk_top ] = vector ;
@@ -1286,7 +1286,7 @@ vlapic_read(struct vlapic *vlapic, int mmio_access, uint64_t offset,
1286
1286
* XXX Generate GP fault for MSR accesses in xAPIC mode
1287
1287
*/
1288
1288
dev_dbg (ACRN_DBG_LAPIC ,
1289
- "x2APIC MSR read from offset %#lx in xAPIC mode" ,
1289
+ "x2APIC MSR read from offset %#x in xAPIC mode" ,
1290
1290
offset );
1291
1291
* data = 0UL ;
1292
1292
goto done ;
@@ -1379,7 +1379,7 @@ vlapic_read(struct vlapic *vlapic, int mmio_access, uint64_t offset,
1379
1379
#ifdef INVARIANTS
1380
1380
reg = vlapic_get_lvtptr (vlapic , offset );
1381
1381
ASSERT (* data == * reg ,
1382
- "inconsistent lvt value at offset %#lx : %#lx/%#x" ,
1382
+ "inconsistent lvt value at offset %#x : %#lx/%#x" ,
1383
1383
offset , * data , * reg );
1384
1384
#endif
1385
1385
break ;
@@ -1422,10 +1422,10 @@ vlapic_write(struct vlapic *vlapic, int mmio_access, uint64_t offset,
1422
1422
uint32_t * regptr ;
1423
1423
int retval ;
1424
1424
1425
- ASSERT ((offset & 0xfUL ) == 0 && offset < CPU_PAGE_SIZE ,
1426
- "%s: invalid offset %#lx " , __func__ , offset );
1425
+ ASSERT ((offset & 0xfU ) == 0U && offset < CPU_PAGE_SIZE ,
1426
+ "%s: invalid offset %#x " , __func__ , offset );
1427
1427
1428
- dev_dbg (ACRN_DBG_LAPIC , "vlapic write offset %#lx , data %#lx" ,
1428
+ dev_dbg (ACRN_DBG_LAPIC , "vlapic write offset %#x , data %#lx" ,
1429
1429
offset , data );
1430
1430
1431
1431
if (offset > sizeof (* lapic )) {
@@ -1437,7 +1437,7 @@ vlapic_write(struct vlapic *vlapic, int mmio_access, uint64_t offset,
1437
1437
*/
1438
1438
if (mmio_access == 0 ) {
1439
1439
dev_dbg (ACRN_DBG_LAPIC ,
1440
- "x2APIC MSR write of %#lx to offset %#lx in xAPIC mode" ,
1440
+ "x2APIC MSR write of %#lx to offset %#x in xAPIC mode" ,
1441
1441
data , offset );
1442
1442
return 0 ;
1443
1443
}
@@ -1750,14 +1750,14 @@ vlapic_set_tmr_one_vec(struct vlapic *vlapic, __unused int delmode,
1750
1750
uint32_t vector , bool level )
1751
1751
{
1752
1752
ASSERT (vector <= NR_MAX_VECTOR ,
1753
- "invalid vector %d " , vector );
1753
+ "invalid vector %u " , vector );
1754
1754
1755
1755
/*
1756
1756
* A level trigger is valid only for fixed and lowprio delivery modes.
1757
1757
*/
1758
1758
if (delmode != APIC_DELMODE_FIXED && delmode != APIC_DELMODE_LOWPRIO ) {
1759
1759
dev_dbg (ACRN_DBG_LAPIC ,
1760
- "Ignoring level trigger-mode for delivery-mode %d " ,
1760
+ "Ignoring level trigger-mode for delivery-mode %u " ,
1761
1761
delmode );
1762
1762
return ;
1763
1763
}
@@ -1769,7 +1769,7 @@ vlapic_set_tmr_one_vec(struct vlapic *vlapic, __unused int delmode,
1769
1769
* If there is new caller to this function, need to refine this
1770
1770
* part of work.
1771
1771
*/
1772
- dev_dbg (ACRN_DBG_LAPIC , "vector %d set to level-triggered" , vector );
1772
+ dev_dbg (ACRN_DBG_LAPIC , "vector %u set to level-triggered" , vector );
1773
1773
vlapic_set_tmr (vlapic , vector , level );
1774
1774
}
1775
1775
@@ -1862,7 +1862,7 @@ vlapic_intr_msi(struct vm *vm, uint64_t addr, uint64_t msg)
1862
1862
delmode = msg & APIC_DELMODE_MASK ;
1863
1863
vec = msg & 0xffUL ;
1864
1864
1865
- dev_dbg (ACRN_DBG_LAPIC , "lapic MSI %s dest %#x, vec %d " ,
1865
+ dev_dbg (ACRN_DBG_LAPIC , "lapic MSI %s dest %#x, vec %u " ,
1866
1866
phys ? "physical" : "logical" , dest , vec );
1867
1867
1868
1868
vlapic_deliver_intr (vm , LAPIC_TRIG_EDGE , dest , phys , delmode , vec );
0 commit comments