aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2011-09-12 05:25:51 -0400
committerAvi Kivity <avi@redhat.com>2011-09-25 12:52:42 -0400
commit7712de872c8ec00a657b867ab0296913f69addac (patch)
treebb0998e903d0d23b63aabca59bab21b78d974ed2 /arch/x86
parent1e2b1dd797f9356f779268ecc1ba21110d4e341c (diff)
KVM: x86: Avoid guest-triggerable printks in APIC model
Convert remaining printks that the guest can trigger to apic_printk. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/kvm/lapic.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
index 52645f283870..4b53b811d1c1 100644
--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
@@ -316,8 +316,8 @@ int kvm_apic_match_logical_addr(struct kvm_lapic *apic, u8 mda)
316 result = 1; 316 result = 1;
317 break; 317 break;
318 default: 318 default:
319 printk(KERN_WARNING "Bad DFR vcpu %d: %08x\n", 319 apic_debug("Bad DFR vcpu %d: %08x\n",
320 apic->vcpu->vcpu_id, apic_get_reg(apic, APIC_DFR)); 320 apic->vcpu->vcpu_id, apic_get_reg(apic, APIC_DFR));
321 break; 321 break;
322 } 322 }
323 323
@@ -354,8 +354,8 @@ int kvm_apic_match_dest(struct kvm_vcpu *vcpu, struct kvm_lapic *source,
354 result = (target != source); 354 result = (target != source);
355 break; 355 break;
356 default: 356 default:
357 printk(KERN_WARNING "Bad dest shorthand value %x\n", 357 apic_debug("kvm: apic: Bad dest shorthand value %x\n",
358 short_hand); 358 short_hand);
359 break; 359 break;
360 } 360 }
361 361
@@ -401,11 +401,11 @@ static int __apic_accept_irq(struct kvm_lapic *apic, int delivery_mode,
401 break; 401 break;
402 402
403 case APIC_DM_REMRD: 403 case APIC_DM_REMRD:
404 printk(KERN_DEBUG "Ignoring delivery mode 3\n"); 404 apic_debug("Ignoring delivery mode 3\n");
405 break; 405 break;
406 406
407 case APIC_DM_SMI: 407 case APIC_DM_SMI:
408 printk(KERN_DEBUG "Ignoring guest SMI\n"); 408 apic_debug("Ignoring guest SMI\n");
409 break; 409 break;
410 410
411 case APIC_DM_NMI: 411 case APIC_DM_NMI:
@@ -565,8 +565,7 @@ static u32 __apic_read(struct kvm_lapic *apic, unsigned int offset)
565 val = kvm_apic_id(apic) << 24; 565 val = kvm_apic_id(apic) << 24;
566 break; 566 break;
567 case APIC_ARBPRI: 567 case APIC_ARBPRI:
568 printk(KERN_WARNING "Access APIC ARBPRI register " 568 apic_debug("Access APIC ARBPRI register which is for P6\n");
569 "which is for P6\n");
570 break; 569 break;
571 570
572 case APIC_TMCCT: /* Timer CCR */ 571 case APIC_TMCCT: /* Timer CCR */
@@ -804,14 +803,14 @@ static int apic_reg_write(struct kvm_lapic *apic, u32 reg, u32 val)
804 803
805 case APIC_TDCR: 804 case APIC_TDCR:
806 if (val & 4) 805 if (val & 4)
807 printk(KERN_ERR "KVM_WRITE:TDCR %x\n", val); 806 apic_debug("KVM_WRITE:TDCR %x\n", val);
808 apic_set_reg(apic, APIC_TDCR, val); 807 apic_set_reg(apic, APIC_TDCR, val);
809 update_divide_count(apic); 808 update_divide_count(apic);
810 break; 809 break;
811 810
812 case APIC_ESR: 811 case APIC_ESR:
813 if (apic_x2apic_mode(apic) && val != 0) { 812 if (apic_x2apic_mode(apic) && val != 0) {
814 printk(KERN_ERR "KVM_WRITE:ESR not zero %x\n", val); 813 apic_debug("KVM_WRITE:ESR not zero %x\n", val);
815 ret = 1; 814 ret = 1;
816 } 815 }
817 break; 816 break;