All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH][v8] megasas: LSI Megaraid SAS HBA emulation
Date: Fri, 13 Jan 2012 10:46:57 +0100	[thread overview]
Message-ID: <4F0FFD91.6010603@suse.de> (raw)
In-Reply-To: <20120112180441.GB13411@stefanha-thinkpad.localdomain>

On 01/12/2012 07:04 PM, Stefan Hajnoczi wrote:
> On Thu, Jan 12, 2012 at 03:45:59PM +0100, Paolo Bonzini wrote:
>> On 01/12/2012 11:43 AM, Hannes Reinecke wrote:
>>> +# hw/megasas.c
>>> +disable megasas_init_firmware(int xfer_len, uint64_t pa) "xfer len %d pa %" PRIx64 " "
>>> +disable megasas_init_queue(uint64_t queue_pa, int queue_len, uint64_t head, uint64_t tail, uint32_t flags) "queue at %" PRIx64 " len %d head %" PRIx64 " tail %" PRIx64 " flags %x"
>>> +megasas_initq_map_failed(int frame) "scmd %d: failed to map queue"
>>> +megasas_initq_mismatch(int queue_len, int fw_cmds) "queue size %d max fw cmds %d"
>>> +disable megasas_qf_found(unsigned int index, uint64_t pa) "found mapped frame %x pa %" PRIx64 ""
>>> +disable megasas_qf_new(unsigned int index, void *cmd) "return new frame %x cmd %p"
>>> +megasas_qf_failed(unsigned long pa) "all frames busy for frame %lx"
>>> +disable megasas_qf_enqueue(unsigned int index, unsigned int count, uint64_t context, unsigned int tail, int busy) "enqueue frame %x count %d countext %" PRIx64 " tail %x busy %d"
>>> +disable megasas_qf_update(unsigned int head, unsigned int busy) "update reply queue head %x busy %d"
>>> +disable megasas_qf_dequeue(unsigned int index) "dequeue frame %x"
>>> +disable megasas_qf_map_failed(int cmd, unsigned long frame) "scmd %d: frame %lu"
>>> +disable megasas_qf_complete_noirq(uint64_t context) "context %" PRIx64 " "
>>> +disable megasas_qf_complete(uint64_t context, unsigned int tail, unsigned int offset, int busy, unsigned int doorbell) "context %" PRIx64 " tail %x offset %d busy %d doorbell %x"
>>> +disable megasas_handle_frame(const char *cmd, uint64_t addr, uint64_t context, uint32_t count) "MFI cmd %s addr %" PRIx64 " context %" PRIx64 " count %d"
>>> +megasas_frame_busy(uint64_t addr) "frame %" PRIx64 " busy"
>>> +megasas_unhandled_frame_cmd(int cmd, uint8_t frame_cmd) "scmd %d: Unhandled MFI cmd %x"
>>> +disable megasas_handle_scsi(const char *frame, const char *desc, int dev, int lun, void *sdev, unsigned long size) "%s %s dev %x/%x sdev %p xfer %lu"
>>> +disable megasas_scsi_target_not_present(const char *frame, const char *desc, int dev, int lun) "%s %s dev %x/%x target not present"
>>> +megasas_scsi_invalid_cdb_len(const char *frame, const char *desc, int dev, int lun, int len) "%s %s dev %x/%x invalid cdb len %d"
>>> +megasas_scsi_overflow(int cmd, const char *dir, int bytes, int len) "scmd %d: %s %d of %d bytes"
>>> +disable megasas_scsi_underflow(int cmd, const char *dir, int bytes, int len) "scmd %d: %s %d of %d bytes"
>>> +megasas_scsi_req_alloc_failed(const char *frame, int dev, int lun) "%s dev %x/%x req allocation failed"
>>> +disable megasas_scsi_start(int cmd, const char *desc, int len) "scmd %d: %s %d bytes of data"
>>> +disable megasas_scsi_nodata(int cmd) "scmd %d: no data to be transferred"
>>> +disable megasas_scsi_complete(int cmd, uint32_t status, int len, int xfer) "scmd %d: finished with status %x, len %u/%u"
>>> +disable megasas_command_complete(int cmd, uint32_t status) "scmd %d: command completed, status %x"
>>> +disable megasas_handle_io(int cmd, const char *frame, int dev, int lun, unsigned long lba, unsigned long count) "scmd %d: %s dev %x/%x lba %lx count %lu"
>>> +disable megasas_io_target_not_present(int cmd, const char *frame, int dev, int lun) "scmd %d: %s dev %x/%x LUN not present"
>>> +disable megasas_io_start(int cmd, const char *dir, unsigned long lba, unsigned long count, unsigned long len) "scmd %d: %s start LBA %lx %lu blocks (%lu bytes)"
>>> +disable megasas_io_complete(int cmd, uint32_t len) "scmd %d: %d bytes completed"
>>> +disable megasas_io_copy(int cmd, const char *dir, int bytes, int len, unsigned long offset) "scmd %d: %s %d of %d bytes, iov offset %lu"
>>> +disable megasas_io_continue(int cmd, int bytes) "scmd %d: %d bytes left"
>>> +megasas_iovec_map_failed(int cmd, int index, unsigned long iov_size) "scmd %d: iovec %d size %lu"
>>> +megasas_iovec_sgl_overflow(int cmd, int index, int limit) "scmd %d: iovec count %d limit %d"
>>> +megasas_iovec_sgl_underflow(int cmd, int index) "scmd %d: iovec count %d"
>>> +megasas_iovec_sgl_invalid(int cmd, int index, uint64_t pa, uint32_t len) "scmd %d: invalid sgl element %d pa %" PRIx64 " len %u"
>>> +megasas_iovec_len(int cmd, const char *desc, int len, int limit) "scmd %d: iovec %s len %d limit %d"
>>> +disable megasas_handle_dcmd(int cmd, int opcode) "scmd %d: MFI DCMD opcode %x"
>>> +disable megasas_finish_dcmd(int cmd, int size) "scmd %d: MFI DCMD wrote %d bytes"
>>> +megasas_dcmd_req_alloc_failed(int cmd, const char *desc) "scmd %d: %s alloc failed"
>>> +disable megasas_dcmd_internal_submit(int cmd, const char *desc, int dev) "scmd %d: %s to dev %d"
>>> +disable megasas_dcmd_internal_finish(int cmd, int opcode, int lun) "scmd %d: DCMD finish internal cmd %x lun %d"
>>> +megasas_dcmd_internal_invalid(int cmd, int opcode) "scmd %d: Invalid internal DCMD %x"
>>> +megasas_dcmd_unhandled(int cmd, int opcode, int len) "scmd %d: opcode %x, len %d"
>>> +disable megasas_dcmd_zero_sge(int cmd) "scmd %d: zero DCMD sge count"
>>> +megasas_dcmd_invalid_sge(int cmd, int count) "scmd %d: invalid DCMD sge count %d"
>>> +megasas_dcmd_map_failed(int cmd) "scmd %d: Failed to map DCMD buffer"
>>> +megasas_dcmd_invalid_xfer_len(int cmd, const char *dcmd, unsigned long size) "scmd %d: %s invalid xfer len %ld"
>>> +disable megasas_dcmd_enter(int cmd, const char *dcmd) "scmd %d: DCMD %s"
>>> +disable megasas_dcmd_dummy(int cmd, unsigned long size) "scmd %d: DCMD dummy xfer len %ld"
>>> +disable megasas_dcmd_set_fw_time(int cmd, unsigned long time) "scmd %d: Set FW time %lx"
>>> +disable megasas_dcmd_pd_get_list(int cmd, int num, int max, int offset) "scmd %d: DCMD PD get list: %d / %d PDs, size %d"
>>> +disable megasas_dcmd_ld_get_list(int cmd, int num, int max) "scmd %d: DCMD LD get list: found %d / %d LDs"
>>> +disable megasas_dcmd_get_info(int cmd, const char *desc, int pd_id) "scmd %d: DCMD %s get info for dev %d"
>>> +disable megasas_dcmd_pd_get_info(int cmd, int lun, int state) "scmd %d: set state for dev %d to %x"
>>> +disable megasas_abort_frame(int cmd, int abort_cmd) "scmd %d: aborting frame %x"
>>> +megasas_abort_no_cmd(int cmd, uint64_t context) "scmd %d: no active command for frame context %" PRIx64 ""
>>> +megasas_abort_invalid_context(int cmd, uint64_t context, int abort_cmd) "scmd %d: invalid frame context %" PRIx64 " for abort frame %x"
>>> +disable megasas_reset(void) "Reset"
>>> +megasas_init(int sges, int cmds, const char *intr, const char *mode) "Using %d sges, %d cmds, %s, %s mode"
>>> +disable megasas_map_region(int num, const char *name, unsigned long addr) "mapping %s region %d at %08lx"
>>> +disable megasas_irq_lower(const char *desc) "%s"
>>> +disable megasas_irq_raise(const char *desc) "%s"
>>> +disable megasas_readl_reg(const char *region, const char *reg, uint32_t val) "%s %s: 0x%x"
>>> +disable megasas_readl(const char *region, unsigned long addr, uint32_t val) "%s 0x%lx: 0x%x"
>>> +megasas_invalid_read(const char *region, unsigned long addr) "%s 0x%lx"
>>> +disable megasas_writel_reg(const char *region, const char *reg, uint32_t val) "%s %s: 0x%x"
>>> +disable megasas_writel(const char *region, uint32_t addr, uint32_t val) "%s 0x%x: 0x%x"
>>> +megasas_invalid_write(const char *region, uint32_t addr, uint32_t val) "%s 0x%x: 0x%x"
>>> +
>>
>> Not sure why some of these still have "disable".  Also, not all
>> backends support string arguments, but that's not a problem as long
>> as you stick to those that do. :)
> 
> The disable is not needed anymore.  The semantics in qemu.git/master are
> that trace events are disabled on startup by default.  You can also
> provide a file containing the events you want to enable using qemu
> -trace events=./my-events.
> 
> The simple backend will support %s formats soon.  If possible, I still
> prefer non-string arguments, but don't worry about using them if it
> improves the trace output quality.
> 
So, I should be removing the 'disable' keyword, then, correct?

The strings are just there to avoid trace statement duplication. But
if that's not a problem then I can easily convert the strings to
individual trace statements.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      zSeries & Storage
hare@suse.de			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)

  reply	other threads:[~2012-01-13  9:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-12 10:43 [Qemu-devel] [PATCH][v8] megasas: LSI Megaraid SAS HBA emulation Hannes Reinecke
2012-01-12 14:45 ` Paolo Bonzini
2012-01-12 18:04   ` Stefan Hajnoczi
2012-01-13  9:46     ` Hannes Reinecke [this message]
2012-01-13 10:14       ` Paolo Bonzini

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=4F0FFD91.6010603@suse.de \
    --to=hare@suse.de \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    /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.