Re: [Qemu-devel] [PATCH RFT ppc-next] target-ppc: Make host CPU a subclass of the host's CPU model

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

 



Am 23.02.2013 17:00, schrieb Andreas Färber:
> This avoids assigning individual class fields and contributors
> forgetting to add field assignments in KVM-only code.
> 
> ppc_cpu_class_find_by_pvr() requires the CPU model classes to be
> registered, so defer host CPU type registration to kvm_arch_init().
> 
> Only register the host CPU type if there is a class with matching PVR.
> This lets us drop error handling from instance_init.
> 
> Signed-off-by: Andreas Färber <afaerber@xxxxxxx>
> ---
>  target-ppc/kvm.c            |   64 ++++++++++++++++---------------------------
>  target-ppc/translate_init.c |   15 +++++-----
>  2 Dateien geändert, 31 Zeilen hinzugefügt(+), 48 Zeilen entfernt(-)
> 
> diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c
> index e601059..0e892d0 100644
> --- a/target-ppc/kvm.c
> +++ b/target-ppc/kvm.c
[...]
> @@ -1262,41 +1266,14 @@ static void kvmppc_host_cpu_initfn(Object *obj)
>      PowerPCCPUClass *pcc = POWERPC_CPU_GET_CLASS(obj);
>  
>      assert(kvm_enabled());
> -
> -    if (pcc->pvr != mfpvr()) {
> -        fprintf(stderr, "Your host CPU is unsupported.\n"
> -                "Please choose a supported model instead, see -cpu ?.\n");
> -        exit(1);
> -    }
>  }
[snip]

Managed to screw this one up by last minute cleanup:

diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c
index 0e892d0..994bf6d 100644
--- a/target-ppc/kvm.c
+++ b/target-ppc/kvm.c
@@ -1263,8 +1263,6 @@ static void alter_insns(uint64_t *word, uint64_t
flags, bool on)

 static void kvmppc_host_cpu_initfn(Object *obj)
 {
-    PowerPCCPUClass *pcc = POWERPC_CPU_GET_CLASS(obj);
-
     assert(kvm_enabled());
 }


Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
--
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