[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-discuss] How to add a new type device into qemu and make vms recog

From: wukunhenggo
Subject: [Qemu-discuss] How to add a new type device into qemu and make vms recognize it
Date: Wed, 22 Jun 2016 23:02:06 +0800


I have a new DAQ(data acquisition) card, which can speed up special data calculation, and its driver in linux. Now, I want to write something like a "virtio-daq":  VMs can recognize this device in guest side(like /dev/daq) and use read/wirte operation to get data processed by host. And host can receive those request and data from guest VMs. Then  host sends data to responsed VMs respectively.

In fact, I have read virtio-blk.c and virtio-console.c in kernel code. But I still fall into confusion. I have some question about device emulation in qemu:
1. How to add new virtio device. The probe function of virtio driver should be triggered when OS detects this device.
2. How to know which guest VM sends requests to host. For example, VM1 and VM2 send requests, which include data. How does host distinguishs which request is sent by VM1?

Have any guide for me?
Thanks a lot!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]