This patch moves the trace entry for APIC accesses from the VMX code to the
generic lapic code. This way APIC accesses from SVM will also be traced.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
 {
        u32 val = 0;
 
+       KVMTRACE_1D(APIC_ACCESS, apic->vcpu, (u32)offset, handler);
+
        if (offset >= LAPIC_MMIO_LENGTH)
                return 0;
 
 
        offset &= 0xff0;
 
+       KVMTRACE_1D(APIC_ACCESS, apic->vcpu, (u32)offset, handler);
+
        switch (offset) {
        case APIC_ID:           /* Local APIC ID */
                apic_set_reg(apic, APIC_ID, val);
 
        exit_qualification = vmcs_read64(EXIT_QUALIFICATION);
        offset = exit_qualification & 0xffful;
 
-       KVMTRACE_1D(APIC_ACCESS, vcpu, (u32)offset, handler);
-
        er = emulate_instruction(vcpu, kvm_run, 0, 0, 0);
 
        if (er !=  EMULATE_DONE) {