Skip to contentSkip to conversation

Qemu e1000 broken in -rc1 and -rc2

DISCUSSION Ken Moffat 2 participants 4 messages Mar 6, 2015 – Mar 9, 2015

lore
Share & tools
lore

Ken Moffat

author
#0 lore raw

I have a very recent qemu i686 image, using a 3.19.0 kernel and
dhclient, which works fine if the host is running a 3.19.0 kernel, but breaks when the host runs 4.0.0-rc1 or -rc2.

On those, dhclient does not get an address, so I have no network.
There is a message
e1000 0000:00:03.0 eth0: Reset adaptor

Before I start trying to bisect this, has anybody already seen, or
fixed, it ?

ĸen

Signature · 2 lines
Nanny Ogg usually went to bed early. After all, she was an old lady.
Sometimes she went to bed as early as 6 a.m.
author
#1 lore raw

Re: Qemu e1000 broken in -rc1 and -rc2 : bisected

Quoted 11 lines · Ken Moffat

I have a very recent qemu i686 image, using a 3.19.0 kernel and
dhclient, which works fine if the host is running a 3.19.0 kernel, but breaks when the host runs 4.0.0-rc1 or -rc2.

On those, dhclient does not get an address, so I have no network.
There is a message
e1000 0000:00:03.0 eth0: Reset adaptor

Before I start trying to bisect this, has anybody already seen, or
fixed, it ?

Bisected.
b4eef9b36db461ca44832226fbca614db58c0c33 is the first bad commit commit b4eef9b36db461ca44832226fbca614db58c0c33

Author: Tiejun Chen <[email protected]>
Date:   Mon Dec 22 10:32:57 2014 +0100

kvm: x86: vmx: NULL out hwapic_isr_update() in case of
!enable_apicv

In most cases calling hwapic_isr_update(), we always check if kvm_apic_vid_enabled() == 1, but actually, kvm_apic_vid_enabled()
-> kvm_x86_ops->vm_has_apicv()
-> vmx_vm_has_apicv() or '0' in svm case
-> return enable_apicv && irqchip_in_kernel(kvm)

So its a little cost to recall vmx_vm_has_apicv() inside hwapic_isr_update(), here just NULL out hwapic_isr_update() in case of !enable_apicv inside hardware_setup() then make all related stuffs follow this. Note we don't check this under that condition of irqchip_in_kernel() since we should make sure definitely any caller don't work without in-kernel irqchip.

I have reverted this from -rc2 (big offsets, 209 and 357 lines) and
everything is working again.

ĸen

Signature · 2 lines
Nanny Ogg usually went to bed early. After all, she was an old lady.
Sometimes she went to bed as early as 6 a.m.
#2 lore raw

Re: Qemu e1000 broken in -rc1 and -rc2 : bisected

Quoted 35 lines · Ken Moffat
Quoted 11 lines · Ken Moffat

I have a very recent qemu i686 image, using a 3.19.0 kernel and
dhclient, which works fine if the host is running a 3.19.0 kernel, but breaks when the host runs 4.0.0-rc1 or -rc2.

On those, dhclient does not get an address, so I have no network.
There is a message
e1000 0000:00:03.0 eth0: Reset adaptor

Before I start trying to bisect this, has anybody already seen, or
fixed, it ?

Bisected.
b4eef9b36db461ca44832226fbca614db58c0c33 is the first bad commit commit b4eef9b36db461ca44832226fbca614db58c0c33

Author: Tiejun Chen <[email protected]>
Date:   Mon Dec 22 10:32:57 2014 +0100

kvm: x86: vmx: NULL out hwapic_isr_update() in case of
!enable_apicv

In most cases calling hwapic_isr_update(), we always check if kvm_apic_vid_enabled() == 1, but actually, kvm_apic_vid_enabled()
-> kvm_x86_ops->vm_has_apicv()
-> vmx_vm_has_apicv() or '0' in svm case
-> return enable_apicv && irqchip_in_kernel(kvm)

So its a little cost to recall vmx_vm_has_apicv() inside hwapic_isr_update(), here just NULL out hwapic_isr_update() in case of !enable_apicv inside hardware_setup() then make all related stuffs follow this. Note we don't check this under that condition of irqchip_in_kernel() since we should make sure definitely any caller don't work without in-kernel irqchip.

Quoted 6 lines

I have reverted this from -rc2 (big offsets, 209 and 357 lines) and
everything is working again.

Did you try Linux 4.0-rc3? That includes one relevant fix,

KVM: SVM: fix interrupt injection (apic->isr_count always 0)

Thanks
Tiejun

author
#3 lore raw

Re: Qemu e1000 broken in -rc1 and -rc2 : bisected

Quoted 22 lines · Tiejun
Quoted 21 lines · Ken Moffat
Quoted 11 lines · Ken Moffat

I have a very recent qemu i686 image, using a 3.19.0 kernel and
dhclient, which works fine if the host is running a 3.19.0 kernel, but breaks when the host runs 4.0.0-rc1 or -rc2.

On those, dhclient does not get an address, so I have no network.
There is a message
e1000 0000:00:03.0 eth0: Reset adaptor

Before I start trying to bisect this, has anybody already seen, or
fixed, it ?

Bisected.
b4eef9b36db461ca44832226fbca614db58c0c33 is the first bad commit commit b4eef9b36db461ca44832226fbca614db58c0c33

Author: Tiejun Chen <[email protected]>
Date:   Mon Dec 22 10:32:57 2014 +0100

kvm: x86: vmx: NULL out hwapic_isr_update() in case of
!enable_apicv

[...]

Quoted 7 lines

Did you try Linux 4.0-rc3? That includes one relevant fix,

KVM: SVM: fix interrupt injection (apic->isr_count always 0)

Thanks
Tiejun

I've now tried -rc3, and the problem has gone. Thanks.

ĸen

Signature · 2 lines
Nanny Ogg usually went to bed early. After all, she was an old lady.
Sometimes she went to bed as early as 6 a.m.