* [PATCH] qemu-kvm: Build fixes for ppc64-softmmu
@ 2012-05-09 2:59 Benjamin Herrenschmidt
2012-05-09 8:02 ` Avi Kivity
0 siblings, 1 reply; 2+ messages in thread
From: Benjamin Herrenschmidt @ 2012-05-09 2:59 UTC (permalink / raw)
To: Marcelo Tosatti, Avi Kivity; +Cc: kvm, Paul Mackerras
This is a small collection of build fixes that allow the
qemu-kvm tree to build a ppc64-softmmu target with kvm
enabled (provided device-assignment is disabled).
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
Avi, Marcelo: This is really only for qemu-kvm, not upstream qemu,
but since distros such as Fedora use this as base qemu source tree,
it would be great to have these fixed.
diff --git a/kvm-all.c b/kvm-all.c
index 99eb095..03d4b31 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -941,6 +941,12 @@ int kvm_irqchip_commit_routes(KVMState *s)
static void kvm_init_irq_routing(KVMState *s)
{
}
+
+int kvm_irqchip_commit_routes(KVMState *s)
+{
+ return -ENOSYS;
+}
+
#endif /* !KVM_CAP_IRQ_ROUTING */
static int kvm_irqchip_create(KVMState *s)
diff --git a/qemu-kvm.c b/qemu-kvm.c
index 34e1ac8..108050b 100644
--- a/qemu-kvm.c
+++ b/qemu-kvm.c
@@ -30,6 +30,7 @@
#define ALIGN(x, y) (((x)+(y)-1) & ~((y)-1))
+#ifdef KVM_CAP_IRQ_ROUTING
static inline void clear_gsi(KVMState *s, unsigned int gsi)
{
uint32_t *bitmap = s->used_gsi_bitmap;
@@ -40,6 +41,7 @@ static inline void clear_gsi(KVMState *s, unsigned int gsi)
DPRINTF("Invalid GSI %u\n", gsi);
}
}
+#endif
#ifdef KVM_CAP_DEVICE_ASSIGNMENT
int kvm_assign_pci_device(KVMState *s,
@@ -228,6 +230,7 @@ int kvm_del_irq_route(int gsi, int irqchip, int pin)
int kvm_get_irq_route_gsi(void)
{
+#ifdef KVM_CAP_IRQ_ROUTING
KVMState *s = kvm_state;
int i, bit;
uint32_t *buf = s->used_gsi_bitmap;
@@ -243,8 +246,12 @@ int kvm_get_irq_route_gsi(void)
}
return -ENOSPC;
+#else
+ return -ENOSYS;
+#endif
}
+#ifdef KVM_CAP_IRQ_ROUTING
static void kvm_msi_routing_entry(struct kvm_irq_routing_entry *e,
KVMMsiMessage *msg)
@@ -256,9 +263,11 @@ static void kvm_msi_routing_entry(struct kvm_irq_routing_entry *e,
e->u.msi.address_hi = msg->addr_hi;
e->u.msi.data = msg->data;
}
+#endif
int kvm_msi_message_add(KVMMsiMessage *msg)
{
+#ifdef KVM_CAP_IRQ_ROUTING
struct kvm_irq_routing_entry e;
int ret;
@@ -271,18 +280,26 @@ int kvm_msi_message_add(KVMMsiMessage *msg)
kvm_msi_routing_entry(&e, msg);
kvm_add_routing_entry(kvm_state, &e);
return 0;
+#else
+ return -ENOSYS;
+#endif
}
int kvm_msi_message_del(KVMMsiMessage *msg)
{
+#ifdef KVM_CAP_IRQ_ROUTING
struct kvm_irq_routing_entry e;
kvm_msi_routing_entry(&e, msg);
return kvm_del_routing_entry(&e);
+#else
+ return -ENOSYS;
+#endif
}
int kvm_msi_message_update(KVMMsiMessage *old, KVMMsiMessage *new)
{
+#ifdef KVM_CAP_IRQ_ROUTING
struct kvm_irq_routing_entry e1, e2;
int ret;
@@ -300,6 +317,9 @@ int kvm_msi_message_update(KVMMsiMessage *old, KVMMsiMessage *new)
}
return 1;
+#else
+ return -ENOSYS;
+#endif
}
@@ -317,9 +337,8 @@ int kvm_assign_set_msix_entry(KVMState *s,
#endif
#if !defined(TARGET_I386)
-int kvm_arch_init_irq_routing(void)
+void kvm_arch_init_irq_routing(KVMState *s)
{
- return 0;
}
#endif
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] qemu-kvm: Build fixes for ppc64-softmmu
2012-05-09 2:59 [PATCH] qemu-kvm: Build fixes for ppc64-softmmu Benjamin Herrenschmidt
@ 2012-05-09 8:02 ` Avi Kivity
0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2012-05-09 8:02 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: Marcelo Tosatti, kvm, Paul Mackerras
On 05/09/2012 05:59 AM, Benjamin Herrenschmidt wrote:
> This is a small collection of build fixes that allow the
> qemu-kvm tree to build a ppc64-softmmu target with kvm
> enabled (provided device-assignment is disabled).
>
Applied, thanks.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-05-09 8:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-09 2:59 [PATCH] qemu-kvm: Build fixes for ppc64-softmmu Benjamin Herrenschmidt
2012-05-09 8:02 ` Avi Kivity
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.