[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: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH v4 5/5] Add param Error ** for msi_init()
Date: Tue, 12 Apr 2016 10:34:30 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Cao jin <address@hidden> writes:

> Hi
> On 04/08/2016 04:44 PM, Markus Armbruster wrote:
>>> diff --git a/hw/ide/ich.c b/hw/ide/ich.c
>>> index 0a13334..db4fdb5 100644
>>> --- a/hw/ide/ich.c
>>> +++ b/hw/ide/ich.c
>>> @@ -146,7 +146,7 @@ static void pci_ich9_ahci_realize(PCIDevice *dev, Error 
>>> **errp)
>>>       /* Although the AHCI 1.3 specification states that the first 
>>> capability
>>>        * should be PMCAP, the Intel ICH9 data sheet specifies that the ICH9
>>>        * AHCI device puts the MSI capability first, pointing to 0x80. */
>>> -    msi_init(dev, ICH9_MSI_CAP_OFFSET, 1, true, false);
>>> +    msi_init(dev, ICH9_MSI_CAP_OFFSET, 1, true, false, errp);
>> Sure there's nothing to undo on error?  Instead of undoing, you may want
>> to move msi_init() before the stuff that needs undoing.
> ich9-ahci is a on-board device of Q35, like cover-letter says: when it
> fail, qemu will exit. So, is it necessary to undo on error?

Yes, it's a Q35 onboard device, but it's not only that: QEMU happily
accepts -device ich9-ahci.

A realize() method should fail cleanly unless its device has
cannot_instantiate_with_device_add_yet set.

> maybe you saw, I did move msi_init() for some other devices.

Yes.  Appreciated!


reply via email to

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