Re: [Qemu-devel] [PATCH v8 12/17] pci: Convert msi_init() to Error and fix callers to check it

2016-06-13 Thread Marcel Apfelbaum
On 06/13/2016 02:07 PM, Markus Armbruster wrote: Marcel Apfelbaum writes: On 06/10/2016 12:54 PM, Cao jin wrote: msi_init() reports errors with error_report(), which is wrong when it's used in realize(). Fix by converting it to Error. Fix its callers to handle failure instead of ignoring it

Re: [Qemu-devel] [PATCH v8 12/17] pci: Convert msi_init() to Error and fix callers to check it

2016-06-13 Thread Marcel Apfelbaum
On 06/13/2016 02:09 PM, Cao jin wrote: On 06/13/2016 06:16 PM, Marcel Apfelbaum wrote: On 06/10/2016 12:54 PM, Cao jin wrote: diff --git a/hw/net/e1000e.c b/hw/net/e1000e.c index 692283f..a06d184 100644 --- a/hw/net/e1000e.c +++ b/hw/net/e1000e.c @@ -268,13 +268,9 @@ e1000e_init_msi(E1000ES

Re: [Qemu-devel] [PATCH v8 12/17] pci: Convert msi_init() to Error and fix callers to check it

2016-06-13 Thread Markus Armbruster
Marcel Apfelbaum writes: > On 06/10/2016 12:54 PM, Cao jin wrote: >> msi_init() reports errors with error_report(), which is wrong >> when it's used in realize(). >> >> Fix by converting it to Error. >> >> Fix its callers to handle failure instead of ignoring it. >> >> For those callers who don't

Re: [Qemu-devel] [PATCH v8 12/17] pci: Convert msi_init() to Error and fix callers to check it

2016-06-13 Thread Cao jin
On 06/13/2016 06:16 PM, Marcel Apfelbaum wrote: On 06/10/2016 12:54 PM, Cao jin wrote: diff --git a/hw/net/e1000e.c b/hw/net/e1000e.c index 692283f..a06d184 100644 --- a/hw/net/e1000e.c +++ b/hw/net/e1000e.c @@ -268,13 +268,9 @@ e1000e_init_msi(E1000EState *s) { int res; -res =

Re: [Qemu-devel] [PATCH v8 12/17] pci: Convert msi_init() to Error and fix callers to check it

2016-06-13 Thread Marcel Apfelbaum
On 06/10/2016 12:54 PM, Cao jin wrote: msi_init() reports errors with error_report(), which is wrong when it's used in realize(). Fix by converting it to Error. Fix its callers to handle failure instead of ignoring it. For those callers who don't handle the failure, it might happen: when user

[Qemu-devel] [PATCH v8 12/17] pci: Convert msi_init() to Error and fix callers to check it

2016-06-10 Thread Cao jin
msi_init() reports errors with error_report(), which is wrong when it's used in realize(). Fix by converting it to Error. Fix its callers to handle failure instead of ignoring it. For those callers who don't handle the failure, it might happen: when user want msi on, but he doesn't get what he w