Alon,

Forget my previous mail. When I dig into the vdservice, I found there was one 
bug to check the overlay I/O status after calling the VirtIO write function.
After I fixed the bug, I can see more printing raw data inside the Qemu now. 
Although I still find some issues, hopefully I can fix it as I debug more codes 
in both spice client and spice server. Thank you for your time.

-----Original Message-----
From: Charles.Tsai-蔡清海-研究發展部 
Sent: Wednesday, March 28, 2012 6:07 PM
To: 'Alon Levy'
Cc: spice-devel@lists.freedesktop.org
Subject: Read data out of the Virtqueue

Alon,

My printer driver can write the printing raw data into virtIO driver. But I 
cannot see the found the printing raw data in the spice server. For the 
vdagent, I found the following code segment which is a callback to read the 
data from the vdi_port. Do I need to add a similar code to read the data from 
the Virtio?

In Qemu, I do see vmc_write is called when the printer driver writes the 
printing raw data into the  virtIOdevice.
Consequently, function "spicevmc_red_channel_send_item" should be called to 
send the payload to the spice client. But I did not see function 
"spicevmc_red_channel_send_item" is called either. It looks like the printing 
rawa data is still inside the VirtIO queue. What function I need to add so as 
to pull the data out of the VirtIO queue?

=======================================================================================
struct SpiceCharDeviceState vdagent_char_device_state = {
    .wakeup = &vdagent_char_device_wakeup, };


void vdagent_char_device_wakeup(SpiceCharDeviceInstance *sin) {
    while (read_from_vdi_port());
}
_______________________________________________
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to