public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: Chris Lalancette <clalance-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: [PATCH]: Fix memory corruption in-kernel IOAPIC	emulation
Date: Wed, 30 Jan 2008 18:54:34 +0200	[thread overview]
Message-ID: <47A0ABCA.4020206@qumranet.com> (raw)
In-Reply-To: <47A0A830.8040900-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

Chris Lalancette wrote:
> Avi Kivity wrote:
>   
>> Excellent catch, but the fix is wrong.  Instead of partially restoring 
>> the ioapic state in the kernel, you should fully save it in qemu.
>>
>> This is a trap that many fall into: considering kvm and qemu as one 
>> entity and making sure they work well together.  We need to make sure 
>> that kvm and libkvm are useful for other userspace programs as well.
>>
>>     
>
> Actually, let me ask a question here.  It seems to me that there are two
> ways I could go about this:
>
> 1)  Change the save protocol so that it saves the relevant information
> (i.e. base_address and irr), and then the restore protocol so it
> actually pulls this stuff off the wire.  This solution seems more
> "right" to me, but it has the downside that we are changing the
> over-the-wire information, which will break migration between old and
> new versions of qemu.
>
>   

qemu supports backwards compatible changes to the protocol via the 
version field.

> 2)  Just change the restore protocol so that we properly fill in the
> missing fields with real, hard-coded values instead of just random
> memory.  This has the benefit that it doesn't change the protocol, but
> has the downside that we won't reflect changes to base_address or irr
> 100% properly.  In practice, this doesn't seem like a big deal since
> there doesn't currently seem to be a way to change base_address anyway,
> and losing the irr doesn't seem to be catastrophic (although I'm not
> 100% certain about that).
>
> The attached patch implements 2); does anyone have an opinion on which
> way to go here?
>   

I prefer doing a full save/restore, since we don't know what guests 
depend on.

-- 
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

  parent reply	other threads:[~2008-01-30 16:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-29 23:24 [PATCH]: Fix memory corruption in-kernel IOAPIC emulation Chris Lalancette
     [not found] ` <479FB5C6.6060204-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2008-01-30 10:04   ` Avi Kivity
     [not found]     ` <47A04BB3.7020302-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2008-01-30 13:28       ` Chris Lalancette
2008-01-30 16:39       ` Chris Lalancette
     [not found]         ` <47A0A830.8040900-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2008-01-30 16:54           ` Avi Kivity [this message]
2008-01-30 21:03   ` Chris Lalancette
     [not found]     ` <47A0E613.7080408-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2008-01-31  7:24       ` Avi Kivity
     [not found]         ` <47A177BE.6020300-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2008-02-05 15:58           ` Chris Lalancette

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=47A0ABCA.4020206@qumranet.com \
    --to=avi-atkuwr5tajbwk0htik3j/w@public.gmane.org \
    --cc=clalance-H+wXaHxf7aLQT0dZR+AlfA@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