All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/7] target-ppc: gdbstub: endiannes fixes and VSX support
@ 2016-01-15 15:00 Greg Kurz
  2016-01-15 15:00 ` [Qemu-devel] [PATCH 1/7] target-ppc: kvm: fix floating point registers sync on little-endian hosts Greg Kurz
                   ` (6 more replies)
  0 siblings, 7 replies; 17+ messages in thread
From: Greg Kurz @ 2016-01-15 15:00 UTC (permalink / raw)
  To: Alexander Graf, David Gibson
  Cc: Paolo Bonzini, qemu-ppc, Anton Blanchard, qemu-devel

Hi,

This series was posted before last Xmas. Since I am not sure if Alex is
available to handle this, and this affects ppc64le (hence most people
running sPAPR guests), I repost with David Gibson added to the Cc: list.

This series is a sequel to Anton's tentative at bringing VSX support in
our gdbstub:

http://patchwork.ozlabs.org/patch/453758/

Indeed, FP, SPE and Altivec registers need to be copied to memory with
the appropriate ordering, like we already do for core registers. This
series reuses the maybe_bswap_register() helper to do the job, since
it already handles the user mode case where the target endianness is
known at build time and don't need byteswap. This is covered by
patches 2 to 6.

For these to work, two bugs that break FP/VR/VSX synchronization between
QEMU and KVM had to be addressed.

First one is a bug in KVM, that completely breaks the KVM_GET_ONE_REG
and KVM_SET_ONE_REG ioctls for Altivec registers. The fix is already
in Paul Mackerras' tree at:

http://git.kernel.org/cgit/linux/kernel/git/paulus/powerpc.git/commit/?h=kvm-ppc-next&id=b4d7f161feb3015d6306e1d35b565c888ff70c9d

Second one is a bug in QEMU that breaks synchronisation with KVM for FP,
Altivec and VSX registers on little-endian hosts. I pushed the fix to
patch 1 since it is needed for the gdbstub fixes to actually work, but it
could even be handled separately.

And finally, patch 7 is Anton's + the byteswapping for little-endian
guests.

Cheers.

---

Anton Blanchard (1):
      target-ppc: gdbstub: Add VSX support

Greg Kurz (6):
      target-ppc: kvm: fix floating point registers sync on little-endian hosts
      target-ppc: rename and export maybe_bswap_register()
      target-ppc: gdbstub: fix float registers for little-endian guests
      target-ppc: gdbstub: introduce avr_need_swap()
      target-ppc: gdbstub: fix altivec registers for little-endian guests
      target-ppc: gdbstub: fix spe registers for little-endian guests


 configure                   |    6 ++-
 gdb-xml/power-vsx.xml       |   44 +++++++++++++++++++++++
 target-ppc/cpu.h            |    1 +
 target-ppc/gdbstub.c        |   10 +++--
 target-ppc/kvm.c            |   12 ++++++
 target-ppc/translate_init.c |   84 +++++++++++++++++++++++++++++++++++--------
 6 files changed, 134 insertions(+), 23 deletions(-)
 create mode 100644 gdb-xml/power-vsx.xml

