Message ID | 20230914015531.1419405-5-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 EAC28EE021A for <linux-mm@archiver.kernel.org>; Thu, 14 Sep 2023 01:55:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 37F576B0288; Wed, 13 Sep 2023 21:55:48 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 32E986B0289; Wed, 13 Sep 2023 21:55:48 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 181726B028F; Wed, 13 Sep 2023 21:55:48 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 0462A6B0288 for <linux-mm@kvack.org>; Wed, 13 Sep 2023 21:55:48 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id A5E9B160F12 for <linux-mm@kvack.org>; Thu, 14 Sep 2023 01:55:47 +0000 (UTC) X-FDA: 81233536734.01.F6C6851 Received: from mail-yb1-f201.google.com (mail-yb1-f201.google.com [209.85.219.201]) by imf19.hostedemail.com (Postfix) with ESMTP id D6B751A0017 for <linux-mm@kvack.org>; Thu, 14 Sep 2023 01:55:44 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=oscbF+Sd; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf19.hostedemail.com: domain of 3H2gCZQYKCCgWIERNGKSSKPI.GSQPMRYb-QQOZEGO.SVK@flex--seanjc.bounces.google.com designates 209.85.219.201 as permitted sender) smtp.mailfrom=3H2gCZQYKCCgWIERNGKSSKPI.GSQPMRYb-QQOZEGO.SVK@flex--seanjc.bounces.google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1694656544; 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=5olfKKfAgOBEIWorNeGA6oMvbpwHV/k+KeYKQRUdq04=; b=etpS4a9RpxJTM8bozbEnKCCtDmjuQNvQ6ebj1tmNEtFhzZKbOOplVfFgWwMyQU7gm4MIyd E1dxzQPqOw1tqDQJlvWHeb/pTDwTCv1ITiWpeEHBgPYoQdNtfnUa8rYVGy8VWHpeNUHfK4 Y/rjOvqtPHYxMkhbg8CLBb32YmIILPE= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=oscbF+Sd; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf19.hostedemail.com: domain of 3H2gCZQYKCCgWIERNGKSSKPI.GSQPMRYb-QQOZEGO.SVK@flex--seanjc.bounces.google.com designates 209.85.219.201 as permitted sender) smtp.mailfrom=3H2gCZQYKCCgWIERNGKSSKPI.GSQPMRYb-QQOZEGO.SVK@flex--seanjc.bounces.google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1694656544; a=rsa-sha256; cv=none; b=0n6ZVmnil6x0Y5BC0o6zVzIkqaS7lyNkxBrlprm2jzMBktiHOIEdmrOu4mLbr0N+xcbDPR CjN+9ganUyBzN/8gi30P/BcNZtEjI5U/nhMsGpUVTU1DwCWb3mxqm4G8EemUpOtXhl6GP4 714R1Cjzm1oekYsEbVip9ZLlPcq7qHo= Received: by mail-yb1-f201.google.com with SMTP id 3f1490d57ef6-d7e8e12df78so539518276.3 for <linux-mm@kvack.org>; Wed, 13 Sep 2023 18:55:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1694656544; x=1695261344; 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=5olfKKfAgOBEIWorNeGA6oMvbpwHV/k+KeYKQRUdq04=; b=oscbF+Sdn29udgOEuwGekl8Q8vhPzdmb2OYzzsBdGlf6X9nb9P365vKagSKKt1Z7ut g93IAyHOOadFiBobNbiu1LhVt4ov0tRoM4/GCEg6Duu5Cl0wRbOdIKnj1SRK+Jz0nBRE NRU6LBszAeJ7U7bGuXv96ypARmalsqoLjYJA0WAhGAFR8hZFCGDPTJ81SxC1Hvh6KuMt ElMv0Y7fXqRmBR23WhTO06TmT2Nfd47Lsbv6Ks6OGqSn9WCeUoJxhe8YbO28ecIJNUW+ 9XLy1atrWeVUhywOeAJPdU0Xe7vAj78X0ZFKjTZYXIY15TdGBONmMIqrc2kis/cvGdMN hb6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694656544; x=1695261344; 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=5olfKKfAgOBEIWorNeGA6oMvbpwHV/k+KeYKQRUdq04=; b=xNzIvl0BgRMEgc1dnMABJyk7INdfk+Q2oFRqk5ODVY1kthW0uhbIpv4xf5ROvNE7sZ LTNfCvev+OgZGA7xOT+F2JDy882q/EfilQvMecic0/EhHMHqNfZ/VyCdWn/T0K/ANshZ BFqTm94eXCQJ9KXS6bTSfsr76bhCIm7KkE+kGkj4GPMqEzh3M5qagBbGIqSm/dnqBG8b w7f4xdTjwzN6PT8Gp97jeRqfTmVBGtBQtiTYBsF5CfxYqoT60temQlnXR6mKkczAlxBl dYNkeQuxCYHexnIfML4ERnEKPICpMPY336ximJAY/jFdeKSmKGzeXWShAJUt36D+T0vg KA/Q== X-Gm-Message-State: AOJu0YxlzQXW/QgsSHkcrrvAnLTflRrMS2IA2QUSBf3J1N/Tt75MoFcM 7jCs3fBuLoXBDqpWH15YQHzZafyGDHg= X-Google-Smtp-Source: AGHT+IFAWDIKY3pID0CrDZgtjj2bXptPteu0k42w51y6Ps+oH46knUj2OnzhEQTEbd0IbAu5MzXei5K4JBI= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a05:6902:684:b0:d81:8e4d:b681 with SMTP id i4-20020a056902068400b00d818e4db681mr15248ybt.12.1694656543919; Wed, 13 Sep 2023 18:55:43 -0700 (PDT) Reply-To: Sean Christopherson <seanjc@google.com> Date: Wed, 13 Sep 2023 18:55:02 -0700 In-Reply-To: <20230914015531.1419405-1-seanjc@google.com> Mime-Version: 1.0 References: <20230914015531.1419405-1-seanjc@google.com> X-Mailer: git-send-email 2.42.0.283.g2d96d420d3-goog Message-ID: <20230914015531.1419405-5-seanjc@google.com> Subject: [RFC PATCH v12 04/33] 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>, "Matthew Wilcox (Oracle)" <willy@infradead.org>, Andrew Morton <akpm@linux-foundation.org>, Paul Moore <paul@paul-moore.com>, James Morris <jmorris@namei.org>, "Serge E. Hallyn" <serge@hallyn.com> 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-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, Chao Peng <chao.p.peng@linux.intel.com>, Fuad Tabba <tabba@google.com>, Jarkko Sakkinen <jarkko@kernel.org>, Anish Moorthy <amoorthy@google.com>, Yu Zhang <yu.c.zhang@linux.intel.com>, Isaku Yamahata <isaku.yamahata@intel.com>, Xu Yilun <yilun.xu@intel.com>, 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-Rspamd-Queue-Id: D6B751A0017 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: pnfys4x9fys99rq8q54tjmio9bqbutyo X-HE-Tag: 1694656544-75175 X-HE-Meta: U2FsdGVkX1/Na/YeaKpCG0nriJ19Cti7KjW/4hay/+fx0ACGG+bgfpzsg3RJYO89bH7fbw5eYfU7WKsAWErFUGxhiuMKHX+iffNq2X9Wi0ilgwpwtR8oDq+zayGAyh5wYqoYcgxCLd+YrzCGUrLikVE+fI60Y67yKVTYMQgrveoCTLb5IeqeH433gl6WG2L2/mspdcO0jUsEAhVycqEor5xYh1YZVc0HttvXEIFem840JUqic9w7cwwTdZMUUDtihQYZFHZKqCdQMQ5oXMLEKcvVsF/COUnOyDFmYfmwHyHAB+yFdxEHHwLtySpqJ7NtzZB/8k9TfqAuAc2fHn8AWkqYD3o57LwkyJB/n7YpjA0kcLV7XuJV+/vzWftxRXQy2QA0qnwOl1Iu5A656gLvM3427jhgot2rNNNZcbWX7S32vfWtkjkzEk+58ZEf+Fb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Jd4p4UI1NyRe2H/ijOKH3Z6y+V2t7tUDfRH+2lUJyVzY+8tDZXo2xVXmVgdkuf1DHae07PO8Yx75jaAjM/rjd56xUwrNVn0XwgpGyHiHR5U4UJmXmIxhUMpSB18TjMik9b3emvcNxagU0NCrfoKAy43qjv08rNjc+vQuICE8F0sWfXx6P7TRDVkkLbUhgztZZ4Ax/lftavo7MKYTbYhBuL7m9HUJwIZqWrLtRYzxwAmoqdIeeL0/januBWmsZmCaAUFXYpXDzdyrip2YJGqO57I2eD2dr+2zlO+zWQo3hflR4ju5MP9romODVuCJfSphoNVKkwNHfHGESlXADz5g== 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> |
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(-)