From: Avi Kivity <avi@qumranet.com>
To: Guillaume Thouvenin <guillaume.thouvenin@ext.bull.net>
Cc: "kvm@vger.kernel.org" <kvm@vger.kernel.org>,
Anthony Liguori <aliguori@linux.vnet.ibm.com>,
Mohammed Gamal <m.gamal005@gmail.com>,
"Kamble, Nitin A" <nitin.a.kamble@intel.com>,
Marcelo Tosatti <mtosatti@redhat.com>,
laurent.vivier@bull.net, Alexander Graf <alex@csgraf.de>
Subject: Re: [Patch 6/7] RealMode: Adds support for mov seg, r (0x8e) instruction
Date: Tue, 27 May 2008 13:12:23 +0300 [thread overview]
Message-ID: <483BDE87.4000407@qumranet.com> (raw)
In-Reply-To: <20080527101923.77e62e21@frecb000711.frec.bull.fr>
Guillaume Thouvenin wrote:
> Adds support for mov r, sreg (0x8c) instruction.
> We also introduce a table called vcpu_sreg_table[] to avoid an
> unreadable switch. This table is also used to emulate instruction 0X8c.
>
>
> +/*
> + * This table is used by instruction like Ox8c to avoid long ugly switch.
> + * The order is important, index is given by c->modrm_reg.
> + */
> +static u16 vcpu_sreg_table[] = {
> + VCPU_SREG_ES,
> + VCPU_SREG_CS,
> + VCPU_SREG_SS,
> + VCPU_SREG_DS,
> + VCPU_SREG_FS,
> + VCPU_SREG_GS,
> +};
> +
>
>
'static u16' -> 'static const u8'
Also, you can make the ordering explicit:
static const u8 vcpu_sreg_table[] = {
[0]: VCPU_SREG_ES,
...
};
--
error compiling committee.c: too many arguments to function
next parent reply other threads:[~2008-05-27 10:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20080527084115.2b0cfae1@frecb000711.frec.bull.fr>
[not found] ` <20080527101923.77e62e21@frecb000711.frec.bull.fr>
2008-05-27 10:12 ` Avi Kivity [this message]
2008-05-27 12:49 ` [Patch 6/7] RealMode: Adds support for mov seg, r (0x8e) instruction Guillaume Thouvenin
[not found] ` <20080527101933.68cdc7de@frecb000711.frec.bull.fr>
2008-05-27 10:14 ` [Patch 7/7] RealMode: Adds support for mov r, sreg (0x8c) instruction Avi Kivity
2008-05-27 13:05 ` Guillaume Thouvenin
2008-05-27 13:13 ` Guillaume Thouvenin
[not found] ` <20080527101908.749cff41@frecb000711.frec.bull.fr>
2008-05-27 18:32 ` [Patch 4/7] RealMode: Adds support for jmp far 0xea Anthony Liguori
2008-05-28 6:30 ` 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=483BDE87.4000407@qumranet.com \
--to=avi@qumranet.com \
--cc=alex@csgraf.de \
--cc=aliguori@linux.vnet.ibm.com \
--cc=guillaume.thouvenin@ext.bull.net \
--cc=kvm@vger.kernel.org \
--cc=laurent.vivier@bull.net \
--cc=m.gamal005@gmail.com \
--cc=mtosatti@redhat.com \
--cc=nitin.a.kamble@intel.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.