Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c7bf23ba authored by Joerg Roedel's avatar Joerg Roedel Committed by Avi Kivity
Browse files

KVM: VMX: move APIC_ACCESS trace entry to generic code



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: default avatarJoerg Roedel <joerg.roedel@amd.com>
Signed-off-by: default avatarAvi Kivity <avi@qumranet.com>
parent 8b2cf73c
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -572,6 +572,8 @@ static u32 __apic_read(struct kvm_lapic *apic, unsigned int offset)
{
	u32 val = 0;

	KVMTRACE_1D(APIC_ACCESS, apic->vcpu, (u32)offset, handler);

	if (offset >= LAPIC_MMIO_LENGTH)
		return 0;

@@ -695,6 +697,8 @@ static void apic_mmio_write(struct kvm_io_device *this,

	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);
+0 −2
Original line number Diff line number Diff line
@@ -2554,8 +2554,6 @@ static int handle_apic_access(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
	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) {