Received: by 2002:ac2:4c32:0:0:0:0:0 with SMTP id u18csp17303lfq; Wed, 20 Apr 2022 14:14:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyDjvSXQiqPvgiJOVnyJydfnyOYLl2FLOMQ07yFeyN1jXQ2aeAzGQf0kK3IVUp0QiXZYQvW X-Received: by 2002:a63:c23:0:b0:3aa:3f26:b2eb with SMTP id b35-20020a630c23000000b003aa3f26b2ebmr8372175pgl.196.1650489268094; Wed, 20 Apr 2022 14:14:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650489268; cv=none; d=google.com; s=arc-20160816; b=sYOEUo701e43S6k1GNQjD/KpOyxbZfolQEqcV4Pa5t+oYIgc3lqG1iyl247bspmkS1 dcKevzdrl5H6T53PFVdDL4jw1iMJ1Svxzv6KjQniKFdzjpPBY/YRPNB/OdzcRctg8myN kxcXrrWFNjMvDn1SMDbQxCgE4e+jkSB4TsClegs805kVwIE2C9o8KTG6xetzAvr4xYe2 xCEaXbCVvStEaVpQ4ei9t7DvM3yJunu4rNZ809VhQXryUWvd61y3i+N9eug0FtqQ6Fw9 gUlxv4Tf7GzJcSm26YnI29rerHXeuPo0skdVPGt/mtEEjspAwDIQCXLVNyBj49kkzRKZ gTZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=5aKqoFa3PS3ofFsonmsRpILD1LHcN5f7ZDBzSGfsEbM=; b=HtzLbzD191EExriujFfOaLS/YrtqWr0rQeFEEXxbHLjUSqCOJ8CcfE+ZUK16js3Qct Nrugh7SsUQXey3YDnAZhhD74nPj390pDshfF2rWEYi91qk5QuVMASxsGd2Orq+iYQOO1 GlLtYrjqc36oPToB51pvjiqR78JsMtqSemQgALnbfndairmoWbqF287Pcdy9XZi68ZSF io5xsE4l/6wxFnUVyqd2wcAdipWXrxlDo7ErKBQe+MqIIAJ9mHQ3NQvSMl/eBkvLilOt Vwt7xuTl+gQV1ghPBC5kkcIT+jUbiMEeCMA6p/1ZOXiEfX/udohFqZjNGRZowgJSbIVE c6DA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=XQt2qNB5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i20-20020a170902eb5400b00153b2d165d3si3080918pli.475.2022.04.20.14.14.12; Wed, 20 Apr 2022 14:14:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=XQt2qNB5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378037AbiDTL2T (ORCPT + 99 others); Wed, 20 Apr 2022 07:28:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378007AbiDTL2B (ORCPT ); Wed, 20 Apr 2022 07:28:01 -0400 Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9867D640A for ; Wed, 20 Apr 2022 04:25:15 -0700 (PDT) Received: by mail-pf1-x42e.google.com with SMTP id x80so1674390pfc.1 for ; Wed, 20 Apr 2022 04:25:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5aKqoFa3PS3ofFsonmsRpILD1LHcN5f7ZDBzSGfsEbM=; b=XQt2qNB5u6pQxEF1HwDnEhc6NcPf+VkZSZq4w0mIY/jogwXW+sK8aZ+cXC1l/ZoHHU YGJJ0QjeSA8J/aP2zERHCpNEU3ZfqCQbGxKungKtD9r+4XedTyeDSfRcUxooSnaWKFZL gmBkBO0EgiRISNHALM9twlHmgO13HJIMrXTzGyTt3t9Zq1+0HHINUA5lb9iti/692dK7 XNwIASZYWRnzfxyd35UsIcbXGhLyRkWH9A1fSsA4t0pkykVdUL5pNqHyfrVPlWjtkNB0 2AxqTk60EGXEazaomUtuNqeeov959Q79Wt+MaAJB+BqYakQk9AYKGFLtAo09qwlMu30z /cCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5aKqoFa3PS3ofFsonmsRpILD1LHcN5f7ZDBzSGfsEbM=; b=T0sOmGXK0XQPDzDhpZj2M9BmlYu2T+O61mlAkLeCWtmLl3PdKsx31UjyTARUzY0CPN BZrq7r5sAvdvpkErH4PA0wOHroxh2iKQbap5IOA6+UJ1kegr5VOh6lqL6+DYiCVq3YDz /VYtdTlyGH3Jl04ON0I2UgccB/2pq7sFq4Tu6UDfuHZb2PTXDyxKXW3rVWrPSQ7yLix0 01h5T0SgmuXpX//oqOZAzTWYKub3OQdxIXneTG5CTeLuDCQz6gQD59bovNr2/HLxQvD9 VEllSF2x/nfZ0KGx6VaCeuRqbAQNux/PDdo4JmQ72QjbMrFO5oPUzb71qnlUXgYcAjWG PWRA== X-Gm-Message-State: AOAM532VZliXlT4Deh7lXwTsYpkfHlvUgSQAurh9rdI4ljj5NrNndDFJ PKdPCAYlpUuGEEVsoAfi79mJ3w== X-Received: by 2002:a05:6a00:16c5:b0:505:c572:7c2a with SMTP id l5-20020a056a0016c500b00505c5727c2amr22726073pfc.46.1650453915154; Wed, 20 Apr 2022 04:25:15 -0700 (PDT) Received: from localhost.localdomain ([122.167.88.101]) by smtp.gmail.com with ESMTPSA id u12-20020a17090a890c00b001b8efcf8e48sm22529274pjn.14.2022.04.20.04.25.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 04:25:14 -0700 (PDT) From: Anup Patel To: Paolo Bonzini , Atish Patra Cc: Palmer Dabbelt , Paul Walmsley , Alistair Francis , Anup Patel , kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Anup Patel Subject: [PATCH v2 3/7] RISC-V: KVM: Treat SBI HFENCE calls as NOPs Date: Wed, 20 Apr 2022 16:54:46 +0530 Message-Id: <20220420112450.155624-4-apatel@ventanamicro.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220420112450.155624-1-apatel@ventanamicro.com> References: <20220420112450.155624-1-apatel@ventanamicro.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We should treat SBI HFENCE calls as NOPs until nested virtualization is supported by KVM RISC-V. This will help us test booting a hypervisor under KVM RISC-V. Signed-off-by: Anup Patel --- arch/riscv/kvm/vcpu_sbi_replace.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/riscv/kvm/vcpu_sbi_replace.c b/arch/riscv/kvm/vcpu_sbi_replace.c index 0f217365c287..3c1dcd38358e 100644 --- a/arch/riscv/kvm/vcpu_sbi_replace.c +++ b/arch/riscv/kvm/vcpu_sbi_replace.c @@ -117,7 +117,11 @@ static int kvm_sbi_ext_rfence_handler(struct kvm_vcpu *vcpu, struct kvm_run *run case SBI_EXT_RFENCE_REMOTE_HFENCE_GVMA_VMID: case SBI_EXT_RFENCE_REMOTE_HFENCE_VVMA: case SBI_EXT_RFENCE_REMOTE_HFENCE_VVMA_ASID: - /* TODO: implement for nested hypervisor case */ + /* + * Until nested virtualization is implemented, the + * SBI HFENCE calls should be treated as NOPs + */ + break; default: ret = -EOPNOTSUPP; } -- 2.25.1