diff options
author | Alexander Graf <agraf@suse.de> | 2010-02-19 05:00:29 -0500 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-04-25 05:34:41 -0400 |
commit | b104d06632d08957f384ff7403f609fb5dfb9cbd (patch) | |
tree | a9349425bf2c1c170dcaaa358bf5978c673cc5cf /arch/powerpc/include | |
parent | c62e096dec032c82bae60545623c24743116f5dd (diff) |
KVM: PPC: Enable MMIO to do 64 bits, fprs and qprs
Right now MMIO access can only happen for GPRs and is at most 32 bit wide.
That's actually enough for almost all types of hardware out there.
Unfortunately, the guest I was using used FPU writes to MMIO regions, so
it ended up writing 64 bit MMIOs using FPRs and QPRs.
So let's add code to handle those odd cases too.
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/powerpc/include')
-rw-r--r-- | arch/powerpc/include/asm/kvm.h | 7 | ||||
-rw-r--r-- | arch/powerpc/include/asm/kvm_ppc.h | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/kvm.h b/arch/powerpc/include/asm/kvm.h index 81f3b0b5601e..19bae31202ce 100644 --- a/arch/powerpc/include/asm/kvm.h +++ b/arch/powerpc/include/asm/kvm.h | |||
@@ -77,4 +77,11 @@ struct kvm_debug_exit_arch { | |||
77 | struct kvm_guest_debug_arch { | 77 | struct kvm_guest_debug_arch { |
78 | }; | 78 | }; |
79 | 79 | ||
80 | #define KVM_REG_MASK 0x001f | ||
81 | #define KVM_REG_EXT_MASK 0xffe0 | ||
82 | #define KVM_REG_GPR 0x0000 | ||
83 | #define KVM_REG_FPR 0x0020 | ||
84 | #define KVM_REG_QPR 0x0040 | ||
85 | #define KVM_REG_FQPR 0x0060 | ||
86 | |||
80 | #endif /* __LINUX_KVM_POWERPC_H */ | 87 | #endif /* __LINUX_KVM_POWERPC_H */ |
diff --git a/arch/powerpc/include/asm/kvm_ppc.h b/arch/powerpc/include/asm/kvm_ppc.h index e2642829e435..c011170f572b 100644 --- a/arch/powerpc/include/asm/kvm_ppc.h +++ b/arch/powerpc/include/asm/kvm_ppc.h | |||
@@ -49,7 +49,7 @@ extern int kvmppc_handle_load(struct kvm_run *run, struct kvm_vcpu *vcpu, | |||
49 | unsigned int rt, unsigned int bytes, | 49 | unsigned int rt, unsigned int bytes, |
50 | int is_bigendian); | 50 | int is_bigendian); |
51 | extern int kvmppc_handle_store(struct kvm_run *run, struct kvm_vcpu *vcpu, | 51 | extern int kvmppc_handle_store(struct kvm_run *run, struct kvm_vcpu *vcpu, |
52 | u32 val, unsigned int bytes, int is_bigendian); | 52 | u64 val, unsigned int bytes, int is_bigendian); |
53 | 53 | ||
54 | extern int kvmppc_emulate_instruction(struct kvm_run *run, | 54 | extern int kvmppc_emulate_instruction(struct kvm_run *run, |
55 | struct kvm_vcpu *vcpu); | 55 | struct kvm_vcpu *vcpu); |