From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-183.mta0.migadu.com (out-183.mta0.migadu.com [91.218.175.183]) (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 472602580CF for ; Thu, 22 May 2025 21:43:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.183 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747950232; cv=none; b=CBfwIByvQSEB9GpAR1VRFZpgNGy0Z+lSJL/L7kO945DYH4ei0bPP5uHzHrfugzxyMlUaIG5AubtfItawHkcw5dx6kH/bdYg0GBNCjL3FZF1FLZsvv+RNaaSiz4fFCaqhUYXZTcZxwvHtDWa34Unb6yEuC6UDwtJCSUao2RKV6O8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747950232; c=relaxed/simple; bh=RWfUVJ+R+Vt3km2MW8uGMn6uTuXrPyTFfzIZbw4Ardc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=pquJcoAjId3Mjl4LgCPdznqGM8QH7I45NcGIFoYeylt8LA9FzioSUG2z/URfRNqP0DBdt4XXeJ9LZaUV5kRZ5QtMUFAAbDoM9ed/AWdasTgn2t0S0hH87WRwx+1bpTpff6cxqhLFDw70qAvdcLpxcoiAFel5eYKl5rT4VoXGznI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=OOkG4nO6; arc=none smtp.client-ip=91.218.175.183 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="OOkG4nO6" Message-ID: <1a7a81fd-cf15-4b54-a805-32d66ced4517@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1747950227; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=plmj0gdkiLDj4KVFLXX5cTeiNOeT4yGDHPQsokxsHYA=; b=OOkG4nO6c5U8WpwXR5zHF9F4hraYfw3IqEfgDjBO5ZMGHMQNcyDuF6iF0vJTho3r/Z1Cmo aO2zKV1AZgm9LSAdsZIsdIPSJ/E26aJyz9VWKCUF8uBhNWRnNB2o0sxPviVwWFYpKO4H2E QLcdkZY7Sl/SgBnOzB43xKs05KME/ss= Date: Thu, 22 May 2025 14:43:40 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH v3 0/2] RISC-V: KVM: VCPU reset fixes To: =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , kvm-riscv@lists.infradead.org Cc: kvm@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Anup Patel , Atish Patra , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Andrew Jones References: <20250515143723.2450630-4-rkrcmar@ventanamicro.com> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Atish Patra In-Reply-To: <20250515143723.2450630-4-rkrcmar@ventanamicro.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT On 5/15/25 7:37 AM, Radim KrÄmáŠwrote: > Hello, > > the design still requires a discussion. > > [v3 1/2] removes most of the additional changes that the KVM capability > was doing in v2. [v3 2/2] is new and previews a general solution to the > lack of userspace control over KVM SBI. > I am still missing the motivation behind it. If the motivation is SBI HSM suspend, the PATCH2 doesn't achieve that as it forwards every call to the user space. Why do you want to control hsm start/stop from the user space ? > A possible QEMU implementation for both capabilities can be seen in > https://github.com/radimkrcmar/qemu/tree/reset_fixes_v3 > The next step would be to forward the HSM ecalls to QEMU. > > v2: https://lore.kernel.org/kvm-riscv/20250508142842.1496099-2-rkrcmar@ventanamicro.com/ > v1: https://lore.kernel.org/kvm-riscv/20250403112522.1566629-3-rkrcmar@ventanamicro.com/ > > Radim Krčmář (2): > RISC-V: KVM: add KVM_CAP_RISCV_MP_STATE_RESET > RISC-V: KVM: add KVM_CAP_RISCV_USERSPACE_SBI > > Documentation/virt/kvm/api.rst | 22 ++++++++++++++++++++++ > arch/riscv/include/asm/kvm_host.h | 6 ++++++ > arch/riscv/include/asm/kvm_vcpu_sbi.h | 1 + > arch/riscv/kvm/vcpu.c | 27 ++++++++++++++------------- > arch/riscv/kvm/vcpu_sbi.c | 27 +++++++++++++++++++++++++-- > arch/riscv/kvm/vm.c | 18 ++++++++++++++++++ > include/uapi/linux/kvm.h | 2 ++ > 7 files changed, 88 insertions(+), 15 deletions(-) >