From patchwork Wed Dec 4 17:10:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xia, Hongyan" X-Patchwork-Id: 11273331 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B043117EF for ; Wed, 4 Dec 2019 17:13:07 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8CB4420833 for ; Wed, 4 Dec 2019 17:13:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=amazon.com header.i=@amazon.com header.b="Cz/y8gN9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8CB4420833 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=amazon.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1icYCI-0003wl-0E; Wed, 04 Dec 2019 17:12:18 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1icYCG-0003wG-DX for xen-devel@lists.xenproject.org; Wed, 04 Dec 2019 17:12:16 +0000 X-Inumbo-ID: 33af9972-16b9-11ea-8206-12813bfff9fa Received: from smtp-fw-9102.amazon.com (unknown [207.171.184.29]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 33af9972-16b9-11ea-8206-12813bfff9fa; Wed, 04 Dec 2019 17:12:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1575479528; x=1607015528; h=from:to:cc:subject:date:message-id:mime-version; bh=1yf9dDqLvjuFgwwJJk8m9i3fRjVc+CiLsNbxAvCjb5A=; b=Cz/y8gN9HJ7wfvmVhpvMfwlu56rRklvSMNlO6JC/CjcHB55YSTw86hJJ V57HZkKl6PWvHwQws8Vrtl4E2AxmfJEviP2qzJ13m7w8rCPlTRdB5n4Tn x4BJqgC5RSfkxIcLaKs2wL1/MqKKl2g7yPa2riFC0taAx1iYIeUmozQ7t Y=; IronPort-SDR: X7RkASUdueHIRTfnMNjy6ynsjFs+kZ10Vu/HTOdHN3I8OJVRdjquViUQax41v33vEqgilPaWMW mZe3OaRyYyLQ== X-IronPort-AV: E=Sophos;i="5.69,277,1571702400"; d="scan'208";a="11630517" Received: from sea32-co-svc-lb4-vlan3.sea.corp.amazon.com (HELO email-inbound-relay-2c-2225282c.us-west-2.amazon.com) ([10.47.23.38]) by smtp-border-fw-out-9102.sea19.amazon.com with ESMTP; 04 Dec 2019 17:11:04 +0000 Received: from EX13MTAUWA001.ant.amazon.com (pdx4-ws-svc-p6-lb7-vlan3.pdx.amazon.com [10.170.41.166]) by email-inbound-relay-2c-2225282c.us-west-2.amazon.com (Postfix) with ESMTPS id 2FB97A2898; Wed, 4 Dec 2019 17:11:04 +0000 (UTC) Received: from EX13D01UWA002.ant.amazon.com (10.43.160.74) by EX13MTAUWA001.ant.amazon.com (10.43.160.58) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 4 Dec 2019 17:11:03 +0000 Received: from EX13MTAUWA001.ant.amazon.com (10.43.160.58) by EX13d01UWA002.ant.amazon.com (10.43.160.74) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 4 Dec 2019 17:11:03 +0000 Received: from u60d575063b1f53.ant.amazon.com (10.125.106.64) by mail-relay.amazon.com (10.43.160.118) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Wed, 4 Dec 2019 17:11:02 +0000 From: Hongyan Xia To: Date: Wed, 4 Dec 2019 17:10:52 +0000 Message-ID: X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Precedence: Bulk Subject: [Xen-devel] [PATCH v4 0/9] Add alternative API for Xen PTEs X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Andrew Cooper , Wei Liu , Jan Beulich , =?utf-8?q?Roger_Pau_Monn=C3=A9?= Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" NOTE: My email address has changed due to some HR management. I have lost all my previous emails and I could only salvage some of the comments to v3 from the mailing list archive. I will reply to the comments from v3 in this v4 series. This batch adds an alternative alloc-map-unmap-free Xen PTE API to the normal alloc-free on the xenheap, in preparation of switching to domheap for Xen page tables. Since map and unmap are basically no-ops now, and other changes are cosmetic to ease future patches, this batch does not introduce any functional changes. tree: https://xenbits.xen.org/git-http/people/hx242/xen.git xen_pte_map-v4 v3: https://lists.xenproject.org/archives/html/xen-devel/2019-10/msg00304.html --- Changed since v3: - change my email address in all patches - address many style issues in v3 - rebase Changed since v2: - split into a smaller series - drop the clear_page optimisation as Wei suggests - rebase Changed since v1: - squash some commits - merge bug fixes into this first batch - rebase against latest master Wei Liu (9): x86: move some xen mm function declarations x86: introduce a new set of APIs to manage Xen page tables x86/mm: introduce l{1,2}t local variables to map_pages_to_xen x86/mm: introduce l{1,2}t local variables to modify_xen_mappings x86/mm: map_pages_to_xen would better have one exit path x86/mm: add an end_of_loop label in map_pages_to_xen x86/mm: make sure there is one exit path for modify_xen_mappings x86/mm: add an end_of_loop label in modify_xen_mappings x86/mm: change pl*e to l*t in virt_to_xen_l*e xen/arch/x86/mm.c | 280 ++++++++++++++++++++++--------------- xen/include/asm-x86/mm.h | 16 +++ xen/include/asm-x86/page.h | 5 - 3 files changed, 186 insertions(+), 115 deletions(-)