diff options
author | David Daney <david.daney@cavium.com> | 2013-05-23 09:49:06 -0700 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2013-05-28 13:40:30 +0200 |
commit | 46b4761427e19a6e66b82b3a1ed198830d831ac9 (patch) | |
tree | d2637e087f554d560e059a18e8dccaf3f2b19db8 | |
parent | 482608b96d4e457ff5ade894dac4e5d2fb90afde (diff) | |
download | linux-46b4761427e19a6e66b82b3a1ed198830d831ac9.tar.gz |
mips/kvm: Fix ABI for use of 64-bit registers.
All registers are 64-bits wide, 32-bit guests use the least
significant portion of the register storage fields.
Signed-off-by: David Daney <david.daney@cavium.com>
Acked-by: Sanjay Lal <sanjayl@kymasys.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | arch/mips/include/uapi/asm/kvm.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/arch/mips/include/uapi/asm/kvm.h b/arch/mips/include/uapi/asm/kvm.h index 0e8f5658c03e44..86812fb61842b8 100644 --- a/arch/mips/include/uapi/asm/kvm.h +++ b/arch/mips/include/uapi/asm/kvm.h @@ -18,12 +18,18 @@ #define N_MIPS_COPROC_REGS 32 #define N_MIPS_COPROC_SEL 8 -/* for KVM_GET_REGS and KVM_SET_REGS */ +/* + * for KVM_GET_REGS and KVM_SET_REGS + * + * If Config[AT] is zero (32-bit CPU), the register contents are + * stored in the lower 32-bits of the struct kvm_regs fields and sign + * extended to 64-bits. + */ struct kvm_regs { - __u32 gprs[32]; - __u32 hi; - __u32 lo; - __u32 pc; + __u64 gprs[32]; + __u64 hi; + __u64 lo; + __u64 pc; __u32 cp0reg[N_MIPS_COPROC_REGS][N_MIPS_COPROC_SEL]; }; |