Message ID | 20240116100025.95702-1-chentao@kylinos.cn |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-27242-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:42cf:b0:101:a8e8:374 with SMTP id q15csp156995dye; Tue, 16 Jan 2024 02:11:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IFGuHGaiVWLt4qNyIXPMaEa+3DMN0K0S/JwUIQ8TGboT1kZTDIzPNUyJjh6kJRAfCBbbCY3 X-Received: by 2002:a05:622a:242:b0:42a:335:7511 with SMTP id c2-20020a05622a024200b0042a03357511mr1074069qtx.35.1705399902284; Tue, 16 Jan 2024 02:11:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705399902; cv=none; d=google.com; s=arc-20160816; b=BI5xkT2TpiRyHt/vdiNe/iGGQEBOWf+4mL9PfX+I0vgPtGkdTmRK3UJN/y5diRfCEh P7YM9Xte4dEsuEWZLsz5aSfQXzlGDkJGxs4/cZklEurk0IKaO2E7zMdqm1uWavMulFld hF0JntRLAo5+PxcF76nYwD645Hhmd4RNiEH3fjjJ8JBjuFPy7YdC8cwEmaO4DQX932MX ZNNKbaWgeN3Gg17ioc4C0Pm2Y2NN6JhH+vjbeeK+hInkfF+je6HPjGiq4cm8zuIHUpHB 65WRj108ivKC4+eNHy6+DjFtb3HhVExMQdB5cQ5kTVJbo174M3vchiMG0NGUA3u8XHlA H41g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=FVXyojPK0CLBfr1W4cJV/kkDxXIysxifOoHsT9yh39I=; fh=PsXrae7AEmetyrctQlBiQWBBkLsAf/3lZFk9y3q90Rw=; b=TE3mC7xkXos4LWKwMosz7T3UN5DNVOO7md0blq38kQZPfQ+yPpzNjJVhb+XGNvhSNz QAL7AwF1RzPlWygf7AMMIRsdukQ43nELKsRuzE69gp5nTWGlL4VumkoboDWqHUwGHwhj LYzjcf099yAkFTD7Lyb9zUU1BdURVtl8860Fgli29BsGjQNICzakBm8NX98NSJchOat1 It6fTQ6iwTh/QceZ9dsVp1Xv0FtCBUzPXjbMkupsoWdzqMboXoTz+RCqre6McutSXUvK T+BCUbReBUN0Fjbsr8KxCfD2vBUVY6B9PwLu8JWxZF2UNDAeoBhS7qWPlJEhRUn8N5zZ 1SAA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-27242-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-27242-ouuuleilei=gmail.com@vger.kernel.org" Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id x17-20020ac85f11000000b004283d581a5asi9616737qta.628.2024.01.16.02.11.42 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jan 2024 02:11:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-27242-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-27242-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-27242-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 1B8B01C20D10 for <ouuuleilei@gmail.com>; Tue, 16 Jan 2024 10:11:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 45B5213FF7; Tue, 16 Jan 2024 10:11:24 +0000 (UTC) Received: from mailgw.kylinos.cn (mailgw.kylinos.cn [124.126.103.232]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 69188134BE; Tue, 16 Jan 2024 10:11:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kylinos.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kylinos.cn X-UUID: a22905cd170d4ee9805d32e1eec18322-20240116 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.35,REQID:16592e3b-7f91-4805-b226-df76d2b3ec8f,IP:10, URL:0,TC:0,Content:0,EDM:25,RT:0,SF:-5,FILE:0,BULK:0,RULE:Release_Ham,ACTI ON:release,TS:30 X-CID-INFO: VERSION:1.1.35,REQID:16592e3b-7f91-4805-b226-df76d2b3ec8f,IP:10,UR L:0,TC:0,Content:0,EDM:25,RT:0,SF:-5,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:30 X-CID-META: VersionHash:5d391d7,CLOUDID:17af677f-4f93-4875-95e7-8c66ea833d57,B ulkID:240116180031ZL8M7VE6,BulkQuantity:0,Recheck:0,SF:19|38|24|100|101|74 |66|17|42|102,TC:nil,Content:0,EDM:5,IP:-2,URL:0,File:nil,Bulk:nil,QS:nil, BEC:nil,COL:0,OSI:0,OSA:0,AV:0,LES:1,SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0 X-CID-BVR: 0,NGT X-CID-BAS: 0,NGT,0,_ X-CID-FACTOR: TF_CID_SPAM_FAS,TF_CID_SPAM_FSD,TF_CID_SPAM_FSI,TF_CID_SPAM_SNR X-UUID: a22905cd170d4ee9805d32e1eec18322-20240116 Received: from mail.kylinos.cn [(39.156.73.10)] by mailgw (envelope-from <chentao@kylinos.cn>) (Generic MTA) with ESMTP id 1885945740; Tue, 16 Jan 2024 18:00:29 +0800 Received: from mail.kylinos.cn (localhost [127.0.0.1]) by mail.kylinos.cn (NSMail) with SMTP id 5C6A3E000EB9; Tue, 16 Jan 2024 18:00:29 +0800 (CST) X-ns-mid: postfix-65A653BD-152262411 Received: from kernel.. (unknown [172.20.15.234]) by mail.kylinos.cn (NSMail) with ESMTPA id 43C6EE000EB9; Tue, 16 Jan 2024 18:00:27 +0800 (CST) From: Kunwu Chan <chentao@kylinos.cn> To: seanjc@google.com, pbonzini@redhat.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Kunwu Chan <chentao@kylinos.cn> Subject: [PATCH] KVM: x86/mmu: Use KMEM_CACHE instead of kmem_cache_create() Date: Tue, 16 Jan 2024 18:00:25 +0800 Message-Id: <20240116100025.95702-1-chentao@kylinos.cn> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788241408176908783 X-GMAIL-MSGID: 1788241408176908783 |
Series |
KVM: x86/mmu: Use KMEM_CACHE instead of kmem_cache_create()
|
|
Commit Message
Kunwu Chan
Jan. 16, 2024, 10 a.m. UTC
Use the new KMEM_CACHE() macro instead of direct kmem_cache_create
to simplify the creation of SLAB caches.
Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
---
arch/x86/kvm/mmu/mmu.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
Comments
On Tue, 16 Jan 2024 18:00:25 +0800, Kunwu Chan wrote: > Use the new KMEM_CACHE() macro instead of direct kmem_cache_create > to simplify the creation of SLAB caches. > > Applied to kvm-x86 mmu, with a slightly expanded changelog. Thanks! [1/1] KVM: x86/mmu: Use KMEM_CACHE instead of kmem_cache_create() https://github.com/kvm-x86/linux/commit/0dbd05469966 -- https://github.com/kvm-x86/linux/tree/next
diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c index d59e3ba5d646..5f0d8148cf6e 100644 --- a/arch/x86/kvm/mmu/mmu.c +++ b/arch/x86/kvm/mmu/mmu.c @@ -6997,9 +6997,7 @@ int kvm_mmu_vendor_module_init(void) kvm_mmu_reset_all_pte_masks(); - pte_list_desc_cache = kmem_cache_create("pte_list_desc", - sizeof(struct pte_list_desc), - 0, SLAB_ACCOUNT, NULL); + pte_list_desc_cache = KMEM_CACHE(pte_list_desc, SLAB_ACCOUNT); if (!pte_list_desc_cache) goto out;