Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 610063 - Need to test that i6300ESB virtual watchdog device works in qemu on Windows guests
Need to test that i6300ESB virtual watchdog device works in qemu on Windows g...
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
6.1
All Linux
low Severity medium
: rc
: 6.1
Assigned To: Richard W.M. Jones
Virtualization Bugs
:
Depends On: 604466
Blocks: 580953 583562
  Show dependency treegraph
 
Reported: 2010-07-01 09:37 EDT by Richard W.M. Jones
Modified: 2013-01-09 17:48 EST (History)
17 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 604466
Environment:
Last Closed: 2012-08-10 09:19:36 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
WDT demo on winxp-32 (54.11 KB, image/png)
2010-07-27 02:38 EDT, Keqin Hong
no flags Details

  None (edit)
Comment 1 Keqin Hong 2010-07-01 21:16:13 EDT
Richard, could you help confirm that Intel's driver can't be installed inside Windows guest?
Comment 2 Richard W.M. Jones 2010-07-02 03:33:34 EDT
Yes, I'll be checking this.  It may be a bug in the emulation of the watchdog
device.
Comment 5 Richard W.M. Jones 2010-07-26 14:49:00 EDT
This isn't working, *and* it's not something that can be solved
right away.  I'm bumping this to 6.1.
Comment 6 Richard W.M. Jones 2010-07-26 15:38:43 EDT
Ignore comment 6.

This does work.  However:

(1) Ignore Window's "default" driver.  This is nothing more than
displaying the PCI information about the device.

(2) You must have a 32 bit guest.  This is because Intel does not
supply 64 bit drivers for this hardware.

(3) You must install the Intel driver manually using the *.inf file.
Intel's documentation tells you how to do this.

After doing the above with a 32 bit Windows guest, I was
able to run Intel's WDT demo program, showing that the
device was working / counting.

Really we need some Windows software which can actually
use a watchdog.  I don't know of any.  There is documentation
with the Intel driver which describes their API, should anyone
want to write some control software.

Keqin, can you check this now works for you if you follow
the steps in the Intel documentation?
Comment 7 Keqin Hong 2010-07-26 21:48:35 EDT
I will check it asap.
Comment 8 Keqin Hong 2010-07-27 02:38:39 EDT
Created attachment 434607 [details]
WDT demo on winxp-32
Comment 9 Keqin Hong 2010-07-27 02:55:05 EDT
Richard,
Yes, Intel's WDT driver can be installed on XP following its documentation. However, WDT_LOCK BIT is always 1, no matter I click enable or disable button on the right hand side, as can be seen from attachment of Comment 8.

"Clicking the Enable button starts the WDT counting down. Clicking the Disable button stops the WDT from counting down." That's what Intel's Watchdog Demo Application Specification says. I couldn't see it work. Did I miss/misunderstand something?

Also, it is true there is doc describing the APIs of this driver, but no .h (iwdtlib.h) is given within the package that Intel provides, which also prevents writing some control software.
Comment 10 Richard W.M. Jones 2010-07-27 03:26:54 EDT
We emulated every feature of the WDT, so it should work, but
I'll have to take a closer look.

This is pretty low priority since watchdog software doesn't exist
for Windows as far as I can find.  So the aim of this exercise is to
make Intel's demo program work :-)

Bumping to 6.1 is the right choice ...
Comment 12 Richard W.M. Jones 2011-01-14 07:25:48 EST
Here's the situation:

The 32 bit Windows driver supplied by Intel does not work
with the emulated watchdog device.

For reasons unknown the driver ignores the PCI BAR mapping
and sends all memory mapped I/O to 0x1_0000_0000 - 0x1_0000_000f
and one write to 0x3001ffff.

For example here is a sequence captured in qemu-system-x86_64
where it is setting the timer.  Note that the Windows driver is
writing the correct values, but to completely the wrong locations:

Unassigned mem write 000000010000000e = 0x0
Unassigned mem write 000000010000000d = 0x0
Unassigned mem write 000000010000000c = 0x0
Unassigned mem write 000000010000000b = 0x80
Unassigned mem write 000000010000000e = 0x0
Unassigned mem write 000000010000000d = 0x0
Unassigned mem write 000000010000000c = 0x0
Unassigned mem write 000000010000000b = 0x86
Unassigned mem write 0000000100000002 = 0x0
Unassigned mem write 0000000100000001 = 0x0
Unassigned mem write 0000000100000000 = 0x75
Unassigned mem write 000000003001ffff = 0x30
Unassigned mem write 000000010000000e = 0x0
Unassigned mem write 000000010000000d = 0x0
Unassigned mem write 000000010000000c = 0x0
Unassigned mem write 000000010000000b = 0x80
Unassigned mem write 000000010000000e = 0x0
Unassigned mem write 000000010000000d = 0x0
Unassigned mem write 000000010000000c = 0x0
Unassigned mem write 000000010000000b = 0x86
Unassigned mem write 0000000100000006 = 0x0
Unassigned mem write 0000000100000005 = 0x0
Unassigned mem write 0000000100000004 = 0x4e
Unassigned mem write 0000000100000003 = 0x20

It's not anything obvious in the PCI config.

The driver is binary only.  I disassembled it but it's
hard to tell exactly what it's doing.

So I suggest we write a Windows driver for this device.
This is a good idea anyway because the Intel driver is
binary only, only supports 32 bit Windows and doesn't
support recent versions of Windows.  A new open source
driver is required to fix this.  The device is very simple
and so this shouldn't be a lot of work.
Comment 16 Suzanne Yeghiayan 2011-03-28 15:53:44 EDT
Since RHEL 6.1 External Beta has begun, and this bug remains 
unresolved, it has been rejected as it is not proposed as an 
exception or blocker.

Red Hat invites you to ask your support representative to 
propose this request, if appropriate and relevant, in the 
next release of Red Hat Enterprise Linux.
Comment 17 Richard W.M. Jones 2011-06-02 05:55:54 EDT
I spent some time looking into writing a Windows driver
(for ib700 since that's a simpler device).  I haven't
got very far at the moment -- driver compiles but Windows
refuses to load it for unknown reasons.
Comment 18 Richard W.M. Jones 2011-06-10 06:05:46 EDT
It's possible we can get something working for 6.2.
Still under investigation, but I'll give it a tentative
dev-ack+
Comment 19 Richard W.M. Jones 2011-07-12 04:13:55 EDT
Update:

Vadim R found out why this doesn't work.  The Windows driver
assumes that the i6300esb is fitted in a particular PCI slot(!)

Vadim also wrote a framework modern driver for this.  Unfortunately
because it requires some Windows driver SDK that's not available
on mingw-w64, I can't compile it.

This is *not* something that customers have asked us about (to
my knowledge) so I'm happy to push this issue off into the
future.  Setting flags accordingly.
Comment 21 Richard W.M. Jones 2012-02-06 08:25:26 EST
I am deferring this to 6.4 / far future based on
us not having the tools still to write a Windows
device driver (waiting for mingw-w64 in Fedora).
Comment 22 Richard W.M. Jones 2012-08-10 09:19:36 EDT
Closing as "WONTFIX":

(1) It requires someone to take Vadim's partial driver and
    make it work.  I don't have the development environment
    to do this.

(2) No one cares about watchdogs on Windows.

(3) There is no generic framework for watchdogs on Windows
    as there is under Linux, so even if (1) and (2) were solved
    the driver wouldn't really be much use outside very narrow
    use cases.

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