qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 15/35] tcg-s390: Query instruction extensions th


From: Aurelien Jarno
Subject: Re: [Qemu-devel] [PATCH 15/35] tcg-s390: Query instruction extensions that are installed.
Date: Fri, 11 Jun 2010 10:06:34 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

On Thu, Jun 10, 2010 at 03:19:25PM -0700, Richard Henderson wrote:
> On 06/10/2010 03:28 AM, Aurelien Jarno wrote:
> >> +    asm volatile(".word 0xb2b0,0x1000"
> >> +                 : "=r"(r0) : "0"(0), "r"(r1) : "memory", "cc");
> > 
> > Wouldn't it be possible to use the instruction directly instead of
> > dumping the opcode values? Same below
> 
> No, they aren't recognized by older assemblers.  For instance, the one shipped
> with RHEL 5.5, and possibly even by Debian Lenny (I don't currently have 
> access
> to that machine to check). Apparently some of these are quite new insns -- 
> 2008 era.
> 
> That said, all the hardware to which either I or agraf have access are the 
> latest
> z10 machines.  Frankly I expect that to be true of most if not all machines, 
> since
> I think it's just a microcode update which everyone with an active support 
> contract
> can get.
> 

FYI, that's the /proc/cpuinfo of s390 machines I have (more or less)
access:

features        : esan3 zarch msa ldisp 
features        : esan3 zarch stfle msa ldisp eimm dfp
features        : esan3 zarch stfle msa ldisp eimm dfp etf3eh highgprs 

So that's seems fine. However, looking more in details in the code
again, I do wonder about this part:

> +        /* Test for z/Architecture.  Required even in 31-bit mode.  */
> +        got_sigill = 0;
> +        /* agr %r0,%r0 */
> +        asm volatile(".word 0xb908,0x0000" : "=r"(r0) : : "cc");
> +        if (!got_sigill) {
> +            facilities |= FACILITY_ZARCH | FACILITY_ZARCH_ACTIVE;
> +        }
> +

What's the difference between FACILITY_ZARCH and FACILITY_ZARCH_ACTIVE,
as both are actually flagged together. My guess is that
FACILITY_ZARCH_ACTIVE is needed in 64-bit mode, why FACILITY_ZARCH is
only needed for a possible future 32-bit mode. Is it correct?

-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
address@hidden                 http://www.aurel32.net



reply via email to

[Prev in Thread] Current Thread [Next in Thread]