Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
Linux
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
E-EXK4 - Operating System Group
projects
Linux
Commits
4926d445
Commit
4926d445
authored
12 years ago
by
Marc Zyngier
Committed by
Christoffer Dall
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
ARM: KVM: abstract exception class decoding away
Signed-off-by:
Marc Zyngier
<
marc.zyngier@arm.com
>
parent
23b415d6
Loading
Loading
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
arch/arm/include/asm/kvm_emulate.h
+5
-0
5 additions, 0 deletions
arch/arm/include/asm/kvm_emulate.h
arch/arm/kvm/arm.c
+2
-2
2 additions, 2 deletions
arch/arm/kvm/arm.c
arch/arm/kvm/mmu.c
+1
-1
1 addition, 1 deletion
arch/arm/kvm/mmu.c
with
8 additions
and
3 deletions
arch/arm/include/asm/kvm_emulate.h
+
5
−
0
View file @
4926d445
...
@@ -142,4 +142,9 @@ static inline bool kvm_vcpu_trap_il_is32bit(struct kvm_vcpu *vcpu)
...
@@ -142,4 +142,9 @@ static inline bool kvm_vcpu_trap_il_is32bit(struct kvm_vcpu *vcpu)
return
kvm_vcpu_get_hsr
(
vcpu
)
&
HSR_IL
;
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__ */
#endif
/* __ARM_KVM_EMULATE_H__ */
This diff is collapsed.
Click to expand it.
arch/arm/kvm/arm.c
+
2
−
2
View file @
4926d445
...
@@ -559,7 +559,7 @@ static bool kvm_condition_valid(struct kvm_vcpu *vcpu)
...
@@ -559,7 +559,7 @@ static bool kvm_condition_valid(struct kvm_vcpu *vcpu)
* catch undefined instructions, and then we won't get past
* catch undefined instructions, and then we won't get past
* the arm_exit_handlers test anyway.
* 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. */
/* Top two bits non-zero? Unconditional. */
if
(
kvm_vcpu_get_hsr
(
vcpu
)
>>
30
)
if
(
kvm_vcpu_get_hsr
(
vcpu
)
>>
30
)
...
@@ -609,7 +609,7 @@ static int handle_exit(struct kvm_vcpu *vcpu, struct kvm_run *run,
...
@@ -609,7 +609,7 @@ static int handle_exit(struct kvm_vcpu *vcpu, struct kvm_run *run,
case
ARM_EXCEPTION_DATA_ABORT
:
case
ARM_EXCEPTION_DATA_ABORT
:
case
ARM_EXCEPTION_PREF_ABORT
:
case
ARM_EXCEPTION_PREF_ABORT
:
case
ARM_EXCEPTION_HVC
:
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
)
if
(
hsr_ec
>=
ARRAY_SIZE
(
arm_exit_handlers
)
||
!
arm_exit_handlers
[
hsr_ec
])
{
||
!
arm_exit_handlers
[
hsr_ec
])
{
...
...
This diff is collapsed.
Click to expand it.
arch/arm/kvm/mmu.c
+
1
−
1
View file @
4926d445
...
@@ -593,7 +593,7 @@ int kvm_handle_guest_abort(struct kvm_vcpu *vcpu, struct kvm_run *run)
...
@@ -593,7 +593,7 @@ int kvm_handle_guest_abort(struct kvm_vcpu *vcpu, struct kvm_run *run)
gfn_t
gfn
;
gfn_t
gfn
;
int
ret
,
idx
;
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
);
is_iabt
=
(
hsr_ec
==
HSR_EC_IABT
);
fault_ipa
=
kvm_vcpu_get_fault_ipa
(
vcpu
);
fault_ipa
=
kvm_vcpu_get_fault_ipa
(
vcpu
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment