refine definition for foreach_vcpu
foreach_vcpu will go through all vcpu_array and only call the following code when vcpu != NULL Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com> Reviewed-by: Zhao Yakui <yakui.zhao@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
parent
311787032a
commit
22833787ce
|
@ -20,9 +20,9 @@
|
|||
|
||||
#define foreach_vcpu(idx, vm, vcpu) \
|
||||
for (idx = 0U, vcpu = vm->hw.vcpu_array[idx]; \
|
||||
(idx < vm->hw.num_vcpus) && (vcpu != NULL); \
|
||||
idx++, vcpu = vm->hw.vcpu_array[idx])
|
||||
|
||||
idx < vm->hw.num_vcpus; \
|
||||
idx++, vcpu = vm->hw.vcpu_array[idx]) \
|
||||
if (vcpu)
|
||||
|
||||
/* the index is matched with emulated msrs array*/
|
||||
#define IDX_TSC_DEADLINE 0U
|
||||
|
|
Loading…
Reference in New Issue