From nobody Mon Feb 9 23:02:58 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.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 (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1576561328; cv=none; d=zohomail.com; s=zohoarc; b=cpEtLnLZWX9tOTLzdbZoJDiSOdo4tfdGI1JhE5MuZVY1cuzVrHnIdthVpUDGMsp21NdSXUtHAw6eNwp1q70v7RHS8ZS+d14DVyyzLmLg50uy6N0sLzElSQghrIqj6+TnJ0Sxt0RaiSzk8XFUYBDVKNncfc5VGvFdo8lbmsM7od4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576561328; 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; bh=74rsXrSmNnis/55x0FkHSZ5sIbLHZJilI+J4lHIIZFI=; b=gEBKFJqJhoweHrq3BqBLO5h2RtgyISlwOZ52zc8p3qiOVJex1J87lHG9/dfUvmaRIpYj+NXomnm3rhAhuU0NVVjpxYn5t97gZPRgAoG5fFcT85rPs+bVkoHjGJoBAtVvmNh24MbHK48xzgZ/j8e1GiU5yPomoWAlCQKlGUU+7Mw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1576561328739502.9953382497399; Mon, 16 Dec 2019 21:42:08 -0800 (PST) Received: from localhost ([::1]:36046 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ih5cV-0006li-Bw for importer@patchew.org; Tue, 17 Dec 2019 00:42:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35424) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ih4k9-0002MD-G8 for qemu-devel@nongnu.org; Mon, 16 Dec 2019 23:45:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ih4k6-00082c-1m for qemu-devel@nongnu.org; Mon, 16 Dec 2019 23:45:55 -0500 Received: from bilbo.ozlabs.org ([2401:3900:2:1::2]:52743 helo=ozlabs.org) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ih4k2-0007V9-3s; Mon, 16 Dec 2019 23:45:53 -0500 Received: by ozlabs.org (Postfix, from userid 1007) id 47cQWg2mZKz9sTS; Tue, 17 Dec 2019 15:43:41 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1576557823; bh=5/a5TMrvK4EzeFh6JE4d9uQG/td8uvROAlRqOMDCQng=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pp3QAFPf4XCm3gCh3bHQR27GX9dZJPZt/k2mZ5ohGxI6JSZYnkOxB7SyrTZQSddI8 aJm4p2oXplpdp4uNxYXWvxSBOe27bCJkqdtdxqqyKa5pfTkLdWSrdhn8/c8mZYPX8y GXri7XvK9GU4oQtxelFbqcn8KCcY+2Tc0hPgd6fk= From: David Gibson To: peter.maydell@linaro.org Subject: [PULL 68/88] target/ppc: Add SPR ASDR Date: Tue, 17 Dec 2019 15:43:02 +1100 Message-Id: <20191217044322.351838-69-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191217044322.351838-1-david@gibson.dropbear.id.au> References: <20191217044322.351838-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2401:3900:2:1::2 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, aik@ozlabs.ru, qemu-devel@nongnu.org, groug@kaod.org, qemu-ppc@nongnu.org, clg@kaod.org, Suraj Jitindar Singh , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Suraj Jitindar Singh The Access Segment Descriptor Register (ASDR) provides information about the storage element when taking a hypervisor storage interrupt. When performing nested radix address translation, this is normally the guest real address. This register is present on POWER9 processors and later. Implement the ADSR, note read and write access is limited to the hypervisor. Signed-off-by: Suraj Jitindar Singh Reviewed-by: David Gibson Signed-off-by: C=C3=A9dric Le Goater Message-Id: <20191128134700.16091-4-clg@kaod.org> Signed-off-by: David Gibson --- target/ppc/cpu.h | 1 + target/ppc/translate_init.inc.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index da44cc8809..e99850c3ae 100644 --- a/target/ppc/cpu.h +++ b/target/ppc/cpu.h @@ -1778,6 +1778,7 @@ typedef PowerPCCPU ArchCPU; #define SPR_MPC_MD_DBRAM1 (0x32A) #define SPR_RCPU_L2U_RA3 (0x32B) #define SPR_TAR (0x32F) +#define SPR_ASDR (0x330) #define SPR_IC (0x350) #define SPR_VTB (0x351) #define SPR_MMCRC (0x353) diff --git a/target/ppc/translate_init.inc.c b/target/ppc/translate_init.in= c.c index c5e4d45569..c850a9d065 100644 --- a/target/ppc/translate_init.inc.c +++ b/target/ppc/translate_init.inc.c @@ -8295,6 +8295,12 @@ static void gen_spr_power9_mmu(CPUPPCState *env) SPR_NOACCESS, SPR_NOACCESS, &spr_read_generic, &spr_write_ptcr, KVM_REG_PPC_PTCR, 0x00000000); + /* Address Segment Descriptor Register */ + spr_register_hv(env, SPR_ASDR, "ASDR", + SPR_NOACCESS, SPR_NOACCESS, + SPR_NOACCESS, SPR_NOACCESS, + &spr_read_generic, &spr_write_generic, + 0x0000000000000000); #endif } =20 --=20 2.23.0