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

2016-04-29 Thread Markus Armbruster
Cao jin writes: > 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

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

2016-04-29 Thread Cao jin
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

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

2016-04-12 Thread Markus Armbruster
Marcel Apfelbaum writes: > On 04/10/2016 12:38 PM, Cao jin wrote: >> >> >> On 04/10/2016 04:20 PM, Marcel Apfelbaum wrote: >> >>> >>> Hi, >>> I'll let Markus to continue the review, it brings very valuable >>> information, >>> I will only try to answer the questions below. >>>

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

2016-04-12 Thread Markus Armbruster
Cao jin 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

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

2016-04-11 Thread Cao jin
On 04/11/2016 06:00 PM, Marcel Apfelbaum wrote: 2). If user doesn`t order msi on(so device have msi on by default), when msi_init returns -ENOTSUP, I am ok with Markus`s suggestion: *caller should silently switch to the non-MSI variant* But now the condition is, qemu can`t distinguish

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

2016-04-11 Thread Marcel Apfelbaum
On 04/10/2016 12:38 PM, Cao jin wrote: On 04/10/2016 04:20 PM, Marcel Apfelbaum wrote: Hi, I'll let Markus to continue the review, it brings very valuable information, I will only try to answer the questions below. Several questions on this topic: 1. How to confirm whether a device model

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

2016-04-10 Thread Cao jin
On 04/10/2016 04:20 PM, Marcel Apfelbaum wrote: Hi, I'll let Markus to continue the review, it brings very valuable information, I will only try to answer the questions below. Several questions on this topic: 1. How to confirm whether a device model has non-MSI variant? AFAICT, it is these

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

2016-04-10 Thread Marcel Apfelbaum
On 04/09/2016 03:19 PM, Cao jin wrote: 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) /*

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

2016-04-09 Thread Cao jin
On 04/09/2016 08:19 PM, Cao jin wrote: Hi Several questions on this topic: 1. How to confirm whether a device model has non-MSI variant? AFAICT, it is these who have msi property. 2. For those have non-MSI variant devices(have msi property), as I see in the code, they all have it on by

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

2016-04-09 Thread Cao jin
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

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

2016-04-08 Thread Markus Armbruster
Cao jin writes: > Add param Error **errp, and change pci_add_capability() to > pci_add_capability2(), because pci_add_capability() report error, and > msi_init() is widely used in realize(), so it is not suitable for realize() Suggest: pci: Convert msi_init() to