All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] Re: Windows 2000 disk full problem during install...
       [not found] <200412142142.iBELg2Qa009126@treas.simtreas.ru>
@ 2004-12-17 11:23 ` Vladimir N. Oleynik
  2004-12-17 11:51   ` Piotras
                     ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Vladimir N. Oleynik @ 2004-12-17 11:23 UTC (permalink / raw)
  To: qemu-devel, whit74

[-- Attachment #1: Type: text/plain, Size: 1385 bytes --]

Leo,

 > I was wondering if anyone had a chance to look into this problem more.
 > I've done a great deal of research myself on it so far, but do not yet have
 > a solution. Most of the c:\winnt\security\edb*.log files that fill up the disk
 > are created during the hardware scan stage in the GUI portion of the install.
 > I'm using Windows 2000 Professional, on QEMU 0.6.2 (latest from CVS) and have
 > encountered the problem on any flavor of Linux I try.

 > I also tried a small patch to hw/ide.c (without the multithread bits),
 > from Vladimir N. Oleynik. Basically only the s->status is set to READY_STAT
 > instead of READY_STAT | SEEK_STAT in/around hw/ide.c:1472 from that patch.
 > This did not solve the problem at all.

O my God!
This problem consists not in these flags, you looked corrections
to the previous version of the ide emulator.
I have made new hack specially for elimination of a Subject problem only.
This correction adds waiting one (or zero, autorandomly) period before
sending interruption after positioning before write. (see attach)
But this a HACK, do not use after w2k install!
Me other idea interested - to make asynchronous input-output.
The received effect of elimination of a Subject problem was
completely unexpected.
But the author of the QEmu has not supported idea.
(The sended a patch do not contain asynchronous input-output.)



--w
vodz


[-- Attachment #2: qemu_w2k_df.patch --]
[-- Type: text/x-patch, Size: 3121 bytes --]

diff -rbu qemu.orig/hw/ide.c qemu/hw/ide.c
--- qemu.orig/hw/ide.c	2004-12-02 23:20:21.000000000 +0300
+++ qemu/hw/ide.c	2004-12-17 14:06:15.000000000 +0300
@@ -332,8 +332,12 @@
     uint8_t *data_ptr;
     uint8_t *data_end;
     uint8_t io_buffer[MAX_MULT_SECTORS*512 + 4];
+    int ide_set_irq_from_timer;
 } IDEState;
 
+volatile int ide_set_irq_from_timer;
+static IDEState *IDEStates[4];
+
 #define BM_STATUS_DMAING 0x01
 #define BM_STATUS_ERROR  0x02
 #define BM_STATUS_INT    0x04
@@ -512,6 +516,21 @@
     }
 }
 
+void make_ide_set_irq(void)
+{
+	int i;
+	IDEState *s;
+
+	ide_set_irq_from_timer--;
+	for(i = 0; (s=IDEStates[i]) != NULL; i++) {
+		if(s->ide_set_irq_from_timer) {
+			s->ide_set_irq_from_timer--;
+			ide_set_irq(s);
+			break;
+		}
+	}
+}
+
 /* prepare data transfer and tell what to do after */
 static void ide_transfer_start(IDEState *s, uint8_t *buf, int size, 
                                EndTransferFunc *end_transfer_func)
@@ -667,7 +686,11 @@
         ide_transfer_start(s, s->io_buffer, 512 * n1, ide_sector_write);
     }
     ide_set_sector(s, sector_num + n);
+    if(s->ide_set_irq_from_timer) {
+	ide_set_irq_from_timer++;
+    } else {
     ide_set_irq(s);
+    }
 }
 
 static int ide_write_dma_cb(IDEState *s, 
@@ -1511,6 +1534,7 @@
             s->error = 0;
             s->status = SEEK_STAT | READY_STAT;
             s->req_nb_sectors = 1;
+	    s->ide_set_irq_from_timer = 1;
             ide_transfer_start(s, s->io_buffer, 512, ide_sector_write);
             break;
         case WIN_MULTREAD:
@@ -1528,6 +1552,7 @@
             n = s->nsector;
             if (n > s->req_nb_sectors)
                 n = s->req_nb_sectors;
+	    s->ide_set_irq_from_timer = 1;
             ide_transfer_start(s, s->io_buffer, 512 * n, ide_sector_write);
             break;
         case WIN_READDMA:
@@ -1883,6 +1908,7 @@
 
     for(i = 0; i < 2; i++) {
         s = ide_state + i;
+	IDEStates[drive_serial-1] = s;
         if (i == 0)
             s->bs = hd0;
         else
diff -rbu qemu.orig/vl.c qemu/vl.c
--- qemu.orig/vl.c	2004-12-13 01:20:04.000000000 +0300
+++ qemu/vl.c	2004-12-17 12:41:16.000000000 +0300
@@ -911,7 +911,7 @@
         
         /* timer signal */
         sigfillset(&act.sa_mask);
-        act.sa_flags = 0;
+	act.sa_flags = SA_RESTART;
 #if defined (TARGET_I386) && defined(USE_CODE_COPY)
         act.sa_flags |= SA_ONSTACK;
 #endif
@@ -2403,7 +2403,12 @@
     int n, max_size;
 #endif
     int ret;
+    /* ide.c hack */
+    extern volatile int ide_set_irq_from_timer;
+    extern void make_ide_set_irq(void);
 
+	if(ide_set_irq_from_timer)
+		make_ide_set_irq();
 #ifdef _WIN32
         if (timeout > 0)
             Sleep(timeout);
@@ -2449,8 +2454,6 @@
                             n = read(ioh->fd, buf, ioh->max_size);
                             if (n >= 0) {
                                 ioh->fd_read(ioh->opaque, buf, n);
-                            } else if (errno != EAGAIN) {
-                                ioh->fd_read(ioh->opaque, NULL, -errno);
                             }
                         }
                     }

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] Re: Windows 2000 disk full problem during install...
  2004-12-17 11:23 ` [Qemu-devel] Re: Windows 2000 disk full problem during install Vladimir N. Oleynik
@ 2004-12-17 11:51   ` Piotras
  2004-12-17 14:15   ` Leo Whitman
  2005-04-30 16:18   ` Fabrice Bellard
  2 siblings, 0 replies; 6+ messages in thread
