From nobody Tue May 7 05:10:42 2024 Delivered-To: importer@patchew.org Received-SPF: temperror (zoho.com: Error in retrieving data from DNS) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1557458973; cv=none; d=zoho.com; s=zohoarc; b=kAkiOTg6eTtTxrW1B1jlTrbebFLkuq1O+2eo6KSX2bByGLRtivUsRiVO94ILnu7hF9LIVDfMkd0z00dO04JdWRorI/yNxnFJoAQ5elXTqOfrCX91meCwOEXo/rlOx9muSvIKFjg+rCupfHOvQYkkS+BPvTgK58NRVPMLRtH5OIY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557458973; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=iKTmI9ncTuLaMcNrrSxuBO2p/7mhBstesEY49w5c0ms=; b=N3pl+9l0BtMCroUZOBFljvRScuxIeONUStfWX5nECEmax4fHSEv/LZXVfdjiWYsADIDcsUDiipfF6TME+knuOFG9QOmoCYIFbyIH8oNzdcGEe+wi1pus0IT+N4gIwhr4ulDIKD0vYttHAZN4uwuDZLETqOWz9pODyYkqsXGDuys= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1557458973564595.8336648065297; Thu, 9 May 2019 20:29:33 -0700 (PDT) Received: from localhost ([127.0.0.1]:36122 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOwDm-000442-0U for importer@patchew.org; Thu, 09 May 2019 23:29:18 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48051) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOwBo-0002w1-KS for qemu-devel@nongnu.org; Thu, 09 May 2019 23:27:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hOwBn-0001Nk-NW for qemu-devel@nongnu.org; Thu, 09 May 2019 23:27:16 -0400 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]:45052) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hOwBn-0001LU-Hh for qemu-devel@nongnu.org; Thu, 09 May 2019 23:27:15 -0400 Received: by mail-pg1-x542.google.com with SMTP id z16so2260583pgv.11 for ; Thu, 09 May 2019 20:27:15 -0700 (PDT) Received: from localhost.localdomain (97-113-13-231.tukw.qwest.net. [97.113.13.231]) by smtp.gmail.com with ESMTPSA id t26sm6259695pgk.62.2019.05.09.20.27.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 May 2019 20:27:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=iKTmI9ncTuLaMcNrrSxuBO2p/7mhBstesEY49w5c0ms=; b=BY1M4BJpSx0iy7djdB7+Acxrx3ZaPDMy3YUEN/1ASHo7ISGkt8qU/DE73/kO33M/9v v8Y9dRwURwxElKs9/vwBHXTGhQTQLt+6XCke3p79RNWGTzHl6mNyiJyiGBCMYu7Xs7LX jJu726/gMlSOQXPO8UiJaUdoQaxTYivZX8o70ce2rfYmBo/lO6gZuoAvu6hkaFk+vg1r ulC9AePS5Lcfx/ejXbK1R5Oz1Hy0SWiJ6jRAE5PFUkxOf1qoEsnuA0Lj4Gl51gBq82vs gWxf6F5wz7qaTpFaToC0/lK3eXb1uWci8ttHbQya2wUdaLfQWqrYPSG55UKkrfiubkgu 653g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iKTmI9ncTuLaMcNrrSxuBO2p/7mhBstesEY49w5c0ms=; b=epXI8EwVvUuaWxOObffKhd7QKSSNyYjUsWlwMDmVkk5RuxCgfPNHym+VUdMRQ6AZsO RBsmOqF69K7LHDGnsfwSst39LPQZ7k0DwBXdGWOFjexAyE+Kru/771xjxZ/2FvrhNSE9 pdlzBco8vpz0qfyODYRrnQiNBUK184V4u8EXB/lu+meP/nnD0LEVilRKEwkdZYekm7Sd R5eDbZiKUo1YGzJ1B90QDrecWdsSi5mM09JLStsTV9F1atXaNrlVHzgldK22nAd2sbSi 2BN7oqX2NPD9Zc9AKMLbmqkhEISlFsbwDljJfOXU/0gjYRXAOb3/myDF6OQM1ZWI1D7H i14Q== X-Gm-Message-State: APjAAAWISXjeBeRSk7pxKSILLuJRKmWaP5wH/rfxy11Rws/H0kaf7OMo NmKMDIXo7K0tD8My17zqKQVBxDiYHfQ= X-Google-Smtp-Source: APXvYqzyBCkGDvWecHTnBPFnrruLCwdYP2plQ4iBuHluOsLMvvn8eJVSgmnDfBLULNGL/SiM/I3pZQ== X-Received: by 2002:a63:445d:: with SMTP id t29mr10619943pgk.303.1557458834238; Thu, 09 May 2019 20:27:14 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 9 May 2019 20:27:03 -0700 Message-Id: <20190510032710.23910-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190510032710.23910-1-richard.henderson@linaro.org> References: <20190510032710.23910-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::542 Subject: [Qemu-devel] [PATCH v2 1/8] linux-user: Disallow setting newsp for fork X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: laurent@vivier.eu Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Or really, just clone devolving into fork. This should not ever happen in practice. We do want to reserve calling cpu_clone_regs for the case in which we are actually performing a clone. Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Richard Henderson --- linux-user/syscall.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 96cd4bf86d..f7d0754c8d 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -5553,10 +5553,14 @@ static int do_fork(CPUArchState *env, unsigned int = flags, abi_ulong newsp, pthread_mutex_destroy(&info.mutex); pthread_mutex_unlock(&clone_lock); } else { - /* if no CLONE_VM, we consider it is a fork */ + /* If no CLONE_VM, we consider it is a fork. */ if (flags & CLONE_INVALID_FORK_FLAGS) { return -TARGET_EINVAL; } + /* As a fork, setting a new sp does not make sense. */ + if (newsp) { + return -TARGET_EINVAL; + } =20 /* We can't support custom termination signals */ if ((flags & CSIGNAL) !=3D TARGET_SIGCHLD) { @@ -5571,7 +5575,6 @@ static int do_fork(CPUArchState *env, unsigned int fl= ags, abi_ulong newsp, ret =3D fork(); if (ret =3D=3D 0) { /* Child Process. */ - cpu_clone_regs(env, newsp); fork_end(1); /* There is a race condition here. The parent process could theoretically read the TID in the child process before the = child --=20 2.17.1 From nobody Tue May 7 05:10:42 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1557459125; cv=none; d=zoho.com; s=zohoarc; b=aYuPufSaTCyXutwA7ATCeZVSm/Ck6FmfX1+1wdbsniegI8eMFzSQZ12NjNiGmT2xo+VJjvZPNLDcfSuXxq7bEiefS+a4YoYsogrxEVhDez6UieAAn4H+dCPrXtMSi+QKxhZ11+bvrk6FUkFAiYKXkMBywO72zMPS2cPXMENts+8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557459125; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=XUS5O0Wsp1uZAHY7PV259DmtfHHmlKN4309ndxqVouY=; b=TqH9OtylSRJKwnEfseKsvter/X8f0rhglt4LuvMwUOox044CJuI3iOZzZgFH0V3V3UQygt+emGUVnw8D1o+EfUIx2Il0QapwsnjsIuRisl/PL1glSrRCNdHS0x8Vs9Et79ydHaVN7ckM+G/DgKZAGdIo8EeC+KHJZntSYNqSYCI= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1557459125797795.0978262914341; Thu, 9 May 2019 20:32:05 -0700 (PDT) Received: from localhost ([127.0.0.1]:36176 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOwGP-00072s-Mo for importer@patchew.org; Thu, 09 May 2019 23:32:01 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48071) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOwBq-0002wZ-OE for qemu-devel@nongnu.org; Thu, 09 May 2019 23:27:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hOwBp-0001PC-66 for qemu-devel@nongnu.org; Thu, 09 May 2019 23:27:18 -0400 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]:41502) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hOwBo-0001Ok-UX for qemu-devel@nongnu.org; Thu, 09 May 2019 23:27:17 -0400 Received: by mail-pf1-x442.google.com with SMTP id l132so2407808pfc.8 for ; Thu, 09 May 2019 20:27:16 -0700 (PDT) Received: from localhost.localdomain (97-113-13-231.tukw.qwest.net. [97.113.13.231]) by smtp.gmail.com with ESMTPSA id t26sm6259695pgk.62.2019.05.09.20.27.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 May 2019 20:27:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XUS5O0Wsp1uZAHY7PV259DmtfHHmlKN4309ndxqVouY=; b=Gz4GjQPtL1E3Yv539k/vYUvTN3tWGTYXHEvkcVeoA1qOmXra+knF5YYuTtM5+Pa8ot /XqjuJhTd1eEhmEtfkSSB5MNzWs9zkRfKoh0LtMyfbzF2DY20GMbfcaoyHBte9CZ1uP8 +NEhEEGucCpOeYWtd1Rwhb3BSfXDLiX0se8VkKEy20MDFyXVEYQpy83dwDC8OzAbi3n9 gX+73q2ar5plCpX6alf2PCqkwTTB1WPjAftUwKxKtLyStOQwjrlw/51+pTqn5kBjHLQm XiZkIPWv5QWnkFvY0Ab0IN67mJTFocsb4aektpcoPMclD56oCgzda7i2i6TW3PsZSLYf hirA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XUS5O0Wsp1uZAHY7PV259DmtfHHmlKN4309ndxqVouY=; b=fbZeXsJ566qB7Yf5hkRq1FlPIvVYHAn2L3mv+NigGDbapa3zr3QFfncoFtv+sBrdqJ 7FgXjLtwqy9/z+1Dh8uzUzkMSwHfqTP2D9udqrFAsz81TykLLeqTrvWMlhySYSVQP8da /QWoDuq+0tpsPJXU9R1V/ytWL8TKHi4SvrnwQ3Y8clITC2cIby6nnIUQpsPU+5uhP4cA J+Tzj9T2JZsQu0mB2z7/iBI/fhC5m4oIIFrNUgi1t1mN9Pb6PitWy8jFyUrYCxBY2yef iv+yHidkPwjUsTlJChncEiK94EsyGUgBRUTd1wBf2WTmBRUZpYe4nw2GNMGzGE/X6tsF HArA== X-Gm-Message-State: APjAAAX7KUosf8Ms0s3jPnfjpa2jWct+iDDyArHpxKaiLLiKN9VIaC5g eyF/rBoh0tK58u4QW13RJhgWOcJswD4= X-Google-Smtp-Source: APXvYqyB7JgPJGAhFvGELy32mTKrNXZrS6u2/CJYCVt/pJwzm7LqTJ5SzxZCIHjLLl4neUK1W1LLPg== X-Received: by 2002:a63:e550:: with SMTP id z16mr10692500pgj.329.1557458835613; Thu, 09 May 2019 20:27:15 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 9 May 2019 20:27:04 -0700 Message-Id: <20190510032710.23910-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190510032710.23910-1-richard.henderson@linaro.org> References: <20190510032710.23910-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::442 Subject: [Qemu-devel] [PATCH v2 2/8] linux-user: Pass the parent env to cpu_clone_regs X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: laurent@vivier.eu Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Implementing clone for sparc requires that we make modifications to both the parent and child cpu state. In all other cases, the new argument can be ignored. Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Richard Henderson --- linux-user/aarch64/target_cpu.h | 3 ++- linux-user/alpha/target_cpu.h | 3 ++- linux-user/arm/target_cpu.h | 3 ++- linux-user/cris/target_cpu.h | 3 ++- linux-user/hppa/target_cpu.h | 3 ++- linux-user/i386/target_cpu.h | 3 ++- linux-user/m68k/target_cpu.h | 3 ++- linux-user/microblaze/target_cpu.h | 3 ++- linux-user/mips/target_cpu.h | 3 ++- linux-user/nios2/target_cpu.h | 3 ++- linux-user/openrisc/target_cpu.h | 4 +++- linux-user/ppc/target_cpu.h | 3 ++- linux-user/riscv/target_cpu.h | 3 ++- linux-user/s390x/target_cpu.h | 3 ++- linux-user/sh4/target_cpu.h | 3 ++- linux-user/sparc/target_cpu.h | 3 ++- linux-user/tilegx/target_cpu.h | 3 ++- linux-user/xtensa/target_cpu.h | 3 ++- linux-user/syscall.c | 2 +- 19 files changed, 38 insertions(+), 19 deletions(-) diff --git a/linux-user/aarch64/target_cpu.h b/linux-user/aarch64/target_cp= u.h index a021c95fa4..130177115e 100644 --- a/linux-user/aarch64/target_cpu.h +++ b/linux-user/aarch64/target_cpu.h @@ -19,7 +19,8 @@ #ifndef AARCH64_TARGET_CPU_H #define AARCH64_TARGET_CPU_H =20 -static inline void cpu_clone_regs(CPUARMState *env, target_ulong newsp) +static inline void cpu_clone_regs(CPUARMState *env, CPUARMState *old_env, + target_ulong newsp) { if (newsp) { env->xregs[31] =3D newsp; diff --git a/linux-user/alpha/target_cpu.h b/linux-user/alpha/target_cpu.h index ac4d255ae7..750ffb50d7 100644 --- a/linux-user/alpha/target_cpu.h +++ b/linux-user/alpha/target_cpu.h @@ -19,7 +19,8 @@ #ifndef ALPHA_TARGET_CPU_H #define ALPHA_TARGET_CPU_H =20 -static inline void cpu_clone_regs(CPUAlphaState *env, target_ulong newsp) +static inline void cpu_clone_regs(CPUAlphaState *env, CPUAlphaState *old_e= nv, + target_ulong newsp) { if (newsp) { env->ir[IR_SP] =3D newsp; diff --git a/linux-user/arm/target_cpu.h b/linux-user/arm/target_cpu.h index 8a3764919a..5538b6cb29 100644 --- a/linux-user/arm/target_cpu.h +++ b/linux-user/arm/target_cpu.h @@ -23,7 +23,8 @@ See validate_guest_space in linux-user/elfload.c. */ #define MAX_RESERVED_VA 0xffff0000ul =20 -static inline void cpu_clone_regs(CPUARMState *env, target_ulong newsp) +static inline void cpu_clone_regs(CPUARMState *env, CPUARMState *old_env, + target_ulong newsp) { if (newsp) { env->regs[13] =3D newsp; diff --git a/linux-user/cris/target_cpu.h b/linux-user/cris/target_cpu.h index 2309343979..baf842b400 100644 --- a/linux-user/cris/target_cpu.h +++ b/linux-user/cris/target_cpu.h @@ -20,7 +20,8 @@ #ifndef CRIS_TARGET_CPU_H #define CRIS_TARGET_CPU_H =20 -static inline void cpu_clone_regs(CPUCRISState *env, target_ulong newsp) +static inline void cpu_clone_regs(CPUCRISState *env, CPUCRISState *old_env, + target_ulong newsp) { if (newsp) { env->regs[14] =3D newsp; diff --git a/linux-user/hppa/target_cpu.h b/linux-user/hppa/target_cpu.h index 1c539bdbd6..7cd8d168a7 100644 --- a/linux-user/hppa/target_cpu.h +++ b/linux-user/hppa/target_cpu.h @@ -19,7 +19,8 @@ #ifndef HPPA_TARGET_CPU_H #define HPPA_TARGET_CPU_H =20 -static inline void cpu_clone_regs(CPUHPPAState *env, target_ulong newsp) +static inline void cpu_clone_regs(CPUHPPAState *env, CPUHPPAState *old_env, + target_ulong newsp) { if (newsp) { env->gr[30] =3D newsp; diff --git a/linux-user/i386/target_cpu.h b/linux-user/i386/target_cpu.h index ece04d0966..8fbe36670f 100644 --- a/linux-user/i386/target_cpu.h +++ b/linux-user/i386/target_cpu.h @@ -20,7 +20,8 @@ #ifndef I386_TARGET_CPU_H #define I386_TARGET_CPU_H =20 -static inline void cpu_clone_regs(CPUX86State *env, target_ulong newsp) +static inline void cpu_clone_regs(CPUX86State *env, CPUX86State *old_env, + target_ulong newsp) { if (newsp) { env->regs[R_ESP] =3D newsp; diff --git a/linux-user/m68k/target_cpu.h b/linux-user/m68k/target_cpu.h index 7a26f3c3fc..00b3535fae 100644 --- a/linux-user/m68k/target_cpu.h +++ b/linux-user/m68k/target_cpu.h @@ -21,7 +21,8 @@ #ifndef M68K_TARGET_CPU_H #define M68K_TARGET_CPU_H =20 -static inline void cpu_clone_regs(CPUM68KState *env, target_ulong newsp) +static inline void cpu_clone_regs(CPUM68KState *env, CPUM68KState *old_env, + target_ulong newsp) { if (newsp) { env->aregs[7] =3D newsp; diff --git a/linux-user/microblaze/target_cpu.h b/linux-user/microblaze/tar= get_cpu.h index 73e139938c..3394e98918 100644 --- a/linux-user/microblaze/target_cpu.h +++ b/linux-user/microblaze/target_cpu.h @@ -19,7 +19,8 @@ #ifndef MICROBLAZE_TARGET_CPU_H #define MICROBLAZE_TARGET_CPU_H =20 -static inline void cpu_clone_regs(CPUMBState *env, target_ulong newsp) +static inline void cpu_clone_regs(CPUMBState *env, CPUMBState *old_env, + target_ulong newsp) { if (newsp) { env->regs[R_SP] =3D newsp; diff --git a/linux-user/mips/target_cpu.h b/linux-user/mips/target_cpu.h index 02cf5eeff7..109348a5c9 100644 --- a/linux-user/mips/target_cpu.h +++ b/linux-user/mips/target_cpu.h @@ -19,7 +19,8 @@ #ifndef MIPS_TARGET_CPU_H #define MIPS_TARGET_CPU_H =20 -static inline void cpu_clone_regs(CPUMIPSState *env, target_ulong newsp) +static inline void cpu_clone_regs(CPUMIPSState *env, CPUMIPSState *old_env, + target_ulong newsp) { if (newsp) { env->active_tc.gpr[29] =3D newsp; diff --git a/linux-user/nios2/target_cpu.h b/linux-user/nios2/target_cpu.h index 14f63338fa..09d2db74dc 100644 --- a/linux-user/nios2/target_cpu.h +++ b/linux-user/nios2/target_cpu.h @@ -20,7 +20,8 @@ #ifndef TARGET_CPU_H #define TARGET_CPU_H =20 -static inline void cpu_clone_regs(CPUNios2State *env, target_ulong newsp) +static inline void cpu_clone_regs(CPUNios2State *env, CPUNios2State *old_e= nv, + target_ulong newsp) { if (newsp) { env->regs[R_SP] =3D newsp; diff --git a/linux-user/openrisc/target_cpu.h b/linux-user/openrisc/target_= cpu.h index 32ff135089..361b192735 100644 --- a/linux-user/openrisc/target_cpu.h +++ b/linux-user/openrisc/target_cpu.h @@ -20,7 +20,9 @@ #ifndef OPENRISC_TARGET_CPU_H #define OPENRISC_TARGET_CPU_H =20 -static inline void cpu_clone_regs(CPUOpenRISCState *env, target_ulong news= p) +static inline void cpu_clone_regs(CPUOpenRISCState *env, + CPUOpenRISCState *old_env, + target_ulong newsp) { if (newsp) { cpu_set_gpr(env, 1, newsp); diff --git a/linux-user/ppc/target_cpu.h b/linux-user/ppc/target_cpu.h index c4641834e7..f42e266047 100644 --- a/linux-user/ppc/target_cpu.h +++ b/linux-user/ppc/target_cpu.h @@ -19,7 +19,8 @@ #ifndef PPC_TARGET_CPU_H #define PPC_TARGET_CPU_H =20 -static inline void cpu_clone_regs(CPUPPCState *env, target_ulong newsp) +static inline void cpu_clone_regs(CPUPPCState *env, CPUPPCState *old_env, + target_ulong newsp) { if (newsp) { env->gpr[1] =3D newsp; diff --git a/linux-user/riscv/target_cpu.h b/linux-user/riscv/target_cpu.h index 7e090f376a..b112832d95 100644 --- a/linux-user/riscv/target_cpu.h +++ b/linux-user/riscv/target_cpu.h @@ -1,7 +1,8 @@ #ifndef TARGET_CPU_H #define TARGET_CPU_H =20 -static inline void cpu_clone_regs(CPURISCVState *env, target_ulong newsp) +static inline void cpu_clone_regs(CPURISCVState *env, CPURISCVState *old_e= nv, + target_ulong newsp) { if (newsp) { env->gpr[xSP] =3D newsp; diff --git a/linux-user/s390x/target_cpu.h b/linux-user/s390x/target_cpu.h index aa181ceaee..31d9d9d75f 100644 --- a/linux-user/s390x/target_cpu.h +++ b/linux-user/s390x/target_cpu.h @@ -19,7 +19,8 @@ #ifndef S390X_TARGET_CPU_H #define S390X_TARGET_CPU_H =20 -static inline void cpu_clone_regs(CPUS390XState *env, target_ulong newsp) +static inline void cpu_clone_regs(CPUS390XState *env, CPUS390XState *old_e= nv, + target_ulong newsp) { if (newsp) { env->regs[15] =3D newsp; diff --git a/linux-user/sh4/target_cpu.h b/linux-user/sh4/target_cpu.h index b0be9a2c1b..ca0d1bb0bb 100644 --- a/linux-user/sh4/target_cpu.h +++ b/linux-user/sh4/target_cpu.h @@ -19,7 +19,8 @@ #ifndef SH4_TARGET_CPU_H #define SH4_TARGET_CPU_H =20 -static inline void cpu_clone_regs(CPUSH4State *env, target_ulong newsp) +static inline void cpu_clone_regs(CPUSH4State *env, CPUSH4State *old_env, + target_ulong newsp) { if (newsp) { env->gregs[15] =3D newsp; diff --git a/linux-user/sparc/target_cpu.h b/linux-user/sparc/target_cpu.h index 1ffc0ae9f2..a92748cae3 100644 --- a/linux-user/sparc/target_cpu.h +++ b/linux-user/sparc/target_cpu.h @@ -20,7 +20,8 @@ #ifndef SPARC_TARGET_CPU_H #define SPARC_TARGET_CPU_H =20 -static inline void cpu_clone_regs(CPUSPARCState *env, target_ulong newsp) +static inline void cpu_clone_regs(CPUSPARCState *env, CPUSPARCState *old_e= nv, + target_ulong newsp) { if (newsp) { env->regwptr[22] =3D newsp; diff --git a/linux-user/tilegx/target_cpu.h b/linux-user/tilegx/target_cpu.h index d1aa5824f2..35100a3d43 100644 --- a/linux-user/tilegx/target_cpu.h +++ b/linux-user/tilegx/target_cpu.h @@ -19,7 +19,8 @@ #ifndef TILEGX_TARGET_CPU_H #define TILEGX_TARGET_CPU_H =20 -static inline void cpu_clone_regs(CPUTLGState *env, target_ulong newsp) +static inline void cpu_clone_regs(CPUTLGState *env, CPUTLGState *old_env, + target_ulong newsp) { if (newsp) { env->regs[TILEGX_R_SP] =3D newsp; diff --git a/linux-user/xtensa/target_cpu.h b/linux-user/xtensa/target_cpu.h index e31efe3ea0..0e9681e9f9 100644 --- a/linux-user/xtensa/target_cpu.h +++ b/linux-user/xtensa/target_cpu.h @@ -4,7 +4,8 @@ #ifndef XTENSA_TARGET_CPU_H #define XTENSA_TARGET_CPU_H =20 -static inline void cpu_clone_regs(CPUXtensaState *env, target_ulong newsp) +static inline void cpu_clone_regs(CPUXtensaState *env, CPUXtensaState *old= _env, + target_ulong newsp) { if (newsp) { env->regs[1] =3D newsp; diff --git a/linux-user/syscall.c b/linux-user/syscall.c index f7d0754c8d..80d7f3788e 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -5493,7 +5493,7 @@ static int do_fork(CPUArchState *env, unsigned int fl= ags, abi_ulong newsp, /* we create a new CPU instance. */ new_env =3D cpu_copy(env); /* Init regs that differ from the parent. */ - cpu_clone_regs(new_env, newsp); + cpu_clone_regs(new_env, env, newsp); new_cpu =3D ENV_GET_CPU(new_env); new_cpu->opaque =3D ts; ts->bprm =3D parent_ts->bprm; --=20 2.17.1 From nobody Tue May 7 05:10:42 2024 Delivered-To: importer@patchew.org Received-SPF: temperror (zoho.com: Error in retrieving data from DNS) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1557458976; cv=none; d=zoho.com; s=zohoarc; b=IWwA9zl4oKGz4bT9QD16vwBrfksbG9RBrWAushuyJoOjq9T9w1t9t5+UUuq8R3jsENARfT+OQdLg0MePAtgKG3BWoNFRu76LvanbbrjyUMO7HiJjPI7GdRKsbQqn7wF+rjR9pQJxIf2ql/+et1Vr5ObRN7jbGe5fp4NVJrhhvuI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557458976; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=ynany7TpuwIOWZBHNBqsv0L1yKHGvVYa7cOFengyx/8=; b=CxkTgFzLiBSCWW/MlMAs0EHDlSGt7r3O2CSwj1ZDV1hc4e5ZyFDnZl01pFM7FUIKceXFelonbXoAblFOKzBYwN28ql+c7cwCjLrOpNKDNJktIulSw4KCDQpKh6Ry0dpeht4zsXa0IV8CM30NyRgvUacL035p1PWB+srP2PZT5ok= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1557458976528765.4839081062097; Thu, 9 May 2019 20:29:36 -0700 (PDT) Received: from localhost ([127.0.0.1]:36126 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOwDp-000476-Cu for importer@patchew.org; Thu, 09 May 2019 23:29:21 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48076) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOwBr-0002wt-7D for qemu-devel@nongnu.org; Thu, 09 May 2019 23:27:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hOwBq-0001QX-EP for qemu-devel@nongnu.org; Thu, 09 May 2019 23:27:19 -0400 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]:35591) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hOwBq-0001PJ-9B for qemu-devel@nongnu.org; Thu, 09 May 2019 23:27:18 -0400 Received: by mail-pl1-x644.google.com with SMTP id g5so2133892plt.2 for ; Thu, 09 May 2019 20:27:18 -0700 (PDT) Received: from localhost.localdomain (97-113-13-231.tukw.qwest.net. [97.113.13.231]) by smtp.gmail.com with ESMTPSA id t26sm6259695pgk.62.2019.05.09.20.27.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 May 2019 20:27:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ynany7TpuwIOWZBHNBqsv0L1yKHGvVYa7cOFengyx/8=; b=yjT0simJO9u2OuwMQdQp6mWSIr/NSNxCUkdo/UGM6kQ7Lqqyfy1RVOjW9p0fcorW+o WgkEmCt874s6HU4n+oXj9Ub3A1J1ArN4erWkQAX8VuuNdf2+ZIV5prdaZei0I/O1Q9Xd adPuiLjPINlXBfZfqeNIRurnRQMBexi7csVqe8q8f4/TuZ4ILuqEyjB8Y8bssTIfnVol LJP1nVtK08TmONJQgF8Keon25pFt+iV+pScAKPrGJhYypyk4YSWkJyAgh9/Zd8q/u9dI L2S4Jxh6UWs7qSdrc+2eSl6MR1Zrpm+FJjVehn+WPfayu5rJryxAWQNkiK2dqNVuq1H/ frSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ynany7TpuwIOWZBHNBqsv0L1yKHGvVYa7cOFengyx/8=; b=h0EdQw9MUaMYUCX0KJQ5kiWralzkRtSxMBsI4X2aLdw2iEQWE5JK1jYkL/fFs83A8N PppyBecbinLG8exrqhYDfdtE+Pj/mFypPfSGILqtXc/gWRsr8TXMXRhKnN0bvTM0sF8z zd3/oirPmxpQ2KLRNRX0kwVxnbyHYd8ihp7cSFVH9j5ysK3L3514vxM3VLuH/EnoW5Pm ePxL4kXndzlQG7jzDushB/okjM9ElUlLl6M+00W3xtFvxnAmVqKX+07NDw7gjKtYSReZ gSgcf+dXrn16HntbAhWxtZ9OSNiaaq+bvMDEIDvWe1Dx5ZbJ6h0RIFbRQM9jzgJS+qzF b+XQ== X-Gm-Message-State: APjAAAUcguASXjzvcC+K/zvVf12K2uuHb9EwsoGz1w5qOAWF1xujkbJa FJQW8/vPvmN/3xnZ18AbfJCmqFTo00c= X-Google-Smtp-Source: APXvYqwMcKgpSE2r788iiQxW5LBAz7RRtw2q3ryosUWSzsWQSXeNhAYt9UCC0bgtg4hRItIe1ibQBA== X-Received: by 2002:a17:902:b412:: with SMTP id x18mr10205522plr.304.1557458836901; Thu, 09 May 2019 20:27:16 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 9 May 2019 20:27:05 -0700 Message-Id: <20190510032710.23910-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190510032710.23910-1-richard.henderson@linaro.org> References: <20190510032710.23910-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::644 Subject: [Qemu-devel] [PATCH v2 3/8] target/sparc: Define an enumeration for accessing env->regwptr X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: laurent@vivier.eu Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson --- target/sparc/cpu.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/target/sparc/cpu.h b/target/sparc/cpu.h index 85b9665ccc..08f7d1a3c6 100644 --- a/target/sparc/cpu.h +++ b/target/sparc/cpu.h @@ -31,6 +31,39 @@ =20 /*#define EXCP_INTERRUPT 0x100*/ =20 +/* Windowed register indexes. */ +enum { + WREG_O0, + WREG_O1, + WREG_O2, + WREG_O3, + WREG_O4, + WREG_O5, + WREG_O6, + WREG_O7, + + WREG_L0, + WREG_L1, + WREG_L2, + WREG_L3, + WREG_L4, + WREG_L5, + WREG_L6, + WREG_L7, + + WREG_I0, + WREG_I1, + WREG_I2, + WREG_I3, + WREG_I4, + WREG_I5, + WREG_I6, + WREG_I7, + + WREG_SP =3D WREG_O6, + WREG_FP =3D WREG_I6, +}; + /* trap definitions */ #ifndef TARGET_SPARC64 #define TT_TFAULT 0x01 --=20 2.17.1 From nobody Tue May 7 05:10:42 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1557459130; cv=none; d=zoho.com; s=zohoarc; b=mnKRKadhokg41WKbHH662DfzKkYJHhbRlrgqgtxNavZDDEVDfdqtXW7Zy+v6tajhCYollB5/Z7Q9xy2ShdZgMoyRe6u4IS/8QPW05iiNYMnRl7BVw6uqzG0CYDkFB9HiSAeH9W8iTmj5JifZrLMV1RJ9uBOvM72UUT9SXssOs2c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557459130; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=k6JHJxPH4SUjOY+2AFOQmSeRVHdVtcQpQvqTv9tIMgY=; b=Sb2NJ5tK9zC2mnOpiFMpXS1qdDyjGryHHzMKAcGREvoky+ggnjXoqlu6a5wft5oViFzxzVFvJB7WSv0VoOv5Ra6t/qFYflYJXTbpdMGYXMzZBDhYbnqmzmH3oWW2uA82CKRlmthYVpGtSmoKIrwzaGZwj2Wd7F7TpyihZIJgISM= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1557459130611473.5708101553746; Thu, 9 May 2019 20:32:10 -0700 (PDT) Received: from localhost ([127.0.0.1]:36174 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOwGO-00072n-Lw for importer@patchew.org; Thu, 09 May 2019 23:32:00 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48097) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOwBs-0002xn-Ax for qemu-devel@nongnu.org; Thu, 09 May 2019 23:27:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hOwBr-0001RR-FR for qemu-devel@nongnu.org; Thu, 09 May 2019 23:27:20 -0400 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]:40909) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hOwBr-0001Qh-A5 for qemu-devel@nongnu.org; Thu, 09 May 2019 23:27:19 -0400 Received: by mail-pg1-x544.google.com with SMTP id d31so2270413pgl.7 for ; Thu, 09 May 2019 20:27:19 -0700 (PDT) Received: from localhost.localdomain (97-113-13-231.tukw.qwest.net. [97.113.13.231]) by smtp.gmail.com with ESMTPSA id t26sm6259695pgk.62.2019.05.09.20.27.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 May 2019 20:27:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=k6JHJxPH4SUjOY+2AFOQmSeRVHdVtcQpQvqTv9tIMgY=; b=qy0i2ErqsZmVU4FeGmusySdXgZApMG8P7vPdmyhVVVbwMiLPsZcCYSG8L54/gcG1SY QMxagzZ6nWUSbaI5u8FMKEU1JkoUV1bNEfiSbW0gcobxqYZym17ysMcvZxZWobbCS0ln pAKqB8qVF8vRx5GtIUbrKELrqaV4DFrYRs1oa7RbNZke4wYf4++QFTABTAHzCff6bR+1 FZFamuSIp/o78Q6oKpwQSv8Hz1wPJZIAa/Z/MGYltiN0fH9DIg1UHTFRcekD+zSBnm+G c2bf0/GEcZuUkHwEN7gzaFubBELbggJuJyzBNUoNt3n6sTgUIfNG435kp6pSXCo0UF4L pJ5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=k6JHJxPH4SUjOY+2AFOQmSeRVHdVtcQpQvqTv9tIMgY=; b=OS7ZOK4UrEsX+hBWcJiTAVzfY2NaC+l267a0GY2GKUNSTWaGeiUld78L5Ggjpto6wK faVWaPzlKsZzy6uSoaRGmpz467bhNyftosUQoFjU8jsFQWOBYGS+HP+eq1AALS15lFOV l8Uvq8Dr6nRcibzhStsu7D+56iBOUnigpmVgX7o93Tdir6amw52b1F/7guHdN9wqpGO/ 29GHOK6gbtuBs+8Yz30Hj+4ZbmssJ7c1lHzvR5UaAqLHUpNKIAfx/3JorjhrAEjQspyK eINeIESQ7rmV6O/+iwag8UHdNXzO6+MQf5kt4r3PbhJHzclfp5rWKrye+g1UvD8kek8u qEpg== X-Gm-Message-State: APjAAAVVmvmGBwkdd2ds1FytYmdHsZ4utw4+kgfL1tX0EEsdf8MkgA1d t5/LiTNT/X5gsllt1Khq2d9NlkTcE58= X-Google-Smtp-Source: APXvYqzlzM2QphKzoQxKlRKN5Jqzl7swgU+hLInPJHAaszF3+U6eah4dB9FBrgWcCCc/snseAtVSdQ== X-Received: by 2002:a63:cf:: with SMTP id 198mr10410723pga.228.1557458838080; Thu, 09 May 2019 20:27:18 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 9 May 2019 20:27:06 -0700 Message-Id: <20190510032710.23910-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190510032710.23910-1-richard.henderson@linaro.org> References: <20190510032710.23910-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::544 Subject: [Qemu-devel] [PATCH v2 4/8] linux-user/sparc: Use WREG constants in sparc/target_cpu.h X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: laurent@vivier.eu Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" This fixes a naming bug wherein we used "UREG_FP" to access the stack pointer. OTOH, the "UREG_FP" constant was also defined incorrectly such that it *did* reference the stack pointer. Signed-off-by: Richard Henderson --- linux-user/sparc/target_cpu.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/linux-user/sparc/target_cpu.h b/linux-user/sparc/target_cpu.h index a92748cae3..567351d564 100644 --- a/linux-user/sparc/target_cpu.h +++ b/linux-user/sparc/target_cpu.h @@ -42,15 +42,9 @@ static inline void cpu_set_tls(CPUSPARCState *env, targe= t_ulong newtls) env->gregs[7] =3D newtls; } =20 -#ifndef UREG_I6 -#define UREG_I6 6 -#endif -#ifndef UREG_FP -#define UREG_FP UREG_I6 -#endif - static inline abi_ulong get_sp_from_cpustate(CPUSPARCState *state) { - return state->regwptr[UREG_FP]; + return state->regwptr[WREG_SP]; } + #endif --=20 2.17.1 From nobody Tue May 7 05:10:42 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1557459132; cv=none; d=zoho.com; s=zohoarc; b=RbWkcq6/QstqWVv5C/gvk82Fa/7nJzfRBwEkvZO6h+cnlpPMOpvxdQ3Ko06nWRzFVmrJTWApe+FAr41RN4bwdi5dRtT2eZSkOG9N+H4+pZmlnX9vvMO3VwuIDgyPUMw3rsT56zihWNQCa1OPlkVqMS4uj+e9zuRwOALh5FeI6lM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557459132; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=Ad7p0XpmVmGXkoTgniD57oGcto4g8MS55uU7nmfGDcA=; b=KBXXfsiyFIJeaTFebsRe9tjffYM/JPsgfZF+nI3vm/4tkXqIaasurAEzTOlA5C206TBZHkdav2X3yqdaMU1PdieHHoVILkErsb1mS2/amEAwtWuG4rj3lqPj4Re6DW2GES5VPfSLmBP6V65kpIIIt/Tk3+0c4LmSjLWzjeFKFaM= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1557459132638803.6082327780989; Thu, 9 May 2019 20:32:12 -0700 (PDT) Received: from localhost ([127.0.0.1]:36178 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOwGX-00077P-If for importer@patchew.org; Thu, 09 May 2019 23:32:09 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48113) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOwBu-0002zm-AA for qemu-devel@nongnu.org; Thu, 09 May 2019 23:27:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hOwBs-0001S3-TV for qemu-devel@nongnu.org; Thu, 09 May 2019 23:27:22 -0400 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]:35104) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hOwBs-0001Rh-Lo for qemu-devel@nongnu.org; Thu, 09 May 2019 23:27:20 -0400 Received: by mail-pg1-x543.google.com with SMTP id h1so2280575pgs.2 for ; Thu, 09 May 2019 20:27:20 -0700 (PDT) Received: from localhost.localdomain (97-113-13-231.tukw.qwest.net. [97.113.13.231]) by smtp.gmail.com with ESMTPSA id t26sm6259695pgk.62.2019.05.09.20.27.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 May 2019 20:27:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Ad7p0XpmVmGXkoTgniD57oGcto4g8MS55uU7nmfGDcA=; b=q0hnwXp9Tfw4d5QG11EwUDzE9zUw5uI0Lx0bbdh1ZLV/YfvOwwvjuBPieBDcf9GQhn pMgMZKZBLIYtvWB3BvOOg8KrPsB7dNADCc+7Jp0K0f0GLmtjdfKydLZTvz1oTB112DCP rGB14g8vUMD8tA6OLnxM9u5DfY75mKOItvD80QGk7AFP1IbkKgAWzS0L8T4BhTGEdEK7 x8zP08o4ZS/a844dap/gyeDANVF4ZTf6hXo8kW9BCIZVK5IHY1QPBABUv7tVzXC65TWG 2KIlDz8QK0D7b/Oviw40/7S7qFX098biMlm41YPDSPKlbWOJzIGfwwbbglvezOyGjZ9d wNLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Ad7p0XpmVmGXkoTgniD57oGcto4g8MS55uU7nmfGDcA=; b=NNpiCP0/biSaqi6pQrnNfq0QnK0DZtGpzfomBzZfys1R2ME5zTIPfU1eXQHmGXXQJL +QjskRnXyT6wV5wHwzv08cutjDgRpd199oIyaAipdQBNjDYBXFxBouzvI353NJ85BG+A JgK/j4Enm1sKbHgQdlQ7gqHA31Iz9f4/wPTD30Mvs67LTSAfZfwDt5zufkX76PUGna++ wvdizzbgwt9yY2Xzxvjxr8jepqeXWmfLOWT1kPd7fXsTehnIE4v9XRqJmsgTq5/b2+Fp u3RMVQJBow2d4Y3cRs8rGimkqlXp/5vYsjZ+gMg3xPI5T4RJ0E9glKbR5XvMrdxisxP/ ehcw== X-Gm-Message-State: APjAAAV5UDADh50HNIY7x4OnwfJKFdiSoQIYm7h2I2iUiEbJqyw91bI+ dtbrQNszN4/CozWf6EONwVwVSJP+N0Q= X-Google-Smtp-Source: APXvYqzGEkQlut5b0Raaz8TykR12mjwVrW4Zg+IC0C1Cy6hyTJATLgpMevUqgFU/lAFLC5/B/TyS/A== X-Received: by 2002:aa7:82cd:: with SMTP id f13mr10522384pfn.203.1557458839287; Thu, 09 May 2019 20:27:19 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 9 May 2019 20:27:07 -0700 Message-Id: <20190510032710.23910-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190510032710.23910-1-richard.henderson@linaro.org> References: <20190510032710.23910-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::543 Subject: [Qemu-devel] [PATCH v2 5/8] linux-user/sparc: Use WREG constants in sparc/signal.c X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: laurent@vivier.eu Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Remove the incorrectly defined UREG constants. Maddeningly, in some cases we used the correct constant getting the env register wrong, and in other cases we used the incorrect constant getting the env register right. In the case of getcontext/setcontext, we are aided by the fact that the "other" constant, e.g. SPARC_MC_O0, is correct. So we can easily guess that the WREG_* constant on the other side should also be O0. Signed-off-by: Richard Henderson --- linux-user/sparc/signal.c | 96 +++++++++++++-------------------------- 1 file changed, 32 insertions(+), 64 deletions(-) diff --git a/linux-user/sparc/signal.c b/linux-user/sparc/signal.c index ead169fbaa..243f237528 100644 --- a/linux-user/sparc/signal.c +++ b/linux-user/sparc/signal.c @@ -104,20 +104,6 @@ struct target_rt_signal_frame { qemu_siginfo_fpu_t fpu_state; }; =20 -#define UREG_O0 16 -#define UREG_O6 22 -#define UREG_I0 0 -#define UREG_I1 1 -#define UREG_I2 2 -#define UREG_I3 3 -#define UREG_I4 4 -#define UREG_I5 5 -#define UREG_I6 6 -#define UREG_I7 7 -#define UREG_L0 8 -#define UREG_FP UREG_I6 -#define UREG_SP UREG_O6 - static inline abi_ulong get_sigframe(struct target_sigaction *sa,=20 CPUSPARCState *env, unsigned long framesize) @@ -159,30 +145,12 @@ setup___siginfo(__siginfo_t *si, CPUSPARCState *env, = abi_ulong mask) __put_user(env->gregs[i], &si->si_regs.u_regs[i]); } for (i=3D0; i < 8; i++) { - __put_user(env->regwptr[UREG_I0 + i], &si->si_regs.u_regs[i+8]); + __put_user(env->regwptr[WREG_O0 + i], &si->si_regs.u_regs[i+8]); } __put_user(mask, &si->si_mask); return err; } =20 -#if 0 -static int -setup_sigcontext(struct target_sigcontext *sc, /*struct _fpstate *fpstate,= */ - CPUSPARCState *env, unsigned long mask) -{ - int err =3D 0; - - __put_user(mask, &sc->sigc_mask); - __put_user(env->regwptr[UREG_SP], &sc->sigc_sp); - __put_user(env->pc, &sc->sigc_pc); - __put_user(env->npc, &sc->sigc_npc); - __put_user(env->psr, &sc->sigc_psr); - __put_user(env->gregs[1], &sc->sigc_g1); - __put_user(env->regwptr[UREG_O0], &sc->sigc_o0); - - return err; -} -#endif #define NF_ALIGNEDSZ (((sizeof(struct target_signal_frame) + 7) & (~7))) =20 void setup_frame(int sig, struct target_sigaction *ka, @@ -221,20 +189,20 @@ void setup_frame(int sig, struct target_sigaction *ka, } =20 for (i =3D 0; i < 8; i++) { - __put_user(env->regwptr[i + UREG_L0], &sf->ss.locals[i]); + __put_user(env->regwptr[i + WREG_L0], &sf->ss.locals[i]); } for (i =3D 0; i < 8; i++) { - __put_user(env->regwptr[i + UREG_I0], &sf->ss.ins[i]); + __put_user(env->regwptr[i + WREG_I0], &sf->ss.ins[i]); } if (err) goto sigsegv; =20 /* 3. signal handler back-trampoline and parameters */ - env->regwptr[UREG_FP] =3D sf_addr; - env->regwptr[UREG_I0] =3D sig; - env->regwptr[UREG_I1] =3D sf_addr + + env->regwptr[WREG_FP] =3D sf_addr; + env->regwptr[WREG_I0] =3D sig; + env->regwptr[WREG_I1] =3D sf_addr + offsetof(struct target_signal_frame, info); - env->regwptr[UREG_I2] =3D sf_addr + + env->regwptr[WREG_I2] =3D sf_addr + offsetof(struct target_signal_frame, info); =20 /* 4. signal handler */ @@ -242,11 +210,11 @@ void setup_frame(int sig, struct target_sigaction *ka, env->npc =3D (env->pc + 4); /* 5. return to kernel instructions */ if (ka->ka_restorer) { - env->regwptr[UREG_I7] =3D ka->ka_restorer; + env->regwptr[WREG_I7] =3D ka->ka_restorer; } else { uint32_t val32; =20 - env->regwptr[UREG_I7] =3D sf_addr + + env->regwptr[WREG_I7] =3D sf_addr + offsetof(struct target_signal_frame, insns) - 2 * 4; =20 /* mov __NR_sigreturn, %g1 */ @@ -284,7 +252,7 @@ long do_sigreturn(CPUSPARCState *env) sigset_t host_set; int i; =20 - sf_addr =3D env->regwptr[UREG_FP]; + sf_addr =3D env->regwptr[WREG_SP]; trace_user_do_sigreturn(env, sf_addr); if (!lock_user_struct(VERIFY_READ, sf, sf_addr, 1)) { goto segv_and_exit; @@ -316,7 +284,7 @@ long do_sigreturn(CPUSPARCState *env) __get_user(env->gregs[i], &sf->info.si_regs.u_regs[i]); } for (i=3D0; i < 8; i++) { - __get_user(env->regwptr[i + UREG_I0], &sf->info.si_regs.u_regs[i+8= ]); + __get_user(env->regwptr[i + WREG_O0], &sf->info.si_regs.u_regs[i+8= ]); } =20 /* FIXME: implement FPU save/restore: @@ -433,7 +401,7 @@ void sparc64_set_context(CPUSPARCState *env) abi_ulong fp, i7, w_addr; unsigned int i; =20 - ucp_addr =3D env->regwptr[UREG_I0]; + ucp_addr =3D env->regwptr[WREG_O0]; if (!lock_user_struct(VERIFY_READ, ucp, ucp_addr, 1)) { goto do_sigsegv; } @@ -443,7 +411,7 @@ void sparc64_set_context(CPUSPARCState *env) if ((pc | npc) & 3) { goto do_sigsegv; } - if (env->regwptr[UREG_I1]) { + if (env->regwptr[WREG_O1]) { target_sigset_t target_set; sigset_t set; =20 @@ -474,19 +442,19 @@ void sparc64_set_context(CPUSPARCState *env) __get_user(env->gregs[5], (&(*grp)[SPARC_MC_G5])); __get_user(env->gregs[6], (&(*grp)[SPARC_MC_G6])); __get_user(env->gregs[7], (&(*grp)[SPARC_MC_G7])); - __get_user(env->regwptr[UREG_I0], (&(*grp)[SPARC_MC_O0])); - __get_user(env->regwptr[UREG_I1], (&(*grp)[SPARC_MC_O1])); - __get_user(env->regwptr[UREG_I2], (&(*grp)[SPARC_MC_O2])); - __get_user(env->regwptr[UREG_I3], (&(*grp)[SPARC_MC_O3])); - __get_user(env->regwptr[UREG_I4], (&(*grp)[SPARC_MC_O4])); - __get_user(env->regwptr[UREG_I5], (&(*grp)[SPARC_MC_O5])); - __get_user(env->regwptr[UREG_I6], (&(*grp)[SPARC_MC_O6])); - __get_user(env->regwptr[UREG_I7], (&(*grp)[SPARC_MC_O7])); + __get_user(env->regwptr[WREG_O0], (&(*grp)[SPARC_MC_O0])); + __get_user(env->regwptr[WREG_O1], (&(*grp)[SPARC_MC_O1])); + __get_user(env->regwptr[WREG_O2], (&(*grp)[SPARC_MC_O2])); + __get_user(env->regwptr[WREG_O3], (&(*grp)[SPARC_MC_O3])); + __get_user(env->regwptr[WREG_O4], (&(*grp)[SPARC_MC_O4])); + __get_user(env->regwptr[WREG_O5], (&(*grp)[SPARC_MC_O5])); + __get_user(env->regwptr[WREG_O6], (&(*grp)[SPARC_MC_O6])); + __get_user(env->regwptr[WREG_O7], (&(*grp)[SPARC_MC_O7])); =20 __get_user(fp, &(ucp->tuc_mcontext.mc_fp)); __get_user(i7, &(ucp->tuc_mcontext.mc_i7)); =20 - w_addr =3D TARGET_STACK_BIAS+env->regwptr[UREG_I6]; + w_addr =3D TARGET_STACK_BIAS + env->regwptr[WREG_FP]; if (put_user(fp, w_addr + offsetof(struct target_reg_window, ins[6]), abi_ulong) !=3D 0) { goto do_sigsegv; @@ -534,7 +502,7 @@ void sparc64_get_context(CPUSPARCState *env) target_sigset_t target_set; sigset_t set; =20 - ucp_addr =3D env->regwptr[UREG_I0]; + ucp_addr =3D env->regwptr[WREG_O0]; if (!lock_user_struct(VERIFY_WRITE, ucp, ucp_addr, 0)) { goto do_sigsegv; } @@ -580,16 +548,16 @@ void sparc64_get_context(CPUSPARCState *env) __put_user(env->gregs[5], &((*grp)[SPARC_MC_G5])); __put_user(env->gregs[6], &((*grp)[SPARC_MC_G6])); __put_user(env->gregs[7], &((*grp)[SPARC_MC_G7])); - __put_user(env->regwptr[UREG_I0], &((*grp)[SPARC_MC_O0])); - __put_user(env->regwptr[UREG_I1], &((*grp)[SPARC_MC_O1])); - __put_user(env->regwptr[UREG_I2], &((*grp)[SPARC_MC_O2])); - __put_user(env->regwptr[UREG_I3], &((*grp)[SPARC_MC_O3])); - __put_user(env->regwptr[UREG_I4], &((*grp)[SPARC_MC_O4])); - __put_user(env->regwptr[UREG_I5], &((*grp)[SPARC_MC_O5])); - __put_user(env->regwptr[UREG_I6], &((*grp)[SPARC_MC_O6])); - __put_user(env->regwptr[UREG_I7], &((*grp)[SPARC_MC_O7])); + __put_user(env->regwptr[WREG_O0], &((*grp)[SPARC_MC_O0])); + __put_user(env->regwptr[WREG_O1], &((*grp)[SPARC_MC_O1])); + __put_user(env->regwptr[WREG_O2], &((*grp)[SPARC_MC_O2])); + __put_user(env->regwptr[WREG_O3], &((*grp)[SPARC_MC_O3])); + __put_user(env->regwptr[WREG_O4], &((*grp)[SPARC_MC_O4])); + __put_user(env->regwptr[WREG_O5], &((*grp)[SPARC_MC_O5])); + __put_user(env->regwptr[WREG_O6], &((*grp)[SPARC_MC_O6])); + __put_user(env->regwptr[WREG_O7], &((*grp)[SPARC_MC_O7])); =20 - w_addr =3D TARGET_STACK_BIAS+env->regwptr[UREG_I6]; + w_addr =3D TARGET_STACK_BIAS + env->regwptr[WREG_FP]; fp =3D i7 =3D 0; if (get_user(fp, w_addr + offsetof(struct target_reg_window, ins[6]), abi_ulong) !=3D 0) { --=20 2.17.1 From nobody Tue May 7 05:10:42 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1557458976; cv=none; d=zoho.com; s=zohoarc; b=olj/iv3qty1I6dx+St9Ct3Bh+h1SdyS49/A7vAkMDeJPpV37+HdPfKTudARJSD2aCsXq7u+DUYHTxkgIcWL/nZ+D9YnyxWrgzrysv+6CIZRVkT3Rj/5ta2qrMwpi1TsBMgh1Ss4XUEsjPxRB/J6vFBVKLEgAP9o+SVu6sld+K9c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557458976; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=dB9naD8XYt7AtlbN9T/W2D2B/j/Ax2scb9z0hcM/3hI=; b=bW6KeVRNtUuMGcE94pnIAC0GQKyxYgSVTFZlF6B9mwXs8OSwVhTlxeL47dOX/x6Ew/Ru8blMmUZnrFS9Hjp9gJADCvZI8L6ahlzQ1x+NIlB4LOH3pOe9Qz+540hJsXe42tX6hzFz6uyTeTHJq05zD1XOBIxooVoJKu6xBTrSKBk= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1557458976098217.3736729773599; Thu, 9 May 2019 20:29:36 -0700 (PDT) Received: from localhost ([127.0.0.1]:36128 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOwDv-0004Bl-3G for importer@patchew.org; Thu, 09 May 2019 23:29:27 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48117) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOwBu-00030H-QU for qemu-devel@nongnu.org; Thu, 09 May 2019 23:27:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hOwBt-0001Sd-SW for qemu-devel@nongnu.org; Thu, 09 May 2019 23:27:22 -0400 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]:35589) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hOwBt-0001SI-NE for qemu-devel@nongnu.org; Thu, 09 May 2019 23:27:21 -0400 Received: by mail-pl1-x641.google.com with SMTP id g5so2133963plt.2 for ; Thu, 09 May 2019 20:27:21 -0700 (PDT) Received: from localhost.localdomain (97-113-13-231.tukw.qwest.net. [97.113.13.231]) by smtp.gmail.com with ESMTPSA id t26sm6259695pgk.62.2019.05.09.20.27.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 May 2019 20:27:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=dB9naD8XYt7AtlbN9T/W2D2B/j/Ax2scb9z0hcM/3hI=; b=m3jv+bsahW28jCHcbKpzohUtOdPkYK7q8eZnPVQW7aSDBZTwJXydlhMlSuGAvbeTck wJV28h8VS0IHTiDiVXVwWV+/dPZzZwn3fuySms7kdUJP2ay635//MNzuaC4MV9HZNs+2 /j/7pYo7FdkLstxY2yX3U9TUpCju3XPKSDJbqyi8L6dfgw2pzp+x6it5QRFTwgn9HNOB XF4OMIbbJZIZ3pVPK53yJ1B6SPfVQ/3PNGWRFFPrAXlUC+PsVgm9B/gUnJ6aTkThYcK+ RgtF4b7alkCTPik6QsqdKUzcm8YgEa5LVoeF70OaIdqBC8JGbPuo7vgB183aigzOTtDj WNVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=dB9naD8XYt7AtlbN9T/W2D2B/j/Ax2scb9z0hcM/3hI=; b=J0k3w4lugu15hKiLTxC+bW39RQ2y1AiE0PFKVLfIO8xr4OXx2cBrG1KOVhaCx8E7bw LTfRMnpBny483DIl6bpqZl8RLLXVA3Two1dhJa4zNDLG1Pnew4C1f0as5whKnQtQo6/c gY5noggOiXa2VnYXAVXvyG8k64qzZ6QHuE3NipJVcX3ImQTXGhetyFwl189xuKldOXn8 g+vs/FDBHK6r0363RO+T5bjwoQ4BWAzWmLB2rCSz2guwe8+fQp7G6KQx38eg80aKKvzO gRff3QR6vsDNch8wtigrn8omSSsRkrj1s69TPAHi+MzIq51hGd+qg8cuFsJONe8m3V/q O33w== X-Gm-Message-State: APjAAAXSbsCTOqkUICfIdUsont9nHEp67oxlVr+/cR0cOGm6g/fvh+PJ SxBkp4EULsEnEV09FBA3SBzmw0AK07s= X-Google-Smtp-Source: APXvYqxYeWfXMHxI6n/tRxUmTiYLic6CDqqKbz1m0kpBUBd+zkZDUjqH09xIUjOo2y/XXnkdf+kxuQ== X-Received: by 2002:a17:902:be09:: with SMTP id r9mr10113624pls.215.1557458840529; Thu, 09 May 2019 20:27:20 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 9 May 2019 20:27:08 -0700 Message-Id: <20190510032710.23910-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190510032710.23910-1-richard.henderson@linaro.org> References: <20190510032710.23910-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::641 Subject: [Qemu-devel] [PATCH v2 6/8] linux-user/sparc: Fix cpu_clone_regs X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: laurent@vivier.eu Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" We failed to set the secondary return value in %o1 we failed to advance the PC past the syscall, we failed to adjust regwptr into the new structure, we stored the stack pointer into the wrong register. Signed-off-by: Richard Henderson --- linux-user/sparc/target_cpu.h | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/linux-user/sparc/target_cpu.h b/linux-user/sparc/target_cpu.h index 567351d564..bbcb3a92ed 100644 --- a/linux-user/sparc/target_cpu.h +++ b/linux-user/sparc/target_cpu.h @@ -23,18 +23,34 @@ static inline void cpu_clone_regs(CPUSPARCState *env, CPUSPARCState *old_e= nv, target_ulong newsp) { - if (newsp) { - env->regwptr[22] =3D newsp; - } - /* syscall return for clone child: 0, and clear CF since - * this counts as a success return value. + /* + * After cpu_copy, env->regwptr is pointing into old_env. + * Update the new cpu to use its own register window. */ - env->regwptr[0] =3D 0; + env->regwptr =3D env->regbase + (env->cwp * 16); + + /* Set a new stack, if requested. */ + if (newsp) { + env->regwptr[WREG_SP] =3D newsp; + } + + /* + * Syscall return for clone child: %o0 =3D 0 and clear CF since + * this counts as a success return value. %o1 =3D 1 to indicate + * this is the child. Advance the PC past the syscall. + */ + env->regwptr[WREG_O0] =3D 0; #if defined(TARGET_SPARC64) && !defined(TARGET_ABI32) env->xcc &=3D ~PSR_CARRY; #else env->psr &=3D ~PSR_CARRY; #endif + env->regwptr[WREG_O1] =3D 1; + env->pc =3D env->npc; + env->npc =3D env->npc + 4; + + /* Set the second return value for the parent: %o1 =3D 0. */ + old_env->regwptr[WREG_O1] =3D 0; } =20 static inline void cpu_set_tls(CPUSPARCState *env, target_ulong newtls) --=20 2.17.1 From nobody Tue May 7 05:10:42 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1557459253; cv=none; d=zoho.com; s=zohoarc; b=LZ60/Jm1W7siN3j9WfUxpLTwu1UT2xsKz/PvPy09TAf35IXmJajoyPrAJ3brsSuutUMW+k3qaOUX/E1KWtw6vgQbcoeaQNlyEKICmU3bGHg3/3hW5+zyq4mLDcUyi7HBIKJ7Z1rHF9B+qOkw5JObQSEe4yElOn00piCr4MFIhiI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557459253; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=rcqQ5gZYdNhdYCOJ+I4S1mR1Qz6k+Xi4o1Wh52SYzeo=; b=lz0m33u2VqIjtU793wzabY8nXsucD4P6M2KRSTD9BmPpgZbjdlY2iQa8kuVyen3kNjTFKqFoW+tBxRyNQXxIHyACk50LWn2Pajr5VPCxFs82EG1JP353nd0jqSaKOanLdWqjZZeNetv5EnH1JJv6/QLf405K6e8SuPmyee03X/M= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1557459253889549.7495063422646; Thu, 9 May 2019 20:34:13 -0700 (PDT) Received: from localhost ([127.0.0.1]:36192 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOwIS-0008UF-0K for importer@patchew.org; Thu, 09 May 2019 23:34:08 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48133) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOwBw-00031X-1V for qemu-devel@nongnu.org; Thu, 09 May 2019 23:27:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hOwBv-0001T7-90 for qemu-devel@nongnu.org; Thu, 09 May 2019 23:27:24 -0400 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]:34885) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hOwBv-0001Sw-3g for qemu-devel@nongnu.org; Thu, 09 May 2019 23:27:23 -0400 Received: by mail-pf1-x441.google.com with SMTP id t87so2423003pfa.2 for ; Thu, 09 May 2019 20:27:23 -0700 (PDT) Received: from localhost.localdomain (97-113-13-231.tukw.qwest.net. [97.113.13.231]) by smtp.gmail.com with ESMTPSA id t26sm6259695pgk.62.2019.05.09.20.27.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 May 2019 20:27:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=rcqQ5gZYdNhdYCOJ+I4S1mR1Qz6k+Xi4o1Wh52SYzeo=; b=ej0UQFe4T0IG8uCDEXGBKcgijTK5WJKqQYejGlybedav4ebsRY+aX/qjh8fu5SBdvp PfLyPTBTBk/34NeOPt70DCH5+5vl9xRVvtFox+XhVzl0IPjGzrTJSvEH0Z70Lzx9/YbO yDzdsaPMa4ZMiI+KiZK3/sN4ghV5qXD669tjbfGrzDDjw2w7/D1rmdwvMumVa7jq9HGH h91vAGxPZbQJlq1ZImU/oh2wMjyv60HI33I9WYUXPzs6N7mHHzncZ9GedjfyZ5WdAwc0 zQ82TBEds158PmuEuTEWcjLqFcZiAImCT6rHf0j2AjAbwlK4xrQmY1Av0adXTsFUEvry vUMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=rcqQ5gZYdNhdYCOJ+I4S1mR1Qz6k+Xi4o1Wh52SYzeo=; b=V/wKb9dRmXD+s5NtLM5ye5kS865h/Ylf/X34r/y4NGorSJRmGoDHXMjarXpWO80Zgu tthCWXPyXytinNs2amBRmm79uJirNPIa/6Z0c1ILy5t7burUHTcGvrUC0xgJgJJEZd1H 9AudL7l4wRH9OOXxdmCsikXtLqVuztK1dvR4S/iS3sZQyFshx/NOBJ1E4aCuiFXxYuuC eGN4EUiG+Wt7DKdC1CYFpKEwz5ujHTvjPVysEYQi8qbzewZm4LWMogFHK82Yy0Xv+GRC 8rOnG2tcdSxNchZhZpnvjGLrRTcoYhcwc6AgcBldpweJnYziBnxQZ93Mx5OP7XErGrNQ EcFA== X-Gm-Message-State: APjAAAXGyZesn3WF6/N8humBMEqz2t9a4Km2xhlUMcKseha1ePekvS7j +MWJUNjvqUPkU+Rsifh4/sQaay1GZn8= X-Google-Smtp-Source: APXvYqx/VWcPw43nD+s3P1bGuPfv7IkCz9Z43BTGEJ9Y4sXENIT/zBxqPUEYExdpRXK5wDqcTIF0IA== X-Received: by 2002:aa7:98c6:: with SMTP id e6mr10647385pfm.191.1557458841783; Thu, 09 May 2019 20:27:21 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 9 May 2019 20:27:09 -0700 Message-Id: <20190510032710.23910-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190510032710.23910-1-richard.henderson@linaro.org> References: <20190510032710.23910-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::441 Subject: [Qemu-devel] [PATCH v2 7/8] linux-user/sparc: Flush register windows before clone X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: laurent@vivier.eu Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" As seen as the very first instruction of sys_clone in the kernel. Ideally this would be done in or before cpu_copy, and not with a separate explicit test vs the syscall number, but this is a more minimal solution. Signed-off-by: Richard Henderson --- linux-user/sparc/cpu_loop.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/linux-user/sparc/cpu_loop.c b/linux-user/sparc/cpu_loop.c index 9e357229c0..ff04f67847 100644 --- a/linux-user/sparc/cpu_loop.c +++ b/linux-user/sparc/cpu_loop.c @@ -169,6 +169,9 @@ void cpu_loop (CPUSPARCState *env) case 0x110: case 0x16d: #endif + if (env->gregs[1] =3D=3D TARGET_NR_clone) { + flush_windows(env); + } ret =3D do_syscall (env, env->gregs[1], env->regwptr[0], env->regwptr[1], env->regwptr[2], env->regwptr[3], --=20 2.17.1 From nobody Tue May 7 05:10:42 2024 Delivered-To: importer@patchew.org Received-SPF: temperror (zoho.com: Error in retrieving data from DNS) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1557459337; cv=none; d=zoho.com; s=zohoarc; b=R9m7sLMtbuiy2rFlRRL72l73165oqJUhqFE2WkeeWTIMavSanuAMA5N25ipuAHSaS4XQ61wDm7pL/Upp4GGl/8IhInSdC/0XCUxcOsm1js6MCxhWMgliVVGlZQJvS92V6CjCh8VER0imHNii6aa6eOF14EvNX7RMq1yZCPrzM5A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557459337; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=OghAJHs3fOQNasKs983B96RGcVieroO+wnBU19gV5SI=; b=jdKW3cgbTzqii2N0TXb1/dyh+bTEuOi1KdHy0TzmLDa4bdxz4+Ix7ATSQCv9vki7v+lNMTs+cdpPVdmblCKJ5zhXmB++bSBMndyrD3IRi19wcaIYsakfy0YcxcX5nRxLf9IV+DwfeRaZW5eGFOSAvDX8gz6QEWphpBFOHKNNcP0= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1557459337556802.2053118908756; Thu, 9 May 2019 20:35:37 -0700 (PDT) Received: from localhost ([127.0.0.1]:36225 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOwJe-0000ef-IV for importer@patchew.org; Thu, 09 May 2019 23:35:22 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48145) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOwBx-00032Y-6k for qemu-devel@nongnu.org; Thu, 09 May 2019 23:27:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hOwBw-0001TW-A7 for qemu-devel@nongnu.org; Thu, 09 May 2019 23:27:25 -0400 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]:40762) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hOwBw-0001TH-4p for qemu-devel@nongnu.org; Thu, 09 May 2019 23:27:24 -0400 Received: by mail-pf1-x443.google.com with SMTP id u17so2409906pfn.7 for ; Thu, 09 May 2019 20:27:24 -0700 (PDT) Received: from localhost.localdomain (97-113-13-231.tukw.qwest.net. [97.113.13.231]) by smtp.gmail.com with ESMTPSA id t26sm6259695pgk.62.2019.05.09.20.27.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 May 2019 20:27:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=OghAJHs3fOQNasKs983B96RGcVieroO+wnBU19gV5SI=; b=PnYmgQL03LGX3nHHWTGEAqZm2Xjw1H5oyBj7ORW+hayqyWHNHTwW9m2vDfd7Xtu4dy SEZ/rMJxkfvAHLVfDpkm0gsYmS4gShE4gAY+ZBIcbC/CjlO7KhaFh5FVRufxP60GkxCW jE4bNMyBUDNbAUpLtQlzN+TvAFrf9w/qPI3kdKbdZfW1Xd/DagbF/00gY/jCTu7UawNl FqS9iuXtD3XamC4lLO1utId4vn5OgnGL0T4WHZS13E0A7b9UljUP2+syyS95bqYZenVR lIfsOvAvwf2IXXIW+PHw2XCLpOjrctvku1R2MHlDQcipDep5GYGiXszyqnKleibyE9YS maDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=OghAJHs3fOQNasKs983B96RGcVieroO+wnBU19gV5SI=; b=EQTSE7yXHb06q10+TZrrWw1NNQ/nVyAI/2EhSxwp+LmBCWm+udj4tZj+50zdswAxrj xa8NDC5Hh5Dy2if3nzeeQ9GFq7B8zox4Nhmn77myX9FiGBBCW2sLI+CmEif/sD4gBXol j5lEnZZ+IJk7b/XDzfoJ7RqecfK3rUxOIMsEWWHkqOOpMSY7JByhrsoyX4lO5p7kxvCx k4v0dvngiczpFbir3wf2HdAhaXVRze27LwGWfRVJ8mJqjdeZmKKVAYL0KemWeu99I2/j i0GVeCm6pAfK2/O1FVgPubV26KfgAuNsIyjF3c/RbqK8VR6z/jjN0FhibS1x8tjXSyU+ pEUg== X-Gm-Message-State: APjAAAXzHiUP65H9INOS4Ss9TenVrwdOl842XvjpM2J2ueqyXeUA18IP PQuzgo86hsECAyI5fWjUwGiRbj7QSt8= X-Google-Smtp-Source: APXvYqzDNwh1zlA5lu1LLAGKzQlw+HSJT4/vOTRPlQ0Xpzyva+m/aKDtMDKtDafglc0BXoG1aZ74Cg== X-Received: by 2002:a62:5ec4:: with SMTP id s187mr10737284pfb.185.1557458842987; Thu, 09 May 2019 20:27:22 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 9 May 2019 20:27:10 -0700 Message-Id: <20190510032710.23910-9-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190510032710.23910-1-richard.henderson@linaro.org> References: <20190510032710.23910-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::443 Subject: [Qemu-devel] [PATCH v2 8/8] scripts/qemu-binfmt-conf: Update for sparc64 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: laurent@vivier.eu Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Also note that we were missing the qemu_target_list entry for plain sparc; fix that at the same time. Signed-off-by: Richard Henderson --- scripts/qemu-binfmt-conf.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh index b5a16742a1..9f1580a91c 100755 --- a/scripts/qemu-binfmt-conf.sh +++ b/scripts/qemu-binfmt-conf.sh @@ -1,8 +1,8 @@ #!/bin/sh # Enable automatic program execution by the kernel. =20 -qemu_target_list=3D"i386 i486 alpha arm armeb sparc32plus ppc ppc64 ppc64l= e m68k \ -mips mipsel mipsn32 mipsn32el mips64 mips64el \ +qemu_target_list=3D"i386 i486 alpha arm armeb sparc sparc32plus sparc64 \ +ppc ppc64 ppc64le m68k mips mipsel mipsn32 mipsn32el mips64 mips64el \ sh4 sh4eb s390x aarch64 aarch64_be hppa riscv32 riscv64 xtensa xtensaeb \ microblaze microblazeel or1k x86_64" =20 @@ -38,6 +38,10 @@ sparc32plus_magic=3D'\x7fELF\x01\x02\x01\x00\x00\x00\x00= \x00\x00\x00\x00\x00\x00\x sparc32plus_mask=3D'\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\x= ff\xff\xff\xff\xfe\xff\xff' sparc32plus_family=3Dsparc =20 +sparc64_magic=3D'\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x= 00\x02\x00\x2b' +sparc64_mask=3D'\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\x= ff\xff\xff\xfe\xff\xff' +sparc64_family=3Dsparc + ppc_magic=3D'\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x= 02\x00\x14' ppc_mask=3D'\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\x= ff\xff\xfe\xff\xff' ppc_family=3Dppc --=20 2.17.1