From patchwork Mon Jul 4 11:45:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergej Proskurin X-Patchwork-Id: 9212415 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 9FABF60572 for ; Mon, 4 Jul 2016 11:49:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 91A94286DE for ; Mon, 4 Jul 2016 11:49:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8647A286E2; Mon, 4 Jul 2016 11:49:16 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F02E2286DE for ; Mon, 4 Jul 2016 11:49:15 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bK2LM-0008PP-E4; Mon, 04 Jul 2016 11:47:16 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bK2Kf-00081x-Ow for xen-devel@lists.xenproject.org; Mon, 04 Jul 2016 11:46:33 +0000 Received: from [85.158.137.68] by server-8.bemta-3.messagelabs.com id 54/01-03780-99C4A775; Mon, 04 Jul 2016 11:46:33 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrMLMWRWlGSWpSXmKPExsXSPJ+BQ3eGT1W 4QcNZYYvvWyYzOTB6HP5whSWAMYo1My8pvyKBNWPa4jWsBStFKw5//8/UwPiEv4uRi0NIYCOj RNvTRuYuRk4gZzmjxKYLWSA2m4CBxJTXK1lBbBEBJYl7qyYzgdjMAucYJe7ezuxi5OAQFnCXm Lo2GyTMIqAq8er+QjaQMK+ArcSMT2UgYQkBOYnJiy8xgticQOGGjk9MEJtsJLrvPmabwMi9gJ FhFaN6cWpRWWqRrpFeUlFmekZJbmJmjq6hgbFebmpxcWJ6ak5iUrFecn7uJkagZ+sZGBh3MJ5 qdj7EKMnBpCTKm+5eFS7El5SfUpmRWJwRX1Sak1p8iFGGg0NJgtfHGygnWJSanlqRlpkDDDGY tAQHj5IIbyFImre4IDG3ODMdInWKUVFKnNcPJCEAksgozYNrg4X1JUZZKWFeRgYGBiGegtSi3 MwSVPlXjOIcjErCvBNApvBk5pXATX8FtJgJaDFrbDnI4pJEhJRUAyOTqLiOoS7fh16ty3Mmvp c34Nrb6CxrWzQ38F924/dJ3WUNHO67djxfd4d9ydkFb49fKpY0TWt133ClqGt77HmhhFXB+4/ pRrps09wc39NtY6YiOs9ZIfW7YVT7+VNpD1wNzX2qA10/aE0IyuX3mrn49k7/yqu2roKRSbWx Km/lNr2Wi3/7VYmlOCPRUIu5qDgRAB5qxbpmAgAA X-Env-Sender: proskurin@sec.in.tum.de X-Msg-Ref: server-10.tower-31.messagelabs.com!1467632792!48044965!1 X-Originating-IP: [131.159.0.8] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.46; banners=-,-,- X-VirusChecked: Checked Received: (qmail 59926 invoked from network); 4 Jul 2016 11:46:32 -0000 Received: from mail-out1.informatik.tu-muenchen.de (HELO mail-out1.informatik.tu-muenchen.de) (131.159.0.8) by server-10.tower-31.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 4 Jul 2016 11:46:32 -0000 Received: from files.sec.in.tum.de (files.sec.in.tum.de [131.159.50.1]) by services.sec.in.tum.de (Postfix) with ESMTP id E528B100D1FAF; Mon, 4 Jul 2016 13:46:31 +0200 (CEST) Received: from ker.sec.in.tum.de (ker.sec.in.tum.de [131.159.50.36]) by files.sec.in.tum.de (Postfix) with ESMTP id D84A52EEF; Mon, 4 Jul 2016 13:46:31 +0200 (CEST) From: Sergej Proskurin To: xen-devel@lists.xenproject.org Date: Mon, 4 Jul 2016 13:45:47 +0200 Message-Id: <20160704114605.10086-19-proskurin@sec.in.tum.de> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20160704114605.10086-1-proskurin@sec.in.tum.de> References: <20160704114605.10086-1-proskurin@sec.in.tum.de> X-Mailman-Approved-At: Mon, 04 Jul 2016 11:47:11 +0000 Cc: Sergej Proskurin , Tamas K Lengyel , Ian Jackson , Wei Liu , Razvan Cojocaru Subject: [Xen-devel] [PATCH 18/18] arm/altp2m: Extend xen-access for altp2m on ARM. X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Sergej Proskurin Acked-by: Razvan Cojocaru --- Cc: Razvan Cojocaru Cc: Tamas K Lengyel Cc: Ian Jackson Cc: Wei Liu --- tools/tests/xen-access/xen-access.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tools/tests/xen-access/xen-access.c b/tools/tests/xen-access/xen-access.c index f26e723..ef21d0d 100644 --- a/tools/tests/xen-access/xen-access.c +++ b/tools/tests/xen-access/xen-access.c @@ -333,8 +333,9 @@ void usage(char* progname) { fprintf(stderr, "Usage: %s [-m] write|exec", progname); #if defined(__i386__) || defined(__x86_64__) - fprintf(stderr, "|breakpoint|altp2m_write|altp2m_exec"); + fprintf(stderr, "|breakpoint"); #endif + fprintf(stderr, "|altp2m_write|altp2m_exec"); fprintf(stderr, "\n" "Logs first page writes, execs, or breakpoint traps that occur on the domain.\n" @@ -402,6 +403,7 @@ int main(int argc, char *argv[]) { breakpoint = 1; } +#endif else if ( !strcmp(argv[0], "altp2m_write") ) { default_access = XENMEM_access_rx; @@ -412,7 +414,6 @@ int main(int argc, char *argv[]) default_access = XENMEM_access_rw; altp2m = 1; } -#endif else { usage(argv[0]); @@ -485,12 +486,14 @@ int main(int argc, char *argv[]) goto exit; } +#if defined(__i386__) || defined(__x86_64__) rc = xc_monitor_singlestep( xch, domain_id, 1 ); if ( rc < 0 ) { ERROR("Error %d failed to enable singlestep monitoring!\n", rc); goto exit; } +#endif } if ( !altp2m ) @@ -540,7 +543,9 @@ int main(int argc, char *argv[]) rc = xc_altp2m_switch_to_view( xch, domain_id, 0 ); rc = xc_altp2m_destroy_view(xch, domain_id, altp2m_view_id); rc = xc_altp2m_set_domain_state(xch, domain_id, 0); +#if defined(__i386__) || defined(__x86_64__) rc = xc_monitor_singlestep(xch, domain_id, 0); +#endif } else { rc = xc_set_mem_access(xch, domain_id, XENMEM_access_rwx, ~0ull, 0); rc = xc_set_mem_access(xch, domain_id, XENMEM_access_rwx, START_PFN, @@ -695,9 +700,11 @@ int main(int argc, char *argv[]) exit: if ( altp2m ) { +#if defined(__i386__) || defined(__x86_64__) uint32_t vcpu_id; for ( vcpu_id = 0; vcpu_id