From: Sean Christopherson <seanjc@google.com>
To: "Huang, Shaoqin" <shaoqin.huang@intel.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Marc Zyngier <maz@kernel.org>, Anup Patel <anup@brainfault.org>,
Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Christian Borntraeger <borntraeger@linux.ibm.com>,
Janosch Frank <frankja@linux.ibm.com>,
Claudio Imbrenda <imbrenda@linux.ibm.com>,
James Morse <james.morse@arm.com>,
Alexandru Elisei <alexandru.elisei@arm.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Atish Patra <atishp@atishpatra.org>,
David Hildenbrand <david@redhat.com>,
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 <coltonlewis@google.com>,
Andrew Jones <drjones@redhat.com>
Subject: Re: [PATCH 2/3] KVM: selftests: Consolidate boilerplate code in get_ucall()
Date: Tue, 21 Jun 2022 14:41:02 +0000 [thread overview]
Message-ID: <YrHYfiI+54hAp0vv@google.com> (raw)
In-Reply-To: <de35d629-e076-e02d-7482-c93de628dd82@intel.com>
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
next prev parent reply other threads:[~2022-06-21 14:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-18 0:16 [PATCH 0/3] KVM: selftests: Consolidate ucall code Sean Christopherson
2022-06-18 0:16 ` [PATCH 1/3] KVM: selftests: Consolidate common code for popuplating ucall struct Sean Christopherson
2022-06-20 7:39 ` Christian Borntraeger
2022-06-18 0:16 ` [PATCH 2/3] KVM: selftests: Consolidate boilerplate code in get_ucall() Sean Christopherson
2022-06-19 10:36 ` Huang, Shaoqin
2022-06-21 14:41 ` Sean Christopherson [this message]
2022-06-18 0:16 ` [PATCH 3/3] KVM: selftest: Add __weak stubs for ucall_arch_(un)init() Sean Christopherson
2022-06-20 7:33 ` [PATCH 0/3] KVM: selftests: Consolidate ucall code Andrew Jones
2022-06-20 12:03 ` Paolo Bonzini
2022-06-21 14:54 ` Sean Christopherson
2022-07-15 19:32 ` Peter Gonda
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YrHYfiI+54hAp0vv@google.com \
--to=seanjc@google.com \
--cc=alexandru.elisei@arm.com \
--cc=anup@brainfault.org \
--cc=aou@eecs.berkeley.edu \
--cc=atishp@atishpatra.org \
--cc=borntraeger@linux.ibm.com \
--cc=coltonlewis@google.com \
--cc=david@redhat.com \
--cc=drjones@redhat.com \
--cc=frankja@linux.ibm.com \
--cc=imbrenda@linux.ibm.com \
--cc=james.morse@arm.com \
--cc=kvm-riscv@lists.infradead.org \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=maz@kernel.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=pbonzini@redhat.com \
--cc=shaoqin.huang@intel.com \
--cc=suzuki.poulose@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).