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
Kirill Smelkov
linux
Commits
4926d445
Commit
4926d445
authored
Sep 18, 2012
by
Marc Zyngier
Committed by
Christoffer Dall
Mar 06, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ARM: KVM: abstract exception class decoding away
Signed-off-by:
Marc Zyngier
<
marc.zyngier@arm.com
>
parent
23b415d6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
3 deletions
+8
-3
arch/arm/include/asm/kvm_emulate.h
arch/arm/include/asm/kvm_emulate.h
+5
-0
arch/arm/kvm/arm.c
arch/arm/kvm/arm.c
+2
-2
arch/arm/kvm/mmu.c
arch/arm/kvm/mmu.c
+1
-1
No files found.
arch/arm/include/asm/kvm_emulate.h
View file @
4926d445
...
...
@@ -142,4 +142,9 @@ static inline bool kvm_vcpu_trap_il_is32bit(struct kvm_vcpu *vcpu)
return
kvm_vcpu_get_hsr
(
vcpu
)
&
HSR_IL
;
}
static
inline
u8
kvm_vcpu_trap_get_class
(
struct
kvm_vcpu
*
vcpu
)
{
return
kvm_vcpu_get_hsr
(
vcpu
)
>>
HSR_EC_SHIFT
;
}
#endif
/* __ARM_KVM_EMULATE_H__ */
arch/arm/kvm/arm.c
View file @
4926d445
...
...
@@ -559,7 +559,7 @@ static bool kvm_condition_valid(struct kvm_vcpu *vcpu)
* catch undefined instructions, and then we won't get past
* the arm_exit_handlers test anyway.
*/
BUG_ON
(
((
kvm_vcpu_get_hsr
(
vcpu
)
&
HSR_EC
)
>>
HSR_EC_SHIFT
)
==
0
);
BUG_ON
(
!
kvm_vcpu_trap_get_class
(
vcpu
)
);
/* Top two bits non-zero? Unconditional. */
if
(
kvm_vcpu_get_hsr
(
vcpu
)
>>
30
)
...
...
@@ -609,7 +609,7 @@ static int handle_exit(struct kvm_vcpu *vcpu, struct kvm_run *run,
case
ARM_EXCEPTION_DATA_ABORT
:
case
ARM_EXCEPTION_PREF_ABORT
:
case
ARM_EXCEPTION_HVC
:
hsr_ec
=
(
kvm_vcpu_get_hsr
(
vcpu
)
&
HSR_EC
)
>>
HSR_EC_SHIFT
;
hsr_ec
=
kvm_vcpu_trap_get_class
(
vcpu
)
;
if
(
hsr_ec
>=
ARRAY_SIZE
(
arm_exit_handlers
)
||
!
arm_exit_handlers
[
hsr_ec
])
{
...
...
arch/arm/kvm/mmu.c
View file @
4926d445
...
...
@@ -593,7 +593,7 @@ int kvm_handle_guest_abort(struct kvm_vcpu *vcpu, struct kvm_run *run)
gfn_t
gfn
;
int
ret
,
idx
;
hsr_ec
=
kvm_vcpu_
get_hsr
(
vcpu
)
>>
HSR_EC_SHIFT
;
hsr_ec
=
kvm_vcpu_
trap_get_class
(
vcpu
)
;
is_iabt
=
(
hsr_ec
==
HSR_EC_IABT
);
fault_ipa
=
kvm_vcpu_get_fault_ipa
(
vcpu
);
...
...
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