qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: Le Tan <tamlokveer@gmail.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Why devfn will be -1
Date: Tue, 01 Jul 2014 09:34:13 +0200	[thread overview]
Message-ID: <53B26475.9030809@web.de> (raw)
In-Reply-To: <CACrq+i+PhmbMTR8CALTyDLMkmXKTfprA=EieNdBrk42ytCzq8Q@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 838 bytes --]

Hi Le,

On 2014-07-01 04:34, Le Tan wrote:
> Hi Jan,
> I use pci_setup_iommu() to setup a PCIIOMMUFunc for the q35 pci bus.
> In the iommu_fn, I print out the devfn parameter and find out that it
> sometimes will be -1. So what does it mean?
> The detail code is here:
> 
> In mch_init() function, I write like this:
> PCIBus *pci_bus = PCI_BUS(qdev_get_parent_bus(DEVICE(mch)));
> pci_setup_iommu(pci_bus, q35_host_dma_iommu, mch->iommu);
> 
> And in q35_host_dma_iommu(PCIBus *bus, void *opaque, int devfn), I
> print out the devfn parameter, sometimes it will be -1.

Hmm, I have no idea about the reason and would suggest to set a
conditional breakpoint on this function, then print the backtrace to see
where this comes from and analyze the device structure from where that
-1 was most probably taken.

Jan



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

  reply	other threads:[~2014-07-01  7:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-01  2:34 [Qemu-devel] Why devfn will be -1 Le Tan
2014-07-01  7:34 ` Jan Kiszka [this message]
2014-07-01 12:52   ` Le Tan
2014-07-01 12:55     ` Le Tan
2014-07-01 12:56       ` Jan Kiszka
2014-07-01 13:02         ` Le Tan
2014-07-01 13:08           ` Jan Kiszka

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=53B26475.9030809@web.de \
    --to=jan.kiszka@web.de \
    --cc=qemu-devel@nongnu.org \
    --cc=tamlokveer@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).