From: Piotras @ 2004-12-17 11:51 UTC (permalink / raw)
  To: Vladimir N. Oleynik, qemu-devel

If this is the problem, how Bochs solves it?


Piotrek

PS. There is another issue that AIO-like driver could clean:
  http://lists.gnu.org/archive/html/qemu-devel/2004-09/msg00290.html


On Fri, 17 Dec 2004 14:23:38 +0300, Vladimir N. Oleynik <dzo@simtreas.ru> wrote:
> Leo,
> 
>  > I was wondering if anyone had a chance to look into this problem more.
>  > I've done a great deal of research myself on it so far, but do not yet have
>  > a solution. Most of the c:\winnt\security\edb*.log files that fill up the disk
>  > are created during the hardware scan stage in the GUI portion of the install.
>  > I'm using Windows 2000 Professional, on QEMU 0.6.2 (latest from CVS) and have
>  > encountered the problem on any flavor of Linux I try.
> 
>  > I also tried a small patch to hw/ide.c (without the multithread bits),
>  > from Vladimir N. Oleynik. Basically only the s->status is set to READY_STAT
>  > instead of READY_STAT | SEEK_STAT in/around hw/ide.c:1472 from that patch.
>  > This did not solve the problem at all.
> 
> O my God!
> This problem consists not in these flags, you looked corrections
> to the previous version of the ide emulator.
> I have made new hack specially for elimination of a Subject problem only.
> This correction adds waiting one (or zero, autorandomly) period before
> sending interruption after positioning before write. (see attach)
> But this a HACK, do not use after w2k install!
> Me other idea interested - to make asynchronous input-output.
> The received effect of elimination of a Subject problem was
> completely unexpected.
> But the author of the QEmu has not supported idea.
> (The sended a patch do not contain asynchronous input-output.)
> 
> --w
> vodz

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Qemu-devel] Re: Windows 2000 disk full problem during install...
  2004-12-17 11:23 ` [Qemu-devel] Re: Windows 2000 disk full problem during install Vladimir N. Oleynik
  2004-12-17 11:51   ` Piotras
@ 2004-12-17 14:15   ` Leo Whitman
  2005-04-30 16:18   ` Fabrice Bellard
  2 siblings, 0 replies; 6+ messages in thread
From: Leo Whitman @ 2004-12-17 14:15 UTC (permalink / raw)
  To: qemu-devel

Vladimir N. Oleynik wrote:

> O my God!
> This problem consists not in these flags, you looked corrections
> to the previous version of the ide emulator.
> I have made new hack specially for elimination of a Subject problem only.

And it works as expected - thank you.

> This correction adds waiting one (or zero, autorandomly) period before
> sending interruption after positioning before write. (see attach)
> But this a HACK, do not use after w2k install!

Can you explain why we shouldn't use this other than for win2k install?  
I'm not too familiar with the IDE emulation and am not sure what the 
consequences would be.  Of course, it is easy to disable at run time by 
just setting s->ide_set_irq_from_timer = 0.  I am just trying to 
understand more about this - what the real problem seems to be, what the 
danger of using this hack after install is, etc.

> Me other idea interested - to make asynchronous input-output.
> The received effect of elimination of a Subject problem was
> completely unexpected.

I will investigate your AIO solution as well - do you feel that it is 
more correct than this non-AIO patch?

> <snip>
>
Thank you,

Leo Whitman

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] Re: Windows 2000 disk full problem during install...
  2004-12-17 11:23 ` [Qemu-devel] Re: Windows 2000 disk full problem during install Vladimir N. Oleynik
  2004-12-17 11:51   ` Piotras
  2004-12-17 14:15   ` Leo Whitman
@ 2005-04-30 16:18   ` Fabrice Bellard
  2 siblings, 0 replies; 6+ messages in thread
