[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 21/22] KVM: PPC: Override host vmx/vsx/dfp only when i
From: |
Alexander Graf |
Subject: |
[Qemu-ppc] [PATCH 21/22] KVM: PPC: Override host vmx/vsx/dfp only when information known |
Date: |
Sun, 30 Oct 2011 21:23:12 +0100 |
The -cpu host feature tries to find out the host capabilities based
on device tree information. However, we don't always have that available
because it's an optional property in dt.
So instead of force unsetting values depending on an unreliable source
of information, let's just try to be clever about it and not override
capabilities when we don't know the device tree pieces.
This fixes altivec with -cpu host on YDL PowerStations.
Reported-by: Nishanth Aravamudan <address@hidden>
Acked-by: David Gibson <address@hidden>
Signed-off-by: Alexander Graf <address@hidden>
---
target-ppc/kvm.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c
index a090d79..f3d0861 100644
--- a/target-ppc/kvm.c
+++ b/target-ppc/kvm.c
@@ -912,9 +912,15 @@ const ppc_def_t *kvmppc_host_cpu_def(void)
/* Now fix up the spec with information we can query from the host */
- alter_insns(&spec->insns_flags, PPC_ALTIVEC, vmx > 0);
- alter_insns(&spec->insns_flags2, PPC2_VSX, vmx > 1);
- alter_insns(&spec->insns_flags2, PPC2_DFP, dfp);
+ if (vmx != -1) {
+ /* Only override when we know what the host supports */
+ alter_insns(&spec->insns_flags, PPC_ALTIVEC, vmx > 0);
+ alter_insns(&spec->insns_flags2, PPC2_VSX, vmx > 1);
+ }
+ if (dfp != -1) {
+ /* Only override when we know what the host supports */
+ alter_insns(&spec->insns_flags2, PPC2_DFP, dfp);
+ }
return spec;
}
--
1.6.0.2
- [Qemu-ppc] [PATCH 15/22] PPC: Bump qemu-system-ppc to 64-bit physical address space, (continued)
- [Qemu-ppc] [PATCH 15/22] PPC: Bump qemu-system-ppc to 64-bit physical address space, Alexander Graf, 2011/10/30
- [Qemu-ppc] [PATCH 09/22] pseries: Add device tree properties for VMX/VSX and DFP under kvm, Alexander Graf, 2011/10/30
- [Qemu-ppc] [PATCH 08/22] ppc: Generalize the kvmppc_get_clockfreq() function, Alexander Graf, 2011/10/30
- [Qemu-ppc] [PATCH 14/22] pseries: Under kvm use guest cpu = host cpu by default, Alexander Graf, 2011/10/30
- [Qemu-ppc] [PATCH 18/22] PPC: Fail configure when libfdt is not available, Alexander Graf, 2011/10/30
- [Qemu-ppc] [PATCH 19/22] pseries: Correct vmx/dfp handling in both KVM and TCG cases, Alexander Graf, 2011/10/30
- [Qemu-ppc] [PATCH 17/22] ppc: Avoid decrementer related kvm exits, Alexander Graf, 2011/10/30
- [Qemu-ppc] [PATCH 16/22] PPC: Disable non-440 CPUs for ppcemb target, Alexander Graf, 2011/10/30
- [Qemu-ppc] [PATCH 20/22] ppc: Fix up usermode only builds, Alexander Graf, 2011/10/30
- [Qemu-ppc] [PATCH 12/22] ppc: First cut implementation of -cpu host, Alexander Graf, 2011/10/30
- [Qemu-ppc] [PATCH 21/22] KVM: PPC: Override host vmx/vsx/dfp only when information known,
Alexander Graf <=
- [Qemu-ppc] [PATCH 22/22] pseries: Allow writes to KVM accelerated TCE table, Alexander Graf, 2011/10/30
- [Qemu-ppc] [PATCH 07/22] Set an invalid-bits mask for each SPE instructions, Alexander Graf, 2011/10/30
- [Qemu-ppc] [PATCH 10/22] pseries: Update SLOF firmware image, Alexander Graf, 2011/10/30
- [Qemu-ppc] [PATCH 23/22] ppc: Alter CPU state to mask out TCG unimplemented instructions as appropriate, Alexander Graf, 2011/10/31
- [Qemu-ppc] [PATCH 24/22] pseries: Add partial support for PCI, Alexander Graf, 2011/10/31
- Re: [Qemu-ppc] [Qemu-devel] [PULL 00/22] ppc patch queue 2011-10-30, Alexander Graf, 2011/10/31