All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bug 213257] New: KVM-PR: FPU is broken when single-stepping
@ 2021-05-28 11:20 bugzilla-daemon
  2021-05-31 10:28 ` [Bug 213257] " bugzilla-daemon
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: bugzilla-daemon @ 2021-05-28 11:20 UTC (permalink / raw)
  To: kvm

https://bugzilla.kernel.org/show_bug.cgi?id=213257

            Bug ID: 213257
           Summary: KVM-PR: FPU is broken when single-stepping
           Product: Virtualization
           Version: unspecified
    Kernel Version: 5.6
          Hardware: PPC-64
                OS: Linux
              Tree: Mainline
            Status: NEW
          Severity: normal
          Priority: P1
         Component: kvm
          Assignee: virtualization_kvm@kernel-bugs.osdl.org
          Reporter: cand@gmx.com
        Regression: No

The FPU is completely broken when single-stepping on KVM-PR. Registers stay
zeroes, computation results are zeroes. If I disable single-stepping,
computation results are correct, but of course then I cannot dump FPRs between
every instruction.

HW is POWER9, 18-core Talos II.

5.6 is slightly old, but there are no commits under arch/powerpc/kvm since that
mention single stepping.

Program:
https://git.libre-soc.org/?p=kvm-minippc.git;a=summary

Test file:
https://ftp.libre-soc.org/mini-float-test-kvm.bin

Repro instructions:
git clone https://git.libre-soc.org/git/kvm-minippc.git
cd kvm-minippc
make

wget https://ftp.libre-soc.org/mini-float-test-kvm.bin
./kvm-minippc -i mini-float-test-kvm.bin -t trace
less trace
# you will see FPRs stay zeroes. In larger test programs that dump the computed
memory, that is wrong too (all zero).

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

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

* [Bug 213257] KVM-PR: FPU is broken when single-stepping
  2021-05-28 11:20 [Bug 213257] New: KVM-PR: FPU is broken when single-stepping bugzilla-daemon
@ 2021-05-31 10:28 ` bugzilla-daemon
  2021-06-01  0:12 ` bugzilla-daemon
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: bugzilla-daemon @ 2021-05-31 10:28 UTC (permalink / raw)
  To: kvm

https://bugzilla.kernel.org/show_bug.cgi?id=213257

Luke Kenneth Casson Leighton (lkcl@lkcl.net) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lkcl@lkcl.net

--- Comment #1 from Luke Kenneth Casson Leighton (lkcl@lkcl.net) ---
the module being used is kvm_pr not kvm_hv.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

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

* [Bug 213257] KVM-PR: FPU is broken when single-stepping
  2021-05-28 11:20 [Bug 213257] New: KVM-PR: FPU is broken when single-stepping bugzilla-daemon
  2021-05-31 10:28 ` [Bug 213257] " bugzilla-daemon
@ 2021-06-01  0:12 ` bugzilla-daemon
  2021-06-01  7:35 ` bugzilla-daemon
  2021-06-01 12:34 ` bugzilla-daemon
  3 siblings, 0 replies; 5+ messages in thread
From: bugzilla-daemon @ 2021-06-01  0:12 UTC (permalink / raw)
  To: kvm

https://bugzilla.kernel.org/show_bug.cgi?id=213257

--- Comment #2 from Luke Kenneth Casson Leighton (lkcl@lkcl.net) ---
out of interest if the bottom half of vs0-vs31 is read (or written),
are those also zero?

completely unrelated i am running into a gdb machine-interface bug
which has been "solved" through the workaround of reading/writing
the lower 64 bits of VSX registers instead of fp0-fp31

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

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

* [Bug 213257] KVM-PR: FPU is broken when single-stepping
  2021-05-28 11:20 [Bug 213257] New: KVM-PR: FPU is broken when single-stepping bugzilla-daemon
  2021-05-31 10:28 ` [Bug 213257] " bugzilla-daemon
  2021-06-01  0:12 ` bugzilla-daemon
@ 2021-06-01  7:35 ` bugzilla-daemon
  2021-06-01 12:34 ` bugzilla-daemon
  3 siblings, 0 replies; 5+ messages in thread
From: bugzilla-daemon @ 2021-06-01  7:35 UTC (permalink / raw)
  To: kvm

https://bugzilla.kernel.org/show_bug.cgi?id=213257

--- Comment #3 from Lauri Kasanen (cand@gmx.com) ---
That's probably not worth trying, since the computation results were
also wrong. The computation does not rely on register setting, it
loads, computes and saves entirely in code.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

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

* [Bug 213257] KVM-PR: FPU is broken when single-stepping
  2021-05-28 11:20 [Bug 213257] New: KVM-PR: FPU is broken when single-stepping bugzilla-daemon
                   ` (2 preceding siblings ...)
  2021-06-01  7:35 ` bugzilla-daemon
@ 2021-06-01 12:34 ` bugzilla-daemon
  3 siblings, 0 replies; 5+ messages in thread
From: bugzilla-daemon @ 2021-06-01 12:34 UTC (permalink / raw)
  To: kvm

https://bugzilla.kernel.org/show_bug.cgi?id=213257

--- Comment #4 from Luke Kenneth Casson Leighton (lkcl@lkcl.net) ---
(In reply to Lauri Kasanen from comment #3)
> That's probably not worth trying, since the computation results were
> also wrong.

ok. and the initial setup starts from a blank FPU, no host modification of FPRs
needed

> The computation does not rely on register setting, it
> loads, computes and saves entirely in code.

i realised i just said this exact thing, above, in a different way.

and is it the case that the minippc kvm host program is not attempting to read
(or write) the FPR regfile after each guest singlestep?

not that i would expect reading of the FPR regfile from the host to affect the
guest, but it's worth confirming.

trying to think, how else can this be debugged, to find out what's going on?

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

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

end of thread, other threads:[~2021-06-01 12:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-28 11:20 [Bug 213257] New: KVM-PR: FPU is broken when single-stepping bugzilla-daemon
2021-05-31 10:28 ` [Bug 213257] " bugzilla-daemon
2021-06-01  0:12 ` bugzilla-daemon
2021-06-01  7:35 ` bugzilla-daemon
2021-06-01 12:34 ` bugzilla-daemon

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.