public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: "S.Çağlar Onur" <caglar-caicS1wCkhO6A22drWdTBw@public.gmane.org>
To: kvm-devel <kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Subject: [PATCH] HSM violation
Date: Sun, 23 Sep 2007 12:12:38 +0300	[thread overview]
Message-ID: <200709231212.42677.caglar@pardus.org.tr> (raw)

Hi;

With very recent kernels libata throws lots of errors while booting and it 
makes booting really really slow, while searching the solution i found 
following bug reports [1],[2] and following commit [3].

Following diff against kvm-userspace HEAD solves this issue for kvm. This 
chunk of code is directly copied from qemu CVS so according to CVS logs 
credit belongs to Brandon Philips.

diff --git a/qemu/hw/ide.c b/qemu/hw/ide.c
index 190f074..6967d33 100644
--- a/qemu/hw/ide.c
+++ b/qemu/hw/ide.c
@@ -586,7 +586,8 @@ static void ide_transfer_start(IDEState *s, uint8_t *buf, 
int size,
     s->end_transfer_func = end_transfer_func;
     s->data_ptr = buf;
     s->data_end = buf + size;
-    s->status |= DRQ_STAT;
+    if (!(s->status & ERR_STAT))
+        s->status |= DRQ_STAT;
 }
 
 static void ide_transfer_stop(IDEState *s)
@@ -1805,6 +1806,7 @@ static void ide_ioport_write(void *opaque, uint32_t 
addr, uint32_t val)
             /* overlapping commands not supported */
             if (s->feature & 0x02)
                 goto abort_cmd;
+            s->status = READY_STAT;
             s->atapi_dma = s->feature & 1;
             s->nsector = 1;
             ide_transfer_start(s, s->io_buffer, ATAPI_PACKET_SIZE, 



[1] https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.22/+bug/120316
[2] https://bugzilla.novell.com/show_bug.cgi?id=291775
[3] http://cvs.savannah.gnu.org/viewvc/qemu/hw/ide.c?root=qemu&r1=1.63&r2=1.64

Cheers
-- 
S.Çağlar Onur <caglar@pardus.org.tr>
http://cekirdek.pardus.org.tr/~caglar/

Linux is like living in a teepee. No Windows, no Gates and an Apache in house!

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

             reply	other threads:[~2007-09-23  9:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-23  9:12 S.Çağlar Onur [this message]
     [not found] ` <200709231212.42677.caglar-caicS1wCkhO6A22drWdTBw@public.gmane.org>
2007-09-23  9:23   ` [PATCH] HSM violation Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200709231212.42677.caglar@pardus.org.tr \
    --to=caglar-caics1wckho6a22drwdtbw@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox