From: Alexander Graf <agraf@suse.de>
To: "Cédric Le Goater" <clg@fr.ibm.com>
Cc: kvm-ppc@vger.kernel.org, kvm@vger.kernel.org,
Paul Mackerras <paulus@samba.org>,
Alexey Kardashevskiy <aik@ozlabs.ru>,
Gregory Kurz <gkurz@linux.vnet.ibm.com>
Subject: Re: [PATCH] KVM: PPC: Book3S HV: ptes are big endian
Date: Thu, 20 Nov 2014 17:28:34 +0000 [thread overview]
Message-ID: <546E24C2.1090908@suse.de> (raw)
In-Reply-To: <1415028950-9654-1-git-send-email-clg@fr.ibm.com>
On 03.11.14 16:35, Cédric Le Goater wrote:
> When being restored from qemu, the kvm_get_htab_header are in native
> endian, but the ptes are big endian.
>
> This patch fixes restore on a KVM LE host. Qemu also needs a fix for
> this :
>
> http://lists.nongnu.org/archive/html/qemu-ppc/2014-11/msg00008.html
>
> Signed-off-by: Cédric Le Goater <clg@fr.ibm.com>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Alexey Kardashevskiy <aik@ozlabs.ru>
> Cc: Gregory Kurz <gkurz@linux.vnet.ibm.com>
>
> ---
>
> Tested on 3.17-rc7 with LE and BE host.
>
>
>
> arch/powerpc/kvm/book3s_64_mmu_hv.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> Index: linux-3.18-hv.git/arch/powerpc/kvm/book3s_64_mmu_hv.c
> =================================> --- linux-3.18-hv.git.orig/arch/powerpc/kvm/book3s_64_mmu_hv.c
> +++ linux-3.18-hv.git/arch/powerpc/kvm/book3s_64_mmu_hv.c
> @@ -1542,6 +1542,8 @@ static ssize_t kvm_htab_write(struct fil
> err = -EFAULT;
> if (__get_user(v, lbuf) || __get_user(r, lbuf + 1))
> goto out;
> + v = be64_to_cpu(v);
> + r = be64_to_cpu(r);
This will trigger warnings with sparse. Please introduce new be64
variables that you do get_user on and that you then use as source for v
and r.
Alex
WARNING: multiple messages have this Message-ID (diff)
From: Alexander Graf <agraf@suse.de>
To: "Cédric Le Goater" <clg@fr.ibm.com>
Cc: kvm-ppc@vger.kernel.org, kvm@vger.kernel.org,
Paul Mackerras <paulus@samba.org>,
Alexey Kardashevskiy <aik@ozlabs.ru>,
Gregory Kurz <gkurz@linux.vnet.ibm.com>
Subject: Re: [PATCH] KVM: PPC: Book3S HV: ptes are big endian
Date: Thu, 20 Nov 2014 18:28:34 +0100 [thread overview]
Message-ID: <546E24C2.1090908@suse.de> (raw)
In-Reply-To: <1415028950-9654-1-git-send-email-clg@fr.ibm.com>
On 03.11.14 16:35, Cédric Le Goater wrote:
> When being restored from qemu, the kvm_get_htab_header are in native
> endian, but the ptes are big endian.
>
> This patch fixes restore on a KVM LE host. Qemu also needs a fix for
> this :
>
> http://lists.nongnu.org/archive/html/qemu-ppc/2014-11/msg00008.html
>
> Signed-off-by: Cédric Le Goater <clg@fr.ibm.com>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Alexey Kardashevskiy <aik@ozlabs.ru>
> Cc: Gregory Kurz <gkurz@linux.vnet.ibm.com>
>
> ---
>
> Tested on 3.17-rc7 with LE and BE host.
>
>
>
> arch/powerpc/kvm/book3s_64_mmu_hv.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> Index: linux-3.18-hv.git/arch/powerpc/kvm/book3s_64_mmu_hv.c
> ===================================================================
> --- linux-3.18-hv.git.orig/arch/powerpc/kvm/book3s_64_mmu_hv.c
> +++ linux-3.18-hv.git/arch/powerpc/kvm/book3s_64_mmu_hv.c
> @@ -1542,6 +1542,8 @@ static ssize_t kvm_htab_write(struct fil
> err = -EFAULT;
> if (__get_user(v, lbuf) || __get_user(r, lbuf + 1))
> goto out;
> + v = be64_to_cpu(v);
> + r = be64_to_cpu(r);
This will trigger warnings with sparse. Please introduce new be64
variables that you do get_user on and that you then use as source for v
and r.
Alex
next prev parent reply other threads:[~2014-11-20 17:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-03 15:35 [PATCH] KVM: PPC: Book3S HV: ptes are big endian Cédric Le Goater
2014-11-03 15:35 ` Cédric Le Goater
2014-11-20 17:28 ` Alexander Graf [this message]
2014-11-20 17:28 ` Alexander Graf
2014-11-20 23:45 ` [PATCH v2] " Cédric Le Goater
2014-11-20 23:45 ` Cédric Le Goater
2014-11-23 0:39 ` Alexander Graf
2014-11-23 0:39 ` Alexander Graf
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=546E24C2.1090908@suse.de \
--to=agraf@suse.de \
--cc=aik@ozlabs.ru \
--cc=clg@fr.ibm.com \
--cc=gkurz@linux.vnet.ibm.com \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=paulus@samba.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.