Message ID | 20231027182217.3615211-7-seanjc@google.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5600BC25B48 for <linux-mm@archiver.kernel.org>; Fri, 27 Oct 2023 18:22:43 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D98CD8000D; Fri, 27 Oct 2023 14:22:40 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D23BD8000C; Fri, 27 Oct 2023 14:22:40 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B4CD48000D; Fri, 27 Oct 2023 14:22:40 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 9D0428000C for <linux-mm@kvack.org>; Fri, 27 Oct 2023 14:22:40 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 78671B5F1D for <linux-mm@kvack.org>; Fri, 27 Oct 2023 18:22:40 +0000 (UTC) X-FDA: 81392062080.19.B53CF6C Received: from mail-pl1-f201.google.com (mail-pl1-f201.google.com [209.85.214.201]) by imf18.hostedemail.com (Postfix) with ESMTP id 84E471C0011 for <linux-mm@kvack.org>; Fri, 27 Oct 2023 18:22:38 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=grrMPnbo; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf18.hostedemail.com: domain of 37f87ZQYKCA46so1xqu22uzs.q20zw18B-00y9oqy.25u@flex--seanjc.bounces.google.com designates 209.85.214.201 as permitted sender) smtp.mailfrom=37f87ZQYKCA46so1xqu22uzs.q20zw18B-00y9oqy.25u@flex--seanjc.bounces.google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1698430958; h=from:from: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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=srqr8yeDZlFrvxNrVECKE5xxuDvV2cb3J0BOKhehVs4=; b=zD2bU1ev4p/JeJO9ci2BOpZqdoOsts9Gi9C1CEqLSwH+pznEFkm0zqIwkc9KUk5T2pdCjO YOyC8I63sWu/SpuLlfmM0B48lORPDfMsh8+bKIYdJq8hSpkhf0jDFY/ox/n7Myr9HG7Zc5 DV8wJAzZDLoVQ5Xq+YpYTVqGGW/8RE0= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=grrMPnbo; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf18.hostedemail.com: domain of 37f87ZQYKCA46so1xqu22uzs.q20zw18B-00y9oqy.25u@flex--seanjc.bounces.google.com designates 209.85.214.201 as permitted sender) smtp.mailfrom=37f87ZQYKCA46so1xqu22uzs.q20zw18B-00y9oqy.25u@flex--seanjc.bounces.google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1698430958; a=rsa-sha256; cv=none; b=zHOil4nJGjlTn0lF3Y3sDsdopWK+pTbzCwCSqWpV6dYGhOx6TgJXQo3NSo4ns9VbSxpzly qfMw1OwEFOUIJn2bK4zxjDLVmuqJ2vNqEvS4jwe4GFVJlhvFx8azMGAwfvFRuw6ywVzBHS uCVTFxD3CnWxv3e0Ko9XdN8zhyUnOzE= Received: by mail-pl1-f201.google.com with SMTP id d9443c01a7336-1caaaa873efso23349735ad.3 for <linux-mm@kvack.org>; Fri, 27 Oct 2023 11:22:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1698430957; x=1699035757; darn=kvack.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:from:to:cc:subject:date:message-id:reply-to; bh=srqr8yeDZlFrvxNrVECKE5xxuDvV2cb3J0BOKhehVs4=; b=grrMPnbo3nildZ36x6XR8dn2TV44a56Pyy9vPXcIszH33K/KWlKs0WePTH+//j60ZZ b03VLcO0iJUhnT7MSrGQrCKCIne4DVVJpnGJ5wQymDsQ3GjI3hiYGV6m61cQRKdlFnAT hlPfM0TYc8xEg8I55EFImQoKL7xnLoBcu4Zmf1cA5uTj5XEFZJMicE47Xru91LzcDtJG 1nR7PzFyeBqONLcwymZP3skG49x6lrYT35sA3GGV43D4zX1j2OkS2hQSaLfVLdyfJ0o0 wVKoCV0SFlpPf94esJhVasojXzx/zlIj/qoe3LTAxrwBZh6HFlgPbaSl03zGSw/uMk3O 8Mgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698430957; x=1699035757; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=srqr8yeDZlFrvxNrVECKE5xxuDvV2cb3J0BOKhehVs4=; b=cpkBKdmWvemH6w0lh76iunukx6Zjj/pMFUJU42jZC+3eXHmkuj7BaqFe4c1oLWhQKB xyqy/riMU3qKMJ2RYGZW4VzWtSFB5DkxJmzbNFp0Xr40i5y8Dx3W2Ye31FMEx8rOzYiq 0fmuuyo0YiVo9z7aZBHhqSWAzHtasrPTPLIYQ3NHgflniasltFkLBKZt2wETJ89x+BrI SOZPa8ekD8bpyXNIVhSyGb61hZQHw6tTIz8IEha1WhiOQeYl/W4YIxYIFC3925A5AKnv ANBD7lY5x5fpV1iroHdv+xSb0vWRXUGt3N907nuXPLRDLCixu1o8Qj1MBF70y1+NW0Rl lSjg== X-Gm-Message-State: AOJu0YxSbno+4nqWZfMmNvHwQP12jwjm7Aev44AXfr6IU0sqvIRcyQ30 STrQRp7Mcorhd35/CPiRJwjSTzJLiHo= X-Google-Smtp-Source: AGHT+IEgJpE7SXSukSyCmrL3MrLSyvY8980C5XITIQh/pYBdmOorR/VvmfyRxJnTS7i/xC9oBoneiM7iOr4= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a17:903:446:b0:1ca:2620:78ad with SMTP id iw6-20020a170903044600b001ca262078admr60815plb.8.1698430957451; Fri, 27 Oct 2023 11:22:37 -0700 (PDT) Reply-To: Sean Christopherson <seanjc@google.com> Date: Fri, 27 Oct 2023 11:21:48 -0700 In-Reply-To: <20231027182217.3615211-1-seanjc@google.com> Mime-Version: 1.0 References: <20231027182217.3615211-1-seanjc@google.com> X-Mailer: git-send-email 2.42.0.820.g83a721a137-goog Message-ID: <20231027182217.3615211-7-seanjc@google.com> Subject: [PATCH v13 06/35] KVM: PPC: Return '1' unconditionally for KVM_CAP_SYNC_MMU From: Sean Christopherson <seanjc@google.com> To: Paolo Bonzini <pbonzini@redhat.com>, Marc Zyngier <maz@kernel.org>, Oliver Upton <oliver.upton@linux.dev>, Huacai Chen <chenhuacai@kernel.org>, Michael Ellerman <mpe@ellerman.id.au>, Anup Patel <anup@brainfault.org>, Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu>, Sean Christopherson <seanjc@google.com>, Alexander Viro <viro@zeniv.linux.org.uk>, Christian Brauner <brauner@kernel.org>, "Matthew Wilcox (Oracle)" <willy@infradead.org>, Andrew Morton <akpm@linux-foundation.org> Cc: kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Xiaoyao Li <xiaoyao.li@intel.com>, Xu Yilun <yilun.xu@intel.com>, Chao Peng <chao.p.peng@linux.intel.com>, Fuad Tabba <tabba@google.com>, Jarkko Sakkinen <jarkko@kernel.org>, Anish Moorthy <amoorthy@google.com>, David Matlack <dmatlack@google.com>, Yu Zhang <yu.c.zhang@linux.intel.com>, Isaku Yamahata <isaku.yamahata@intel.com>, " =?utf-8?q?Micka=C3=ABl_Sala?= =?utf-8?q?=C3=BCn?= " <mic@digikod.net>, Vlastimil Babka <vbabka@suse.cz>, Vishal Annapurve <vannapurve@google.com>, Ackerley Tng <ackerleytng@google.com>, Maciej Szmigiero <mail@maciej.szmigiero.name>, David Hildenbrand <david@redhat.com>, Quentin Perret <qperret@google.com>, Michael Roth <michael.roth@amd.com>, Wang <wei.w.wang@intel.com>, Liam Merwick <liam.merwick@oracle.com>, Isaku Yamahata <isaku.yamahata@gmail.com>, "Kirill A . Shutemov" <kirill.shutemov@linux.intel.com> Content-Type: text/plain; charset="UTF-8" X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 84E471C0011 X-Stat-Signature: mxuyrsfwdtdggj5qfhrnemuscmmry4u3 X-HE-Tag: 1698430958-768877 X-HE-Meta: U2FsdGVkX18HUxIEdSZUBDZzrRD8BndaniKXkaIvfKUsAR68CW07Qd1hzOziNVwOPpMJ5yXltwRWidnheM6vSkYZB2tb5u8NkdGc92GOmlc2w2iyceUlv24d1cchzNMSnDwG3tFyAuQVEyHiUP+ay7Q+Ox8ajSFniOjFNLr9uwTOhgEbGk7RA44BBQa5t6Xv8ROPmlJkbpTMryFh0WXho1Wh6j4riXKPAGkgP0PRXRk62pXKBC6FshEFBbsrTIldqhxt/9ixIbt1mSF58vfFZnKWpYbYhfRmj9nbfzfiuEgZUu+HERZNOcL+8NWOQ5mxt7xI13fhyigGVVzU3MFXUuG3RkbNS44VYlmqyrKGuMw+nCDlotY8YO4R1cQOUoDa2IEQBOUkg8jTRB6V1l7JlvJs6jvl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NqHlPu4BUZkWfu/KC9Do5CF8wuAqhGQs0ej/c9FOKtSI7kcn5XoGUoj/pD0/e5hnufjHrWWYgNX6/oMmxOGQSc2qCDezWYpEY6sGco4FtAAVvGr1xK7CWfk7tOHCwWfxu3ympuj/sYAxTQLwMZrg40JtiXgl6XdnbgmUl60zC1Dqh6A28X2btZnaZmsQfbbGM56lmWi+J/Au95FRNhsEaFZmO/LAIb0O8fx6DoMhS0Dyrfcce9ngn9SbGT3AqC2DRqirhDWH9PPgl33pfOtgZE8Px78SAsIEe62RJQMn4WFOtrlgM4euQ8I3sTNRt24VQvHaHHIqbkq4ZczmtwFWcH4LJ2IOOvj0V5ERJQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
KVM: guest_memfd() and per-page attributes
|
expand
|
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c index b0a512ede764..8d3ec483bc2b 100644 --- a/arch/powerpc/kvm/powerpc.c +++ b/arch/powerpc/kvm/powerpc.c @@ -635,11 +635,7 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext) #if !defined(CONFIG_MMU_NOTIFIER) || !defined(KVM_ARCH_WANT_MMU_NOTIFIER) BUILD_BUG(); #endif -#ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE - r = hv_enabled; -#else r = 1; -#endif break; #ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE case KVM_CAP_PPC_HTAB_FD:
Advertise that KVM's MMU is synchronized with the primary MMU for all flavors of PPC KVM support, i.e. advertise that the MMU is synchronized when CONFIG_KVM_BOOK3S_HV_POSSIBLE=y but the VM is not using hypervisor mode (a.k.a. PR VMs). PR VMs, via kvm_unmap_gfn_range_pr(), do the right thing for mmu_notifier invalidation events, and more tellingly, KVM returns '1' for KVM_CAP_SYNC_MMU when CONFIG_KVM_BOOK3S_HV_POSSIBLE=n and CONFIG_KVM_BOOK3S_PR_POSSIBLE=y, i.e. KVM already advertises a synchronized MMU for PR VMs, just not when CONFIG_KVM_BOOK3S_HV_POSSIBLE=y. Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Sean Christopherson <seanjc@google.com> --- arch/powerpc/kvm/powerpc.c | 4 ---- 1 file changed, 4 deletions(-)