Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1302682pxa; Sat, 15 Aug 2020 15:05:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJynMD3W0WTc/ZhCwOScVyfKpJ5BdgvbmYhbfuxVFuE6Zizay1CiaSWqrZ7a0ZAAsCi6l8lT X-Received: by 2002:a17:906:68b:: with SMTP id u11mr8977328ejb.143.1597529134490; Sat, 15 Aug 2020 15:05:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597529134; cv=none; d=google.com; s=arc-20160816; b=rU/YGIm886Nx9pTr921jTmuyBRFbVTsC2xrMDVpk/22ot23e12Rkl8UVm/simMVmdu RbjFfPH+lovwjwVgW49+JYC1DXJVYKbe7gvplmixB5beQYro+nnQeLvfGcRGvVjdC6pV tNslqVIGwPBtLDWPHp+MQcdhkXXJv5GKYxu8ojbpTIdDvi1diBoigJ3220+L8YXzg2ho Yz+sVy+uBL9i3IOhsD7/Awaxj5FXSiHQjzANJFf/1zZsr0N+adVmsZfn5UbWrnpsld5x 40hVKo4dhUs+OCUK1PYWx6ABVeLccSWxuTdwQWc29r6FLB4wZmwxGqjjoyCuEc3lr25M HsJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:dkim-signature :dkim-signature:date; bh=gvXsFKLYgG9imtnvQkz/GI8BrWBV6j9tKKoEh7WUZi8=; b=bdU9UvOTrT74Yj4SiIno+9jLkQC8Eqoeu2upcPFuWOt+zF4DP0IIbVfkTrKpDy/8kn kWfy7hTZycnFLtCq5rpkPJsBMce0GPdHIkjpu8+QtSfFGEMWSWjT6km/Ra5CPdGiNzjn h+vTNhmJi+fN+QN/TngZ451i/pF57Od2lm6rbZndalZTKFjZSPmxzq50XSB9XcxjCkQw tJpgYa8sxy3RMcPdFASF/fNL/i6AYqt8APKrvqJWlCpg53mgvNr0/Lc1h1jp/qqiWPme Wfz+qK7fn7WiFCTQMgcwYToSm/ff8nbH//5j2+GmFFYsfhHGWbsbOmL6ieGlqTxFSUFL xwXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linutronix.de header.s=2020 header.b=3fCpAH8a; dkim=neutral (no key) header.i=@vger.kernel.org header.b=31mXZuxZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ch10si8207630edb.28.2020.08.15.15.05.11; Sat, 15 Aug 2020 15:05:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@linutronix.de header.s=2020 header.b=3fCpAH8a; dkim=neutral (no key) header.i=@vger.kernel.org header.b=31mXZuxZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729782AbgHOWDe (ORCPT + 99 others); Sat, 15 Aug 2020 18:03:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728580AbgHOVvL (ORCPT ); Sat, 15 Aug 2020 17:51:11 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29D2EC09B04C; Sat, 15 Aug 2020 08:47:01 -0700 (PDT) Date: Sat, 15 Aug 2020 15:46:50 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1597506411; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gvXsFKLYgG9imtnvQkz/GI8BrWBV6j9tKKoEh7WUZi8=; b=3fCpAH8aOpeyZ6g5tLVl+0CF+ZWK4dgcai6C3dUgOMAGR93MAaZutDwT5e5PbZkg17+bga NO/c460egX7I40+HH3qzaJtWHk24Y/7qfjKu/wqjrw42yDtrxErETIOyMIOsvDG942+3RX +x8N2ODSD/tfpPU4wMGJ3L1BKGSlTzCZqwU7h3kloWPij5vkbYZVFnm3i4QItcD/9iqL6Y vA1iu/NBnHDwme2RkfGvrNTE2sBwh2fHoHEoLigTjN+jaLIpLcpy0szilKJHUrl/4HC5b8 Qs13VQpoT8K0wd3+C0leRpmhGOyE0uORi+Jmyxz+U7cwWx08NAD17WuKsiBWrw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1597506411; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gvXsFKLYgG9imtnvQkz/GI8BrWBV6j9tKKoEh7WUZi8=; b=31mXZuxZXQDFE6MgKHpLllUTXBgBBI8flbw/drdHe/egma1mS8y40jS3O9aLCfWr561lVB r64rdccOFyBNLtDw== From: "tip-bot2 for Juergen Gross" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/paravirt] x86/paravirt: Remove set_pte_at() pv-op Cc: Juergen Gross , Ingo Molnar , x86 , LKML In-Reply-To: <20200815100641.26362-6-jgross@suse.com> References: <20200815100641.26362-6-jgross@suse.com> MIME-Version: 1.0 Message-ID: <159750641040.3192.3040793846858713127.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/paravirt branch of tip: Commit-ID: e1ac3e66d301e57472f31ebee81b916e9fa8b35b Gitweb: https://git.kernel.org/tip/e1ac3e66d301e57472f31ebee81b916e9fa8b35b Author: Juergen Gross AuthorDate: Sat, 15 Aug 2020 12:06:40 +02:00 Committer: Ingo Molnar CommitterDate: Sat, 15 Aug 2020 13:52:12 +02:00 x86/paravirt: Remove set_pte_at() pv-op On x86 set_pte_at() is now always falling back to set_pte(). So instead of having this fallback after the paravirt maze just drop the set_pte_at paravirt operation and let set_pte_at() use the set_pte() function directly. Signed-off-by: Juergen Gross Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200815100641.26362-6-jgross@suse.com --- arch/x86/include/asm/paravirt.h | 8 +------- arch/x86/include/asm/paravirt_types.h | 2 -- arch/x86/include/asm/pgtable.h | 7 +++---- arch/x86/kernel/paravirt.c | 1 - arch/x86/xen/mmu_pv.c | 8 -------- include/trace/events/xen.h | 20 -------------------- 6 files changed, 4 insertions(+), 42 deletions(-) diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h index e02c409..f0464b8 100644 --- a/arch/x86/include/asm/paravirt.h +++ b/arch/x86/include/asm/paravirt.h @@ -412,12 +412,6 @@ static inline void set_pte(pte_t *ptep, pte_t pte) PVOP_VCALL2(mmu.set_pte, ptep, pte.pte); } -static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, - pte_t *ptep, pte_t pte) -{ - PVOP_VCALL4(mmu.set_pte_at, mm, addr, ptep, pte.pte); -} - static inline void set_pmd(pmd_t *pmdp, pmd_t pmd) { PVOP_VCALL2(mmu.set_pmd, pmdp, native_pmd_val(pmd)); @@ -510,7 +504,7 @@ static inline void set_pte_atomic(pte_t *ptep, pte_t pte) static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) { - set_pte_at(mm, addr, ptep, __pte(0)); + set_pte(ptep, __pte(0)); } static inline void pmd_clear(pmd_t *pmdp) diff --git a/arch/x86/include/asm/paravirt_types.h b/arch/x86/include/asm/paravirt_types.h index f27c3fe..0fad9f6 100644 --- a/arch/x86/include/asm/paravirt_types.h +++ b/arch/x86/include/asm/paravirt_types.h @@ -242,8 +242,6 @@ struct pv_mmu_ops { /* Pagetable manipulation functions */ void (*set_pte)(pte_t *ptep, pte_t pteval); - void (*set_pte_at)(struct mm_struct *mm, unsigned long addr, - pte_t *ptep, pte_t pteval); void (*set_pmd)(pmd_t *pmdp, pmd_t pmdval); pte_t (*ptep_modify_prot_start)(struct vm_area_struct *vma, unsigned long addr, diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index b836138..5e0dcc2 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h @@ -63,7 +63,6 @@ extern pmdval_t early_pmd_flags; #include #else /* !CONFIG_PARAVIRT_XXL */ #define set_pte(ptep, pte) native_set_pte(ptep, pte) -#define set_pte_at(mm, addr, ptep, pte) native_set_pte_at(mm, addr, ptep, pte) #define set_pte_atomic(ptep, pte) \ native_set_pte_atomic(ptep, pte) @@ -1033,10 +1032,10 @@ static inline pud_t native_local_pudp_get_and_clear(pud_t *pudp) return res; } -static inline void native_set_pte_at(struct mm_struct *mm, unsigned long addr, - pte_t *ptep , pte_t pte) +static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, + pte_t *ptep, pte_t pte) { - native_set_pte(ptep, pte); + set_pte(ptep, pte); } static inline void set_pmd_at(struct mm_struct *mm, unsigned long addr, diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c index e56a144..6c3407b 100644 --- a/arch/x86/kernel/paravirt.c +++ b/arch/x86/kernel/paravirt.c @@ -360,7 +360,6 @@ struct paravirt_patch_template pv_ops = { .mmu.release_p4d = paravirt_nop, .mmu.set_pte = native_set_pte, - .mmu.set_pte_at = native_set_pte_at, .mmu.set_pmd = native_set_pmd, .mmu.ptep_modify_prot_start = __ptep_modify_prot_start, diff --git a/arch/x86/xen/mmu_pv.c b/arch/x86/xen/mmu_pv.c index 3273c98..eda7814 100644 --- a/arch/x86/xen/mmu_pv.c +++ b/arch/x86/xen/mmu_pv.c @@ -285,13 +285,6 @@ static void xen_set_pte(pte_t *ptep, pte_t pteval) __xen_set_pte(ptep, pteval); } -static void xen_set_pte_at(struct mm_struct *mm, unsigned long addr, - pte_t *ptep, pte_t pteval) -{ - trace_xen_mmu_set_pte_at(mm, addr, ptep, pteval); - __xen_set_pte(ptep, pteval); -} - pte_t xen_ptep_modify_prot_start(struct vm_area_struct *vma, unsigned long addr, pte_t *ptep) { @@ -2105,7 +2098,6 @@ static const struct pv_mmu_ops xen_mmu_ops __initconst = { .release_pmd = xen_release_pmd_init, .set_pte = xen_set_pte_init, - .set_pte_at = xen_set_pte_at, .set_pmd = xen_set_pmd_hyper, .ptep_modify_prot_start = __ptep_modify_prot_start, diff --git a/include/trace/events/xen.h b/include/trace/events/xen.h index a5ccfa6..3b61b58 100644 --- a/include/trace/events/xen.h +++ b/include/trace/events/xen.h @@ -153,26 +153,6 @@ DECLARE_EVENT_CLASS(xen_mmu__set_pte, DEFINE_XEN_MMU_SET_PTE(xen_mmu_set_pte); -TRACE_EVENT(xen_mmu_set_pte_at, - TP_PROTO(struct mm_struct *mm, unsigned long addr, - pte_t *ptep, pte_t pteval), - TP_ARGS(mm, addr, ptep, pteval), - TP_STRUCT__entry( - __field(struct mm_struct *, mm) - __field(unsigned long, addr) - __field(pte_t *, ptep) - __field(pteval_t, pteval) - ), - TP_fast_assign(__entry->mm = mm; - __entry->addr = addr; - __entry->ptep = ptep; - __entry->pteval = pteval.pte), - TP_printk("mm %p addr %lx ptep %p pteval %0*llx (raw %0*llx)", - __entry->mm, __entry->addr, __entry->ptep, - (int)sizeof(pteval_t) * 2, (unsigned long long)pte_val(native_make_pte(__entry->pteval)), - (int)sizeof(pteval_t) * 2, (unsigned long long)__entry->pteval) - ); - TRACE_DEFINE_SIZEOF(pmdval_t); TRACE_EVENT(xen_mmu_set_pmd,