Bug 823879 - Parallel port not working in guest, wrong commandline for qemu generated
Parallel port not working in guest, wrong commandline for qemu generated
Status: CLOSED NEXTRELEASE
Product: Virtualization Tools
Classification: Community
Component: libvirt (Show other bugs)
unspecified
x86_64 Linux
unspecified Severity medium
: ---
: ---
Assigned To: Libvirt Maintainers
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-22 07:19 EDT by Beat Jörg
Modified: 2012-06-04 18:50 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-04 18:50:31 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch that fixes the wrong commandline generated by libvirt for qemu parallel port support (846 bytes, application/octet-stream)
2012-05-22 09:46 EDT, Beat Jörg
no flags Details

  None (edit)
Description Beat Jörg 2012-05-22 07:19:11 EDT
Description of problem:
Pass the /dev/parport0 to guest does not work with qemu-kvm

Version-Release number of selected component (if applicable):
libvirt 0.9.4

How reproducible:
always

Steps to Reproduce:
1. Configure /dev/parport0
<parallel type='dev'>
      <source path='/dev/parport0'/>
      <target port='0'/>
</parallel>

2. Start guest and try to use the parallel port.
  
Actual results:
Not working

Expected results:
Working

Additional info:
The commandline produced by libvirt looks like this:

-chardev tty,id=charparallel0,path=/dev/parport0
-device isa-parallel,chardev=charparallel0,id=parallel0

The first parameter is "tty". Should not it be "parport"?
If I start the qemu in the commandline with tty replaced with parport it is working as expected.

I will try to provide a patch that fix this issue.

There was also a post in the libvirt-users mailinglist from an other users a couple of months ago:
https://www.redhat.com/archives/libvirt-users/2011-September/msg00095.html
Comment 1 Dave Allan 2012-05-22 09:35:45 EDT
(In reply to comment #0)
> The first parameter is "tty". Should not it be "parport"?
> If I start the qemu in the commandline with tty replaced with parport it is
> working as expected.
> 
> I will try to provide a patch that fix this issue.

Thanks; if you have questions, I'm sure folks on the list would be glad to answer them.
Comment 2 Beat Jörg 2012-05-22 09:46:20 EDT
Created attachment 586043 [details]
Patch that fixes the wrong commandline generated by libvirt for qemu parallel port support

Not sure if this is fix is very clean, but for my case it works. 
Perhaps it should also be check if similar problems / patches are required for other chardev backends.
Comment 3 Dave Allan 2012-05-22 11:41:45 EDT
Would you mind sending the patch to libvir-list@redhat.com as well?
Comment 4 Beat Jörg 2012-05-23 01:51:47 EDT
Patch posted to the libvir-list@redhat.com.
Comment 5 Eric Blake 2012-06-04 18:50:31 EDT
Fix will be in 0.9.13.

commit 7508338ff3b75b39ee9654e3d83bc58c858dc92a
Author: Beat Jörg <Beat.Joerg@ssatr.ch>
Date:   Wed May 23 07:50:02 2012 +0200

    Fix for parallel port passthrough for QEMU
    
    I came across a bug that the command line generated for passthrough
    of the host parallel port /dev/parport0 by libvirt for QEMU is incorrect.
    
    It currently produces:
    -chardev tty,id=charparallel0,path=/dev/parport0
    -device isa-parallel,chardev=charparallel0,id=parallel0
    
    The first parameter is "tty". It sould be "parport".
    
    If I launch qemu with -chardev parport,... it works as expected.
    
    I have already filled a bug report (
    https://bugzilla.redhat.com/show_bug.cgi?id=823879 ), the topic was
    already on the list some months ago:
    
    https://www.redhat.com/archives/libvirt-users/2011-September/msg00095.html

Note You need to log in before you can comment on or make changes to this bug.