From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Gunthorpe Date: Mon, 18 Sep 2023 12:18:04 -0300 Subject: [PATCH 03/26] virt: Declare and define vfio_file_set_kvm() iff CONFIG_KVM is enabled In-Reply-To: <20230916003118.2540661-4-seanjc@google.com> References: <20230916003118.2540661-1-seanjc@google.com> <20230916003118.2540661-4-seanjc@google.com> Message-ID: <20230918151804.GH13795@ziepe.ca> List-Id: To: kvm-riscv@lists.infradead.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Fri, Sep 15, 2023 at 05:30:55PM -0700, Sean Christopherson wrote: > Hide vfio_file_set_kvm() and its unique helpers if KVM is not enabled, > nothing else in the kernel (or out of the kernel) should be using a > KVM specific helper. > > Signed-off-by: Sean Christopherson > --- > drivers/vfio/vfio_main.c | 2 +- > include/linux/vfio.h | 2 ++ > 2 files changed, 3 insertions(+), 1 deletion(-) Patch subject should be vfio not virt Reviewed-by: Jason Gunthorpe > @@ -1388,6 +1387,7 @@ void vfio_file_set_kvm(struct file *file, struct kvm *kvm) > vfio_device_file_set_kvm(file, kvm); > } > EXPORT_SYMBOL_GPL(vfio_file_set_kvm); > +#endif We could even put this in a symbol namespace.. Jason From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qt1-f170.google.com (mail-qt1-f170.google.com [209.85.160.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 49FEE15494 for ; Mon, 18 Sep 2023 15:18:07 +0000 (UTC) Received: by mail-qt1-f170.google.com with SMTP id d75a77b69052e-411f5dd7912so31065551cf.3 for ; Mon, 18 Sep 2023 08:18:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1695050286; x=1695655086; darn=lists.linux.dev; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=skILK3+RqLs29/E8NIb2upQKKLhMeBuYLpBX+o8j0o8=; b=NeGyEDAQUamBvGuZf9UHstJRgGQV1X24WUPvfXLiDEP4WYPuIjnmMOiL6i0gUiyVQ0 4x5DUBOpeAPh8VqAOCvQm5eKiUW5n+Zlk3gzGyArM3Lcb59f2YO1z6aCJkDXCQ2od2X9 7efrrQRjES9MPoF6v56Z66huZ4ziRP/KQE0JiP3YXjpQSu3sDVLDvyjTOkbv4uaiezrY rdxFArEiFEUTrSdj0p74l2gNVEDbn0coc6lQ8/ReABh9+4hQSpH8Njv1jiiM3Nko1BRa DVTj1s4VQ0li9ecXKM9vxGsfnAfZxEUUZhUT0ktP/+uBNXK1DmM5QYt1idN6ISGZlabA K5zQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695050286; x=1695655086; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=skILK3+RqLs29/E8NIb2upQKKLhMeBuYLpBX+o8j0o8=; b=hZtf6lCaYfVZFqzcfRuR4aM87zCumLh6Ag2U6sUJSaGuCYvgtLDp9lzU3+1IylJDV1 0ks/YdAzU9ML8rIKCgXmoVJEoU1/LABidGSwUJtinbprNa3IqMOPpm89B19JGY5d+AlI 3uJWQ5PdZ6aT0S4f9gS3bXVnnIUwpJd8bwVGw3elclYmeYb0U5FL0Av1Zew+mbCbI30a hFyxzCimZC0zu0ADTUcmCeWCU7nukLlZkzhAyIRuSn9S+zpTYc3PzuviSjt6ZwDd6TwL a/gEsQLNv5fe3o8FnNDf2N6AjaB5AXQwNPeQtNOQz7UEcvh2C4tBH5N5mlENOzfQftbm Dt0w== X-Gm-Message-State: AOJu0YyYUkZrjOFNaLYimWPwhBzcQEYfCB7eY3mV77jGFD57U/EJ2y3W 8CkBgQWO2d1lr8+hQjIVC2vFdA== X-Google-Smtp-Source: AGHT+IEPjZK20Aqh4DOH80nyWTVB2XY8RoIapnvcyiksM3wp5qxi6JV9wSTNi2A0D4DmrBL930vlSw== X-Received: by 2002:ad4:458d:0:b0:63f:9aa3:867b with SMTP id x13-20020ad4458d000000b0063f9aa3867bmr9395365qvu.40.1695050286275; Mon, 18 Sep 2023 08:18:06 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-142-68-26-201.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.68.26.201]) by smtp.gmail.com with ESMTPSA id r28-20020a0cb29c000000b0063d038df3f3sm3532215qve.52.2023.09.18.08.18.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Sep 2023 08:18:05 -0700 (PDT) Received: from jgg by wakko with local (Exim 4.95) (envelope-from ) id 1qiG0i-0005OR-Iy; Mon, 18 Sep 2023 12:18:04 -0300 Date: Mon, 18 Sep 2023 12:18:04 -0300 From: Jason Gunthorpe To: Sean Christopherson Cc: Catalin Marinas , Will Deacon , Marc Zyngier , Oliver Upton , Huacai Chen , Michael Ellerman , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Janosch Frank , Claudio Imbrenda , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, Peter Zijlstra , Arnaldo Carvalho de Melo , Paolo Bonzini , Tony Krowiak , Halil Pasic , Jason Herne , Harald Freudenberger , Alex Williamson , Andy Lutomirski , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-mips@vger.kernel.org, kvm@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Anish Ghulati , Venkatesh Srinivas , Andrew Thornton Subject: Re: [PATCH 03/26] virt: Declare and define vfio_file_set_kvm() iff CONFIG_KVM is enabled Message-ID: <20230918151804.GH13795@ziepe.ca> References: <20230916003118.2540661-1-seanjc@google.com> <20230916003118.2540661-4-seanjc@google.com> Precedence: bulk X-Mailing-List: kvmarm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230916003118.2540661-4-seanjc@google.com> On Fri, Sep 15, 2023 at 05:30:55PM -0700, Sean Christopherson wrote: > Hide vfio_file_set_kvm() and its unique helpers if KVM is not enabled, > nothing else in the kernel (or out of the kernel) should be using a > KVM specific helper. > > Signed-off-by: Sean Christopherson > --- > drivers/vfio/vfio_main.c | 2 +- > include/linux/vfio.h | 2 ++ > 2 files changed, 3 insertions(+), 1 deletion(-) Patch subject should be vfio not virt Reviewed-by: Jason Gunthorpe > @@ -1388,6 +1387,7 @@ void vfio_file_set_kvm(struct file *file, struct kvm *kvm) > vfio_device_file_set_kvm(file, kvm); > } > EXPORT_SYMBOL_GPL(vfio_file_set_kvm); > +#endif We could even put this in a symbol namespace.. Jason From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 55D78CD37B0 for ; Mon, 18 Sep 2023 15:18:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1PENnpqrUSuQGKK/74JWpFGlp5VHgO6Y0OXGN+FWRzg=; b=kjM2wAUTpAM6PZ NQaqXmDtrCpjqPApauY1yrap8ic8n6P6dKUyWDrUqa8fR5QDB5ZhE5pFrK/LAq0dHRLTWNunBd9JF z3P5xCf6F8NZC8Dv0X/CwP2XMiBoDIxr8FMyPK1CAy0BZ6uNBcSCFBmO1pjxgObqt5nhEGv3qQ1zH r1IjNMk8dBOQYlTQY9Jy/ahHZVaVdEk4E32DAqItebgItf48tyUMpzKrQMhTLftuZOtLQMj2ZL48/ +ZMQs2c99nyRxbLNabzT3ATMfVG8YiwfE001zigMXSQfTjjrS4laSQIVUmh/FbM4QQ2znAY0tYv1O HukEPPl2vGNQdTWw5vdg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qiG0o-00FjnI-3D; Mon, 18 Sep 2023 15:18:11 +0000 Received: from mail-qt1-x82c.google.com ([2607:f8b0:4864:20::82c]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qiG0m-00FjkL-0y for linux-riscv@lists.infradead.org; Mon, 18 Sep 2023 15:18:09 +0000 Received: by mail-qt1-x82c.google.com with SMTP id d75a77b69052e-412091b9035so31055861cf.1 for ; Mon, 18 Sep 2023 08:18:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1695050286; x=1695655086; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=skILK3+RqLs29/E8NIb2upQKKLhMeBuYLpBX+o8j0o8=; b=n6jL8wh9yZ+YgRCLkcZ7AcXMqtF/+gWvKXPg79MBnBzPl+oy3YGjGVxJHE0oTf+grK 4eBpJn2CkNmuZLQ6JXhw8gi92dSULrCQ68cbue+gfH+gI3TMpgvflAe41qWA/H9yl5y0 F2Tk3h5NyUF0vt7XtXH1LTU0D7CgV7suKA1JRT0DuAsvJ6fPGd7yorKBW3ptnFHR4qzB jsZT9Id1Wp2BRJBHPTFDuG/lxCbfoGl3a+x5R2K82rt6xJCAY5ivDf2AZKoD5bN4Gx2N mXINTA8WpsFcfrKuOoZ+9Vp7cu+6pKubcCsD+0lb3X0mfbUdaZwjU9LS50fLmW0+Ml/6 WqMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695050286; x=1695655086; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=skILK3+RqLs29/E8NIb2upQKKLhMeBuYLpBX+o8j0o8=; b=p4aNX5u9w8hbwarfdCY++oxMb4jjkrvcRo+WgGVdCTKYne0fj8HDDZYViZAqTOds0j hUTUkId0tiAwbUfU92NAmBksIxr0uZUbsxtepfIfcCUFiniJMrLS3HrvdlyaCcR8VBLe Wf1450roIMxRaOIcyFkPsWyPc22WPWJJso0g9lxUw74oVKi1MkfrN8Y/HiJa9iefVoC+ sA12L7x11NRpNYQ8pkk3ESFxMNX4bBEAlUy175/l56C/57hrjAtumhpH1V+RofIkDzTN /67exD5kZJ+ol9rSBAbk9sadCDQ0Wb1N139o3rfM28PPdcz3w3M1mOiZFVcLfVu/HCRF r4sQ== X-Gm-Message-State: AOJu0YwwlLoxZviKWpJS4L+/LpiclYfvxxKRBYnz2txpzJxUxlHdF5Wl RfyRYMzZEABH6jvuFHrzgplGFQ== X-Google-Smtp-Source: AGHT+IEPjZK20Aqh4DOH80nyWTVB2XY8RoIapnvcyiksM3wp5qxi6JV9wSTNi2A0D4DmrBL930vlSw== X-Received: by 2002:ad4:458d:0:b0:63f:9aa3:867b with SMTP id x13-20020ad4458d000000b0063f9aa3867bmr9395365qvu.40.1695050286275; Mon, 18 Sep 2023 08:18:06 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-142-68-26-201.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.68.26.201]) by smtp.gmail.com with ESMTPSA id r28-20020a0cb29c000000b0063d038df3f3sm3532215qve.52.2023.09.18.08.18.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Sep 2023 08:18:05 -0700 (PDT) Received: from jgg by wakko with local (Exim 4.95) (envelope-from ) id 1qiG0i-0005OR-Iy; Mon, 18 Sep 2023 12:18:04 -0300 Date: Mon, 18 Sep 2023 12:18:04 -0300 From: Jason Gunthorpe To: Sean Christopherson Cc: Catalin Marinas , Will Deacon , Marc Zyngier , Oliver Upton , Huacai Chen , Michael Ellerman , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Janosch Frank , Claudio Imbrenda , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, Peter Zijlstra , Arnaldo Carvalho de Melo , Paolo Bonzini , Tony Krowiak , Halil Pasic , Jason Herne , Harald Freudenberger , Alex Williamson , Andy Lutomirski , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-mips@vger.kernel.org, kvm@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Anish Ghulati , Venkatesh Srinivas , Andrew Thornton Subject: Re: [PATCH 03/26] virt: Declare and define vfio_file_set_kvm() iff CONFIG_KVM is enabled Message-ID: <20230918151804.GH13795@ziepe.ca> References: <20230916003118.2540661-1-seanjc@google.com> <20230916003118.2540661-4-seanjc@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230916003118.2540661-4-seanjc@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230918_081808_337756_1E003998 X-CRM114-Status: GOOD ( 13.69 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On Fri, Sep 15, 2023 at 05:30:55PM -0700, Sean Christopherson wrote: > Hide vfio_file_set_kvm() and its unique helpers if KVM is not enabled, > nothing else in the kernel (or out of the kernel) should be using a > KVM specific helper. > > Signed-off-by: Sean Christopherson > --- > drivers/vfio/vfio_main.c | 2 +- > include/linux/vfio.h | 2 ++ > 2 files changed, 3 insertions(+), 1 deletion(-) Patch subject should be vfio not virt Reviewed-by: Jason Gunthorpe > @@ -1388,6 +1387,7 @@ void vfio_file_set_kvm(struct file *file, struct kvm *kvm) > vfio_device_file_set_kvm(file, kvm); > } > EXPORT_SYMBOL_GPL(vfio_file_set_kvm); > +#endif We could even put this in a symbol namespace.. Jason _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E89B1C46CA1 for ; Mon, 18 Sep 2023 15:19:32 +0000 (UTC) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ziepe.ca header.i=@ziepe.ca header.a=rsa-sha256 header.s=google header.b=oeTvlc3P; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4Rq7kW35QRz3chF for ; Tue, 19 Sep 2023 01:19:31 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=ziepe.ca header.i=@ziepe.ca header.a=rsa-sha256 header.s=google header.b=oeTvlc3P; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=ziepe.ca (client-ip=2607:f8b0:4864:20::72b; helo=mail-qk1-x72b.google.com; envelope-from=jgg@ziepe.ca; receiver=lists.ozlabs.org) Received: from mail-qk1-x72b.google.com (mail-qk1-x72b.google.com [IPv6:2607:f8b0:4864:20::72b]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4Rq7hx4Vzsz3cMW for ; Tue, 19 Sep 2023 01:18:09 +1000 (AEST) Received: by mail-qk1-x72b.google.com with SMTP id af79cd13be357-773a0f36b4bso273252285a.0 for ; Mon, 18 Sep 2023 08:18:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1695050286; x=1695655086; darn=lists.ozlabs.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=skILK3+RqLs29/E8NIb2upQKKLhMeBuYLpBX+o8j0o8=; b=oeTvlc3PGoH0ApaXQQ3xCeU4hZahsgJWwHi9ClHdywZKWb+FieohPrk2iCp5tdkOsc 7ziDD9NaD4Wtvb2Jvi5Kyo2yJIFNlhb6LsRo1GDqr7Lg7Hj5K3gmg2HsKL39i1GK8gPY thLWBxSRLOW71DlkX4BO5TkijsDO8JB9smRqipvK3u4iF5PGXtXDi4gSfrTOrdrsPWYe rxVlPJS9wXRp1Smguvx3gk70miHbKcgp4qil1z86fW7yJxme0zn3L+yREAnvR51IG2eo Jts+M9wsmvNyAxw4Or4n9zNvdzR0OLHhCg6Vp2OCCtZSlFZtPG/jUfYfEELiR8hdhb0L sV0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695050286; x=1695655086; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=skILK3+RqLs29/E8NIb2upQKKLhMeBuYLpBX+o8j0o8=; b=MDAqJTVvKTASVd7gBjY74kV0ZSv1raivODVHJTHga/erdEY1VX230sD0gl4CE3RUWH ksPIR6hG9k9jnnBSSoENWZ0t/CTLPsZZlkQQMBemlJ+3F58dG26BIuOAon5LHOgQJTrp CC1bfE1/SPCw5ZbZKnep6OQ6VYfSWP6VbIcWTwI+Oh6OlwLo5tUcMzlpgEKpds9DZehZ OY8zzyEJxkmyVAQ95DMwoc6Pll1yshyt2ZR7jmHHVttXeww8e7DJP+q2UuOuhBu3f5Qx QqSiBskaaJyvq/xkXtx4FArqi3IX8tSMuYIAIoO++ZkWZeLCRi0TLW7rQC2zaL8HBPpf zEZQ== X-Gm-Message-State: AOJu0Ywxmpc4oFDZNXTV3XUDgqJ37sxiS3g0oW89HZocziWjK+qCvYeD hEt6VK7F0HnFGWT8/+JPdS7n+g== X-Google-Smtp-Source: AGHT+IEPjZK20Aqh4DOH80nyWTVB2XY8RoIapnvcyiksM3wp5qxi6JV9wSTNi2A0D4DmrBL930vlSw== X-Received: by 2002:ad4:458d:0:b0:63f:9aa3:867b with SMTP id x13-20020ad4458d000000b0063f9aa3867bmr9395365qvu.40.1695050286275; Mon, 18 Sep 2023 08:18:06 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-142-68-26-201.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.68.26.201]) by smtp.gmail.com with ESMTPSA id r28-20020a0cb29c000000b0063d038df3f3sm3532215qve.52.2023.09.18.08.18.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Sep 2023 08:18:05 -0700 (PDT) Received: from jgg by wakko with local (Exim 4.95) (envelope-from ) id 1qiG0i-0005OR-Iy; Mon, 18 Sep 2023 12:18:04 -0300 Date: Mon, 18 Sep 2023 12:18:04 -0300 From: Jason Gunthorpe To: Sean Christopherson Subject: Re: [PATCH 03/26] virt: Declare and define vfio_file_set_kvm() iff CONFIG_KVM is enabled Message-ID: <20230918151804.GH13795@ziepe.ca> References: <20230916003118.2540661-1-seanjc@google.com> <20230916003118.2540661-4-seanjc@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230916003118.2540661-4-seanjc@google.com> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: x86@kernel.org, kvm@vger.kernel.org, Peter Zijlstra , Catalin Marinas , Dave Hansen , linux-kernel@vger.kernel.org, Alexander Gordeev , Claudio Imbrenda , Will Deacon , linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, Janosch Frank , Harald Freudenberger , Marc Zyngier , Huacai Chen , Halil Pasic , Andrew Thornton , Ingo Molnar , Christian Borntraeger , Jason Herne , Albert Ou , Vasily Gorbik , Venkatesh Srinivas , Heiko Carstens , Arnaldo Carvalho de Melo , Alex Williamson , Borislav Petkov , And y Lutomirski , Paul Walmsley , kvmarm@lists.linux.dev, Thomas Gleixner , linux-arm-kernel@lists.infradead.org, Tony Krowiak , Anish Ghulati , linux-mips@vger.kernel.org, Oliver Upton , linux-perf-users@vger.kernel.org, Palmer Dabbelt , kvm-riscv@lists.infradead.org, Anup Patel , Paolo Bonzini , linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Fri, Sep 15, 2023 at 05:30:55PM -0700, Sean Christopherson wrote: > Hide vfio_file_set_kvm() and its unique helpers if KVM is not enabled, > nothing else in the kernel (or out of the kernel) should be using a > KVM specific helper. > > Signed-off-by: Sean Christopherson > --- > drivers/vfio/vfio_main.c | 2 +- > include/linux/vfio.h | 2 ++ > 2 files changed, 3 insertions(+), 1 deletion(-) Patch subject should be vfio not virt Reviewed-by: Jason Gunthorpe > @@ -1388,6 +1387,7 @@ void vfio_file_set_kvm(struct file *file, struct kvm *kvm) > vfio_device_file_set_kvm(file, kvm); > } > EXPORT_SYMBOL_GPL(vfio_file_set_kvm); > +#endif We could even put this in a symbol namespace.. Jason From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0972DC46CA1 for ; Mon, 18 Sep 2023 15:18:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=7NPk+aloPUFf5fmGR3xPhWorRyI58gnZZt+fMDahOiE=; b=JHPRtWBiC+lWvZ Kn9wE3A0mTo5UGNddCn2hJgbY8U/iwJVy+S8/prZLg/viBdLdZWWM+/mc67loeH13q8mrpYnbJE/b UCyZ/9UIalkpYthEpFRMm43ibjMoa7aO13NngZAYH5WzwZwVQFnT+zrldgvLzNhl3eYJ81fJzJTpI wyM+Mx3SWJonNqcK4oyOLW/X29HL0BerfzR7i4n5ME4Xk7BPsbdUaxh5Q9SxYmiEaV9QUQ3F+E/RS lI4hHprADopvO3jhPQo7tbz8DzMPcHiMAz9AnYnaCbUgL1lWxUq356LXYUoLG8bGjZNaLrtbQM0sg QYlZZWbzGAM1zG5vKXsw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qiG0r-00Fjoj-12; Mon, 18 Sep 2023 15:18:13 +0000 Received: from mail-qk1-x72e.google.com ([2607:f8b0:4864:20::72e]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qiG0m-00FjkN-1d for linux-arm-kernel@lists.infradead.org; Mon, 18 Sep 2023 15:18:10 +0000 Received: by mail-qk1-x72e.google.com with SMTP id af79cd13be357-76dc77fd024so300974185a.3 for ; Mon, 18 Sep 2023 08:18:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1695050286; x=1695655086; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=skILK3+RqLs29/E8NIb2upQKKLhMeBuYLpBX+o8j0o8=; b=n6jL8wh9yZ+YgRCLkcZ7AcXMqtF/+gWvKXPg79MBnBzPl+oy3YGjGVxJHE0oTf+grK 4eBpJn2CkNmuZLQ6JXhw8gi92dSULrCQ68cbue+gfH+gI3TMpgvflAe41qWA/H9yl5y0 F2Tk3h5NyUF0vt7XtXH1LTU0D7CgV7suKA1JRT0DuAsvJ6fPGd7yorKBW3ptnFHR4qzB jsZT9Id1Wp2BRJBHPTFDuG/lxCbfoGl3a+x5R2K82rt6xJCAY5ivDf2AZKoD5bN4Gx2N mXINTA8WpsFcfrKuOoZ+9Vp7cu+6pKubcCsD+0lb3X0mfbUdaZwjU9LS50fLmW0+Ml/6 WqMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695050286; x=1695655086; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=skILK3+RqLs29/E8NIb2upQKKLhMeBuYLpBX+o8j0o8=; b=CbxHu4527v+nXRG8tN8fVKb0+Uact34dhJ2WzGF+PB/oUxwpCpo8ZGhVVAi0M9mdJL H+qE9asgC27VjMdgg6PJNwou3by6gCoGp0K43nJvW6Jo2FNmSPBuL9tnfa00ZdpjCGkt 11wTp14Bo8QSOBGapK66fj1bwPCU0doHkVVcoNw49id6vkPjjlLl28PPDGJBAA8rI/uu WgYSJi8BjKA0RNxaxeNcHKMe7hktup8gNA+SH+QeS/1vIlMovV8dKVhbcwLScWoen+YQ 8tAHS8eW+kqyrpKC++Jug3Ft+nwoCq5kHyxjoUP2wtf5r9nNZQONw0eogq6b1yX/J+5N 2Q7A== X-Gm-Message-State: AOJu0Yx7XniTn6Ug4UslaXCCMtrNzHx057AvWJFxNbMdNqDBF56+lGBb LeTqKmzBo9Mh/+vD86eSkOmH9Q== X-Google-Smtp-Source: AGHT+IEPjZK20Aqh4DOH80nyWTVB2XY8RoIapnvcyiksM3wp5qxi6JV9wSTNi2A0D4DmrBL930vlSw== X-Received: by 2002:ad4:458d:0:b0:63f:9aa3:867b with SMTP id x13-20020ad4458d000000b0063f9aa3867bmr9395365qvu.40.1695050286275; Mon, 18 Sep 2023 08:18:06 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-142-68-26-201.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.68.26.201]) by smtp.gmail.com with ESMTPSA id r28-20020a0cb29c000000b0063d038df3f3sm3532215qve.52.2023.09.18.08.18.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Sep 2023 08:18:05 -0700 (PDT) Received: from jgg by wakko with local (Exim 4.95) (envelope-from ) id 1qiG0i-0005OR-Iy; Mon, 18 Sep 2023 12:18:04 -0300 Date: Mon, 18 Sep 2023 12:18:04 -0300 From: Jason Gunthorpe To: Sean Christopherson Cc: Catalin Marinas , Will Deacon , Marc Zyngier , Oliver Upton , Huacai Chen , Michael Ellerman , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Janosch Frank , Claudio Imbrenda , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, Peter Zijlstra , Arnaldo Carvalho de Melo , Paolo Bonzini , Tony Krowiak , Halil Pasic , Jason Herne , Harald Freudenberger , Alex Williamson , Andy Lutomirski , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-mips@vger.kernel.org, kvm@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Anish Ghulati , Venkatesh Srinivas , Andrew Thornton Subject: Re: [PATCH 03/26] virt: Declare and define vfio_file_set_kvm() iff CONFIG_KVM is enabled Message-ID: <20230918151804.GH13795@ziepe.ca> References: <20230916003118.2540661-1-seanjc@google.com> <20230916003118.2540661-4-seanjc@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230916003118.2540661-4-seanjc@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230918_081808_584724_A72E1DC8 X-CRM114-Status: GOOD ( 15.43 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Sep 15, 2023 at 05:30:55PM -0700, Sean Christopherson wrote: > Hide vfio_file_set_kvm() and its unique helpers if KVM is not enabled, > nothing else in the kernel (or out of the kernel) should be using a > KVM specific helper. > > Signed-off-by: Sean Christopherson > --- > drivers/vfio/vfio_main.c | 2 +- > include/linux/vfio.h | 2 ++ > 2 files changed, 3 insertions(+), 1 deletion(-) Patch subject should be vfio not virt Reviewed-by: Jason Gunthorpe > @@ -1388,6 +1387,7 @@ void vfio_file_set_kvm(struct file *file, struct kvm *kvm) > vfio_device_file_set_kvm(file, kvm); > } > EXPORT_SYMBOL_GPL(vfio_file_set_kvm); > +#endif We could even put this in a symbol namespace.. Jason _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel