Received: from eggs.gnu.org ([2001:4830:134:3::10]:54406) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1ekO-0001D9-LM for qemu-devel@nongnu.org; Tue, 01 Nov 2016 15:29:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c1ekK-0005Kc-MC for qemu-devel@nongnu.org; Tue, 01 Nov 2016 15:29:24 -0400 Received: from mail-it0-x244.google.com ([2607:f8b0:4001:c0b::244]:33681) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c1ekK-0005KV-HA for qemu-devel@nongnu.org; Tue, 01 Nov 2016 15:29:20 -0400 Received: by mail-it0-x244.google.com with SMTP id e187so4286852itc.0 for ; Tue, 01 Nov 2016 12:29:20 -0700 (PDT) Sender: Richard Henderson References: <1475316333-9776-1-git-send-email-atar4qemu@gmail.com> <1475316333-9776-10-git-send-email-atar4qemu@gmail.com> <49b68272-fb91-ed4d-b06b-2b6312f6a5db@twiddle.net> <0b1f6999-8489-9148-9b0d-a1b35ac676bd@twiddle.net> From: Richard Henderson Message-ID: <0a7b98f2-dbeb-bfb7-aa4f-97844cfc668f@twiddle.net> Date: Tue, 1 Nov 2016 13:29:15 -0600 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------04A0243D39234BF1BCE97AFA" Subject: Re: [Qemu-devel] [PATCH 09/29] target-sparc: hypervisor mode takes over nucleus mode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Artyom Tarasenko Cc: qemu-devel , Mark Cave-Ayland This is a multi-part message in MIME format. --------------04A0243D39234BF1BCE97AFA Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 11/01/2016 12:12 PM, Artyom Tarasenko wrote: >>>> While playing with your patch set, I discovered that we also need a >>>> patch to get_asi for ASI_N et al to retain MMU_HYPV_IDX, and not >>>> decrease privilege. This happens *very* early in the prom boot, with >>>> the first casx (when casx is implemented inline). >>> >>> Why is the bug not visible with the current master? I wonder if we >>> have a symmetrical bug somewhere. >> >> >> Hmm, I dunno. I assume it has something to do with casx being implemented >> out of line, and using helper_ld_asi instead of tcg_gen_qemu_ld_tl directly. > > Actually I don't see where the privilege is decreased: get_asi uses a > local mem_idx variable, the dc->mem_idx is retained. > What patch do you have in mind? Like this. Anyway, now that PMM has my atomic and sparc patch sets, you should be able to see the problem yourself with your patch set and your rom. r~ --------------04A0243D39234BF1BCE97AFA Content-Type: text/plain; charset=UTF-8; name="z1" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="z1" RnJvbSBmYTc1YWUxMGYyNmI3NjExZjlmMzYwMTNhMTFiMDY2NzY2YjlmYWVlIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBSaWNoYXJkIEhlbmRlcnNvbiA8cnRoQHR3aWRkbGUu bmV0PgpEYXRlOiBNb24sIDEwIE9jdCAyMDE2IDE1OjUyOjQ5IC0wNTAwClN1YmplY3Q6IHRh cmdldC1zcGFyYzogT3ZlcnJpZGUgQVNJX04gZm9yIGh5cGVydmlzb3IKClNpZ25lZC1vZmYt Ynk6IFJpY2hhcmQgSGVuZGVyc29uIDxydGhAdHdpZGRsZS5uZXQ+CgpkaWZmIC0tZ2l0IGEv dGFyZ2V0LXNwYXJjL3RyYW5zbGF0ZS5jIGIvdGFyZ2V0LXNwYXJjL3RyYW5zbGF0ZS5jCmlu ZGV4IDQzZjg5ZDQuLjJiODBkNzkgMTAwNjQ0Ci0tLSBhL3RhcmdldC1zcGFyYy90cmFuc2xh dGUuYworKysgYi90YXJnZXQtc3BhcmMvdHJhbnNsYXRlLmMKQEAgLTIxMzksNyArMjEzOSwx MSBAQCBzdGF0aWMgRGlzYXNBU0kgZ2V0X2FzaShEaXNhc0NvbnRleHQgKmRjLCBpbnQgaW5z biwgVENHTWVtT3AgbWVtb3ApCiAgICAgICAgIGNhc2UgQVNJX1RXSU5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