From: Fabrice Bellard @ 2005-04-30 16:18 UTC (permalink / raw)
  To: qemu-devel

Hi,

I commited a patch to correct the Windows 2000 disk full problem based 
on Vladimir N. Oleynik idea. Use the option '-win2k-hack' when 
installing Windows 2000. The disk write speed will be slower but the 
disk full problem should disapear. Do not use this option after Windows 
is installed.

Tell me if you see improvements.

Fabrice.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Qemu-devel] Re: Windows 2000 disk full problem during install...
@ 2004-12-17 17:42 Vladimir N. Oleynik
  0 siblings, 0 replies; 6+ messages in thread
From: Vladimir N. Oleynik @ 2004-12-17 17:42 UTC (permalink / raw)
  To: whit74, qemu-devel

Leo,

 >> This correction adds waiting one (or zero, autorandomly) period before
 >> sending interruption after positioning before write. (see attach)
 >> But this a HACK, do not use after w2k install!

 > Can you explain why we shouldn't use this other than for win2k install?
 > I'm not too familiar with the IDE emulation and am not sure what the
 > consequences would be.  Of course, it is easy to disable at run time by
 > just setting s->ide_set_irq_from_timer = 0.  I am just trying to
 > understand more about this - what the real problem seems to be, what the
 > danger of using this hack after install is, etc.

The periods of the timer too big.
After that hack the host-system will be all more and to be slowed down
at the reference to fragments files.

 > I will investigate your AIO solution as well - do you feel that it is
 > more correct than this non-AIO patch?

Yes. But I offered idea which most likely works only for softmmu variant
and may be not works for qemu-fast/usermode.
I can`t test -fast variant and unlike -usermode.


--w
vodz

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Qemu-devel] Re: Windows 2000 disk full problem during install...
  2004-12-14 20:58 [Qemu-devel] " Leo Whitman
@ 2004-12-15  6:50 ` Janusz S. Bień
  0 siblings, 0 replies; 6+ messages in thread
From: Janusz S. Bień @ 2004-12-15  6:50 UTC (permalink / raw)
  To: qemu-devel

On Tue, 14 Dec 2004  Leo Whitman <whit74@verbmail.com> wrote:

[...]

> I'm willing to keep investigating the problem, but was wondering if
> any others had ideas in the meantime.

I will be glad to help by making some tests.

I am a novice user of QEMU, my main purpose is to use under Debian a
MS Windows commercial dictionary. I made about 10 attempts to install
Windows 2000 under Knoppix-based Debian, experimenting also with
different formats of disk images. 

My experiments were rather chaotic, but I was totally confused by the
fact the the installation process behaved in a semi-random way. Once I
got very far in the installation which failed in a definitely
different way then other attempts.

I am sorry to say that the following passage at
http://fabrice.bellard.free.fr/qemu/qemu-doc.html

        3.11.2.3 Windows 2000 disk full problems

        Currently (release 0.6.0) QEMU has a bug which gives a disk
        full error during installation of some releases of Windows
        2000. The workaround is to stop QEMU as soon as you notice
        that your disk image size is growing too fast (monitor it with
        ls -ls). Then relaunch QEMU to continue the installation. If
        you still experience the problem, relaunch QEMU again.

is not explicit enough for a novice like me (especially because I know
very little about MS Windows, before OpenOffice I used it to print
Word files, now I don't use it at all). In particular I don't know how
to avoid restarting Windows installation from the very beginning after
the relaunch of QEMU.

At the moment I have a usable dictionary under Debian Sarge qemu
0.6.0.dfsg.2-1, but it is not the dictionary I really want. One of the
problems I encountered is described at

        http://www.dad-answers.com/qemu-forum/viewtopic.php?t=145&sid=a595248431ff0e2f0987b001cbd2bf4c

but this is of course another thread.

Best regard

Janusz

-- 
                     ,   
dr hab. Janusz S. Bien, prof. UW -  Uniwersytet Warszawski (Katedra Lingwistyki Formalnej)
Prof. Janusz S. Bien - Warsaw Uniwersity (Chair of Formal Linguistics)
jsbien@mimuw.edu.pl, jsbien@uw.edu.pl, http://www.mimuw.edu.pl/~jsbien/, http://www.klf.uw.edu.pl

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-05-01 16:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <200412142142.iBELg2Qa009126@treas.simtreas.ru>
2004-12-17 11:23 ` [Qemu-devel] Re: Windows 2000 disk full problem during install Vladimir N. Oleynik
2004-12-17 11:51   ` Piotras
2004-12-17 14:15   ` Leo Whitman
2005-04-30 16:18   ` Fabrice Bellard
2004-12-17 17:42 Vladimir N. Oleynik
  -- strict thread matches above, loose matches on Subject: below --
2004-12-14 20:58 [Qemu-devel] " Leo Whitman
2004-12-15  6:50 ` [Qemu-devel] " Janusz S. Bień

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.