Skip to content

Commit bb000f6

Browse files
borntraegerbonzini
authored andcommitted
KVM: s390: restore old debugfs names
commit bc9e9e6 ("KVM: debugfs: Reuse binary stats descriptors") did replace the old definitions with the binary ones. While doing that it missed that some files are names different than the counters. This is especially important for kvm_stat which does have special handling for counters named instruction_*. Fixes: commit bc9e9e6 ("KVM: debugfs: Reuse binary stats descriptors") CC: Jing Zhang <[email protected]> Signed-off-by: Christian Borntraeger <[email protected]> Message-Id: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 3fa5e8f commit bb000f6

File tree

3 files changed

+27
-27
lines changed

3 files changed

+27
-27
lines changed

arch/s390/include/asm/kvm_host.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -445,15 +445,15 @@ struct kvm_vcpu_stat {
445445
u64 instruction_sigp_init_cpu_reset;
446446
u64 instruction_sigp_cpu_reset;
447447
u64 instruction_sigp_unknown;
448-
u64 diagnose_10;
449-
u64 diagnose_44;
450-
u64 diagnose_9c;
451-
u64 diagnose_9c_ignored;
452-
u64 diagnose_9c_forward;
453-
u64 diagnose_258;
454-
u64 diagnose_308;
455-
u64 diagnose_500;
456-
u64 diagnose_other;
448+
u64 instruction_diagnose_10;
449+
u64 instruction_diagnose_44;
450+
u64 instruction_diagnose_9c;
451+
u64 diag_9c_ignored;
452+
u64 diag_9c_forward;
453+
u64 instruction_diagnose_258;
454+
u64 instruction_diagnose_308;
455+
u64 instruction_diagnose_500;
456+
u64 instruction_diagnose_other;
457457
u64 pfault_sync;
458458
};
459459

arch/s390/kvm/diag.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ static int diag_release_pages(struct kvm_vcpu *vcpu)
2424

2525
start = vcpu->run->s.regs.gprs[(vcpu->arch.sie_block->ipa & 0xf0) >> 4];
2626
end = vcpu->run->s.regs.gprs[vcpu->arch.sie_block->ipa & 0xf] + PAGE_SIZE;
27-
vcpu->stat.diagnose_10++;
27+
vcpu->stat.instruction_diagnose_10++;
2828

2929
if (start & ~PAGE_MASK || end & ~PAGE_MASK || start >= end
3030
|| start < 2 * PAGE_SIZE)
@@ -74,7 +74,7 @@ static int __diag_page_ref_service(struct kvm_vcpu *vcpu)
7474

7575
VCPU_EVENT(vcpu, 3, "diag page reference parameter block at 0x%llx",
7676
vcpu->run->s.regs.gprs[rx]);
77-
vcpu->stat.diagnose_258++;
77+
vcpu->stat.instruction_diagnose_258++;
7878
if (vcpu->run->s.regs.gprs[rx] & 7)
7979
return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION);
8080
rc = read_guest(vcpu, vcpu->run->s.regs.gprs[rx], rx, &parm, sizeof(parm));
@@ -145,7 +145,7 @@ static int __diag_page_ref_service(struct kvm_vcpu *vcpu)
145145
static int __diag_time_slice_end(struct kvm_vcpu *vcpu)
146146
{
147147
VCPU_EVENT(vcpu, 5, "%s", "diag time slice end");
148-
vcpu->stat.diagnose_44++;
148+
vcpu->stat.instruction_diagnose_44++;
149149
kvm_vcpu_on_spin(vcpu, true);
150150
return 0;
151151
}
@@ -169,7 +169,7 @@ static int __diag_time_slice_end_directed(struct kvm_vcpu *vcpu)
169169
int tid;
170170

171171
tid = vcpu->run->s.regs.gprs[(vcpu->arch.sie_block->ipa & 0xf0) >> 4];
172-
vcpu->stat.diagnose_9c++;
172+
vcpu->stat.instruction_diagnose_9c++;
173173

174174
/* yield to self */
175175
if (tid == vcpu->vcpu_id)
@@ -192,7 +192,7 @@ static int __diag_time_slice_end_directed(struct kvm_vcpu *vcpu)
192192
VCPU_EVENT(vcpu, 5,
193193
"diag time slice end directed to %d: yield forwarded",
194194
tid);
195-
vcpu->stat.diagnose_9c_forward++;
195+
vcpu->stat.diag_9c_forward++;
196196
return 0;
197197
}
198198

