qemu-discuss
[Top][All Lists]
Advanced

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

[Qemu-discuss] can't redirect virtual parallel port i/o on guest to host


From: Dylan Herman
Subject: [Qemu-discuss] can't redirect virtual parallel port i/o on guest to host file
Date: Sat, 18 Feb 2017 12:21:45 +0000 (GMT)

Hello,

I have been running Linux 2.6 on QEMU and trying to use it to emulate a parallel port device that I don't physically have for a few exercises in the book "Linux Device Drivers 3rd Edition" (the host and guest have the same architecture). I have tried outputing the restults of i/o on the guest machine to a normal file on the host machine.

I am using the following boot parameters:
qemu-system-x86_64 -parallel file:outputfile --enable-kvm -smp 2 -initrd initramfs.igz -kernel arch/x86/boot/bzImage -m 1024 -append "console=ttyS0 loglevel=8" -nographic

When I load the driver, I am able to request, read and write to the parallel port i/o region starting with 0x378
.
However, after writing to the virtual device on the guest, I see the file on the host is still empty. I have also tried an alternative set of boot parameters:
qemu-system-x86_64 -chardev file,path=./outputfile,id=parallel0 -device isa-parallel,chardev=parallel0,iobase=0x378,irq=7,index=0 --enable-kvm --smp 2 -initrd initramfs.igz -kernel arch/x86/boot/bzImage -m 1024 -append "console=ttyS0 loglevel=8" -nographic
(in which case I named my driver's device file parallel0), but this still made no difference.

Is there something I am missing in my boot parameters? I have read the user docs (which explicitly says it is possible to redirect a virtual parallel port on the guest to a host file via -parallel file:name) and asked on stackoverflow.com (where I was redirected to this mailing list) with no luck.
In addition, I would like to be able to emulate device interrupts from the virtual parallel port, is this possible too (I couldn't find any info about this either)?

Thank you,
Dylan



reply via email to

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