diff options
| author | Marc Zyngier <marc.zyngier@arm.com> | 2014-02-04 12:48:10 -0500 |
|---|---|---|
| committer | Christoffer Dall <christoffer.dall@linaro.org> | 2014-07-11 07:57:33 -0400 |
| commit | beee38b9d0c0ea6cf2a7f35c3108f7d8281d4545 (patch) | |
| tree | 49da6608d9b99da17c297eecbf36ecc43ce525c9 /include/kvm | |
| parent | 909d9b5025f149af6cfc304a76ad6218e6622cc0 (diff) | |
KVM: ARM: vgic: abstract VMCR access
Instead of directly messing with with the GICH_VMCR bits for the CPU
interface save/restore code, add accessors that encode/decode the
entire set of registers exposed by VMCR.
Not the most efficient thing, but given that this code is only used
by the save/restore code, performance is far from being critical.
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'include/kvm')
| -rw-r--r-- | include/kvm/arm_vgic.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/kvm/arm_vgic.h b/include/kvm/arm_vgic.h index cdfa5d9567c6..f51580043170 100644 --- a/include/kvm/arm_vgic.h +++ b/include/kvm/arm_vgic.h | |||
| @@ -81,6 +81,13 @@ struct vgic_lr { | |||
| 81 | u8 state; | 81 | u8 state; |
| 82 | }; | 82 | }; |
| 83 | 83 | ||
| 84 | struct vgic_vmcr { | ||
| 85 | u32 ctlr; | ||
| 86 | u32 abpr; | ||
| 87 | u32 bpr; | ||
| 88 | u32 pmr; | ||
| 89 | }; | ||
| 90 | |||
| 84 | struct vgic_ops { | 91 | struct vgic_ops { |
| 85 | struct vgic_lr (*get_lr)(const struct kvm_vcpu *, int); | 92 | struct vgic_lr (*get_lr)(const struct kvm_vcpu *, int); |
| 86 | void (*set_lr)(struct kvm_vcpu *, int, struct vgic_lr); | 93 | void (*set_lr)(struct kvm_vcpu *, int, struct vgic_lr); |
| @@ -90,6 +97,8 @@ struct vgic_ops { | |||
| 90 | u32 (*get_interrupt_status)(const struct kvm_vcpu *vcpu); | 97 | u32 (*get_interrupt_status)(const struct kvm_vcpu *vcpu); |
| 91 | void (*enable_underflow)(struct kvm_vcpu *vcpu); | 98 | void (*enable_underflow)(struct kvm_vcpu *vcpu); |
| 92 | void (*disable_underflow)(struct kvm_vcpu *vcpu); | 99 | void (*disable_underflow)(struct kvm_vcpu *vcpu); |
| 100 | void (*get_vmcr)(struct kvm_vcpu *vcpu, struct vgic_vmcr *vmcr); | ||
| 101 | void (*set_vmcr)(struct kvm_vcpu *vcpu, struct vgic_vmcr *vmcr); | ||
| 93 | }; | 102 | }; |
| 94 | 103 | ||
| 95 | struct vgic_dist { | 104 | struct vgic_dist { |
