Message ID | 20230419221716.3603068-32-atishp@rivosinc.com |
---|---|
State | Changes Requested |
Headers | show
Return-Path: <kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=<UNKNOWN>) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=gDbyrqwX; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=casper.20170209 header.b=TNbWOSBV; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=rivosinc-com.20221208.gappssmtp.com header.i=@rivosinc-com.20221208.gappssmtp.com header.a=rsa-sha256 header.s=20221208 header.b=JS7pXfcL; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Q1wfH6bcqz23tD for <incoming@patchwork.ozlabs.org>; Thu, 20 Apr 2023 08:37:43 +1000 (AEST) 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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=wIDdXjuuw4QOPLTBJD5T/4vtqbtHq8Bm/0tvHSJgrYA=; b=gDbyrqwXuPmeSS t4QBo8vRHShUfEDKX4HEJ31KNpo5aVpuNtXbt0hK+VpK5jPMHFpB1H7S7muP1jr7xODRP98VPeP1s ZjCZ169iLwrURB2puL+RBCQGtNOFS5oEBPG+02x/K/+SRGnkI9OC6YcqaDJ8AP4gmuvct2qT5kB1t 1UNQYfd8f3k2YbvousxCZVoY2slgzIOcjIfJ1dXTUQ7ViuI6mN6Cd7zlkcaI11v/LeU4Y4PJ5rVUy OLA5ckVSPRCv/F9oMEWVicBn8XdybV2qZpDUzRgknnso2W/4ZB68cJFATGDslOikXq8pg2J4j/wqu NxXhtuCOxVCjM3j/SWGg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1ppGQj-006Wlg-1v; Wed, 19 Apr 2023 22:37:37 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1ppGQe-006WXV-19 for kvm-riscv@bombadil.infradead.org; Wed, 19 Apr 2023 22:37:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=K2nJhanY2RyrdzmZ5jdtnkafHRmAptwnMC5XRsCTn9I=; b=TNbWOSBVqkHVpbvLG3ZtrEaO4o QaMa77oL45WzjKichcoz/ywNOr30n9pI+0JyxrWabHHYbjvmW1pYCkviXpDOFEHvcVNL1pDsqUPfn REgU0MznW/VcLnC+4KTLFOLkGvqr2SFL8WqSAyAwq8e/BGHC+D+kCcxDshZv9w3UFslcPnw4MJKeA QXFx1Et1VwkmQX7k/h2adb1WfOQxoTKSQvmUHoBhJJPvUOPNUzufP7WJJMJeZ1HIP/rOCbaM36dhj BdpFGv+sdd6ZJrHJz7JF9Bmr89pqFKN4rlri1ZrIqjMnDq6xy4mahBUCXlaZDGAW3taMgiFw2I9y0 +rSWCsdw==; Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by casper.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ppG8O-00DeIz-KG for kvm-riscv@lists.infradead.org; Wed, 19 Apr 2023 22:18:43 +0000 Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-1a6762fd23cso4485585ad.3 for <kvm-riscv@lists.infradead.org>; Wed, 19 Apr 2023 15:18:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20221208.gappssmtp.com; s=20221208; t=1681942718; x=1684534718; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=K2nJhanY2RyrdzmZ5jdtnkafHRmAptwnMC5XRsCTn9I=; b=JS7pXfcL0uZWhUdoeqJLjU0060h+zlTyFU4Xu6hWHx+bZXgxY7ubdU1X9NVau3JlX9 +7CYbRRwlIc3Vqq9APC8BsBuJn4DTncbkzqKnldPV32jiP3HmMEO6Gpz0Jpg3E8ecp/b 7UYaf07kCninwBHQ2YB/t4GOxc2RYZ1XD5frQZDPWtSV2zmt3BBqoNXrrBa8O/2uay1U 9Q5+GXI2CSH6c4nCaey/IdmivSR/XDL19JFooIN8hV4UeXZUf4HW7Tq4P1XLc0glmzvp cJ6OAEWscVYWk70eywtGuEoxadALFsAZYFXB+jt15zlHvhhj3dquE05TC9qY1zNQuLog DNPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681942718; x=1684534718; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=K2nJhanY2RyrdzmZ5jdtnkafHRmAptwnMC5XRsCTn9I=; b=G5UYVIyiSE9k28dlHCFKnSYMPHNabAtSg1JWRtigIz/veBzsTy/1qyuWlEo/Hwjl9b MZJ22qPbFeUGvDC+GCahj5dnt34Vu8k0zh7WuM0n1RzbB5OIoODF/lC1RHfucIgXSHP4 mMCcHwiALI8FyeqCvHeX3rGsafEoxVYwn5ZwIxIQkFPJgyPBpRmv1cP1v5we9KkeBTo6 oLZw57FXUNbM49wgZswvClffPsYxSvDWW7w5PZls9prO0LchJF45DcESJ7KUDAUlWxOV CjkS5Qhn1knpqZQhFJlrMab3QbMvzJhCaNuYkZXgfZUGaMXme1LLcqh/OGMnh5FFqxan OwkQ== X-Gm-Message-State: AAQBX9dcvPjbcY0wVr19v8N7/BYntcJRPW64HuT9OWd0gFgm22140yRz DdU0JFRb54nbC3pK6UqSdc5A5A== X-Google-Smtp-Source: AKy350Z7HNgpp/rz6oeri9oovBKao1xAaHX/MXTw46NfVQFmX/yVtIUB1ewCw+YJMzwOiUfVeGRvZQ== X-Received: by 2002:a17:902:e0d3:b0:1a2:8770:bb17 with SMTP id e19-20020a170902e0d300b001a28770bb17mr5706306pla.9.1681942717994; Wed, 19 Apr 2023 15:18:37 -0700 (PDT) Received: from atishp.ba.rivosinc.com ([66.220.2.162]) by smtp.gmail.com with ESMTPSA id jn11-20020a170903050b00b00196807b5189sm11619190plb.292.2023.04.19.15.18.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Apr 2023 15:18:37 -0700 (PDT) From: Atish Patra <atishp@rivosinc.com> To: linux-kernel@vger.kernel.org Cc: Atish Patra <atishp@rivosinc.com>, Alexandre Ghiti <alex@ghiti.fr>, Andrew Jones <ajones@ventanamicro.com>, Andrew Morton <akpm@linux-foundation.org>, Anup Patel <anup@brainfault.org>, Atish Patra <atishp@atishpatra.org>, =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= <bjorn@rivosinc.com>, Suzuki K Poulose <suzuki.poulose@arm.com>, Will Deacon <will@kernel.org>, Marc Zyngier <maz@kernel.org>, Sean Christopherson <seanjc@google.com>, linux-coco@lists.linux.dev, Dylan Reid <dylan@rivosinc.com>, abrestic@rivosinc.com, Samuel Ortiz <sameo@rivosinc.com>, Christoph Hellwig <hch@infradead.org>, Conor Dooley <conor.dooley@microchip.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Guo Ren <guoren@kernel.org>, Heiko Stuebner <heiko@sntech.de>, Jiri Slaby <jirislaby@kernel.org>, kvm-riscv@lists.infradead.org, kvm@vger.kernel.org, linux-mm@kvack.org, linux-riscv@lists.infradead.org, Mayuresh Chitale <mchitale@ventanamicro.com>, Palmer Dabbelt <palmer@dabbelt.com>, Paolo Bonzini <pbonzini@redhat.com>, Paul Walmsley <paul.walmsley@sifive.com>, Rajnesh Kanwal <rkanwal@rivosinc.com>, Uladzislau Rezki <urezki@gmail.com> Subject: [RFC 31/48] RISC-V: KVM: Indicate no support user space emulated IRQCHIP Date: Wed, 19 Apr 2023 15:16:59 -0700 Message-Id: <20230419221716.3603068-32-atishp@rivosinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230419221716.3603068-1-atishp@rivosinc.com> References: <20230419221716.3603068-1-atishp@rivosinc.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230419_231840_715295_D3E0195B X-CRM114-Status: GOOD ( 11.37 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.6 on casper.infradead.org summary: Content analysis details: (-1.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:634 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.0 T_SCC_BODY_TEXT_LINE No description available. X-BeenThere: kvm-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <kvm-riscv.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/kvm-riscv>, <mailto:kvm-riscv-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/kvm-riscv/> List-Post: <mailto:kvm-riscv@lists.infradead.org> List-Help: <mailto:kvm-riscv-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/kvm-riscv>, <mailto:kvm-riscv-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "kvm-riscv" <kvm-riscv-bounces@lists.infradead.org> Errors-To: kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org |
Series |
RISC-V CoVE support
|
expand
|
diff --git a/arch/riscv/kvm/vcpu.c b/arch/riscv/kvm/vcpu.c index 20d4800..65f87e1 100644 --- a/arch/riscv/kvm/vcpu.c +++ b/arch/riscv/kvm/vcpu.c @@ -716,6 +716,9 @@ long kvm_arch_vcpu_async_ioctl(struct file *filp, if (ioctl == KVM_INTERRUPT) { struct kvm_interrupt irq; + /* We do not support user space emulated IRQCHIP for TVMs yet */ + if (is_cove_vcpu(vcpu)) + return -ENXIO; if (copy_from_user(&irq, argp, sizeof(irq))) return -EFAULT;
The KVM_INTERRUPT IOCTL is used for the userspace emulated IRQCHIP. The TEE use case do not support that yet. Return appropriate error in case any VMM tries to invoke that operation. Signed-off-by: Atish Patra <atishp@rivosinc.com> --- arch/riscv/kvm/vcpu.c | 3 +++ 1 file changed, 3 insertions(+)