[Top][All Lists]

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

Re: [Qemu-devel] [PATCH v4 5/5] Add param Error ** for msi_init()

From: Cao jin
Subject: Re: [Qemu-devel] [PATCH v4 5/5] Add param Error ** for msi_init()
Date: Fri, 29 Apr 2016 17:28:47 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0

Hi Markus,
    sorry for replying so late, I am stucked by other tasks for a while.

On 04/12/2016 07:50 PM, Markus Armbruster wrote:

Examine how it uses msi_init().  That's how we give a PCI device
capability MSI.  If the device model treats msi_init() failure as fatal,
it doesn't have a non-MSI variant.

Some device models let the user ask for MSI with a property, and make
the msi_init() call depend on the property.  The property is commonly
called "msi" or "use_msi", with values "on" and "off".

msi=off then works as expected: you get the variant without MSI.

The meaning of msi=on depends on how msi_init() failure is handled.  If
it's fatal, then msi=on works as expected: you get the variant with MSI.
But if it's not fatal, then you may or may not get it, which I consider
a grossly misleading user interface.

To clean this up, we could add msi=auto, and move the non-fatal behavior
from msi=on to msi=auto.

Same for MSI-X with msix_init() and property "msix".

Let me try to understand your meaning, correct me pls if I am wrong:

replace the msi property type from bit/int to enum OnOffAuto(it seems need a tiny surgery for device structure), and default to auto. Then process going to look like this:

(msi property = auto) means enable msi by default. If msi_init fail, we switch to the non-MSI variant; If msi_init success, we got msi variant.

Another condition I want to mention, ahci, pvscsi & vmxnet3 don`t have msi property, and when msi_init fail, they all will use intx. One thing need to be confirmed: whether they need a msi property or not?

Yours Sincerely,

Cao jin

reply via email to

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