Re: [Qemu-block] [Qemu-devel] Patch to add helpful tracing output for driver authors in NVMe emulation

2017-10-11 Thread Paolo Bonzini
On 11/10/2017 15:08, Peter Maydell wrote: >> Tracing is the right tool to detect bad guest code, and I think it makes >> sense to mark conditions that shouldn't happen with a correctly >> operating guest driver. I'm not sure if an exclamation mark is the best >> syntax for this, because I wouldn't

Re: [Qemu-block] [Qemu-devel] Patch to add helpful tracing output for driver authors in NVMe emulation

2017-10-11 Thread Peter Maydell
On 10 October 2017 at 09:02, Kevin Wolf wrote: > Assertions are for checking that assumptions in qemu code hold true. > Here it's about bad guest code, and you can't let qemu abort for that. > > Tracing is the right tool to detect bad guest code, and I think it makes > sense to mark conditions tha

Re: [Qemu-block] [Qemu-devel] Patch to add helpful tracing output for driver authors in NVMe emulation

2017-10-11 Thread Doug Gale
On Tue, Oct 10, 2017 at 4:02 AM, Kevin Wolf wrote: > Am 10.10.2017 um 08:58 hat Markus Armbruster geschrieben: >> Doug Gale writes: >> >> > I used exclamations as a concise way of indicating that the driver did >> > something nonsensical, or horribly invalid, like something likely to >> > cause a

Re: [Qemu-block] [Qemu-devel] Patch to add helpful tracing output for driver authors in NVMe emulation

2017-10-10 Thread Kevin Wolf
Am 10.10.2017 um 08:58 hat Markus Armbruster geschrieben: > Doug Gale writes: > > > I used exclamations as a concise way of indicating that the driver did > > something nonsensical, or horribly invalid, like something likely to > > cause a memory corruption, trying to start the controller with a

Re: [Qemu-block] [Qemu-devel] Patch to add helpful tracing output for driver authors in NVMe emulation

2017-10-09 Thread Markus Armbruster
Doug Gale writes: > I used exclamations as a concise way of indicating that the driver did > something nonsensical, or horribly invalid, like something likely to > cause a memory corruption, trying to start the controller with a > nonsense configuration, providing invalid PRDs or writing to > unr

Re: [Qemu-block] [Qemu-devel] Patch to add helpful tracing output for driver authors in NVMe emulation

2017-10-09 Thread Doug Gale
I used exclamations as a concise way of indicating that the driver did something nonsensical, or horribly invalid, like something likely to cause a memory corruption, trying to start the controller with a nonsense configuration, providing invalid PRDs or writing to unrecognized MMIO offsets that mi

Re: [Qemu-block] [Qemu-devel] Patch to add helpful tracing output for driver authors in NVMe emulation

2017-10-09 Thread Eric Blake
On 10/07/2017 02:51 AM, Doug Gale wrote: > Completely re-implemented patch, with significant improvements (now > specifies values in several places I missed, also reduced the amount > of redundant lines). I used the nvme_ as the tracing infrastructure > prefix. Tested with -trace nvme_* on the qemu

Re: [Qemu-block] [Qemu-devel] Patch to add helpful tracing output for driver authors in NVMe emulation

2017-10-07 Thread Doug Gale
Completely re-implemented patch, with significant improvements (now specifies values in several places I missed, also reduced the amount of redundant lines). I used the nvme_ as the tracing infrastructure prefix. Tested with -trace nvme_* on the qemu command line, worked for me. >From 166f57458d60

Re: [Qemu-block] [Qemu-devel] Patch to add helpful tracing output for driver authors in NVMe emulation

2017-10-06 Thread Daniel P. Berrange
On Fri, Oct 06, 2017 at 09:58:33AM -0400, Doug Gale wrote: > I tried to get tracing to work before and I have never gotten it > working. I'll give it another try and redo the patch with tracing > infrastructure if necessary. The printf are nice because the dev can > just look at the terminal where

Re: [Qemu-block] [Qemu-devel] Patch to add helpful tracing output for driver authors in NVMe emulation

2017-10-06 Thread Doug Gale
I tried to get tracing to work before and I have never gotten it working. I'll give it another try and redo the patch with tracing infrastructure if necessary. The printf are nice because the dev can just look at the terminal where qemu is running. Can you view the trace output in realtime? When th

Re: [Qemu-block] [Qemu-devel] Patch to add helpful tracing output for driver authors in NVMe emulation

2017-10-06 Thread Daniel P. Berrange
On Fri, Oct 06, 2017 at 08:50:31AM -0500, Eric Blake wrote: > On 10/05/2017 06:18 PM, Doug Gale wrote: > > I added the tracing output in this patch to assist me in implementing > > an NVMe driver. It helped tremendously. > > > >>From 1d19086cdef8d492929852d582cb41dcc5026f71 Mon Sep 17 00:00:00 200

Re: [Qemu-block] [Qemu-devel] Patch to add helpful tracing output for driver authors in NVMe emulation

2017-10-06 Thread Eric Blake
On 10/05/2017 06:18 PM, Doug Gale wrote: > I added the tracing output in this patch to assist me in implementing > an NVMe driver. It helped tremendously. > >>From 1d19086cdef8d492929852d582cb41dcc5026f71 Mon Sep 17 00:00:00 2001 > From: Doug Gale > Date: Thu, 5 Oct 2017 19:02:03 -0400 > Subject: