• D
    ppc: First cut implementation of -cpu host · a1e98583
    David Gibson 提交于
    For convenience with kvm, x86 allows the user to specify -cpu host on the
    qemu command line, which means make the guest cpu the same as the host
    cpu.  This patch implements the same option for ppc targets.
    
    For now, this just read the host PVR (Processor Version Register) and
    selects one of our existing CPU specs based on it.  This means that the
    option will not work if the host cpu is not supported by TCG, even if that
    wouldn't matter for use under kvm.
    
    In future, we can extend this in future to override parts of the cpu spec
    based on information obtained from the host (via /proc/cpuinfo, the host
    device tree, or explicit KVM calls).  That will let us handle cases where
    the real kvm-virtualized CPU doesn't behave exactly like the TCG-emulated
    CPU.  With appropriate annotation of the CPU specs we'll also then be able
    to use host cpus under kvm even when there isn't a matching full TCG model.
    Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
    Signed-off-by: NAlexander Graf <agraf@suse.de>
    a1e98583
kvm_ppc.h 2.4 KB