Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp1858900lqp; Sat, 23 Mar 2024 11:48:56 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVLeqnD26DThaPY4z4pyxuMccldMhegu/szls2+fX1VqwKr2qShxH5PVDlqFujQjPmgNa30Ikwn+bDqC0lRjPRG/MwZ7uFFXQnwiW4BiQ== X-Google-Smtp-Source: AGHT+IEVb6FCc79BUC0MmwYzBmVdk5AkVLNkyBW9LY0ihALwtPdN+69dXLCl/1eYkAqQPB+EruGE X-Received: by 2002:a92:d744:0:b0:366:ab6f:f63 with SMTP id e4-20020a92d744000000b00366ab6f0f63mr2939908ilq.3.1711219736097; Sat, 23 Mar 2024 11:48:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711219736; cv=pass; d=google.com; s=arc-20160816; b=MfhJeT92CcYO8iinlbu5I0E7y093tAL0oMHc6v/HoOAIiEA8vSdJZ9JFckF+dDYMGW HLqTTikMZSMUZC8Mv6hKI2kdJd2aKagKP4N4UwLZARBYqXTL5VNFweKnO0yK3uV18WUJ Q3d797waGE66qyasgYRC2AAe2u+TTsnid8Kb3DIbwgFXlyyJiZlU7vj2d6H3U3Og7/4r pk3U5sC3BEGQY8vEhDxNHJ/2iuhJ8CtxzdCGwO4qruMz+zUw9coTQKU+qNvargDMAlX3 oPmFnHhxsAq7/r/Cq13e/zP5TKX+mUsrv3NUOu5g5cdE+u1AltBsuhwnGetZzZgEndOe 197w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=fZ0QE+KXOIpTKv6BTtpfniz90YaRdlkZ5YKShKRWKD8=; fh=l9vHTTAW4u+SDgZgyQhPaAWod8HwY7tQX6LyzE1PB9s=; b=inyj2JZwprVmRdNP+5ls9x4DnA6NP5LbKp/N5lbXpZx+x34nDNnXMIHdSbGLDnscv7 rV46ogmdzPlV3BH6daoLRP3yKSmg1U+/9KGwFRJ851U0At2v1io200CL4gHQiS07WhRR ea18mELjihHxoe6EXqUuwBlIb2uVeQuWDQ9iAZga2l/W75EeLGXHLw7PPgola5QxjGAv DggSA2QNcr/1s8TAdzxK/aaUR3Ge/hWX7v5YflGFN+rSHeQshtwuFOpbqdef2JI4uvmG fdIFsVNzYJerMQG84QHb4mlrnTM5jM7pT+hVlZbSPl8WpEBSYxkHkMKnOxEB3WSqBIgs cmKA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@xen0n.name header.s=mail header.b=QMSfzB9R; arc=pass (i=1 spf=pass spfdomain=xen0n.name dkim=pass dkdomain=xen0n.name); spf=pass (google.com: domain of linux-kernel+bounces-112452-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-112452-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id m26-20020a6562da000000b005ced2a6b890si4277764pgv.668.2024.03.23.11.48.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Mar 2024 11:48:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-112452-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@xen0n.name header.s=mail header.b=QMSfzB9R; arc=pass (i=1 spf=pass spfdomain=xen0n.name dkim=pass dkdomain=xen0n.name); spf=pass (google.com: domain of linux-kernel+bounces-112452-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-112452-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 49DF5281E3D for ; Sat, 23 Mar 2024 18:48:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C6F5C58AAC; Sat, 23 Mar 2024 18:48:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=xen0n.name header.i=@xen0n.name header.b="QMSfzB9R" Received: from mailbox.box.xen0n.name (mail.xen0n.name [115.28.160.31]) (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 ABBA54C3C3; Sat, 23 Mar 2024 18:48:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.28.160.31 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711219726; cv=none; b=ZVg/JwTryWbQM6hkc43/pIoQcraQtEpxGo5RRM0eox876ztvrwqoL0WsOOwZ4TOmSbs09IRhtWrnze0YHnuV7329nwO01KlK1Ow1Djmyn4BS9cYcs2OeEStwO8tcB+YQgiqDwKDfm1ttgvtKj+XSSzZozpeAovAXamJcKAxVnKA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711219726; c=relaxed/simple; bh=npwipMtKSwmLf9mv4yQ2FyleQl5NkVskeswqDmWzh0g=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=KxxOePsbD/H9h6iY4p4TQA3uQC+kaF7bUR3k0aY/nVmc3yEzno8rA8UymRVuB4/QVUIrTOKDBrH9OtJO0N6XqIqJ8qVh8qHzr6X3S18uR83TK9yoI7ZQ3KFFbUlhiz64RItQnOSmQQrLAVRGrxzrmT3dlQIErlvjsP2m6htovRc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=xen0n.name; spf=pass smtp.mailfrom=xen0n.name; dkim=pass (1024-bit key) header.d=xen0n.name header.i=@xen0n.name header.b=QMSfzB9R; arc=none smtp.client-ip=115.28.160.31 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=xen0n.name Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=xen0n.name DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xen0n.name; s=mail; t=1711219204; bh=npwipMtKSwmLf9mv4yQ2FyleQl5NkVskeswqDmWzh0g=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=QMSfzB9RAzfhKYaxTnVOG0t1sAMrc040mVeLSw5dcg6t2kvKK/yOZQHfSyfNd5VDs HpcJ04SmV4fjOhSsWeQyid5DxcOaFvL2IaSn+l1YrmmAoJU8ik7X9A7xG/ERvn82SR /jLSjwcwGVaqd8H3/KPx68+iUsJXdQ0RVxpoFZkA= Received: from [IPV6:240e:388:8d00:6500:cccf:e2b8:7fab:4dfb] (unknown [IPv6:240e:388:8d00:6500:cccf:e2b8:7fab:4dfb]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailbox.box.xen0n.name (Postfix) with ESMTPSA id 6AB18600A6; Sun, 24 Mar 2024 02:40:04 +0800 (CST) Message-ID: <68473508-dbf1-4875-a392-88ca09f7ea63@xen0n.name> Date: Sun, 24 Mar 2024 02:40:04 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v7 7/7] Documentation: KVM: Add hypercall for LoongArch Content-Language: en-US To: Bibo Mao , Huacai Chen , Tianrui Zhao , Juergen Gross , Paolo Bonzini , Jonathan Corbet Cc: loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, virtualization@lists.linux.dev, kvm@vger.kernel.org References: <20240315080710.2812974-1-maobibo@loongson.cn> <20240315081104.2813031-1-maobibo@loongson.cn> From: WANG Xuerui In-Reply-To: <20240315081104.2813031-1-maobibo@loongson.cn> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 3/15/24 16:11, Bibo Mao wrote: > [snip] > +KVM hypercall ABI > +================= > + > +Hypercall ABI on KVM is simple, only one scratch register a0 and at most > +five generic registers used as input parameter. FP register and vector register > +is not used for input register and should not be modified during hypercall. > +Hypercall function can be inlined since there is only one scratch register. Maybe it's better to describe the list of preserved registers with an expression such as "all non-GPR registers shall remain unmodified after returning from the hypercall", to guard ourselves against future ISA state additions. But I still maintain that it's better to promise less here, and only hint on the extensive preservation of context as an implementation detail. It is for not losing our ability to save/restore less in the future, should we decide to do so. -- WANG "xen0n" Xuerui Linux/LoongArch mailing list: https://lore.kernel.org/loongarch/