Commit ee87a9bd authored by Marc Zyngier's avatar Marc Zyngier

KVM: arm64: Fix new instances of 32bit ESRs

Fix the new instances of ESR being described as a u32, now that
we consistently are using a u64 for this register.
Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
parent a9e192cd
...@@ -2306,7 +2306,7 @@ static int kvm_handle_cp_64(struct kvm_vcpu *vcpu, ...@@ -2306,7 +2306,7 @@ static int kvm_handle_cp_64(struct kvm_vcpu *vcpu,
size_t nr_global) size_t nr_global)
{ {
struct sys_reg_params params; struct sys_reg_params params;
u32 esr = kvm_vcpu_get_esr(vcpu); u64 esr = kvm_vcpu_get_esr(vcpu);
int Rt = kvm_vcpu_sys_get_rt(vcpu); int Rt = kvm_vcpu_sys_get_rt(vcpu);
int Rt2 = (esr >> 10) & 0x1f; int Rt2 = (esr >> 10) & 0x1f;
...@@ -2353,7 +2353,7 @@ static bool emulate_sys_reg(struct kvm_vcpu *vcpu, struct sys_reg_params *params ...@@ -2353,7 +2353,7 @@ static bool emulate_sys_reg(struct kvm_vcpu *vcpu, struct sys_reg_params *params
* registers. Abuse that fact so we can rely on the AArch64 handler for accesses * registers. Abuse that fact so we can rely on the AArch64 handler for accesses
* from AArch32. * from AArch32.
*/ */
static bool kvm_esr_cp10_id_to_sys64(u32 esr, struct sys_reg_params *params) static bool kvm_esr_cp10_id_to_sys64(u64 esr, struct sys_reg_params *params)
{ {
u8 reg_id = (esr >> 10) & 0xf; u8 reg_id = (esr >> 10) & 0xf;
bool valid; bool valid;
...@@ -2404,7 +2404,7 @@ static bool kvm_esr_cp10_id_to_sys64(u32 esr, struct sys_reg_params *params) ...@@ -2404,7 +2404,7 @@ static bool kvm_esr_cp10_id_to_sys64(u32 esr, struct sys_reg_params *params)
int kvm_handle_cp10_id(struct kvm_vcpu *vcpu) int kvm_handle_cp10_id(struct kvm_vcpu *vcpu)
{ {
int Rt = kvm_vcpu_sys_get_rt(vcpu); int Rt = kvm_vcpu_sys_get_rt(vcpu);
u32 esr = kvm_vcpu_get_esr(vcpu); u64 esr = kvm_vcpu_get_esr(vcpu);
struct sys_reg_params params; struct sys_reg_params params;
/* UNDEF on any unhandled register access */ /* UNDEF on any unhandled register access */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment