aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/lapic.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kvm/lapic.c')
-rw-r--r--arch/x86/kvm/lapic.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
index 3bde43c3789e..2e0286596387 100644
--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
@@ -34,6 +34,7 @@
34#include <asm/atomic.h> 34#include <asm/atomic.h>
35#include "kvm_cache_regs.h" 35#include "kvm_cache_regs.h"
36#include "irq.h" 36#include "irq.h"
37#include "trace.h"
37 38
38#ifndef CONFIG_X86_64 39#ifndef CONFIG_X86_64
39#define mod_64(x, y) ((x) - (y) * div64_u64(x, y)) 40#define mod_64(x, y) ((x) - (y) * div64_u64(x, y))
@@ -515,8 +516,6 @@ static u32 __apic_read(struct kvm_lapic *apic, unsigned int offset)
515{ 516{
516 u32 val = 0; 517 u32 val = 0;
517 518
518 KVMTRACE_1D(APIC_ACCESS, apic->vcpu, (u32)offset, handler);
519
520 if (offset >= LAPIC_MMIO_LENGTH) 519 if (offset >= LAPIC_MMIO_LENGTH)
521 return 0; 520 return 0;
522 521
@@ -562,6 +561,8 @@ static void apic_mmio_read(struct kvm_io_device *this,
562 } 561 }
563 result = __apic_read(apic, offset & ~0xf); 562 result = __apic_read(apic, offset & ~0xf);
564 563
564 trace_kvm_apic_read(offset, result);
565
565 switch (len) { 566 switch (len) {
566 case 1: 567 case 1:
567 case 2: 568 case 2:
@@ -657,7 +658,7 @@ static void apic_mmio_write(struct kvm_io_device *this,
657 658
658 offset &= 0xff0; 659 offset &= 0xff0;
659 660
660 KVMTRACE_1D(APIC_ACCESS, apic->vcpu, (u32)offset, handler); 661 trace_kvm_apic_write(offset, val);
661 662
662 switch (offset) { 663 switch (offset) {
663 case APIC_ID: /* Local APIC ID */ 664 case APIC_ID: /* Local APIC ID */