From: Paolo Bonzini <pbonzini@redhat.com>
To: Avi Kivity <avi@redhat.com>
Cc: kvm@vger.kernel.org, Marcelo Tosatti <mtosatti@redhat.com>
Subject: Re: [PATCH] KVM: i8259: initialize IMR to 0xff on reset
Date: Mon, 30 Aug 2010 15:36:16 +0200 [thread overview]
Message-ID: <4C7BB3D0.3050906@redhat.com> (raw)
In-Reply-To: <1283160031-13505-1-git-send-email-avi@redhat.com>
On 08/30/2010 11:20 AM, Avi Kivity wrote:
> Otherwise, a wily interrupt can slip through while the guest isn't prepared
> for it (and while the irq base is zero).
>
> Signed-off-by: Avi Kivity<avi@redhat.com>
> ---
> arch/x86/kvm/i8259.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/x86/kvm/i8259.c b/arch/x86/kvm/i8259.c
> index 8d10c06..5de9ee0 100644
> --- a/arch/x86/kvm/i8259.c
> +++ b/arch/x86/kvm/i8259.c
> @@ -275,7 +275,7 @@ void kvm_pic_reset(struct kvm_kpic_state *s)
>
> s->last_irr = 0;
> s->irr = 0;
> - s->imr = 0;
> + s->imr = 0xff;
> s->isr = 0;
> s->isr_ack = 0xff;
> s->priority_add = 0;
Sounds sane, but the datasheet says explicitly that upon reset "The
Interrupt Mask Register is cleared"... (FWIW, I checked because it
looked like QEMU and Xen also had the same behavior of setting IMR to zero).
Paolo
next prev parent reply other threads:[~2010-08-30 13:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-30 9:20 [PATCH] KVM: i8259: initialize IMR to 0xff on reset Avi Kivity
2010-08-30 9:22 ` Avi Kivity
2010-08-30 13:36 ` Paolo Bonzini [this message]
2010-08-30 13:53 ` 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=4C7BB3D0.3050906@redhat.com \
--to=pbonzini@redhat.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
/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 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.