@@ -203,7 +203,7 @@ static int __diag_time_slice_end_directed(struct kvm_vcpu *vcpu)
203203
return 0;
204204
no_yield:
205205
VCPU_EVENT(vcpu, 5, "diag time slice end directed to %d: ignored", tid);
206-
vcpu->stat.diagnose_9c_ignored++;
206+
vcpu->stat.diag_9c_ignored++;
207207
return 0;
208208
}
209209

@@ -213,7 +213,7 @@ static int __diag_ipl_functions(struct kvm_vcpu *vcpu)
213213
unsigned long subcode = vcpu->run->s.regs.gprs[reg] & 0xffff;
214214

215215
VCPU_EVENT(vcpu, 3, "diag ipl functions, subcode %lx", subcode);
216-
vcpu->stat.diagnose_308++;
216+
vcpu->stat.instruction_diagnose_308++;
217217
switch (subcode) {
218218
case 3:
219219
vcpu->run->s390_reset_flags = KVM_S390_RESET_CLEAR;
@@ -245,7 +245,7 @@ static int __diag_virtio_hypercall(struct kvm_vcpu *vcpu)
245245
{
246246
int ret;
247247

248-
vcpu->stat.diagnose_500++;
248+
vcpu->stat.instruction_diagnose_500++;
249249
/* No virtio-ccw notification? Get out quickly. */
250250
if (!vcpu->kvm->arch.css_support ||
251251
(vcpu->run->s.regs.gprs[1] != KVM_S390_VIRTIO_CCW_NOTIFY))
@@ -299,7 +299,7 @@ int kvm_s390_handle_diag(struct kvm_vcpu *vcpu)
299299
case 0x500:
300300
return __diag_virtio_hypercall(vcpu);
301301
default:
302-
vcpu->stat.diagnose_other++;
302+
vcpu->stat.instruction_diagnose_other++;
303303
return -EOPNOTSUPP;
304304
}
305305
}

arch/s390/kvm/kvm-s390.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -163,15 +163,15 @@ const struct _kvm_stats_desc kvm_vcpu_stats_desc[] = {
163163
STATS_DESC_COUNTER(VCPU, instruction_sigp_init_cpu_reset),
164164
STATS_DESC_COUNTER(VCPU, instruction_sigp_cpu_reset),
165165
STATS_DESC_COUNTER(VCPU, instruction_sigp_unknown),
166-
STATS_DESC_COUNTER(VCPU, diagnose_10),
167-
STATS_DESC_COUNTER(VCPU, diagnose_44),
168-
STATS_DESC_COUNTER(VCPU, diagnose_9c),
169-
STATS_DESC_COUNTER(VCPU, diagnose_9c_ignored),
170-
STATS_DESC_COUNTER(VCPU, diagnose_9c_forward),
171-
STATS_DESC_COUNTER(VCPU, diagnose_258),
172-
STATS_DESC_COUNTER(VCPU, diagnose_308),
173-
STATS_DESC_COUNTER(VCPU, diagnose_500),
174-
STATS_DESC_COUNTER(VCPU, diagnose_other),
166+
STATS_DESC_COUNTER(VCPU, instruction_diagnose_10),
167+
STATS_DESC_COUNTER(VCPU, instruction_diagnose_44),
168+
STATS_DESC_COUNTER(VCPU, instruction_diagnose_9c),
169+
STATS_DESC_COUNTER(VCPU, diag_9c_ignored),
170+
STATS_DESC_COUNTER(VCPU, diag_9c_forward),
171+
STATS_DESC_COUNTER(VCPU, instruction_diagnose_258),
172+
STATS_DESC_COUNTER(VCPU, instruction_diagnose_308),
173+
STATS_DESC_COUNTER(VCPU, instruction_diagnose_500),
174+
STATS_DESC_COUNTER(VCPU, instruction_diagnose_other),
175175
STATS_DESC_COUNTER(VCPU, pfault_sync)
176176
};
177177
static_assert(ARRAY_SIZE(kvm_vcpu_stats_desc) ==

0 commit comments

Comments
 (0)