From patchwork Thu Sep 22 14:52:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brijesh Singh X-Patchwork-Id: 9345499 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 606406077A for ; Thu, 22 Sep 2016 15:08:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4D9802ABA8 for ; Thu, 22 Sep 2016 15:08:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 400812ABAB; Thu, 22 Sep 2016 15:08:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EABEF2ABA8 for ; Thu, 22 Sep 2016 15:08:46 +0000 (UTC) Received: from localhost ([::1]:49910 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bn5cD-0008WT-AC for patchwork-qemu-devel@patchwork.kernel.org; Thu, 22 Sep 2016 11:08:45 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45827) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bn5Mh-0000TU-6c for qemu-devel@nongnu.org; Thu, 22 Sep 2016 10:52:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bn5Mb-0007cc-8O for qemu-devel@nongnu.org; Thu, 22 Sep 2016 10:52:42 -0400 Received: from mail-sn1nam02on0071.outbound.protection.outlook.com ([104.47.36.71]:4224 helo=NAM02-SN1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bn5Ma-0007bx-Tq for qemu-devel@nongnu.org; Thu, 22 Sep 2016 10:52:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=j30IW8mrXjeagUVlsInvKMhmhYusQ7y7xLzJiJA9OcY=; b=p/Jzu5m+SK6fK8C9RrQBluwuvhQIxusohdeNef6aSW4N04OLUSW4PHxFSaMptN0BNOWKU9j9cBcvj59UGFckuSEWgxn2/zr/YwTeISzL4c7p0ghWVxWa/4ev69q4dvB6riVjrLt+FszwoCqHslas3o9S429xf2xHXjbit5bP4+s= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; Received: from [127.0.1.1] (165.204.77.1) by CY1PR12MB0665.namprd12.prod.outlook.com (10.163.238.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.629.8; Thu, 22 Sep 2016 14:52:32 +0000 From: Brijesh Singh To: , , , , , , , , Date: Thu, 22 Sep 2016 10:52:28 -0400 Message-ID: <147455594859.8519.8825725423514687933.stgit@brijesh-build-machine> In-Reply-To: <147455590865.8519.11191009507297313736.stgit@brijesh-build-machine> References: <147455590865.8519.11191009507297313736.stgit@brijesh-build-machine> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: BLUPR0401CA0030.namprd04.prod.outlook.com (10.162.114.168) To CY1PR12MB0665.namprd12.prod.outlook.com (10.163.238.150) X-MS-Office365-Filtering-Correlation-Id: c991407f-aa31-452a-f85c-08d3e2f81606 X-Microsoft-Exchange-Diagnostics: 1; C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2pgLPeoeAFVWNG8+LZpJCPURH5G60bhZXmFr1oh/WnBYq5wYMNacNTQ8lTNo+K3E0rpW1Yz/AT1ZCpT05A6qQlvkIrdHq3Mf2g0/D9LoJW63jbLOr1ZtBhWnM1QmGgTwbouJJEtHvJeBNp8p3QjiPOwMZDgIMiwwskn63hVVAxQL33KY65enS9uH6r+6xUr7NDxTuq5gvu3Bpi8rmRCNoMgnThQgLRH9AbCfZDQiV6inmqA X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6055026); SRVR:CY1PR12MB0665; BCL:0; PCL:0; RULEID:; SRVR:CY1PR12MB0665; X-Forefront-PRVS: 0073BFEF03 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6049001)(6009001)(7916002)(199003)(189002)(77096005)(229853001)(103116003)(19580395003)(305945005)(47776003)(33716001)(19580405001)(23676002)(105586002)(189998001)(7736002)(83506001)(33646002)(92566002)(8676002)(230700001)(106356001)(81156014)(107886002)(6116002)(9686002)(81166006)(76176999)(2201001)(97736004)(5001770100001)(42186005)(86362001)(68736007)(2906002)(50986999)(66066001)(3846002)(54356999)(5660300001)(50466002)(101416001)(4001350100001)(2950100001)(7846002)(586003)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR12MB0665; H:[127.0.1.1]; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDWTFQUjEyTUIwNjY1OzIzOjNxaFVlS2IxZjhBd2xJMEE5S3lqd0gvQnkx?= =?utf-8?B?WHlCYmNyUnFibE9oWEViVDdlb09sWS93QjlzV1FPMkRPSEJsUysrZm9oYkJr?= =?utf-8?B?Y1o2bVdZY3ZraEJyMjVP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cGHLTDY80Rp47oLNVmgLl9dEX/BMBmigW99qOdwsydb779PSnoLg+2CSFTXRMBIpvC9VTkJDyA17TZb27XrOIXyXf2MsjQQ==; 5:jxiiemf6Pe6CGIG7jR7XVh+aev/gJ3CnAvQ0o+Oefk4HrRt4iy1mBhO5GrFUNi30883+GXCPxEymoIV1B214UjVkESLBh6tuJ0+lUtgfb4iscl5EBmRpkwbdxQ93wTYcMc5bFrD9xELCYVJMdXc9eQ==; 24:SutpZk2X6XNMp8UmCM71MJ3+9LHhBfOehD+U448rn6i+7i4lUnEHWMQPNX4UIyDrnqTU02OBMsbbBXUdIP7yEcteqB9p6IYp63nYtYDfn28=; 7:6zVeUwzPw8ssnw7PpDeYxfOWO+eAkdJ+y79Rrjtiy0+WJaRSQ0Vd88TTB6SJMmpqKZXDkZmKtY99lUaLR16awsVwh0PLFRE4zckJIOMh3vTbPD6znsK7c3J9ceCvZ6ZMcm06hgHEfUKEIA8QYOfqNERPcx15GGtcD6Ex0LKFqMJ3qpCgqrJMuUju3sozRKIf8JWi9l0gS6SPREm6dPDp62ALdziZ+F/D3ilOKZfEyjwKo0T7cJTFz2gX3cHXIDzOT+ROePua8T44EQ35TQDmVmqdSAXlmQnTtsaoTpWxfz6L7v1cl06qgU7q/GRjewW4 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0665; 20:6Oe6uTiIjXT8zk2IgRMK/zL2kbQZ/QOMebp+XipiIX0VZQGIwxr/VYL6tWbS057jl0ujp0OHHN1z4EiXTBVTxhQZ03bgevWU7X8IewaqH1tNPux2LOc4Co2bU1FBhZK8sF/Xw6GWgFft+Uo6XmxQRIaDogGSqN72boyRxwFA/bQtZ6NwGcFz3WPPJAM//Ax1wNYW3pfhq25DBXVbPfJQg9Zrn4DZAuSWZ1XZsm1oTGMS49anrjWXsJBKvDUGOzbK X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Sep 2016 14:52:32.8215 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR12MB0665 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.36.71 Subject: [Qemu-devel] [RFC PATCH v2 04/16] monitor: use debug version of memory access apis 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: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP updates hmp monitor to use debug version of memory access apis when accessing the guest memory. Signed-off-by: Brijesh Singh --- cpus.c | 2 +- disas.c | 2 +- monitor.c | 2 +- target-i386/helper.c | 14 +++++++------- target-i386/monitor.c | 18 ++++++++++-------- 5 files changed, 20 insertions(+), 18 deletions(-) diff --git a/cpus.c b/cpus.c index 84c3520..48dc4d1 100644 --- a/cpus.c +++ b/cpus.c @@ -1725,7 +1725,7 @@ void qmp_pmemsave(int64_t addr, int64_t size, const char *filename, l = sizeof(buf); if (l > size) l = size; - cpu_physical_memory_read(addr, buf, l); + cpu_physical_memory_read_debug(addr, buf, l); if (fwrite(buf, 1, l, f) != l) { error_setg(errp, QERR_IO_ERROR); goto exit; diff --git a/disas.c b/disas.c index 05a7a12..382cc2c 100644 --- a/disas.c +++ b/disas.c @@ -356,7 +356,7 @@ monitor_read_memory (bfd_vma memaddr, bfd_byte *myaddr, int length, CPUDebug *s = container_of(info, CPUDebug, info); if (monitor_disas_is_physical) { - cpu_physical_memory_read(memaddr, myaddr, length); + cpu_physical_memory_read_debug(memaddr, myaddr, length); } else { cpu_memory_rw_debug(s->cpu, memaddr, myaddr, length, 0); } diff --git a/monitor.c b/monitor.c index 5c00373..4773ee1 100644 --- a/monitor.c +++ b/monitor.c @@ -1299,7 +1299,7 @@ static void memory_dump(Monitor *mon, int count, int format, int wsize, if (l > line_size) l = line_size; if (is_physical) { - cpu_physical_memory_read(addr, buf, l); + cpu_physical_memory_read_debug(addr, buf, l); } else { if (cpu_memory_rw_debug(mon_get_cpu(), addr, buf, l, 0) < 0) { monitor_printf(mon, " Cannot access memory\n"); diff --git a/target-i386/helper.c b/target-i386/helper.c index 1c250b8..88fa4fa 100644 --- a/target-i386/helper.c +++ b/target-i386/helper.c @@ -1034,13 +1034,13 @@ hwaddr x86_cpu_get_phys_page_debug(CPUState *cs, vaddr addr) } pml4e_addr = ((env->cr[3] & ~0xfff) + (((addr >> 39) & 0x1ff) << 3)) & env->a20_mask; - pml4e = x86_ldq_phys(cs, pml4e_addr); + pml4e = ldq_phys_debug(cs, pml4e_addr); if (!(pml4e & PG_PRESENT_MASK)) { return -1; } pdpe_addr = ((pml4e & PG_ADDRESS_MASK) + (((addr >> 30) & 0x1ff) << 3)) & env->a20_mask; - pdpe = x86_ldq_phys(cs, pdpe_addr); + pdpe = ldq_phys_debug(cs, pdpe_addr); if (!(pdpe & PG_PRESENT_MASK)) { return -1; } @@ -1055,14 +1055,14 @@ hwaddr x86_cpu_get_phys_page_debug(CPUState *cs, vaddr addr) { pdpe_addr = ((env->cr[3] & ~0x1f) + ((addr >> 27) & 0x18)) & env->a20_mask; - pdpe = x86_ldq_phys(cs, pdpe_addr); + pdpe = ldq_phys_debug(cs, pdpe_addr); if (!(pdpe & PG_PRESENT_MASK)) return -1; } pde_addr = ((pdpe & PG_ADDRESS_MASK) + (((addr >> 21) & 0x1ff) << 3)) & env->a20_mask; - pde = x86_ldq_phys(cs, pde_addr); + pde = ldq_phys_debug(cs, pde_addr); if (!(pde & PG_PRESENT_MASK)) { return -1; } @@ -1075,7 +1075,7 @@ hwaddr x86_cpu_get_phys_page_debug(CPUState *cs, vaddr addr) pte_addr = ((pde & PG_ADDRESS_MASK) + (((addr >> 12) & 0x1ff) << 3)) & env->a20_mask; page_size = 4096; - pte = x86_ldq_phys(cs, pte_addr); + pte = ldq_phys_debug(cs, pte_addr); } if (!(pte & PG_PRESENT_MASK)) { return -1; @@ -1085,7 +1085,7 @@ hwaddr x86_cpu_get_phys_page_debug(CPUState *cs, vaddr addr) /* page directory entry */ pde_addr = ((env->cr[3] & ~0xfff) + ((addr >> 20) & 0xffc)) & env->a20_mask; - pde = x86_ldl_phys(cs, pde_addr); + pde = ldl_phys_debug(cs, pde_addr); if (!(pde & PG_PRESENT_MASK)) return -1; if ((pde & PG_PSE_MASK) && (env->cr[4] & CR4_PSE_MASK)) { @@ -1094,7 +1094,7 @@ hwaddr x86_cpu_get_phys_page_debug(CPUState *cs, vaddr addr) } else { /* page directory entry */ pte_addr = ((pde & ~0xfff) + ((addr >> 10) & 0xffc)) & env->a20_mask; - pte = x86_ldl_phys(cs, pte_addr); + pte = ldl_phys_debug(cs, pte_addr); if (!(pte & PG_PRESENT_MASK)) { return -1; } diff --git a/target-i386/monitor.c b/target-i386/monitor.c index fccfe40..47d3c2d 100644 --- a/target-i386/monitor.c +++ b/target-i386/monitor.c @@ -130,12 +130,12 @@ static void tlb_info_64(Monitor *mon, CPUArchState *env) pml4_addr = env->cr[3] & 0x3fffffffff000ULL; for (l1 = 0; l1 < 512; l1++) { - cpu_physical_memory_read(pml4_addr + l1 * 8, &pml4e, 8); + cpu_physical_memory_read_debug(pml4_addr + l1 * 8, &pml4e, 8); pml4e = le64_to_cpu(pml4e); if (pml4e & PG_PRESENT_MASK) { pdp_addr = pml4e & 0x3fffffffff000ULL; for (l2 = 0; l2 < 512; l2++) { - cpu_physical_memory_read(pdp_addr + l2 * 8, &pdpe, 8); + cpu_physical_memory_read_debug(pdp_addr + l2 * 8, &pdpe, 8); pdpe = le64_to_cpu(pdpe); if (pdpe & PG_PRESENT_MASK) { if (pdpe & PG_PSE_MASK) { @@ -145,7 +145,8 @@ static void tlb_info_64(Monitor *mon, CPUArchState *env) } else { pd_addr = pdpe & 0x3fffffffff000ULL; for (l3 = 0; l3 < 512; l3++) { - cpu_physical_memory_read(pd_addr + l3 * 8, &pde, 8); + cpu_physical_memory_read_debug(pd_addr + l3 * 8, + &pde, 8); pde = le64_to_cpu(pde); if (pde & PG_PRESENT_MASK) { if (pde & PG_PSE_MASK) { @@ -156,7 +157,7 @@ static void tlb_info_64(Monitor *mon, CPUArchState *env) } else { pt_addr = pde & 0x3fffffffff000ULL; for (l4 = 0; l4 < 512; l4++) { - cpu_physical_memory_read(pt_addr + cpu_physical_memory_read_debug(pt_addr + l4 * 8, &pte, 8); pte = le64_to_cpu(pte); @@ -335,13 +336,13 @@ static void mem_info_64(Monitor *mon, CPUArchState *env) last_prot = 0; start = -1; for (l1 = 0; l1 < 512; l1++) { - cpu_physical_memory_read(pml4_addr + l1 * 8, &pml4e, 8); + cpu_physical_memory_read_debug(pml4_addr + l1 * 8, &pml4e, 8); pml4e = le64_to_cpu(pml4e); end = l1 << 39; if (pml4e & PG_PRESENT_MASK) { pdp_addr = pml4e & 0x3fffffffff000ULL; for (l2 = 0; l2 < 512; l2++) { - cpu_physical_memory_read(pdp_addr + l2 * 8, &pdpe, 8); + cpu_physical_memory_read_debug(pdp_addr + l2 * 8, &pdpe, 8); pdpe = le64_to_cpu(pdpe); end = (l1 << 39) + (l2 << 30); if (pdpe & PG_PRESENT_MASK) { @@ -353,7 +354,8 @@ static void mem_info_64(Monitor *mon, CPUArchState *env) } else { pd_addr = pdpe & 0x3fffffffff000ULL; for (l3 = 0; l3 < 512; l3++) { - cpu_physical_memory_read(pd_addr + l3 * 8, &pde, 8); + cpu_physical_memory_read_debug(pd_addr + l3 * 8, + &pde, 8); pde = le64_to_cpu(pde); end = (l1 << 39) + (l2 << 30) + (l3 << 21); if (pde & PG_PRESENT_MASK) { @@ -365,7 +367,7 @@ static void mem_info_64(Monitor *mon, CPUArchState *env) } else { pt_addr = pde & 0x3fffffffff000ULL; for (l4 = 0; l4 < 512; l4++) { - cpu_physical_memory_read(pt_addr + cpu_physical_memory_read_debug(pt_addr + l4 * 8, &pte, 8); pte = le64_to_cpu(pte);