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 7D969C433F5 for ; Tue, 26 Apr 2022 08:42:49 +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=ajVZjZIXq/SucWnfwaElvK3fBPuxoF+ccz6frqyVqXk=; b=OyCx+p6Khxs7lV V0MsIhb0d57z3TJMX42Z13+W5NwjKR9bdlz+kG+IOR9RuNrVBKyLE1f4wwPdknlITsXrydTBexhq7 WeluWZV2/M89/I6NA0+Z5m3kKLY/qQXY46MTJxgftNc2m4vltadeGmacH9MScV3SrX7tAV23yN6DT DDmkCLnaeHxLkCqj/z7Twyxq8ur1Sh7L9HkRVAZu+bXYnMAVH943HMmQMr4ca0PdYIR0q1JjaDIBH CdJRZTtHUkMf9niwxxirj9GJTScvLrT8GpIz7WbZ8a972eQVenk4I/Rt+np2FDRIQ53u8tchH+EPk xpSQOOqYm6NqOhKUbLtQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1njGlE-00DOpp-2K; Tue, 26 Apr 2022 08:41:28 +0000 Received: from mail.skyhub.de ([5.9.137.197]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1njGl8-00DOmQ-FU for linux-arm-kernel@lists.infradead.org; Tue, 26 Apr 2022 08:41:25 +0000 Received: from zn.tnic (p5de8eeb4.dip0.t-ipconnect.de [93.232.238.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 947631EC04A6; Tue, 26 Apr 2022 10:41:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1650962472; h=from:from: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; bh=WDgzj5odytfvHWYC79oVcVHBLZLoY6i/6Y3HutpD6F4=; b=RNjGzXao8IjCAZdnyz+sxuWaGQkZ/vd2mBMQcXkorVlHxF8aZwOhjFv4yzyb07IC1cWtdD ULYpgmsRwGJlrKq9s0lT+lGWYaOvYXAN7z6VNXS1lWrwLuV/e11t2Bk/YoGWr2WZKy1VVj Dqp/f/bCRwbcGI72KlCyWMGc2WUv3AY= Date: Tue, 26 Apr 2022 10:41:09 +0200 From: Borislav Petkov To: Juergen Gross Cc: Oleksandr , Christoph Hellwig , Boris Ostrovsky , Stefano Stabellini , xen-devel@lists.xenproject.org, x86@kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Dave Hansen , Andy Lutomirski , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Julien Grall , Oleksandr Tyshchenko , "Michael S. Tsirkin" , Tom Lendacky Subject: Re: [PATCH V1 3/6] xen/virtio: Add option to restrict memory access under Xen Message-ID: References: <1650646263-22047-1-git-send-email-olekstysh@gmail.com> <1650646263-22047-4-git-send-email-olekstysh@gmail.com> <6c5042fe-dafc-eb4f-c1fa-03b0faf252de@gmail.com> <147f68f6-7d67-1884-bd14-5040639b3396@suse.com> <67c7460a-3001-35a6-8e5b-f367270b257a@gmail.com> <7d89848a-3a1c-415d-957a-564ffdd3712d@suse.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <7d89848a-3a1c-415d-957a-564ffdd3712d@suse.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220426_014122_717824_952F2A36 X-CRM114-Status: GOOD ( 17.51 ) 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 Tue, Apr 26, 2022 at 07:16:16AM +0200, Juergen Gross wrote: > Christoph suggested (rather firmly) this would be the way to go. Yeah, I saw it but I don't think it is the right way to go. What happens the next time a guest needs to query the platform underneath? Misuse these interfaces again? Because people will see the Xen use and say, hey, look, I will use this for my funky HV too. Even worse: what happens if Xen decides to implement SEV/TDX? Then you're in for a world of fun. Now, if we want to *extend* the interfaces to have something as generic as, say, platform_has() and that should be the way for generic kernel code running in the guest to query the platform capabilities, then sure, by all means. > This is needed on guest side at a rather hypervisor independent place. > > So a capability of some sort seems appropriate. > > Another suggestion of mine was to have a callback (or flag) in > struct x86_hyper_runtime for that purpose. This becomes an issue if the HV is not x86 - then you need a different method of querying it, which then underneath will call the arch-specific interface. I don't know how much of querying guests need to do and how they've been doing that so far. Depending on the requirements, we probably should think about a clean design from the get-go instead of homegrown things. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel