qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Why devfn will be -1


From: Jan Kiszka
Subject: Re: [Qemu-devel] Why devfn will be -1
Date: Tue, 01 Jul 2014 09:34:13 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

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: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]