Bug 1509908 - ib700 watchdog should be validated as none address type
Summary: ib700 watchdog should be validated as none address type
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: libvirt
Version: 8.3
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: 8.3
Assignee: Andrea Bolognani
QA Contact: Lili Zhu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-06 10:21 UTC by Fangge Jin
Modified: 2021-05-25 06:41 UTC (History)
12 users (show)

Fixed In Version: libvirt-6.10.0-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-25 06:41:16 UTC
Type: Bug
Target Upstream Version: 6.8.0
Embargoed:


Attachments (Terms of Use)

Description Fangge Jin 2017-11-06 10:21:41 UTC
Description of problem:
Guest fails to start when set ib700 watchdog address type to isa

Version-Release number of selected component (if applicable):
libvirt-3.9.0-1.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Prepare a guest with ib700 watchdog and address type is isa:
    <watchdog model='ib700' action='dump'>
      <address type='isa' iobase='0x505'/>
    </watchdog>

2.Start guest:
# virsh start foo=1
error: Failed to start domain foo=1
error: internal error: qemu unexpectedly closed the monitor: 2017-11-06T10:17:18.509427Z qemu-kvm: -device ib700,id=watchdog0,iobase=0x505,irq=0x0: Property '.iobase' not found


Actual results:
Guest fails to start

Expected results:
Guest can start successfully

Additional info:
1. Can reproduce with libvirt-3.2.0-14.el7_4.3.x86_64
2. Can't reproduce with libvirt-1.2.8-16.el7_1.5.x86_64
   The qemu command line is:
   -device ib700,id=watchdog0 -watchdog-action pause
3. I didn't try other libvirt versions

Comment 2 Fangge Jin 2017-11-07 05:02:50 UTC
Forget to mention that the qemu-kvm-rhev version is qemu-kvm-rhev-2.10.0-4.el7.x86_64

Comment 4 Han Han 2020-08-20 08:37:00 UTC
In fact ib700 has no isa address. Check that in libvirt-6.6.0-2.module+el8.3.0+7567+dc41c0a9.x86_64 qemu-kvm-5.1.0-3.module+el8.3.0+7708+740a1315.x86_64:
➜  ~ /usr/libexec/qemu-kvm -device ib700,\?

There are no options for ib700.


Start a VM and then check qtree:
➜  ~ virsh qemu-monitor-command new --hmp info qtree|grep ib -A 10
--
          dev: ib700, id "watchdog0"
          dev: isa-serial, id "serial0"
            index = 0 (0x0)
            iobase = 1016 (0x3f8)
            irq = 4 (0x4)
            chardev = "charserial0"
            wakeup = 0 (0x0)
            isa irq 4
          dev: port92, id ""
            gpio-out "a20" 1
          dev: i8042, id ""


So libvirt should pop up more clear error here.

Comment 5 Han Han 2020-08-21 02:04:48 UTC
The results of comment4 could be reproduced on qemu-kvm-1.5.3-175.el7.x86_64

Comment 6 Michal Privoznik 2020-09-02 16:55:41 UTC
Merged upstream as:

be28a7fbd6 qemu_validate: Only allow none address for watchdog ib700

v6.7.0-34-gbe28a7fbd6

Comment 10 Lili Zhu 2020-12-15 10:20:15 UTC
Verify this bug with:
libvirt-6.10.0-1.module+el8.4.0+8898+a84e86e1.x86_64
qemu-kvm-4.2.0-37.module+el8.4.0+8837+c89bcfe6.x86_64

positive scenario:
1. prepare a guest with ib700 watchdog, set the action as 'reset'
...
 <os>
    <type arch='x86_64' machine='pc-i440fx-rhel7.6.0'>hvm</type>
    <boot dev='hd'/>
 </os>
...
 <watchdog model='ib700' action='reset'/>
..

2. trigger the watchdog in guest
[root@localhost ~]# modprobe ib700wdt
[root@localhost ~]# lsmod |grep ib700
ib700wdt               16384  0
[root@localhost ~]# echo 1 > /dev/watchdog
[  250.680295] ib700wdt: WDT device closed unexpectedly.  WDT will not stop!

3. wait about 30 seconds, guest will restart automatically

4. try to set the action as 'none', 'poweroff', 'inject-nmi', 'pause',
then trigger watchdog in guest, the guest state will just as expected.

negative scenario:
try to edit guest xml, added a watchdog device with isa/PCI address
# virsh edit vm1
...
<watchdog model='ib700' action='reset'>
   <address type='isa' iobase='0x505'/>
</watchdog>
...
error: unsupported configuration: ib700 model of watchdog does not support configuring the address
Failed. Try again? [y,n,i,f,?]:

Comment 19 Lili Zhu 2020-12-17 01:54:18 UTC
As the feature related to the fixing matches with expected result, mark the bug as verified

Comment 21 errata-xmlrpc 2021-05-25 06:41:16 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 (virt:av bug fix and enhancement update), and where to find the updated
files, follow the link below.

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

https://access.redhat.com/errata/RHBA-2021:2098


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