Re: [PATCH 08/20] target-ppc: Add hooks for handling tcg and kvm limitations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/16/2012 01:19 PM, Andreas Färber wrote:
> Am 16.04.2012 12:13, schrieb Avi Kivity:
> > On 04/15/2012 09:38 PM, Andreas Färber wrote:
> >> From: David Gibson <david@xxxxxxxxxxxxxxxxxxxxx>
> >>
> >> On target-ppc, our table of CPU types and features encodes the features as
> >> found on the hardware, regardless of whether these features are actually
> >> usable under TCG or KVM.  We already have cases where the information from
> >> the cpu table must be fixed up to account for limitations in the emulation
> >> method we're using.  e.g. TCG does not support the DFP and VSX instructions
> >> and KVM needs different numbering of the CPUs in order to tell it the
> >> correct thread to core mappings.
> >>
> >> This patch cleans up these hacks to handle emulation limitations by
> >> consolidating them into a pair of functions specifically for the purpose.
> >>
> >>      env->check_pow = def->check_pow;
> >> +
> >> +    if (kvm_enabled()) {
> >> +        if (kvmppc_fixup_cpu(env) != 0) {
> >> +            fprintf(stderr, "Unable to virtualize selected CPU with KVM\n");
> >> +            exit(1);
> >> +        }
> >> +    } else {
> >> +        if (ppc_fixup_cpu(env) != 0) {
> >> +            fprintf(stderr, "Unable to emulate selected CPU with TCG\n");
> >> +            exit(1);
> >> +        }
> >> +    }
> >> +
> >>
> > 
> > I wish we had an error like that for x86.  Right now we silently add and
> > drop cpu features.
>
> x86 has an ,+enforce option for that, doesn't it?
>

So it does.  And one day it will be the default.

-- 
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux