From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40365) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ewvFI-0007Vj-SS for qemu-devel@nongnu.org; Fri, 16 Mar 2018 15:42:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ewvFH-0003nh-VM for qemu-devel@nongnu.org; Fri, 16 Mar 2018 15:42:32 -0400 Received: from mail-pf0-x241.google.com ([2607:f8b0:400e:c00::241]:45950) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ewvFH-0003nF-PI for qemu-devel@nongnu.org; Fri, 16 Mar 2018 15:42:31 -0400 Received: by mail-pf0-x241.google.com with SMTP id l27so19580pfk.12 for ; Fri, 16 Mar 2018 12:42:31 -0700 (PDT) From: Michael Clark Date: Fri, 16 Mar 2018 12:41:12 -0700 Message-Id: <1521229281-73637-16-git-send-email-mjc@sifive.com> In-Reply-To: <1521229281-73637-1-git-send-email-mjc@sifive.com> References: <1521229281-73637-1-git-send-email-mjc@sifive.com> Subject: [Qemu-devel] [PATCH v3 15/24] RISC-V: Use memory_region_is_ram in pte update List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: patches@groups.riscv.org, Michael Clark , Sagar Karandikar , Bastian Koppelmann , Palmer Dabbelt After reading cpu_physical_memory_write and friends, it seems that memory_region_is_ram is a more appropriate interface, and matches the intent of the code that is calling it. Cc: Sagar Karandikar Cc: Bastian Koppelmann Signed-off-by: Michael Clark Signed-off-by: Palmer Dabbelt --- target/riscv/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/riscv/helper.c b/target/riscv/helper.c index 523a275..c430e95 100644 --- a/target/riscv/helper.c +++ b/target/riscv/helper.c @@ -237,7 +237,7 @@ restart: rcu_read_lock(); mr = address_space_translate(cs->as, pte_addr, &addr1, &l, false); - if (memory_access_is_direct(mr, true)) { + if (memory_region_is_ram(mr)) { target_ulong *pte_pa = qemu_map_ram_ptr(mr->ram_block, addr1); #if TCG_OVERSIZED_GUEST -- 2.7.0