X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Fapic.c;h=188056918adef82cc0746552229b052db448739f;hb=ef944e47f418cfbf344757e3fbab5e40927966fe;hp=73bee3114efaa4081bff9a2ea189e93e45b98b76;hpb=9f049c5f96785b6aa3e284a244235712c4047c1b;p=palacios-OLD.git diff --git a/palacios/src/devices/apic.c b/palacios/src/devices/apic.c index 73bee31..1880569 100644 --- a/palacios/src/devices/apic.c +++ b/palacios/src/devices/apic.c @@ -309,7 +309,7 @@ static int activate_apic_irq(struct apic_state * apic, uint32_t irq_num) { #if 1 if (irq_num <= 15) { - PrintError("apic %u: core ?: Attempting to raise an invalid interrupt: %d\n", apic->lapic_id.val,irq_num); +// PrintError("apic %u: core ?: Attempting to raise an invalid interrupt: %d\n", apic->lapic_id.val,irq_num); return -1; } @@ -396,7 +396,7 @@ static int apic_do_eoi(struct apic_state * apic) { if ((isr_irq == 238) || (isr_irq == 239)) { - PrintError("apic %u: core ?: Acking IRQ %d\n", apic->lapic_id.val,isr_irq); + PrintDebug("apic %u: core ?: Acking IRQ %d\n", apic->lapic_id.val,isr_irq); } if (isr_irq == 238) { @@ -917,7 +917,7 @@ static int apic_intr_pending(struct guest_info * info, void * private_data) { int req_irq = get_highest_irr(apic); int svc_irq = get_highest_isr(apic); - PrintDebug("apic %u: core %u: req_irq=%d, svc_irq=%d\n",apic->lapic_id.val,info->cpu_id,req_irq,svc_irq); + // PrintDebug("apic %u: core %u: req_irq=%d, svc_irq=%d\n",apic->lapic_id.val,info->cpu_id,req_irq,svc_irq); if ((req_irq >= 0) && (req_irq > svc_irq)) { @@ -978,7 +978,7 @@ static int apic_begin_irq(struct guest_info * info, void * private_data, int irq /* Timer Functions */ -static void apic_update_time(struct guest_info * info, ullong_t cpu_cycles, ullong_t cpu_freq, void * priv_data) { +static void apic_update_timer(struct guest_info * info, ullong_t cpu_cycles, ullong_t cpu_freq, void * priv_data) { struct apic_state * apic = (struct apic_state *)(priv_data); // The 32 bit GCC runtime is a pile of shit #ifdef __V3_64BIT__ @@ -1071,7 +1071,7 @@ static struct intr_ctrl_ops intr_ops = { static struct vm_timer_ops timer_ops = { - .update_time = apic_update_time, + .update_timer = apic_update_timer, }; @@ -1106,13 +1106,13 @@ static struct v3_icc_ops icc_ops = { static int apic_init(struct v3_vm_info * vm, v3_cfg_tree_t * cfg) { PrintDebug("apic: creating an APIC for each core\n"); - char * name = v3_cfg_val(cfg, "name"); - char * icc_name = v3_cfg_val(cfg,"bus"); - struct vm_device * icc = v3_find_dev(vm, icc_name); + char * dev_id = v3_cfg_val(cfg, "ID"); + char * icc_bus_id = v3_cfg_val(cfg,"bus"); + struct vm_device * icc = v3_find_dev(vm, icc_bus_id); int i; if (!icc) { - PrintError("apic: Cannot find ICC Bus (%s)\n", icc_name); + PrintError("apic: Cannot find ICC Bus (%s)\n", icc_bus_id); return -1; } @@ -1121,10 +1121,10 @@ static int apic_init(struct v3_vm_info * vm, v3_cfg_tree_t * cfg) { // 0..num_cores-1 at num_cores is the ioapic (one only) struct apic_state * apic = (struct apic_state *)V3_Malloc(sizeof(struct apic_state) * vm->num_cores); - struct vm_device * dev = v3_allocate_device(name, &dev_ops, apic); + struct vm_device * dev = v3_allocate_device(dev_id, &dev_ops, apic); if (v3_attach_device(vm, dev) == -1) { - PrintError("apic: Could not attach device %s\n", name); + PrintError("apic: Could not attach device %s\n", dev_id); return -1; }