From: David Gibson <david@gibson.dropbear.id.au>
To: Alexey Kardashevskiy <aik@ozlabs.ru>
Cc: linuxppc-dev@lists.ozlabs.org, kvm-ppc@vger.kernel.org,
Paul Mackerras <paulus@ozlabs.org>
Subject: Re: [PATCH kernel 1/2] KVM: PPC: Use correct page shift in H_STUFF_TCE
Date: Wed, 2 May 2018 15:41:20 +1000 [thread overview]
Message-ID: <20180502054120.GA3517@umbus.fritz.box> (raw)
In-Reply-To: <20180502040723.20545-2-aik@ozlabs.ru>
[-- Attachment #1: Type: text/plain, Size: 2080 bytes --]
On Wed, May 02, 2018 at 02:07:22PM +1000, Alexey Kardashevskiy wrote:
> The other TCE handlers use page shift from the guest visible TCE table
> (described by kvmppc_spapr_tce_iommu_table) so let's make H_STUFF_TCE
> handlers do the same thing.
>
> This should cause no behavioral change now but soon we will allow
> the iommu_table::it_page_shift being different from from the emulated
> table page size so this will play a role.
>
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
> ---
> arch/powerpc/kvm/book3s_64_vio.c | 2 +-
> arch/powerpc/kvm/book3s_64_vio_hv.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/powerpc/kvm/book3s_64_vio.c b/arch/powerpc/kvm/book3s_64_vio.c
> index 4dffa61..041e54d 100644
> --- a/arch/powerpc/kvm/book3s_64_vio.c
> +++ b/arch/powerpc/kvm/book3s_64_vio.c
> @@ -615,7 +615,7 @@ long kvmppc_h_stuff_tce(struct kvm_vcpu *vcpu,
> return H_PARAMETER;
>
> list_for_each_entry_lockless(stit, &stt->iommu_tables, next) {
> - unsigned long entry = ioba >> stit->tbl->it_page_shift;
> + unsigned long entry = ioba >> stt->page_shift;
>
> for (i = 0; i < npages; ++i) {
> ret = kvmppc_tce_iommu_unmap(vcpu->kvm,
> diff --git a/arch/powerpc/kvm/book3s_64_vio_hv.c b/arch/powerpc/kvm/book3s_64_vio_hv.c
> index 6651f73..e220fab 100644
> --- a/arch/powerpc/kvm/book3s_64_vio_hv.c
> +++ b/arch/powerpc/kvm/book3s_64_vio_hv.c
> @@ -526,7 +526,7 @@ long kvmppc_rm_h_stuff_tce(struct kvm_vcpu *vcpu,
> return H_PARAMETER;
>
> list_for_each_entry_lockless(stit, &stt->iommu_tables, next) {
> - unsigned long entry = ioba >> stit->tbl->it_page_shift;
> + unsigned long entry = ioba >> stt->page_shift;
>
> for (i = 0; i < npages; ++i) {
> ret = kvmppc_rm_tce_iommu_unmap(vcpu->kvm,
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2018-05-02 6:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-02 4:07 [PATCH kernel 0/2] KVM: PPC: Allow backing bigger guest IOMMU pages with smaller physical Alexey Kardashevskiy
2018-05-02 4:07 ` [PATCH kernel 1/2] KVM: PPC: Use correct page shift in H_STUFF_TCE Alexey Kardashevskiy
2018-05-02 5:41 ` David Gibson [this message]
2018-05-02 4:07 ` [PATCH kernel 2/2] KVM: PPC: Allow backing bigger guest IOMMU pages with smaller physical pages Alexey Kardashevskiy
2018-05-02 5:49 ` David Gibson
2018-05-02 9:10 ` Alexey Kardashevskiy
2018-05-02 5:53 ` Balbir Singh
2018-05-02 6:26 ` Alexey Kardashevskiy
2018-05-02 7:03 ` David Gibson
2018-05-02 8:59 ` Balbir Singh
2018-05-02 9:13 ` Alexey Kardashevskiy
2018-05-02 6:16 ` [PATCH kernel 0/2] KVM: PPC: Allow backing bigger guest IOMMU pages with smaller physical David Gibson
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=20180502054120.GA3517@umbus.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=aik@ozlabs.ru \
--cc=kvm-ppc@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=paulus@ozlabs.org \
/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).