^ permalink raw reply	[flat|nested] 17+ messages in thread
* [Qemu-devel] [PATCH 0/7] target-ppc: endian fixes for KVM and gdbstub
@ 2015-12-18 10:18 Greg Kurz
  2015-12-18 10:18 ` [Qemu-devel] [PATCH 4/7] target-ppc: gdbstub: introduce avr_need_swap() Greg Kurz
  0 siblings, 1 reply; 17+ messages in thread
From: Greg Kurz @ 2015-12-18 10:18 UTC (permalink / raw)
  To: Alexander Graf; +Cc: Paolo Bonzini, qemu-ppc, Anton Blanchard, qemu-devel

Hi,

This series is a sequel to Anton's tentative at bringing VSX support in
our gdbstub:

http://patchwork.ozlabs.org/patch/453758/

Indeed, FP, SPE and Altivec registers need to be copied to memory with
the appropriate ordering, like we already do for core registers. This
series reuses the maybe_bswap_register() helper to do the job, since
it already handles the user mode case where the target endianness is
known at build time and don't need byteswap. This is covered by
patches 2 to 6.

I also found more serious issues that probably break more than gdbstub.

First one is a bug in KVM, that completely breaks the KVM_GET_ONE_REG
and KVM_SET_ONE_REG ioctls for Altivec registers. I've already sent a
patch:

http://patchwork.ozlabs.org/patch/557568/

Second one is a bug in QEMU that breaks synchronisation with KVM for FP,
Altivec and VSX registers on little-endian hosts. I pushed the fix to
patch 1 since it is needed for the gdbstub fixes to actually work, but it
could even be handled separately.

And finally, patch 7 is Anton's + the byteswapping for little-endian
guests.

Cheers.

---

Anton Blanchard (1):
      target-ppc: gdbstub: Add VSX support

Greg Kurz (6):
      target-ppc: kvm: fix floating point registers sync on little-endian hosts
      target-ppc: rename and export maybe_bswap_register()
      target-ppc: gdbstub: fix float registers for little-endian guests
      target-ppc: gdbstub: introduce avr_need_swap()
      target-ppc: gdbstub: fix altivec registers for little-endian guests
      target-ppc: gdbstub: fix spe registers for little-endian guests


 configure                   |    6 ++-
 gdb-xml/power-vsx.xml       |   44 +++++++++++++++++++++++
 target-ppc/cpu.h            |    1 +
 target-ppc/gdbstub.c        |   10 +++--
 target-ppc/kvm.c            |   12 ++++++
 target-ppc/translate_init.c |   84 +++++++++++++++++++++++++++++++++++--------
 6 files changed, 134 insertions(+), 23 deletions(-)
 create mode 100644 gdb-xml/power-vsx.xml

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2016-01-20  7:56 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-15 15:00 [Qemu-devel] [PATCH 0/7] target-ppc: gdbstub: endiannes fixes and VSX support Greg Kurz
2016-01-15 15:00 ` [Qemu-devel] [PATCH 1/7] target-ppc: kvm: fix floating point registers sync on little-endian hosts Greg Kurz
2016-01-18  2:16   ` David Gibson
2016-01-18  8:51     ` Greg Kurz
2016-01-19  0:55       ` David Gibson
2016-01-19 12:10         ` Greg Kurz
2016-01-15 15:00 ` [Qemu-devel] [PATCH 2/7] target-ppc: rename and export maybe_bswap_register() Greg Kurz
2016-01-15 15:00 ` [Qemu-devel] [PATCH 3/7] target-ppc: gdbstub: fix float registers for little-endian guests Greg Kurz
2016-01-15 15:00 ` [Qemu-devel] [PATCH 4/7] target-ppc: gdbstub: introduce avr_need_swap() Greg Kurz
2016-01-15 15:00 ` [Qemu-devel] [PATCH 5/7] target-ppc: gdbstub: fix altivec registers for little-endian guests Greg Kurz
2016-01-18  2:25   ` David Gibson
2016-01-19  9:59     ` Greg Kurz
2016-01-20  2:13       ` [Qemu-devel] [Qemu-ppc] " David Gibson
2016-01-20  7:55         ` Greg Kurz
2016-01-15 15:00 ` [Qemu-devel] [PATCH 6/7] target-ppc: gdbstub: fix spe " Greg Kurz
2016-01-15 15:00 ` [Qemu-devel] [PATCH 7/7] target-ppc: gdbstub: Add VSX support Greg Kurz
  -- strict thread matches above, loose matches on Subject: below --
2015-12-18 10:18 [Qemu-devel] [PATCH 0/7] target-ppc: endian fixes for KVM and gdbstub Greg Kurz
2015-12-18 10:18 ` [Qemu-devel] [PATCH 4/7] target-ppc: gdbstub: introduce avr_need_swap() Greg Kurz

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.