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/msg8.html
Signed-off-by: Cédric Le Goater c
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/msg8.html
Signed-off-by: Cédric Le Goater c
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/msg8.html
Signed-off-by: Cédric Le Goater c
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/msg8.html
Signed-off-by: Cédric Le Goater c
Signed-off-by: Cédric Le Goater c...@fr.ibm.com
---
drivers/vhost/net.c | 39 ++-
1 file changed, 30 insertions(+), 9 deletions(-)
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index 8dae2f724a35..f2d5f585dae9 100644
--- a/drivers/vhost/net.c
+++ b
The VHOST_VRING_F_BYTESWAP flag will be used by the host to byteswap
the vring data when the guest and the host have a different endian
order.
Signed-off-by: Cédric Le Goater c...@fr.ibm.com
---
drivers/vhost/vhost.c |5 -
drivers/vhost/vhost.h |1 +
include/uapi/linux
The virtqueue structure shares a few attributes with the guest OS
which need to be byteswapped when the endian order of the host is
different.
This patch uses the vq-byteswap attribute to decide whether to
byteswap or not data being accessed in the guest memory.
Signed-off-by: Cédric Le Goater c
:
trusty/ppc64le, utopic/ppc64le, debian/ppc64le,
rhel6.5/ppc64, fedora21/ppc64, debian/ppc64
Regressions tests for x86_64 were done a debian host using rhel6.6,
fedora20 and debian guests.
Cédric Le Goater (4):
vhost: add VHOST_VRING_F_BYTESWAP flag
vhost: add byteswap
This patch adds a few helper routines around get_user and put_user
to ease byteswapping.
Signed-off-by: Cédric Le Goater c...@fr.ibm.com
---
I am not sure these routines belong to this file. There is room for
improvement to remove the ugly switch (sizeof(*(ptr))). Please
comment !
drivers
The virtqueue structure shares a few attributes with the guest OS
which need to be byteswapped when the endian order of the host is
different.
This patch uses the vq-byteswap attribute to decide whether to
byteswap or not data being accessed in the guest memory.
Signed-off-by: Cédric Le Goater c
Signed-off-by: Cédric Le Goater c...@fr.ibm.com
---
drivers/vhost/net.c | 39 ++-
1 file changed, 30 insertions(+), 9 deletions(-)
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index 8dae2f724a35..f2d5f585dae9 100644
--- a/drivers/vhost/net.c
+++ b
This patch adds a few helper routines around get_user and put_user
to ease byteswapping.
Signed-off-by: Cédric Le Goater c...@fr.ibm.com
---
I am not sure these routines belong to this file. There is room for
improvement to remove the ugly switch (sizeof(*(ptr))). Please
comment !
drivers
Le Goater c...@fr.ibm.com
---
Tested on 3.17-rc7 with LE and BE host.
Looking at the code, it is not very clear what we are doing
in terms of endianness. May be this needs more work on both
side, KVM and qemu, to remove the big endian assumptions ?
Thanks,
arch/powerpc/kvm
Le Goater c...@fr.ibm.com
---
Tested on 3.17-rc7 with LE and BE host.
Looking at the code, it is not very clear what we are doing
in terms of endianness. May be this needs more work on both
side, KVM and qemu, to remove the big endian assumptions ?
Thanks,
arch/powerpc/kvm
to reverse the endianness of the MMIO if required.
Signed-off-by: Cédric Le Goater c...@fr.ibm.com
---
How's that ? As the changes were small, I kept them in one patch
but I can split if necessary.
This patch was tested for Big Endian and Little Endian HV guests
and Big Endian PR guests
to reverse the endianness of the MMIO if required.
Signed-off-by: Cédric Le Goater c...@fr.ibm.com
---
How's that ? As the changes were small, I kept them in one patch
but I can split if necessary.
This patch was tested for Big Endian and Little Endian HV guests
and Big Endian PR guests on 3.13
to reverse the endianness of the MMIO if required.
Signed-off-by: Cédric Le Goater c...@fr.ibm.com
---
How's that ? As the changes were small, I kept them in one patch
but I can split if necessary.
This patch was tested for Big Endian and Little Endian HV guests
and Big Endian PR guests
to reverse the endianness of the MMIO if required.
Signed-off-by: Cédric Le Goater c...@fr.ibm.com
---
How's that ? As the changes were small, I kept them in one patch
but I can split if necessary.
This patch was tested for Big Endian and Little Endian HV guests
and Big Endian PR guests on 3.13
to reverse the endianness of the MMIO if required.
Signed-off-by: Cédric Le Goater c...@fr.ibm.com
---
This patch was tested for Big Endian and Little Endian HV guests
and Big Endian PR guests on 3.13 (plus a h_set_mode hack)
Changes in v6:
- removed asm changes (Alexander Graf)
- byteswaps
to reverse the endianness of the MMIO if required.
Signed-off-by: Cédric Le Goater c...@fr.ibm.com
---
This patch was tested for Big Endian and Little Endian HV guests
and Big Endian PR guests on 3.13 (plus a h_set_mode hack)
Changes in v6:
- removed asm changes (Alexander Graf)
- byteswaps
() and
kvmppc_handle_load() by changing the is_bigendian parameter
meaning. (Paul Mackerras)
Thanks,
C.
Cédric Le Goater (6):
KVM: PPC: Book3S: add helper routine to load guest instructions
KVM: PPC: Book3S: add helper routines to detect endian
KVM: PPC: Book3S: MMIO emulation support
() is
slightly changed to represent an eventual reverse operation. This
is used in conjunction with kvmppc_is_bigendian() to determine if
the instruction being emulated should be byte-swapped.
Signed-off-by: Cédric Le Goater c...@fr.ibm.com
Signed-off-by: Paul Mackerras pau...@samba.org
---
Changes
They will be used to decide whether to byte-swap or not. When Little
Endian host kernels come, these routines will need to be changed
accordingly.
Signed-off-by: Cédric Le Goater c...@fr.ibm.com
---
arch/powerpc/include/asm/kvm_book3s.h | 10 ++
1 file changed, 10 insertions(+)
diff
0 0 Big Big
0 1 Little Little
1 0 Little Big
1 1 Big Little
Signed-off-by: Cédric Le Goater c...@fr.ibm.com
Cc: Benjamin Herrenschmidt b...@kernel.crashing.org
---
This is clearly a powerpc patch
This patch adds an helper routine kvmppc_ld32() to load an
instruction form the guest. This routine will be modified in
the next patch to take into account the endian order of the
guest.
Signed-off-by: Cédric Le Goater c...@fr.ibm.com
---
Changes in v4:
- got rid of useless helper routine
Instruction and data storage accesses are done in opposite order
when the Split Little Endian mode is used. This patch modifies
the kvmppc_ld32() routine to reverse the byteswap when the guest
is in SLE mode.
Signed-off-by: Cédric Le Goater c...@fr.ibm.com
---
arch/powerpc/include/asm
If the host is in little endian order, there is no need to byte-swap
in little endian guests.
Signed-off-by: Cédric Le Goater c...@fr.ibm.com
---
arch/powerpc/include/asm/kvm_book3s.h |4
1 file changed, 4 insertions(+)
diff --git a/arch/powerpc/include/asm/kvm_book3s.h
b/arch/powerpc
They will be used to decide whether to byte-swap or not. When Little
Endian host kernels come, these routines will need to be changed
accordingly.
Signed-off-by: Cédric Le Goater c...@fr.ibm.com
---
arch/powerpc/include/asm/kvm_book3s.h | 10 ++
1 file changed, 10 insertions(+)
diff
This patch adds an helper routine kvmppc_ld32() to load an
instruction form the guest. This routine will be modified in
the next patch to take into account the endian order of the
guest.
Signed-off-by: Cédric Le Goater c...@fr.ibm.com
---
Changes in v4:
- got rid of useless helper routine
They will be used to decide whether to byte-swap or not. When Little
Endian host kernels come, these routines will need to be changed
accordingly.
Signed-off-by: Cédric Le Goater c...@fr.ibm.com
---
arch/powerpc/include/asm/kvm_book3s.h | 10 ++
1 file changed, 10 insertions(+)
diff
() is
slightly changed to represent an eventual reverse operation. This
is used in conjunction with kvmppc_is_bigendian() to determine if
the instruction being emulated should be byte-swapped.
Signed-off-by: Cédric Le Goater c...@fr.ibm.com
---
Changes in v2:
- replaced rldicl. by andi. to test
This patch adds an helper routine kvmppc_ld_inst() to load an
instruction form the guest. This routine will be modified in
the next patch to take into account the endian order of the
guest.
Signed-off-by: Cédric Le Goater c...@fr.ibm.com
---
arch/powerpc/include/asm/kvm_book3s.h | 16
parameter
meaning. (Paul Mackerras)
Thanks,
C.
Cédric Le Goater (3):
KVM: PPC: Book3S: add helper routine to load guest instructions
KVM: PPC: Book3S: add helper routines to detect endian
KVM: PPC: Book3S: MMIO emulation support for little endian guests
arch/powerpc/include/asm
:
- replaced rldicl. by andi. to test the MSR_LE bit in the guest
exit paths. (Paul Mackerras)
- moved the byte swapping logic to kvmppc_handle_load() and
kvmppc_handle_load() by changing the is_bigendian parameter
meaning. (Paul Mackerras)
Thanks,
C.
Cédric Le Goater (3):
KVM
This patch adds an helper routine kvmppc_ld32() to load an
instruction form the guest. This routine will be modified in
the next patch to take into account the endian order of the
guest.
Signed-off-by: Cédric Le Goater c...@fr.ibm.com
---
Changes in v4:
- got rid of useless helper routine
() is
slightly changed to represent an eventual reverse operation. This
is used in conjunction with kvmppc_is_bigendian() to determine if
the instruction being emulated should be byte-swapped.
Signed-off-by: Cédric Le Goater c...@fr.ibm.com
---
Changes in v3:
- moved kvmppc_need_byteswap
They will be used to decide whether to byte-swap or not. When Little
Endian host kernels come, these routines will need to be changed
accordingly.
Signed-off-by: Cédric Le Goater c...@fr.ibm.com
---
arch/powerpc/include/asm/kvm_book3s.h | 10 ++
1 file changed, 10 insertions(+)
diff
This patch adds an helper routine kvmppc_ld_inst() to load an
instruction form the guest. This routine will be modified in
the next patch to take into account the endian order of the
guest.
Signed-off-by: Cédric Le Goater c...@fr.ibm.com
---
arch/powerpc/include/asm/kvm_book3s.h | 16
parameter
meaning. (Paul Mackerras)
Thanks,
C.
Cédric Le Goater (3):
KVM: PPC: Book3S: add helper routine to load guest instructions
KVM: PPC: Book3S: add helper routines to detect endian
KVM: PPC: Book3S: MMIO emulation support for little endian guests
arch/powerpc/include/asm
() is
slightly changed to represent an eventual reverse operation. This
is used in conjunction with kvmppc_is_bigendian() to determine if
the instruction being emulated should be byte-swapped.
Signed-off-by: Cédric Le Goater c...@fr.ibm.com
---
Changes in v2:
- replaced rldicl. by andi. to test
They will be used to decide whether to byte-swap or not. When Little
Endian host kernels come, these routines will need to be changed
accordingly.
Signed-off-by: Cédric Le Goater c...@fr.ibm.com
---
arch/powerpc/include/asm/kvm_book3s.h | 10 ++
1 file changed, 10 insertions(+)
diff
() is
slightly changed to represent an eventual reverse operation. This
is used in conjunction with kvmppc_is_bigendian() to determine if
the instruction being emulated should be byte-swapped.
Signed-off-by: Cédric Le Goater c...@fr.ibm.com
---
Changes in v3:
- moved kvmppc_need_byteswap
:
- replaced rldicl. by andi. to test the MSR_LE bit in the guest
exit paths. (Paul Mackerras)
- moved the byte swapping logic to kvmppc_handle_load() and
kvmppc_handle_load() by changing the is_bigendian parameter
meaning. (Paul Mackerras)
Thanks,
C.
Cédric Le Goater (3):
KVM
() is
slightly changed to represent an eventual reverse operation. This
is used in conjunction with kvmppc_is_bigendian() to determine if
the instruction being emulated should be byte-swapped.
Signed-off-by: Cédric Le Goater c...@fr.ibm.com
---
Changes in v3:
- moved kvmppc_need_byteswap
This patch adds an helper routine kvmppc_ld32() to load an
instruction form the guest. This routine will be modified in
the next patch to take into account the endian order of the
guest.
Signed-off-by: Cédric Le Goater c...@fr.ibm.com
---
Changes in v4:
- got rid of useless helper routine
They will be used to decide whether to byte-swap or not. When Little
Endian host kernels come, these routines will need to be changed
accordingly.
Signed-off-by: Cédric Le Goater c...@fr.ibm.com
---
arch/powerpc/include/asm/kvm_book3s.h | 10 ++
1 file changed, 10 insertions(+)
diff
is Little Endian.
This patchset is based on Alex Graf's kvm-ppc-queue branch. It has been
tested with anton's patchset for Big Endian and Little Endian HV guests
and Big Endian PR guests.
Thanks,
C.
Cédric Le Goater (3):
KVM: PPC: Book3S: add helper routine to load guest instructions
KVM: PPC
to be done.
Signed-off-by: Cédric Le Goater c...@fr.ibm.com
---
arch/powerpc/include/asm/kvm_book3s.h |9 +++-
arch/powerpc/kvm/book3s_hv_rmhandlers.S | 12 ++
arch/powerpc/kvm/book3s_segment.S | 11 +
arch/powerpc/kvm/emulate.c | 72
This patch adds an helper routine kvmppc_ld_inst() to load an
instruction form the guest. This routine will be modified in
the next patches to take into account the endian order of the
guest.
Signed-off-by: Cédric Le Goater c...@fr.ibm.com
---
arch/powerpc/include/asm/kvm_book3s.h | 16
They will be used to decide whether to byte-swap or not. When Little
Endian host kernels come, these routines will need to be changed
accordingly.
Signed-off-by: Cédric Le Goater c...@fr.ibm.com
---
arch/powerpc/include/asm/kvm_book3s.h | 10 ++
1 file changed, 10 insertions(+)
diff
is Little Endian.
This patchset is based on Alex Graf's kvm-ppc-queue branch. It has been
tested with anton's patchset for Big Endian and Little Endian HV guests
and Big Endian PR guests.
Thanks,
C.
Cédric Le Goater (3):
KVM: PPC: Book3S: add helper routine to load guest instructions
KVM: PPC
This patch adds an helper routine kvmppc_ld_inst() to load an
instruction form the guest. This routine will be modified in
the next patches to take into account the endian order of the
guest.
Signed-off-by: Cédric Le Goater c...@fr.ibm.com
---
arch/powerpc/include/asm/kvm_book3s.h | 16
to be done.
Signed-off-by: Cédric Le Goater c...@fr.ibm.com
---
arch/powerpc/include/asm/kvm_book3s.h |9 +++-
arch/powerpc/kvm/book3s_hv_rmhandlers.S | 12 ++
arch/powerpc/kvm/book3s_segment.S | 11 +
arch/powerpc/kvm/emulate.c | 72
They will be used to decide whether to byte-swap or not. When Little
Endian host kernels come, these routines will need to be changed
accordingly.
Signed-off-by: Cédric Le Goater c...@fr.ibm.com
---
arch/powerpc/include/asm/kvm_book3s.h | 10 ++
1 file changed, 10 insertions(+)
diff
.
The patch is based on Alex Graf's kvm-ppc-queue branch and it
has been tested on Big Endian and Little Endian HV guests and
Big Endian PR guests.
Signed-off-by: Cédric Le Goater c...@fr.ibm.com
---
Here are some comments/questions :
* the host is assumed to be running in Big Endian. when
.
The patch is based on Alex Graf's kvm-ppc-queue branch and it
has been tested on Big Endian and Little Endian HV guests and
Big Endian PR guests.
Signed-off-by: Cédric Le Goater c...@fr.ibm.com
---
Here are some comments/questions :
* the host is assumed to be running in Big Endian. when
56 matches
Mail list logo