Re: [Qemu-devel] [RFC PATCH v2 13/15] cpu-model/s390: Add processor property routines
From: Michael Mueller
Date: Fri Feb 20 2015 - 14:29:54 EST
On Fri, 20 Feb 2015 18:00:19 +0100
Alexander Graf <agraf@xxxxxxx> wrote:
> > So above s390_set/get_processor_props() the code is accelerator independent.
>
> Any particular reason you can't do it like PPC?
That seems to be a short question... and when I started one year ago, I oriented myself on
the PPC version and I'm also willing to revisit it but I can't give you a quick answer different
from no currently to that.
There are no PVRs for s390x CPUs and thus I came up with "pseudo PVRs":
/*
* bits 0-7 : CMOS generation
* bits 8-9 : reserved
* bits 10-11 : machine class 0=unknown 1=EC 2=BC
* bits 12-15 : GA
* bits 16-31 : machine type
*
* note: bits are named according to s390
* architecture specific endienness
*/
enum {
CPU_S390_2064_GA1 = 0x07112064,
CPU_S390_2064_GA2 = 0x07122064,
CPU_S390_2064_GA3 = 0x07132064,
CPU_S390_2066_GA1 = 0x07212066,
CPU_S390_2084_GA1 = 0x08112084,
CPU_S390_2084_GA2 = 0x08122084,
CPU_S390_2084_GA3 = 0x08132084,
CPU_S390_2084_GA4 = 0x08142084,
CPU_S390_2084_GA5 = 0x08152084,
CPU_S390_2086_GA1 = 0x08212086,
CPU_S390_2086_GA2 = 0x08222086,
CPU_S390_2086_GA3 = 0x08232086,
CPU_S390_2094_GA1 = 0x09112094,
CPU_S390_2094_GA2 = 0x09122094,
CPU_S390_2094_GA3 = 0x09132094,
CPU_S390_2096_GA1 = 0x09212096,
CPU_S390_2096_GA2 = 0x09222096,
CPU_S390_2097_GA1 = 0x0a112097,
CPU_S390_2097_GA2 = 0x0a122097,
CPU_S390_2097_GA3 = 0x0a132097,
CPU_S390_2098_GA1 = 0x0a212098,
CPU_S390_2098_GA2 = 0x0a222098,
CPU_S390_2817_GA1 = 0x0b112817,
CPU_S390_2817_GA2 = 0x0b122817,
CPU_S390_2818_GA1 = 0x0b212818,
CPU_S390_2827_GA1 = 0x0c112827,
CPU_S390_2827_GA2 = 0x0c122827,
CPU_S390_2828_GA1 = 0x0c212828,
CPU_S390_2964_GA1 = 0x0d112964,
};
And initially I had a version that was limiting the accelerator to be able to implement just them
with all their properties encapsulated in the a accelerator as well. After identifying the real
processor related attributes defining the model, I changed the interface such that KVM or
other accelerators give hints what it is able to support in dependency of the current code
version and the hosting machine and let QEMU decide how to set these attributes
(cpuid,ibc,fac_list). Thus I think the implementation is now quite open and easily adoptable also
for TCG and possibly others as well. Eventually the integration and also some trigger points of
my code are to adjust. So coming back to your question, the answer is still no for the whole item
but eventually yes if you have limited it to the s390_set/get_processor_props() triggers. But I
have to look into it first again. I will do that when I'm back on Tuesday morning.
Thanks and have a nice WE
Michael
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/