From: Sean Christopherson <seanjc@google.com>
To: Arnabjyoti Kalita <akalita@cs.stonybrook.edu>
Cc: Jim Mattson <jmattson@google.com>, kvm@vger.kernel.org
Subject: Re: Causing VMEXITs when kprobes are hit in the guest VM
Date: Wed, 11 May 2022 14:16:23 +0000 [thread overview]
Message-ID: <YnvFN7nT9DzfR8fq@google.com> (raw)
In-Reply-To: <CAJGDS+GMxG1gXMS1cW1+sS1V67h65iUpMGwQ=+-MVTE6DTOBjg@mail.gmail.com>
On Wed, May 11, 2022, Arnabjyoti Kalita wrote:
> Hello Jim and Sean,
>
> Thank you for your answers.
>
> If I re-inject the #BP back into the guest, does it automatically take
> care of updating the RIP and continuing execution?
Yes, the guest "automatically" handles the #BP. What the appropriate handling may
be is up to the guest, i.e. skipping an instruction may or may not be the correct
thing to do. Injecting the #BP after VM-Exit is simply emulating what would happen
from the guest's perspective if KVM had never intercepted the #BP in the first place.
Note, KVM doesn't have to initiate the injection, you can handle that from userspace
via KVM_SET_VCPU_EVENTS. But if it's just as easy to hack KVM, that's totally fine
too, so long as userspace doesn't double inject.
next prev parent reply other threads:[~2022-05-11 14:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-01 15:30 Causing VMEXITs when kprobes are hit in the guest VM Arnabjyoti Kalita
2022-05-03 20:45 ` Sean Christopherson
2022-05-06 5:14 ` Arnabjyoti Kalita
2022-05-07 6:30 ` Arnabjyoti Kalita
2022-05-11 0:49 ` Jim Mattson
2022-05-11 13:59 ` Sean Christopherson
2022-05-11 14:08 ` Arnabjyoti Kalita
2022-05-11 14:16 ` Sean Christopherson [this message]
2022-05-11 14:38 ` Arnabjyoti Kalita
2022-05-11 15:04 ` Sean Christopherson
2022-05-11 17:02 ` Arnabjyoti Kalita
2022-05-23 19:44 ` Arnabjyoti Kalita
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=YnvFN7nT9DzfR8fq@google.com \
--to=seanjc@google.com \
--cc=akalita@cs.stonybrook.edu \
--cc=jmattson@google.com \
--cc=kvm@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox