summaryrefslogtreecommitdiff
path: root/create_config
diff options
context:
space:
mode:
authorGleb Natapov <gleb@redhat.com>2009-08-02 11:36:47 +0300
committerAnthony Liguori <aliguori@us.ibm.com>2009-08-27 21:23:38 -0500
commitb0f6d6c74420bb00076d9c27dd3f07d409334668 (patch)
tree57573d17d27e40b7de240f8da1b4268987d6ffe4 /create_config
parent866c72bbb886293d26e01ef7ee4277ebd27c9efd (diff)
downloadqemu-b0f6d6c74420bb00076d9c27dd3f07d409334668.tar.gz
make windows notice media change
Windows seems to be very stupid about cdrom media change. It polls cdrom status and if status goes ready->media not present->ready it assumes that media was changed. If "media not present" step doesn't happen even if "medium may have changed" was seen it assumes media haven't changed. Fake "media not present" step. Filip Navara did a great job debugging this issue in Windows and this is what he found out: BINGO! ... The media present notifications were broken ever since Windows 2000 it seems. The media change is detected properly and it's passed to ClassSetMediaChangeState function which in turn calls ClasspInternalSetMediaChangeState. This function is responsible for changing some internal state of the device object and sending the PnP events which later result in application notifications. It has this tiny bit of code (not copied byte for byte): if (oldMediaState == NewState) { // Media is in the same state it was before. return; } so the end result is that for the case of UNIT NEEDS ATTENTION / MEDIUM MAY HAVE CHANGED without NOT READY in-between is really broken. It results in the internal media change counter incremented, so the media contents are re-read when necessary, instead of relying on the cache, but the notifications to applications are never sent. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Message-Id:
Diffstat (limited to 'create_config')
0 files changed, 0 insertions, 0 deletions