提交 1b10bf31 编写于 作者: J Jan Kiszka 提交者: Avi Kivity

KVM: x86: Silence various LAPIC-related host kernel messages

KVM-x86 dumps a lot of debug messages that have no meaning for normal
operation:
 - INIT de-assertion is ignored
 - SIPIs are sent and received
 - APIC writes are unaligned or < 4 byte long
   (Windows Server 2003 triggers this on SMP)

Degrade them to true debug messages, keeping the host kernel log clean
for real problems.
Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: NAvi Kivity <avi@redhat.com>
上级 e5fcfc82
...@@ -365,15 +365,13 @@ static int __apic_accept_irq(struct kvm_lapic *apic, int delivery_mode, ...@@ -365,15 +365,13 @@ static int __apic_accept_irq(struct kvm_lapic *apic, int delivery_mode,
vcpu->arch.mp_state = KVM_MP_STATE_INIT_RECEIVED; vcpu->arch.mp_state = KVM_MP_STATE_INIT_RECEIVED;
kvm_vcpu_kick(vcpu); kvm_vcpu_kick(vcpu);
} else { } else {
printk(KERN_DEBUG apic_debug("Ignoring de-assert INIT to vcpu %d\n",
"Ignoring de-assert INIT to vcpu %d\n",
vcpu->vcpu_id); vcpu->vcpu_id);
} }
break; break;
case APIC_DM_STARTUP: case APIC_DM_STARTUP:
printk(KERN_DEBUG "SIPI to vcpu %d vector 0x%02x\n", apic_debug("SIPI to vcpu %d vector 0x%02x\n",
vcpu->vcpu_id, vector); vcpu->vcpu_id, vector);
if (vcpu->arch.mp_state == KVM_MP_STATE_INIT_RECEIVED) { if (vcpu->arch.mp_state == KVM_MP_STATE_INIT_RECEIVED) {
vcpu->arch.sipi_vector = vector; vcpu->arch.sipi_vector = vector;
...@@ -679,8 +677,8 @@ static void apic_mmio_write(struct kvm_io_device *this, ...@@ -679,8 +677,8 @@ static void apic_mmio_write(struct kvm_io_device *this,
* Refer SDM 8.4.1 * Refer SDM 8.4.1
*/ */
if (len != 4 || alignment) { if (len != 4 || alignment) {
if (printk_ratelimit()) /* Don't shout loud, $infamous_os would cause only noise. */
printk(KERN_ERR "apic write: bad size=%d %lx\n", apic_debug("apic write: bad size=%d %lx\n",
len, (long)address); len, (long)address);
return; return;
} }
......
...@@ -3224,7 +3224,7 @@ static int __vcpu_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) ...@@ -3224,7 +3224,7 @@ static int __vcpu_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
int r; int r;
if (unlikely(vcpu->arch.mp_state == KVM_MP_STATE_SIPI_RECEIVED)) { if (unlikely(vcpu->arch.mp_state == KVM_MP_STATE_SIPI_RECEIVED)) {
printk("vcpu %d received sipi with vector # %x\n", pr_debug("vcpu %d received sipi with vector # %x\n",
vcpu->vcpu_id, vcpu->arch.sipi_vector); vcpu->vcpu_id, vcpu->arch.sipi_vector);
kvm_lapic_reset(vcpu); kvm_lapic_reset(vcpu);
r = kvm_x86_ops->vcpu_reset(vcpu); r = kvm_x86_ops->vcpu_reset(vcpu);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册