Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
2c19dba6
Commit
2c19dba6
authored
May 07, 2020
by
Paolo Bonzini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
KVM: nSVM: trap #DB and #BP to userspace if guest debugging is on
Signed-off-by:
Paolo Bonzini
<
pbonzini@redhat.com
>
parent
449aa906
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
arch/x86/kvm/svm/nested.c
arch/x86/kvm/svm/nested.c
+8
-0
No files found.
arch/x86/kvm/svm/nested.c
View file @
2c19dba6
...
...
@@ -608,6 +608,11 @@ static int nested_svm_intercept_db(struct vcpu_svm *svm)
{
unsigned
long
dr6
;
/* Always catch it and pass it to userspace if debugging. */
if
(
svm
->
vcpu
.
guest_debug
&
(
KVM_GUESTDBG_SINGLESTEP
|
KVM_GUESTDBG_USE_HW_BP
))
return
NESTED_EXIT_HOST
;
/* if we're not singlestepping, it's not ours */
if
(
!
svm
->
nmi_singlestep
)
return
NESTED_EXIT_DONE
;
...
...
@@ -682,6 +687,9 @@ static int nested_svm_intercept(struct vcpu_svm *svm)
if
(
svm
->
nested
.
intercept_exceptions
&
excp_bits
)
{
if
(
exit_code
==
SVM_EXIT_EXCP_BASE
+
DB_VECTOR
)
vmexit
=
nested_svm_intercept_db
(
svm
);
else
if
(
exit_code
==
SVM_EXIT_EXCP_BASE
+
BP_VECTOR
&&
svm
->
vcpu
.
guest_debug
&
KVM_GUESTDBG_USE_SW_BP
)
vmexit
=
NESTED_EXIT_HOST
;
else
vmexit
=
NESTED_EXIT_DONE
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment