public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@qumranet.com>
To: Glauber Costa <glommer@gmail.com>
Cc: Mohammed Gamal <m.gamal005@gmail.com>,
	Glauber Costa <gcosta@redhat.com>,
	kvm@vger.kernel.org, virtualization@lists.linux-foundation.org
Subject: Re: [PATCH] Do not calculate linear rip in emulation failure report
Date: Fri, 13 Jun 2008 22:46:27 +0300	[thread overview]
Message-ID: <4852CE93.9020104@qumranet.com> (raw)
In-Reply-To: <5d6222a80806131037u245c66ev902fadaa6d5c4605@mail.gmail.com>

Glauber Costa wrote:
>>>        unsigned long rip = vcpu->arch.rip;
>>>        unsigned long rip_linear;
>>>
>>> -       rip_linear = rip + get_segment_base(vcpu, VCPU_SREG_CS);
>>> -
>>>        if (reported)
>>>                return;
>>>
>>> +       rip_linear = rip + get_segment_base(vcpu, VCPU_SREG_CS);
>>> +
>>>        emulator_read_std(rip_linear, (void *)opcodes, 4, vcpu);
>>>
>>>        printk(KERN_ERR "emulation failed (%s) rip %lx %02x %02x %02x %02x\n",
>>> --
>>> 1.5.4.5
>>>       
>> Why return immediately? Shouldn't we report on failure whenever it
>> occurs (i.e. by rather removing the if condition)?
>>
>>     
> the kernel ring buffer would be full very quickly, and this is not a
> strong enough reason to do that ;-)
> Most of the messages would be the same.
>
> What I do think would be useful, and even planned to do (just have
> more priority things waiting), is to move
> the checking field to the vcpu struct. With the current setup, if you
> kill your guest, set things up again, and run it,
> you won't see any messages, even if it fails.
>
> So the warning should really be once in the lifetime of the virtual
> machine, not once in the lifetime of the kvm module.
>
>
>   

I've changed it to use printk_ratelimit().

-- 
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.


  reply	other threads:[~2008-06-13 19:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-10 13:46 [PATCH] Do not calculate linear rip in emulation failure report Glauber Costa
2008-06-12 13:00 ` Avi Kivity
2008-06-13 17:33 ` Mohammed Gamal
2008-06-13 17:37   ` Glauber Costa
2008-06-13 19:46     ` Avi Kivity [this message]
2008-06-13 19:51       ` Glauber Costa
2008-06-14  2:14         ` Avi Kivity
2008-06-14  3:43           ` Glauber Costa
2008-06-14  5:01             ` 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=4852CE93.9020104@qumranet.com \
    --to=avi@qumranet.com \
    --cc=gcosta@redhat.com \
    --cc=glommer@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=m.gamal005@gmail.com \
    --cc=virtualization@lists.linux-foundation.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