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 X-Spam-Level: X-Spam-Status: No, score=-13.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 23473C12002 for ; Mon, 19 Jul 2021 20:18:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 20E4B6112D for ; Mon, 19 Jul 2021 20:18:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1358911AbhGSTcB (ORCPT ); Mon, 19 Jul 2021 15:32:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1385398AbhGSS7G (ORCPT ); Mon, 19 Jul 2021 14:59:06 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC785C0613E8 for ; Mon, 19 Jul 2021 12:30:11 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id u13so32084157lfs.11 for ; Mon, 19 Jul 2021 12:38:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wDda5dbFXyknFG+xoYFL2uxWIVC+IEB+7xC2zqUFwSc=; b=C2kt/tLjq50F2/8YiWA2vApdMGBU1c/5g8q0V7XaPGvDRnYu01eyxREz3eqyUTFPjo +RkvlkvZfYICjMHAI8gTK9GAf+/flWsUK+v7GAxtmc+xq9D5SUVbZ+DUZ9CiQxzMeanC YwYKYS3yuZmuX9KNoLodu1DiX6u9M1TDj8A4sNlA8pqZqXdGe8vk+eCXrW99r7bbq4xn aezOsvO51i/RTsOu+xwDKXdMBUxnzitKNY74AjA/4ymoyUgfBT077E45qJa7F/qXUBWW ztnTsieI6KT6/2V/OeLJPzcwydkdGfXsTY7HAJUxHWTKjw57wll20Q46XtDXCQNoAQ7m jF2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wDda5dbFXyknFG+xoYFL2uxWIVC+IEB+7xC2zqUFwSc=; b=WYfdVY7kEVYAm8KG1Tydk/mnhbnr9pymePM+0MqN/8Y0Of3x+c8LznpFCfsRIZ7Ha3 9El9ZEnkf16sYT2SH45JjMgarGJqSfwCUxUB/U+upNeSJpbgnuP8OnHUCPJj6pW6h9mj h/mrftB3kEOC98QN5XO2p9In+JOIMr5OiZfWUaznAXkdAnkNIWornMaKEBIRYCByW1R5 DVScSfpd2JejXN5Zbz44RYqRgOnnCsWJ2OKmckMtwX7u+S8r0v4Yxbj7Pdaz+kAHVEC2 lNVafIiUDLQeA4q484xZPutiAyGz9voreqaBF7OCFyg1VMFIFkM28jcEi788qUS+32wY kxOQ== X-Gm-Message-State: AOAM532A91lCbiDziGYPHrynsOS2YA1SxqPHC1k/fo9iEhLjlRwsL+0q 3E1qyoMaYowrdZfdjop69KyTk0DBrnic9ecGefN6IA== X-Google-Smtp-Source: ABdhPJyPUYUhTA7ZwgH8jo3MfY2NUldDSUZwBUe+PjpACyXQEbBrAmTn2pGTqyellwWFMuv9G9LvWhR2OIXXWG8rOvc= X-Received: by 2002:ac2:46d0:: with SMTP id p16mr19415538lfo.23.1626723483858; Mon, 19 Jul 2021 12:38:03 -0700 (PDT) MIME-Version: 1.0 References: <20210608154805.216869-1-jean-philippe@linaro.org> In-Reply-To: From: Oliver Upton Date: Mon, 19 Jul 2021 12:37:52 -0700 Message-ID: Subject: Re: [RFC PATCH 0/5] KVM: arm64: Pass PSCI to userspace To: Jean-Philippe Brucker Cc: Alexandru Elisei , salil.mehta@huawei.com, lorenzo.pieralisi@arm.com, kvm@vger.kernel.org, corbet@lwn.net, maz@kernel.org, linux-kernel@vger.kernel.org, jonathan.cameron@huawei.com, catalin.marinas@arm.com, pbonzini@redhat.com, will@kernel.org, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 19, 2021 at 11:02 AM Jean-Philippe Brucker wrote: > We forward the whole PSCI function range, so it's either KVM or userspace. > If KVM manages PSCI and the guest calls an unimplemented function, that > returns directly to the guest without going to userspace. > > The concern is valid for any other range, though. If userspace enables the > HVC cap it receives function calls that at some point KVM might need to > handle itself. So we need some negotiation between user and KVM about the > specific HVC ranges that userspace can and will handle. Are we going to use KVM_CAPs for every interesting HVC range that userspace may want to trap? I wonder if a more generic interface for hypercall filtering would have merit to handle the aforementioned cases, and whatever else a VMM will want to intercept down the line. For example, x86 has the concept of 'MSR filtering', wherein userspace can specify a set of registers that it wants to intercept. Doing something similar for HVCs would avoid the need for a kernel change each time a VMM wishes to intercept a new hypercall. -- 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 X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 55527C07E95 for ; Mon, 19 Jul 2021 19:38:10 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id BE5ED61107 for ; Mon, 19 Jul 2021 19:38:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BE5ED61107 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvmarm-bounces@lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 399804B0E1; Mon, 19 Jul 2021 15:38:09 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Authentication-Results: mm01.cs.columbia.edu (amavisd-new); dkim=softfail (fail, message has been altered) header.i=@google.com Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jh6bJrM3KfoH; Mon, 19 Jul 2021 15:38:08 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 1B50A4B0DC; Mon, 19 Jul 2021 15:38:08 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id B5C274B08A for ; Mon, 19 Jul 2021 15:38:06 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FXQmI6WJqzAo for ; Mon, 19 Jul 2021 15:38:05 -0400 (EDT) Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 7FD25407D1 for ; Mon, 19 Jul 2021 15:38:05 -0400 (EDT) Received: by mail-lf1-f54.google.com with SMTP id y42so32126773lfa.3 for ; Mon, 19 Jul 2021 12:38:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wDda5dbFXyknFG+xoYFL2uxWIVC+IEB+7xC2zqUFwSc=; b=C2kt/tLjq50F2/8YiWA2vApdMGBU1c/5g8q0V7XaPGvDRnYu01eyxREz3eqyUTFPjo +RkvlkvZfYICjMHAI8gTK9GAf+/flWsUK+v7GAxtmc+xq9D5SUVbZ+DUZ9CiQxzMeanC YwYKYS3yuZmuX9KNoLodu1DiX6u9M1TDj8A4sNlA8pqZqXdGe8vk+eCXrW99r7bbq4xn aezOsvO51i/RTsOu+xwDKXdMBUxnzitKNY74AjA/4ymoyUgfBT077E45qJa7F/qXUBWW ztnTsieI6KT6/2V/OeLJPzcwydkdGfXsTY7HAJUxHWTKjw57wll20Q46XtDXCQNoAQ7m jF2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wDda5dbFXyknFG+xoYFL2uxWIVC+IEB+7xC2zqUFwSc=; b=PnqWhXcPqttidEzrC1YsMTx09NgCyIzgH+v+CX0yAJJ1n/EgflXDHu/pQR69KgwUqU y8tpUwD3lLlXgUCHrFd9tFCBCBsFrNuWq/sp1FKDx7Oiiuu9Rac7owcPyDIl+PxKPMOr 2+CAQckTiGcJqil81hQ9qr0LJZnNKitGS+9ePZwu+TBWP7sFYf9huwwMTjJ+xag8N0B6 8YNKXS15V1r/bn0etaQNSVxP1W+AxkYlyJ7RCp/Zxzmi/sHP6R/d3yHxApqZ56VkyN9O Xm7uV3L74YW+GTnXs6SexezWu5PztPGNgJ9eaftqUvMM3RZllp8XlAsHbbIUgG7+M7uU 89Rg== X-Gm-Message-State: AOAM532RHMnn5H8mtUeCS2v1Mg0Hz4Wd4aRNGP9bES8pRfJySgAiSKbM dwqXpVlzLNpIpK3WTgDEkTNgNVxQepVryWEGaw5r5Q== X-Google-Smtp-Source: ABdhPJyPUYUhTA7ZwgH8jo3MfY2NUldDSUZwBUe+PjpACyXQEbBrAmTn2pGTqyellwWFMuv9G9LvWhR2OIXXWG8rOvc= X-Received: by 2002:ac2:46d0:: with SMTP id p16mr19415538lfo.23.1626723483858; Mon, 19 Jul 2021 12:38:03 -0700 (PDT) MIME-Version: 1.0 References: <20210608154805.216869-1-jean-philippe@linaro.org> In-Reply-To: From: Oliver Upton Date: Mon, 19 Jul 2021 12:37:52 -0700 Message-ID: Subject: Re: [RFC PATCH 0/5] KVM: arm64: Pass PSCI to userspace To: Jean-Philippe Brucker Cc: salil.mehta@huawei.com, lorenzo.pieralisi@arm.com, catalin.marinas@arm.com, kvm@vger.kernel.org, corbet@lwn.net, maz@kernel.org, linux-kernel@vger.kernel.org, will@kernel.org, jonathan.cameron@huawei.com, pbonzini@redhat.com, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu On Mon, Jul 19, 2021 at 11:02 AM Jean-Philippe Brucker wrote: > We forward the whole PSCI function range, so it's either KVM or userspace. > If KVM manages PSCI and the guest calls an unimplemented function, that > returns directly to the guest without going to userspace. > > The concern is valid for any other range, though. If userspace enables the > HVC cap it receives function calls that at some point KVM might need to > handle itself. So we need some negotiation between user and KVM about the > specific HVC ranges that userspace can and will handle. Are we going to use KVM_CAPs for every interesting HVC range that userspace may want to trap? I wonder if a more generic interface for hypercall filtering would have merit to handle the aforementioned cases, and whatever else a VMM will want to intercept down the line. For example, x86 has the concept of 'MSR filtering', wherein userspace can specify a set of registers that it wants to intercept. Doing something similar for HVCs would avoid the need for a kernel change each time a VMM wishes to intercept a new hypercall. -- Thanks, Oliver _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm 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 X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E7D0DC07E95 for ; Mon, 19 Jul 2021 19:40:31 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 9D7DC610D2 for ; Mon, 19 Jul 2021 19:40:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9D7DC610D2 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=DiLwWLSSNqBYulbwA1Ns8dK60nelZDyHbfkxvhnFZIk=; b=0oOTfeJgtQsfXB TBuQCMKzIrwTlygV0qUx8V/sC4y/iuemxycO5xhDW7L5MTm2KHW2uc6WLZePSB7dw6V0gRWsGrCyd P2fhXa6qHcBCAZCGWDE7iXBp9fAPuxdBUuJkHf3zURx89fFNJxYTsch8FJQACm129bA1GT5bYvJZ7 wKnER4Wa8x2PehUhnItdJq/6hjUSUWttlMWKTefv5XsS1MOJMlUn1k2jqaxkn2mpLRLzlrvhKgTIb Oo+qUyHuflarTXDLQsnSKi4R+NpOnCNvRtu0FPaYGTmVtuvdDY/8BMs8dmugD0gx5nHgEggqLmJvz 4/6kkoYX889OiY6kVb9Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m5Z5u-00B7ur-JI; Mon, 19 Jul 2021 19:38:27 +0000 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m5Z5c-00B7oW-V0 for linux-arm-kernel@lists.infradead.org; Mon, 19 Jul 2021 19:38:10 +0000 Received: by mail-lf1-x130.google.com with SMTP id g8so26245862lfh.8 for ; Mon, 19 Jul 2021 12:38:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wDda5dbFXyknFG+xoYFL2uxWIVC+IEB+7xC2zqUFwSc=; b=C2kt/tLjq50F2/8YiWA2vApdMGBU1c/5g8q0V7XaPGvDRnYu01eyxREz3eqyUTFPjo +RkvlkvZfYICjMHAI8gTK9GAf+/flWsUK+v7GAxtmc+xq9D5SUVbZ+DUZ9CiQxzMeanC YwYKYS3yuZmuX9KNoLodu1DiX6u9M1TDj8A4sNlA8pqZqXdGe8vk+eCXrW99r7bbq4xn aezOsvO51i/RTsOu+xwDKXdMBUxnzitKNY74AjA/4ymoyUgfBT077E45qJa7F/qXUBWW ztnTsieI6KT6/2V/OeLJPzcwydkdGfXsTY7HAJUxHWTKjw57wll20Q46XtDXCQNoAQ7m jF2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wDda5dbFXyknFG+xoYFL2uxWIVC+IEB+7xC2zqUFwSc=; b=ZLiXywG5X0Dm+6scgJi/DaxjucqnNFLFMYLZ0MsPWZaXDS0SvXR3Suqa2PA/5Mo2j4 jP2ytF8K+yGYxKcrPd3aaYVW2dzmdqlocnhtKWuvKqQ+PP66px7Ez/kOMqRBTJZ71jav uDCC6pyAmifOt3NWdHYLUcA9CsDDF/QOdSoY71UATjr3KnHBKXILv78qQabcbJezf4G4 YnpS/r7xDIHoCk74qk6ukx7fJqTWd7XKuz9ww1dpNEen3dTlAcZIOfswpQIBdh7kiwqd Pf0lokfvZuSyaBKs++JT968A7FtjMfq1NCQl8BazpDz+YfjkaR51oxBAOlr7S2EZ0ap7 GrZg== X-Gm-Message-State: AOAM531b6wme1ng9DNb7/ozrA8H/098sDynTS3ZcDdrTtxxln/eNFiMt vIwc943hJDFqtmDfM8FpdVIY/FGt4LONaCKcyCZOjg== X-Google-Smtp-Source: ABdhPJyPUYUhTA7ZwgH8jo3MfY2NUldDSUZwBUe+PjpACyXQEbBrAmTn2pGTqyellwWFMuv9G9LvWhR2OIXXWG8rOvc= X-Received: by 2002:ac2:46d0:: with SMTP id p16mr19415538lfo.23.1626723483858; Mon, 19 Jul 2021 12:38:03 -0700 (PDT) MIME-Version: 1.0 References: <20210608154805.216869-1-jean-philippe@linaro.org> In-Reply-To: From: Oliver Upton Date: Mon, 19 Jul 2021 12:37:52 -0700 Message-ID: Subject: Re: [RFC PATCH 0/5] KVM: arm64: Pass PSCI to userspace To: Jean-Philippe Brucker Cc: Alexandru Elisei , salil.mehta@huawei.com, lorenzo.pieralisi@arm.com, kvm@vger.kernel.org, corbet@lwn.net, maz@kernel.org, linux-kernel@vger.kernel.org, jonathan.cameron@huawei.com, catalin.marinas@arm.com, pbonzini@redhat.com, will@kernel.org, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210719_123809_077208_8A6A7E76 X-CRM114-Status: GOOD ( 14.64 ) 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 Mon, Jul 19, 2021 at 11:02 AM Jean-Philippe Brucker wrote: > We forward the whole PSCI function range, so it's either KVM or userspace. > If KVM manages PSCI and the guest calls an unimplemented function, that > returns directly to the guest without going to userspace. > > The concern is valid for any other range, though. If userspace enables the > HVC cap it receives function calls that at some point KVM might need to > handle itself. So we need some negotiation between user and KVM about the > specific HVC ranges that userspace can and will handle. Are we going to use KVM_CAPs for every interesting HVC range that userspace may want to trap? I wonder if a more generic interface for hypercall filtering would have merit to handle the aforementioned cases, and whatever else a VMM will want to intercept down the line. For example, x86 has the concept of 'MSR filtering', wherein userspace can specify a set of registers that it wants to intercept. Doing something similar for HVCs would avoid the need for a kernel change each time a VMM wishes to intercept a new hypercall. -- Thanks, Oliver _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel