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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id F2E96C43334 for ; Tue, 21 Jun 2022 14:42:14 +0000 (UTC) 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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=tbENX+AqPNJZK6yyfZaueMHnxIvjTxeoxyite1qB3VY=; b=aeQWfgUtJjme8I iewXiOqB4fVobZaamgzvbawjdfV9EfkDtDIg5Pn8GF7F6XNS8jJ6wjONlM6cXo+xW2oNTfGDYpaVc ImKItfpw/y6tNBTMHkCEmZ+1FfvZ6qF4xVVTrYWLRhGIXjlYXkAzMxg8qWYO48GmnbWB8L9pittI6 sPcko79jy0U6gmIf4NrCG1KCWZ/e5BqbudZzhqKOlLyVh7YvCZKOwkX1bwTpCp9t28jexT8lTT8AR hibWy8YsZQd39Nmz0eQZvUYH7L19CCd0GjmLcGJZgP+ny55NQDGJkhVLjTPq9SsI5jpYZuUy5csX2 iUfIlB47pB05IEf7vv+g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o3f46-005ugb-HR; Tue, 21 Jun 2022 14:41:14 +0000 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o3f43-005uXo-9S for linux-arm-kernel@lists.infradead.org; Tue, 21 Jun 2022 14:41:12 +0000 Received: by mail-pj1-x1033.google.com with SMTP id g10-20020a17090a708a00b001ea8aadd42bso13639014pjk.0 for ; Tue, 21 Jun 2022 07:41:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=JOicc8moSgPUHZwRa0UCLUvVifYA0qTN8DaBzCizOgw=; b=cKCuyyDnkfNQBL6avZcuKqgcaAnrDgGaMrPVXHKS56JghxcscK9NoNnj3Fq7/NVRC+ oRVzrbe4sEZRyZOqRivaOWFZO8Gd7vthX9YgbDCc1RkeiGegxd0pyZQqGZ/UzgMt5ruJ MaD7F/sfEkQoWFzd4qxP745PX7p+Gml77tWHRrjRjkZiJB4Si0+QNOhldE61LLtgrKtz z7nAckxCBVmBlyIGhrdH+2BUYxEDwzsjv/pBBt1WZ1hcXBLEmjxXq9UXzk0BiNzqacIe VkYCNWJt/9iPC5J8GLSnvPOdHVjKAoDqjVqKQeMuB+EOm3tQprFc1Ew0wMXup3tiDdCK rfwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=JOicc8moSgPUHZwRa0UCLUvVifYA0qTN8DaBzCizOgw=; b=KCf0VCn6kevn7Vg7v8LnQ5uw0nubWcik8r4pfmN0b0vKtF24p2yAXkI8D8DlH+EsuS mIdPKeDMlKU8ICUuiUW+WcPaEkB+3ctP+RbV0zNAgWfD8IKhc96c4cpsGA8Hv8gP9Ktf GmbdII1Enr8teDl0Bf7IH/ZJU5uhsU5EtY7q3LwN8bo3CKayE/u6IX+zXyGDFonu6YhD oEYHyLe+z/mVBska7fHMfVTeW6HixxJoouXn+ow/LNNOTGU271EpGQun1rQAiigXuQ7g u65lc0AQ0urCyNN0tER5Jqvt32ymnd3+DJBglWx9Eph+b4ATOLEXp+9Im2NdqpYcCPSw fygw== X-Gm-Message-State: AJIora+HbYz0vfKMDxJRRp3H9+3ZYD1yAH09+WkEA2q9jjFlbHjmtKP9 uHbn/gDDc+R5eRZSA6Js8hLe9A== X-Google-Smtp-Source: AGRyM1vJrRABFv+Um9W+VY7dY1s+g55BsfMNsbio+5fYQj4/zIQK6olfXAORs7KW0GbN7wK+7Xjx+Q== X-Received: by 2002:a17:902:ab87:b0:162:26cf:bf7a with SMTP id f7-20020a170902ab8700b0016226cfbf7amr28637304plr.168.1655822466277; Tue, 21 Jun 2022 07:41:06 -0700 (PDT) Received: from google.com (123.65.230.35.bc.googleusercontent.com. [35.230.65.123]) by smtp.gmail.com with ESMTPSA id s17-20020a170902c65100b0016a091e993dsm8269986pls.42.2022.06.21.07.41.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jun 2022 07:41:05 -0700 (PDT) Date: Tue, 21 Jun 2022 14:41:02 +0000 From: Sean Christopherson To: "Huang, Shaoqin" Cc: Paolo Bonzini , Marc Zyngier , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Christian Borntraeger , Janosch Frank , Claudio Imbrenda , James Morse , Alexandru Elisei , Suzuki K Poulose , Atish Patra , David Hildenbrand , kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Colton Lewis , Andrew Jones Subject: Re: [PATCH 2/3] KVM: selftests: Consolidate boilerplate code in get_ucall() Message-ID: References: <20220618001618.1840806-1-seanjc@google.com> <20220618001618.1840806-3-seanjc@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220621_074111_363774_362FED8E X-CRM114-Status: GOOD ( 14.15 ) 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 Sun, Jun 19, 2022, Huang, Shaoqin wrote: > > > On 6/18/2022 8:16 AM, Sean Christopherson wrote: > > Consolidate the actual copying of a ucall struct from guest=>host into > > the common get_ucall(). Return a host virtual address instead of a guest > > virtual address even though the addr_gva2hva() part could be moved to > > get_ucall() too. Conceptually, get_ucall() is invoked from the host and > > should return a host virtual address (and returning NULL for "nothing to > > see here" is far superior to returning 0). > > It seems the get_ucall() returns the uc->cmd, the ucall_arch_get_ucall() > returns a host virtual address. Yep, get_ucall() then does the memcpy() from guest memory via that host virtual addres and returns the resulting ucall command. The intent is that the arch hooks are not to be called by common code. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel