From: Gleb Natapov <gleb@redhat.com>
To: Jan Kiszka <jan.kiszka@web.de>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH] set correct CS seg limit and flags on sipi
Date: Sun, 13 Sep 2009 14:50:39 +0300 [thread overview]
Message-ID: <20090913115039.GP22885@redhat.com> (raw)
In-Reply-To: <4AACD8A9.8090201@web.de>
On Sun, Sep 13, 2009 at 01:34:01PM +0200, Jan Kiszka wrote:
> Gleb Natapov wrote:
> > TCG works with incorrect values somehow.
>
> TCG doesn't care about limits and has only few segment type checks.
I already noticed that TCG implement some non existent CPU somewhat
similar to x86.
>
> Some link to the corresponding spec section would be nice-to-have in
> this commit message. I was looking for a reference what registers SIPIs
> actually modify and how, but there seems to be none, at least in the
> System Programming Guide.
>
This commit just fix obvious bug that caused SIPI to put garbage into
segment's flags. I don't have link to spec only common sense.
> >
> > Signed-off-by: Gleb Natapov <gleb@redhat.com>
> > diff --git a/hw/apic.c b/hw/apic.c
> > index 2c414c1..c89008e 100644
> > --- a/hw/apic.c
> > +++ b/hw/apic.c
> > @@ -516,7 +516,7 @@ void apic_sipi(CPUState *env)
> >
> > env->eip = 0;
> > cpu_x86_load_seg_cache(env, R_CS, s->sipi_vector << 8, s->sipi_vector << 12,
> > - 0xffff, 0);
> > + env->segs[R_CS].limit, env->segs[R_CS].flags);
> > env->halted = 0;
> > s->wait_for_sipi = 0;
> > }
> > --
> > Gleb.
>
> Jan
>
>
--
Gleb.
next prev parent reply other threads:[~2009-09-13 11:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-13 8:19 [Qemu-devel] [PATCH] set correct CS seg limit and flags on sipi Gleb Natapov
2009-09-13 11:34 ` [Qemu-devel] " Jan Kiszka
2009-09-13 11:50 ` Gleb Natapov [this message]
2009-09-13 12:02 ` Jan Kiszka
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=20090913115039.GP22885@redhat.com \
--to=gleb@redhat.com \
--cc=jan.kiszka@web.de \
--cc=qemu-devel@nongnu.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 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.