From patchwork Tue Jan 7 12:06:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xia, Hongyan" X-Patchwork-Id: 11320815 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 6D1A2930 for ; Tue, 7 Jan 2020 12:08:05 +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 49F01206F0 for ; Tue, 7 Jan 2020 12:08:05 +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="sG3zlVTM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 49F01206F0 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 1ionda-0004tn-CS; Tue, 07 Jan 2020 12:07:06 +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 1iondZ-0004te-NT for xen-devel@lists.xenproject.org; Tue, 07 Jan 2020 12:07:05 +0000 X-Inumbo-ID: 380ba090-3146-11ea-abea-12813bfff9fa Received: from smtp-fw-9101.amazon.com (unknown [207.171.184.25]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 380ba090-3146-11ea-abea-12813bfff9fa; Tue, 07 Jan 2020 12:07:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1578398825; x=1609934825; h=from:to:cc:subject:date:message-id:mime-version; bh=exyJQ+i5lRIs/ws2ZIutwakEn61cmiThMv/7Wo7m3NE=; b=sG3zlVTMtxQJeriZe0Jx7P2o1B7oFjCRoX4Q4KVCyISu8nCzI6hAF68k GbbGZQ7IVyiSGLj+UqC1KfOAkhey42261Lbw87XW+UzE7G5nEeHFnM0YN krFqWxSsPSF5YL/UFkQwne3jyO02vz/HdLI2TL9LbPPdE+Uuh2Q9+HkiZ E=; IronPort-SDR: pNoB7y7rDrPVV4JpUpTQy2ZPlrIDG4b8bfbHWzM5Cbyz3zmLMIoBvEI/aEH7vG2Oi/zzRKgj8W 50H2HQ9jsHDw== X-IronPort-AV: E=Sophos;i="5.69,406,1571702400"; d="scan'208";a="8790213" Received: from sea32-co-svc-lb4-vlan3.sea.corp.amazon.com (HELO email-inbound-relay-2b-c7131dcf.us-west-2.amazon.com) ([10.47.23.38]) by smtp-border-fw-out-9101.sea19.amazon.com with ESMTP; 07 Jan 2020 12:06:54 +0000 Received: from EX13MTAUEA002.ant.amazon.com (pdx4-ws-svc-p6-lb7-vlan2.pdx.amazon.com [10.170.41.162]) by email-inbound-relay-2b-c7131dcf.us-west-2.amazon.com (Postfix) with ESMTPS id B6826A270F; Tue, 7 Jan 2020 12:06:53 +0000 (UTC) Received: from EX13D37EUA001.ant.amazon.com (10.43.165.212) by EX13MTAUEA002.ant.amazon.com (10.43.61.77) with Microsoft SMTP Server (TLS) id 15.0.1236.3; Tue, 7 Jan 2020 12:06:53 +0000 Received: from EX13MTAUWB001.ant.amazon.com (10.43.161.207) by EX13D37EUA001.ant.amazon.com (10.43.165.212) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 7 Jan 2020 12:06:52 +0000 Received: from u0b3720fa96e858.ant.amazon.com (10.125.106.133) by mail-relay.amazon.com (10.43.161.249) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Tue, 7 Jan 2020 12:06:49 +0000 From: Hongyan Xia To: Date: Tue, 7 Jan 2020 12:06:42 +0000 Message-ID: X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Precedence: Bulk Subject: [Xen-devel] [PATCH v5 0/7] 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 , jgrall@amazon.com, Wei Liu , Jan Beulich , =?utf-8?q?Roger_Pau_?= =?utf-8?q?Monn=C3=A9?= Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" 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 directnonmap-v3 --- Changed since v4: - handle INVALID_MFN in new APIs - drop some goto labels since there could be better options - const qualify introduced variables - defer some changes to future patches due to ongoing discussions on map_pages_to_xen 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 (7): 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: make sure there is one exit path for modify_xen_mappings x86/mm: change pl*e to l*t in virt_to_xen_l*e xen/arch/x86/mm.c | 258 ++++++++++++++++++++++++++++----------------- xen/include/asm-x86/mm.h | 16 +++ xen/include/asm-x86/page.h | 5 - 3 files changed, 175 insertions(+), 104 deletions(-)