Skip to contentSkip to conversation

Virtio IRQ problem

DISCUSSION Pavel Davydov 2 participants 4 messages Jul 11, 2015 – Jul 14, 2015 KVM

lore
Share & tools
lore
#0 lore raw

Hello,

I've got the following problem with KVM:

I'm running a proprietary OS under KVM, the OS is neither Linux/Unix, nor Windows, and I don't get any IRQs from Virtio device. The Virtio device in the system I'm running is a PCI Ethernet device. The device is detected correctly, the IRQ line is also identified, its matches with the IRQ line number retrieved by running lspci command when Linux is run instead of the proprietary system.

When Linux is run on exactly the same virtual machine configuration (with the Virtio device), the Virtio device is detected and works correctly, there is traffic between the host and the guest.

When the only change in the configuration is that the type of the virtual network interface is changed from Virtio to E1000, in both OSes: the proprietary OS and Linux, the virtual network interface works correctly.

The question is: what steps is Virtio driver to perform to enable the IRQs? (Obviously, Linux driver for Virtio performs these steps, the IRQs are generated under Linux VM).

Any hint would be appreciated.

Thank you,
Pavel

#1 lore raw
Quoted 11 lines · Pavel Davydov

Hello,

I've got the following problem with KVM:

I'm running a proprietary OS under KVM, the OS is neither Linux/Unix, nor Windows, and I don't get any IRQs from Virtio device. The Virtio device in the system I'm running is a PCI Ethernet device. The device is detected correctly, the IRQ line is also identified, its matches with the IRQ line number retrieved by running lspci command when Linux is run instead of the proprietary system.

Quoted 3 lines

When Linux is run on exactly the same virtual machine configuration (with the Virtio device), the Virtio device is detected and works correctly, there is traffic between the host and the guest.

Linux does more than detection, you need to have drivers running in the guest for virtio devices.

Does your proprietary system have virtio device drivers?

Fam

Quoted 17 lines

When the only change in the configuration is that the type of the virtual network interface is changed from Virtio to E1000, in both OSes: the proprietary OS and Linux, the virtual network interface works correctly.

The question is: what steps is Virtio driver to perform to enable the IRQs? (Obviously, Linux driver for Virtio performs these steps, the IRQs are generated under Linux VM).

Any hint would be appreciated.

Thank you,
Pavel
--
To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw

The proprietary system doesn't have a virtio driver, that is the problem.

What are the steps that Linux performs to work correctly with virtio devices?

Thank you,
Pavel

Quoted 38 lines · Fam Zheng
Quoted 11 lines · Pavel Davydov

Hello,

I've got the following problem with KVM:

I'm running a proprietary OS under KVM, the OS is neither Linux/Unix, nor Windows, and I don't get any IRQs from Virtio device. The Virtio device in the system I'm running is a PCI Ethernet device. The device is detected correctly, the IRQ line is also identified, its matches with the IRQ line number retrieved by running lspci command when Linux is run instead of the proprietary system.

Quoted 3 lines

When Linux is run on exactly the same virtual machine configuration (with the Virtio device), the Virtio device is detected and works correctly, there is traffic between the host and the guest.

Linux does more than detection, you need to have drivers running in the guest for virtio devices.

Does your proprietary system have virtio device drivers?

Fam

Quoted 16 lines

When the only change in the configuration is that the type of the virtual network interface is changed from Virtio to E1000, in both OSes: the proprietary OS and Linux, the virtual network interface works correctly.

The question is: what steps is Virtio driver to perform to enable the IRQs? (Obviously, Linux driver for Virtio performs these steps, the IRQs are generated under Linux VM).

Any hint would be appreciated.

Thank you,
Pavel
--
To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw
Quoted 4 lines · Pavel Davydov

The proprietary system doesn't have a virtio driver, that is the problem.

What are the steps that Linux performs to work correctly with virtio devices?

It's done with a specific driver that talks to virtio interface:

http://github.com/torvalds/linux/blob/master/drivers/net/virtio_net.c

It goes through regular PCI device discovery, and sets up ring buffers for rx and tx, together with irq handlers etc., according to the device specification. The device operations are documented as:

http://docs.oasis-open.org/virtio/virtio/v1.0/csprd01/virtio-v1.0-csprd01.html#x1-870001

Thanks,
Fam

Quoted 44 lines

Thank you,
Pavel

Quoted 38 lines · Fam Zheng
Quoted 11 lines · Pavel Davydov

Hello,

I've got the following problem with KVM:

I'm running a proprietary OS under KVM, the OS is neither Linux/Unix, nor Windows, and I don't get any IRQs from Virtio device. The Virtio device in the system I'm running is a PCI Ethernet device. The device is detected correctly, the IRQ line is also identified, its matches with the IRQ line number retrieved by running lspci command when Linux is run instead of the proprietary system.

Quoted 3 lines

When Linux is run on exactly the same virtual machine configuration (with the Virtio device), the Virtio device is detected and works correctly, there is traffic between the host and the guest.

Linux does more than detection, you need to have drivers running in the guest for virtio devices.

Does your proprietary system have virtio device drivers?

Fam

Quoted 16 lines

When the only change in the configuration is that the type of the virtual network interface is changed from Virtio to E1000, in both OSes: the proprietary OS and Linux, the virtual network interface works correctly.

The question is: what steps is Virtio driver to perform to enable the IRQs? (Obviously, Linux driver for Virtio performs these steps, the IRQs are generated under Linux VM).

Any hint would be appreciated.

Thank you,
Pavel
--
To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html