* [PATCH] kvm: Don't abort on kvm_irqchip_add_msi_route()
@ 2012-06-25 15:40 Alex Williamson
2012-06-25 20:28 ` Jan Kiszka
2012-06-29 23:02 ` Marcelo Tosatti
0 siblings, 2 replies; 3+ messages in thread
From: Alex Williamson @ 2012-06-25 15:40 UTC (permalink / raw)
To: avi, kvm, mtosatti, jan.kiszka; +Cc: qemu-devel
Anyone using these functions has to be prepared that irqchip
support may not be present. It shouldn't be up to the core
code to determine whether this is a fatal error. Currently
code written as:
virq = kvm_irqchip_add_msi_route(...)
if (virq < 0) {
<slow path>
} else {
<fast path>
}
works on x86 with and without kvm irqchip enabled, works
without kvm support compiled in, but aborts() on !x86 with
kvm support.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
---
kvm-all.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kvm-all.c b/kvm-all.c
index 45d00cd..b2ed702 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -1146,7 +1146,7 @@ int kvm_irqchip_send_msi(KVMState *s, MSIMessage msg)
int kvm_irqchip_add_msi_route(KVMState *s, MSIMessage msg)
{
- abort();
+ return -ENOSYS;
}
static int kvm_irqchip_assign_irqfd(KVMState *s, int fd, int virq, bool assign)
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] kvm: Don't abort on kvm_irqchip_add_msi_route()
2012-06-25 15:40 [PATCH] kvm: Don't abort on kvm_irqchip_add_msi_route() Alex Williamson
@ 2012-06-25 20:28 ` Jan Kiszka
2012-06-29 23:02 ` Marcelo Tosatti
1 sibling, 0 replies; 3+ messages in thread
From: Jan Kiszka @ 2012-06-25 20:28 UTC (permalink / raw)
To: Alex Williamson; +Cc: avi, kvm, mtosatti, qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1125 bytes --]
On 2012-06-25 17:40, Alex Williamson wrote:
> Anyone using these functions has to be prepared that irqchip
> support may not be present. It shouldn't be up to the core
> code to determine whether this is a fatal error. Currently
> code written as:
>
> virq = kvm_irqchip_add_msi_route(...)
> if (virq < 0) {
> <slow path>
> } else {
> <fast path>
> }
>
> works on x86 with and without kvm irqchip enabled, works
> without kvm support compiled in, but aborts() on !x86 with
> kvm support.
>
> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
> ---
>
> kvm-all.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kvm-all.c b/kvm-all.c
> index 45d00cd..b2ed702 100644
> --- a/kvm-all.c
> +++ b/kvm-all.c
> @@ -1146,7 +1146,7 @@ int kvm_irqchip_send_msi(KVMState *s, MSIMessage msg)
>
> int kvm_irqchip_add_msi_route(KVMState *s, MSIMessage msg)
> {
> - abort();
> + return -ENOSYS;
> }
>
> static int kvm_irqchip_assign_irqfd(KVMState *s, int fd, int virq, bool assign)
>
Acked-by: Jan Kiszka <jan.kiszka@siemens.com>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] kvm: Don't abort on kvm_irqchip_add_msi_route()
2012-06-25 15:40 [PATCH] kvm: Don't abort on kvm_irqchip_add_msi_route() Alex Williamson
2012-06-25 20:28 ` Jan Kiszka
@ 2012-06-29 23:02 ` Marcelo Tosatti
1 sibling, 0 replies; 3+ messages in thread
From: Marcelo Tosatti @ 2012-06-29 23:02 UTC (permalink / raw)
To: Alex Williamson; +Cc: avi, kvm, jan.kiszka, qemu-devel
On Mon, Jun 25, 2012 at 09:40:39AM -0600, Alex Williamson wrote:
> Anyone using these functions has to be prepared that irqchip
> support may not be present. It shouldn't be up to the core
> code to determine whether this is a fatal error. Currently
> code written as:
>
> virq = kvm_irqchip_add_msi_route(...)
> if (virq < 0) {
> <slow path>
> } else {
> <fast path>
> }
>
> works on x86 with and without kvm irqchip enabled, works
> without kvm support compiled in, but aborts() on !x86 with
> kvm support.
>
> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Applied to uq/master.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-06-29 23:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-25 15:40 [PATCH] kvm: Don't abort on kvm_irqchip_add_msi_route() Alex Williamson
2012-06-25 20:28 ` Jan Kiszka
2012-06-29 23:02 ` Marcelo Tosatti
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.