From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-106.mta1.migadu.com (out-106.mta1.migadu.com [95.215.58.106]) (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 C1A1BA31 for ; Fri, 3 Feb 2023 21:16:25 +0000 (UTC) Date: Fri, 3 Feb 2023 21:08:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1675458492; 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: in-reply-to:in-reply-to:references:references; bh=zF794bsssBgYs01gtLHUkS28EIicNc0l0YnvFt/94YI=; b=gF+Ot9L7bvkYWgstVlN3IGR5gepXbOhnLUW+ryxf0GGE8OvgoAe8gh4332GPCHIBnUEDfl OstQTXxU52klLCCbGsxtBPABUoe9zoYwljDknwyOPX3XqLcs69d34u9p3+onFADs6Ko7Qx oTbdNErPix3LGrijaxdz/cn1jgoVGFY= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: James Morse Cc: linux-pm@vger.kernel.org, loongarch@lists.linux.dev, kvmarm@lists.linux.dev, kvm@vger.kernel.org, linux-acpi@vger.kernel.org, linux-arch@vger.kernel.org, linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, x86@kernel.org, Marc Zyngier , Thomas Gleixner , Lorenzo Pieralisi , Mark Rutland , Sudeep Holla , Borislav Petkov , H Peter Anvin , Dave Hansen , Ingo Molnar , Will Deacon , Catalin Marinas , Huacai Chen , Suzuki K Poulose , Len Brown , Rafael Wysocki , WANG Xuerui , Salil Mehta , Russell King , Jean-Philippe Brucker Subject: Re: [RFC PATCH 29/32] KVM: arm64: Pass hypercalls to userspace Message-ID: References: <20230203135043.409192-1-james.morse@arm.com> <20230203135043.409192-30-james.morse@arm.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: <20230203135043.409192-30-james.morse@arm.com> X-Migadu-Flow: FLOW_OUT Hi James, On Fri, Feb 03, 2023 at 01:50:40PM +0000, James Morse wrote: > From: Jean-Philippe Brucker > > When capability KVM_CAP_ARM_HVC_TO_USER is available, userspace can > request to handle all hypercalls that aren't handled by KVM. I would very much prefer we not go down this route. This capability effectively constructs an ABI out of what KVM presently does not implement. What would happen if KVM decides to implement a new set of hypercalls later down the road that were previously forwarded to userspace? Instead of a catch-all I think we should take the approach of having userspace explicitly request which hypercalls should be forwarded to userspace. I proposed something similar [1], but never got around to respinning it (oops). Let me dust those patches off and align with Marc's suggestions. [1]: https://lore.kernel.org/kvmarm/20221110015327.3389351-1-oliver.upton@linux.dev/ -- Thanks, Oliver From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oliver Upton Date: Fri, 03 Feb 2023 21:08:00 +0000 Subject: Re: [RFC PATCH 29/32] KVM: arm64: Pass hypercalls to userspace Message-Id: List-Id: References: <20230203135043.409192-1-james.morse@arm.com> <20230203135043.409192-30-james.morse@arm.com> In-Reply-To: <20230203135043.409192-30-james.morse@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: James Morse Cc: linux-pm@vger.kernel.org, loongarch@lists.linux.dev, kvmarm@lists.linux.dev, kvm@vger.kernel.org, linux-acpi@vger.kernel.org, linux-arch@vger.kernel.org, linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, x86@kernel.org, Marc Zyngier , Thomas Gleixner , Lorenzo Pieralisi , Mark Rutland , Sudeep Holla , Borislav Petkov , H Peter Anvin , Dave Hansen , Ingo Molnar , Will Deacon , Catalin Marinas , Huacai Chen , Suzuki K Poulose , Len Brown , Rafael Wysocki , WANG Xuerui , Salil Mehta , Russell King , Jean-Philippe Brucker Hi James, On Fri, Feb 03, 2023 at 01:50:40PM +0000, James Morse wrote: > From: Jean-Philippe Brucker > > When capability KVM_CAP_ARM_HVC_TO_USER is available, userspace can > request to handle all hypercalls that aren't handled by KVM. I would very much prefer we not go down this route. This capability effectively constructs an ABI out of what KVM presently does not implement. What would happen if KVM decides to implement a new set of hypercalls later down the road that were previously forwarded to userspace? Instead of a catch-all I think we should take the approach of having userspace explicitly request which hypercalls should be forwarded to userspace. I proposed something similar [1], but never got around to respinning it (oops). Let me dust those patches off and align with Marc's suggestions. [1]: https://lore.kernel.org/kvmarm/20221110015327.3389351-1-oliver.upton@linux.dev/ -- Thanks, Oliver 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 C3900C05027 for ; Fri, 3 Feb 2023 21:09:55 +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=bcc7WiKJ7bw5ZK8qGAZHFfarDzj8IaapKgZ0lQNLDOY=; b=RAfQbuoKtXBuKi PBeu0atTUsTz2jGWqhVzB+OApg7BPzL9vATH2xE/WdSReOVv5So7P9aisfF+MaHq1v35aJljc8s3S em/7w3ZPQMC4mrzbWJWClBSCYTgbWOXPHOjpjoofrbeKKBvBstOOyB156B7VhkKuXveSdzbrMvDS1 i7u1PY8qS9Lfhln6nJKZ50zHP62jQoc1ARHttpYcB+lQ8jOAp3Oq1+XWJr6gkFzdvdXUgYtw4F1Tn 99Gov/OGKoCF5PSRaAEKNoorAOiA0G8eqiUyYnQYZqhLKPZavXZb3qQvcaiebRYilMp+QzTa7WCE1 u1+mg3r93QnRlWfN0/Bw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pO3IK-003boa-CU; Fri, 03 Feb 2023 21:08:28 +0000 Received: from out-98.mta1.migadu.com ([95.215.58.98]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pO3IG-003bl6-Ab for linux-arm-kernel@lists.infradead.org; Fri, 03 Feb 2023 21:08:26 +0000 Date: Fri, 3 Feb 2023 21:08:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1675458492; 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: in-reply-to:in-reply-to:references:references; bh=zF794bsssBgYs01gtLHUkS28EIicNc0l0YnvFt/94YI=; b=gF+Ot9L7bvkYWgstVlN3IGR5gepXbOhnLUW+ryxf0GGE8OvgoAe8gh4332GPCHIBnUEDfl OstQTXxU52klLCCbGsxtBPABUoe9zoYwljDknwyOPX3XqLcs69d34u9p3+onFADs6Ko7Qx oTbdNErPix3LGrijaxdz/cn1jgoVGFY= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: James Morse Cc: linux-pm@vger.kernel.org, loongarch@lists.linux.dev, kvmarm@lists.linux.dev, kvm@vger.kernel.org, linux-acpi@vger.kernel.org, linux-arch@vger.kernel.org, linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, x86@kernel.org, Marc Zyngier , Thomas Gleixner , Lorenzo Pieralisi , Mark Rutland , Sudeep Holla , Borislav Petkov , H Peter Anvin , Dave Hansen , Ingo Molnar , Will Deacon , Catalin Marinas , Huacai Chen , Suzuki K Poulose , Len Brown , Rafael Wysocki , WANG Xuerui , Salil Mehta , Russell King , Jean-Philippe Brucker Subject: Re: [RFC PATCH 29/32] KVM: arm64: Pass hypercalls to userspace Message-ID: References: <20230203135043.409192-1-james.morse@arm.com> <20230203135043.409192-30-james.morse@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230203135043.409192-30-james.morse@arm.com> X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230203_130824_826286_144ABB18 X-CRM114-Status: GOOD ( 12.08 ) 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 Hi James, On Fri, Feb 03, 2023 at 01:50:40PM +0000, James Morse wrote: > From: Jean-Philippe Brucker > > When capability KVM_CAP_ARM_HVC_TO_USER is available, userspace can > request to handle all hypercalls that aren't handled by KVM. I would very much prefer we not go down this route. This capability effectively constructs an ABI out of what KVM presently does not implement. What would happen if KVM decides to implement a new set of hypercalls later down the road that were previously forwarded to userspace? Instead of a catch-all I think we should take the approach of having userspace explicitly request which hypercalls should be forwarded to userspace. I proposed something similar [1], but never got around to respinning it (oops). Let me dust those patches off and align with Marc's suggestions. [1]: https://lore.kernel.org/kvmarm/20221110015327.3389351-1-oliver.upton@linux.dev/ -- Thanks, Oliver _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel