Commit 688cded3 authored by David Daney's avatar David Daney Committed by Gleb Natapov

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: default avatarDavid Daney <david.daney@cavium.com>
Acked-by: default avatarSanjay Lal <sanjayl@kymasys.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 1f3dc6d7
...@@ -18,12 +18,18 @@ ...@@ -18,12 +18,18 @@
#define N_MIPS_COPROC_REGS 32 #define N_MIPS_COPROC_REGS 32
#define N_MIPS_COPROC_SEL 8 #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 { struct kvm_regs {
__u32 gprs[32]; __u64 gprs[32];
__u32 hi; __u64 hi;
__u32 lo; __u64 lo;
__u32 pc; __u64 pc;
__u32 cp0reg[N_MIPS_COPROC_REGS][N_MIPS_COPROC_SEL]; __u32 cp0reg[N_MIPS_COPROC_REGS][N_MIPS_COPROC_SEL];
}; };
......
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