Bug 921200 - [NetKVM] Do not use VIRTIO_PCI_ISR for debug purposes in production code
Summary: [NetKVM] Do not use VIRTIO_PCI_ISR for debug purposes in production code
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virtio-win
Version: 6.5
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Yan Vugenfirer
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-13 16:52 UTC by Yan Vugenfirer
Modified: 2018-12-02 17:29 UTC (History)
9 users (show)

(edit)
Cause: 
Driver was using undocumented QEMU feature and using VIRTO_ISR to  to trigger debug prints in case of BSOD or hangs in outgoing transfer.

Consequence: 
Debug print out"virtio_ioport_write: unexpected address 0x13 value" might appear on the host.

Fix: 
Do not use writes to VIRTIO_ISR register for debug purposes.

Result: 
No debug printouts on the host. Guest BSODs and network hangs should be detected by other methods.
Clone Of:
(edit)
Last Closed: 2013-11-22 00:05:34 UTC


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:1729 normal SHIPPED_LIVE virtio-win bug fix and enhancement update 2013-11-21 00:39:25 UTC

Description Yan Vugenfirer 2013-03-13 16:52:53 UTC
Description of problem:

Current code will use VIRTIO_PCI_ISR register to notify host regarding two conditions on the guest:

1. BSOD (write 0).
2. Hanged TX transfer (write 1).

This is a hacky way that was used for host\guest debugging. Should be removed from production code as such behavior is not described in virtio spec.



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


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Yan Vugenfirer 2013-04-07 14:47:17 UTC
Guest driver will no longer write to VIRTIO_PCI_ISR register.

This behavior could be enabled for debugging in compile time with  DBG_USE_VIRTIO_PCI_ISR_FOR_HOST_REPORT define.

Comment 3 Mike Cao 2013-04-12 06:41:35 UTC
Pls provide a way for QE to verify it ,

Comment 4 Yan Vugenfirer 2013-04-18 08:25:07 UTC
Testing:

1. Cause BSOD on guest.

2. You QEMU shouldn't see QEMU printouts on the host notifying of incorrect write to virtio register.

Comment 6 guo jiang 2013-06-17 03:37:37 UTC
Verified this issue on virtio-win-prewhql-0.1.64

Steps same as comment #4

Actual Result:
on virtio-win-prewhql-0.1-64 QEMU didn't see QEMU printouts on the host notifying of incorrect write to virtio register.

Based on above, this issue has been fixed already.

Comment 7 guo jiang 2013-06-17 06:06:33 UTC
Reproduced this issue on virtio-win-prewhql-0.1.49
Verified this issue on virtio-win-prewhql-0.1.64

Steps:
1.Boot guest with CLI:
/usr/libexec/qemu-kvm -M rhel6.4.0 -m 2G -smp 4,cores=4 -cpu cpu64-rhel6,+x2apic -usb -device usb-tablet -drive file=win2k3-32.raw,format=raw,if=none,id=drive-ide0-0-0,werror=stop,rerror=stop,cache=none -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -netdev tap,sndbuf=0,id=hostnet0,vhost=on,script=/etc/qemu-ifup-private,downscript=no -device virtio-net-pci,netdev=hostnet0,mac=00:13:34:25:22:41,bus=pci.0,addr=0x4,id=virtio-net-pci0 -netdev tap,sndbuf=0,id=hostnet2,script=/etc/qemu-ifup,downscript=no -device e1000,netdev=hostnet2,mac=00:23:30:25:12:10,bus=pci.0,addr=0x6 -uuid d9a27a4b-13f5-4d6a-8a8c-25269bcc1535 -rtc-td-hack -no-kvm-pit-reinjection -rtc base=localtime,clock=host,driftfix=slew -chardev socket,id=111a,path=/tmp/monitor-win2k3-32-network,server,nowait -mon chardev=111a,mode=readline -name win2k3-32-network -vnc :1 -vga cirrus -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 -monitor stdio

2.Enable the keyboard-initiated crash in the registry. In the registry key HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\i8042prt\Parameters, create a DWORD key named CrashOnCtrlScroll and value is 0x01.

3.reboot

4.Press "CTRL+SCROLL LOCK+SCROLL LOCK" keyboard shortcut to generate a BSOD.

Actual Result:
on virtio-win-prewhql-0.1-49 QEMU monitor show "virtio_ioport_write: unexpected address 0x13 value 0x1" on the host.
on virtio-win-prewhql-0.1-64 QEMU didn't see QEMU printouts on the host notifying of incorrect write to virtio register.

Based on above, this issue has been fixed already.

Comment 8 Mike Cao 2013-06-17 06:29:48 UTC
Move Status to VERIFIED according to comment #7

Comment 13 errata-xmlrpc 2013-11-22 00:05:34 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-1729.html


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