All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eitan Kaplan <e.kaplan@columbia.edu>
To: xen-devel@lists.xenproject.org
Subject: Registering interrupt handler for performance counter overflow
Date: Sun, 19 May 2019 14:46:30 -0400	[thread overview]
Message-ID: <CAMctL7UVJm-5fhkX8oHvkUXUK5LsF0BPY44Y3HmuMx6MJXqVMA@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1369 bytes --]

Hi all,

I am a computer engineering student at Columbia University. This is my
first time writing to this list (please let me know if this isn't the place
for this type of question!).

I am working with a professor on a project to mitigate Spectre and Meltdown
(and other similar cache timing side-channel attacks).  We are using Xen
and modifying its source as a way of modeling the affect certain potential
hardware changes. As part of that project, we need to use the performance
counters to generate interrupts at certain microarchitectural events.  I
have successfully added into xen/arch/x86/setup.c a few lines to setup the
(Intel Sandy Bridge) performance counter control MSRs and set the counter
itself to a few below overflow.  All that's missing is a simple interrupt
handler that will reset the counter to a few below overflow (and perhaps do
some logging).

I am having trouble figuring out how to register my handler in Xen.  I
assume that I have to call request_irq(), but I am not sure how to set all
the arguments for that call.  Would anyone be able to give me any
pointers?  Suggestions or pointers to resources/examples for registering
interrupt handlers in Xen would be really helpful!

Alternatively, is there an existing interrupt handler that is already setup
for PMC overflow interrupts that I might be able to tweak?

Thank you!
Eitan Kaplan

[-- Attachment #1.2: Type: text/html, Size: 1535 bytes --]

[-- Attachment #2: Type: text/plain, Size: 157 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

WARNING: multiple messages have this Message-ID (diff)
From: Eitan Kaplan <e.kaplan@columbia.edu>
To: xen-devel@lists.xenproject.org
Subject: [Xen-devel] Registering interrupt handler for performance counter overflow
Date: Sun, 19 May 2019 14:46:30 -0400	[thread overview]
Message-ID: <CAMctL7UVJm-5fhkX8oHvkUXUK5LsF0BPY44Y3HmuMx6MJXqVMA@mail.gmail.com> (raw)
Message-ID: <20190519184630.AMjXOiFVNCH3w4jKFqG2QoIQFMdYpneRiXkxKbF_O3Q@z> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1369 bytes --]

Hi all,

I am a computer engineering student at Columbia University. This is my
first time writing to this list (please let me know if this isn't the place
for this type of question!).

I am working with a professor on a project to mitigate Spectre and Meltdown
(and other similar cache timing side-channel attacks).  We are using Xen
and modifying its source as a way of modeling the affect certain potential
hardware changes. As part of that project, we need to use the performance
counters to generate interrupts at certain microarchitectural events.  I
have successfully added into xen/arch/x86/setup.c a few lines to setup the
(Intel Sandy Bridge) performance counter control MSRs and set the counter
itself to a few below overflow.  All that's missing is a simple interrupt
handler that will reset the counter to a few below overflow (and perhaps do
some logging).

I am having trouble figuring out how to register my handler in Xen.  I
assume that I have to call request_irq(), but I am not sure how to set all
the arguments for that call.  Would anyone be able to give me any
pointers?  Suggestions or pointers to resources/examples for registering
interrupt handlers in Xen would be really helpful!

Alternatively, is there an existing interrupt handler that is already setup
for PMC overflow interrupts that I might be able to tweak?

Thank you!
Eitan Kaplan

[-- Attachment #1.2: Type: text/html, Size: 1535 bytes --]

[-- Attachment #2: Type: text/plain, Size: 157 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

             reply	other threads:[~2019-05-19 18:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-19 18:46 Eitan Kaplan [this message]
2019-05-19 18:46 ` [Xen-devel] Registering interrupt handler for performance counter overflow Eitan Kaplan
2019-05-20 10:52 ` Andrew Cooper
2019-05-20 10:52   ` [Xen-devel] " Andrew Cooper
2019-05-20 10:55 ` Andrew Cooper
2019-05-20 10:55   ` [Xen-devel] " Andrew Cooper

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=CAMctL7UVJm-5fhkX8oHvkUXUK5LsF0BPY44Y3HmuMx6MJXqVMA@mail.gmail.com \
    --to=e.kaplan@columbia.edu \
    --cc=xen-devel@lists.xenproject.org \
    /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.