From: nadav.amit@gmail.com
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: kvm@vger.kernel.org, Nadav Amit <nadav.amit@gmail.com>
Subject: [kvm-unit-tests PATCH] x86: Unmask LVTPC on interrupt
Date: Thu, 2 May 2019 10:41:25 -0700 [thread overview]
Message-ID: <20190502174125.8706-1-nadav.amit@gmail.com> (raw)
From: Nadav Amit <nadav.amit@gmail.com>
According to the SDM: "When a performance monitoring counters interrupt
is generated, the mask bit for its associated LVT entry is set."
Unmask LVTPC on each interrupt by reprogramming it. As the old value is
known, no need for read-modify-write is needed.
Signed-off-by: Nadav Amit <nadav.amit@gmail.com>
---
x86/pmu.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/x86/pmu.c b/x86/pmu.c
index f7b3010..6658fe9 100644
--- a/x86/pmu.c
+++ b/x86/pmu.c
@@ -184,6 +184,7 @@ static void start_event(pmu_counter_t *evt)
wrmsr(MSR_CORE_PERF_FIXED_CTR_CTRL, ctrl);
}
global_enable(evt);
+ apic_write(APIC_LVTPC, PC_VECTOR);
}
static void stop_event(pmu_counter_t *evt)
--
2.17.1
next reply other threads:[~2019-05-03 1:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-02 17:41 nadav.amit [this message]
2019-05-20 14:12 ` [kvm-unit-tests PATCH] x86: Unmask LVTPC on interrupt Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190502174125.8706-1-nadav.amit@gmail.com \
--to=nadav.amit@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.