mirror of https://gitee.com/openkylin/qemu.git
mips/kvm: Support unsigned KVM registers
Add KVM register access functions for the uint32_t type. This is required for FP and MSA control registers, which are represented as unsigned 32-bit integers. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Leon Alrae <leon.alrae@imgtec.com> Cc: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
This commit is contained in:
parent
03cbfd7b5c
commit
0759487b56
|
@ -248,6 +248,17 @@ static inline int kvm_mips_put_one_reg(CPUState *cs, uint64_t reg_id,
|
|||
return kvm_vcpu_ioctl(cs, KVM_SET_ONE_REG, &cp0reg);
|
||||
}
|
||||
|
||||
static inline int kvm_mips_put_one_ureg(CPUState *cs, uint64_t reg_id,
|
||||
uint32_t *addr)
|
||||
{
|
||||
struct kvm_one_reg cp0reg = {
|
||||
.id = reg_id,
|
||||
.addr = (uintptr_t)addr
|
||||
};
|
||||
|
||||
return kvm_vcpu_ioctl(cs, KVM_SET_ONE_REG, &cp0reg);
|
||||
}
|
||||
|
||||
static inline int kvm_mips_put_one_ulreg(CPUState *cs, uint64_t reg_id,
|
||||
target_ulong *addr)
|
||||
{
|
||||
|
@ -282,6 +293,17 @@ static inline int kvm_mips_get_one_reg(CPUState *cs, uint64_t reg_id,
|
|||
return kvm_vcpu_ioctl(cs, KVM_GET_ONE_REG, &cp0reg);
|
||||
}
|
||||
|
||||
static inline int kvm_mips_get_one_ureg(CPUState *cs, uint64_t reg_id,
|
||||
uint32_t *addr)
|
||||
{
|
||||
struct kvm_one_reg cp0reg = {
|
||||
.id = reg_id,
|
||||
.addr = (uintptr_t)addr
|
||||
};
|
||||
|
||||
return kvm_vcpu_ioctl(cs, KVM_GET_ONE_REG, &cp0reg);
|
||||
}
|
||||
|
||||
static inline int kvm_mips_get_one_ulreg(CPUState *cs, uint64_t reg_id,
|
||||
target_ulong *addr)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue