*/
#include "kvm.h"
+#include "x86.h"
+
#include <linux/kvm.h>
#include <linux/mm.h>
#include <linux/highmem.h>
#include <asm/apicdef.h>
#include <asm/io_apic.h>
#include "irq.h"
-/* #define ioapic_debug(fmt,arg...) printk(KERN_WARNING fmt,##arg) */
+#if 0
+#define ioapic_debug(fmt,arg...) printk(KERN_WARNING fmt,##arg)
+#else
#define ioapic_debug(fmt, arg...)
+#endif
static void ioapic_deliver(struct kvm_ioapic *vioapic, int irq);
static unsigned long ioapic_read_indirect(struct kvm_ioapic *ioapic,
default:
index = (ioapic->ioregsel - 0x10) >> 1;
- ioapic_debug("change redir index %x val %x", index, val);
+ ioapic_debug("change redir index %x val %x\n", index, val);
if (index >= IOAPIC_NUM_PINS)
return;
if (ioapic->ioregsel & 1) {
struct kvm_lapic *target,
u8 vector, u8 trig_mode, u8 delivery_mode)
{
- ioapic_debug("irq %d trig %d deliv %d", vector, trig_mode,
+ ioapic_debug("irq %d trig %d deliv %d\n", vector, trig_mode,
delivery_mode);
ASSERT((delivery_mode == dest_Fixed) ||
struct kvm *kvm = ioapic->kvm;
struct kvm_vcpu *vcpu;
- ioapic_debug("dest %d dest_mode %d", dest, dest_mode);
+ ioapic_debug("dest %d dest_mode %d\n", dest, dest_mode);
if (dest_mode == 0) { /* Physical mode. */
if (dest == 0xFF) { /* Broadcast. */
kvm_apic_match_logical_addr(vcpu->apic, dest))
mask |= 1 << vcpu->vcpu_id;
}
- ioapic_debug("mask %x", mask);
+ ioapic_debug("mask %x\n", mask);
return mask;
}
int vcpu_id;
ioapic_debug("dest=%x dest_mode=%x delivery_mode=%x "
- "vector=%x trig_mode=%x",
+ "vector=%x trig_mode=%x\n",
dest, dest_mode, delivery_mode, vector, trig_mode);
deliver_bitmask = ioapic_get_delivery_bitmask(ioapic, dest, dest_mode);
if (!deliver_bitmask) {
- ioapic_debug("no target on destination");
+ ioapic_debug("no target on destination\n");
return;
}
trig_mode, delivery_mode);
else
ioapic_debug("null round robin: "
- "mask=%x vector=%x delivery_mode=%x",
+ "mask=%x vector=%x delivery_mode=%x\n",
deliver_bitmask, vector, dest_LowestPrio);
break;
case dest_Fixed:
struct kvm_ioapic *ioapic = (struct kvm_ioapic *)this->private;
u32 result;
- ioapic_debug("addr %lx", (unsigned long)addr);
+ ioapic_debug("addr %lx\n", (unsigned long)addr);
ASSERT(!(addr & 0xf)); /* check alignment */
addr &= 0xff;
struct kvm_ioapic *ioapic = (struct kvm_ioapic *)this->private;
u32 data;
- ioapic_debug("ioapic_mmio_write addr=%lx len=%d val=%p\n",
- addr, len, val);
+ ioapic_debug("ioapic_mmio_write addr=%p len=%d val=%p\n",
+ (void*)addr, len, val);
ASSERT(!(addr & 0xf)); /* check alignment */
if (len == 4 || len == 8)
data = *(u32 *) val;