Commit 7a223e06 authored by Vitaly Kuznetsov's avatar Vitaly Kuznetsov Committed by Paolo Bonzini

KVM: x86: avoid misreporting level-triggered irqs as edge-triggered in tracing

In __apic_accept_irq() interface trig_mode is int and actually on some code
paths it is set above u8:

kvm_apic_set_irq() extracts it from 'struct kvm_lapic_irq' where trig_mode
is u16. This is done on purpose as e.g. kvm_set_msi_irq() sets it to
(1 << 15) & e->msi.data

kvm_apic_local_deliver sets it to reg & (1 << 15).

Fix the immediate issue by making 'tm' into u16. We may also want to adjust
__apic_accept_irq() interface and use proper sizes for vector, level,
trig_mode but this is not urgent.
Signed-off-by: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 1d487e9b
...@@ -438,13 +438,13 @@ TRACE_EVENT(kvm_apic_ipi, ...@@ -438,13 +438,13 @@ TRACE_EVENT(kvm_apic_ipi,
); );
TRACE_EVENT(kvm_apic_accept_irq, TRACE_EVENT(kvm_apic_accept_irq,
TP_PROTO(__u32 apicid, __u16 dm, __u8 tm, __u8 vec), TP_PROTO(__u32 apicid, __u16 dm, __u16 tm, __u8 vec),
TP_ARGS(apicid, dm, tm, vec), TP_ARGS(apicid, dm, tm, vec),
TP_STRUCT__entry( TP_STRUCT__entry(
__field( __u32, apicid ) __field( __u32, apicid )
__field( __u16, dm ) __field( __u16, dm )
__field( __u8, tm ) __field( __u16, tm )
__field( __u8, vec ) __field( __u8, vec )
), ),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment