From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: nitin.a.kamble-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org
Cc: kvm-devel
<kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>,
Laurent Vivier <Laurent.Vivier-6ktuUTfB/bM@public.gmane.org>
Subject: Re: [PATCH] (big) real mode emulation - or instruction correction
Date: Sat, 15 Sep 2007 10:33:35 +0300 [thread overview]
Message-ID: <46EB8ACF.1030705@qumranet.com> (raw)
In-Reply-To: <1189725983.28738.15.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
Nitin A Kamble wrote:
> Hi Avi,
> This patch corrects the emulation of the instruction "or" for opcodes
> 0xc & 0cd.
> Please Apply.
>
> + case 0x0c: /* or al imm8 */
> + dst.type = OP_REG;
> + dst.ptr = &_regs[VCPU_REGS_RAX];
> + dst.val = *(u8 *)dst.ptr;
> + dst.bytes = 1;
> + dst.orig_val = dst.val;
> + goto or;
> + case 0x0d: /* or ax imm16, or eax imm32 */
> + dst.type = OP_REG;
> + dst.bytes = op_bytes;
> + dst.ptr = &_regs[VCPU_REGS_RAX];
> + if (op_bytes == 2)
> + dst.val = *(u16 *)dst.ptr;
> + else
> + dst.val = *(u32 *)dst.ptr;
> + dst.orig_val = dst.val;
> + goto or;
Instead of repeating this code for all instructions that use the
accumulator implicitly, we should define a bit in the decoder flags
(like DstAcc) so that all the code is consolidated in the decoder. This
applies to 'sub imm' and 'cmp correction', and probably others as well.
--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
next prev parent reply other threads:[~2007-09-15 7:33 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1188349132.9270.7.camel@lnitindesktop.sc.intel.com>
[not found] ` <20070829020005.GA32726@jim.sh>
[not found] ` <20070829020005.GA32726-lSbMZ+N7itA@public.gmane.org>
2007-09-01 14:10 ` [PATCH] (big) real mode emulation - push imm8 Avi Kivity
[not found] ` <1188349132.9270.7.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2007-09-12 7:54 ` Avi Kivity
[not found] ` <46E79B2A.60506-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-09-12 8:16 ` Laurent Vivier
[not found] ` <46E7A073.6030601-6ktuUTfB/bM@public.gmane.org>
2007-09-12 8:28 ` Avi Kivity
[not found] ` <46E7A317.208-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-09-13 0:36 ` Kamble, Nitin A
[not found] ` <47DF6B76DC88174EB18F2393E76FC46EB20712F4@scsmsx412.amr.corp.intel.com>
[not found] ` <47DF6B76DC88174EB18F2393E76FC46EB20712F4-1a9uaKK1+wJcIJlls4ac1rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-09-13 18:15 ` Nitin A Kamble
[not found] ` <1189707324.28738.0.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2007-09-13 18:28 ` Nitin A Kamble
[not found] ` <1189708119.28738.5.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2007-09-15 7:13 ` Avi Kivity
2007-09-13 18:55 ` [PATCH] (big) real mode emulation - jump conditional relative Nitin A Kamble
[not found] ` <1189709705.28738.9.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2007-09-13 20:48 ` Anthony Liguori
[not found] ` <46E9A215.9020304-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
2007-09-13 20:53 ` Kamble, Nitin A
2007-09-13 23:18 ` [PATCH] (big) real mode emulation - jump conditional short relative Nitin A Kamble
[not found] ` <1189725509.28738.12.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2007-09-13 23:26 ` [PATCH] (big) real mode emulation - or instruction correction Nitin A Kamble
[not found] ` <1189725983.28738.15.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2007-09-13 23:36 ` [PATCH] (big) real mode emulation - sub imm Nitin A Kamble
[not found] ` <1189726560.28738.18.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2007-09-13 23:47 ` [PATCH] (big) real mode emulation - cmp correction Nitin A Kamble
[not found] ` <1189727241.28738.21.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2007-09-13 23:54 ` [PATCH] (big) real mode emulation - mov correction Nitin A Kamble
[not found] ` <1189727640.28738.24.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2007-09-14 0:02 ` [PATCH] (big) real mode emulation - lea Nitin A Kamble
[not found] ` <1189728138.28738.27.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2007-09-14 0:15 ` [PATCH] (big) real mode emulation - mov imm Nitin A Kamble
[not found] ` <1189728902.28738.31.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2007-09-14 0:22 ` [PATCH] (big) real mode emulation - initialization fixes Nitin A Kamble
[not found] ` <1189729357.28738.33.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2007-09-14 0:40 ` [PATCH] (big) real mode emulation - popf Nitin A Kamble
[not found] ` <1189730445.28738.36.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2007-09-14 18:20 ` [PATCH] (big) real mode emulation - jmp abs Nitin A Kamble
[not found] ` <1189794045.28738.47.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2007-09-14 18:43 ` [PATCH] (big) real mode emulation - inc reg Nitin A Kamble
[not found] ` <1189795407.28738.50.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2007-09-14 18:50 ` [PATCH] (big) real mode emulation - dec reg Nitin A Kamble
[not found] ` <1189795841.28738.53.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2007-09-18 22:14 ` [PATCH] (big) real mode emulation - correct code placement Nitin A Kamble
[not found] ` <1190153661.4620.3.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2007-09-19 12:12 ` Avi Kivity
2007-09-15 7:39 ` [PATCH] (big) real mode emulation - inc reg Avi Kivity
2007-09-15 7:41 ` [PATCH] (big) real mode emulation - jmp abs Avi Kivity
2007-09-15 7:45 ` [PATCH] (big) real mode emulation - popf Avi Kivity
2007-09-14 17:08 ` [PATCH] (big) real mode emulation - initialization fixes Avi Kivity
[not found] ` <46EAC01F.7040609-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-09-14 17:33 ` Nitin A Kamble
[not found] ` <1189791233.28738.42.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2007-09-14 17:42 ` Avi Kivity
2007-09-15 7:43 ` Avi Kivity
2007-09-15 7:48 ` [PATCH] (big) real mode emulation - mov imm Avi Kivity
2007-09-15 7:36 ` [PATCH] (big) real mode emulation - lea Avi Kivity
2007-09-15 7:33 ` Avi Kivity [this message]
2007-09-15 7:29 ` [PATCH] (big) real mode emulation - jump conditional relative 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=46EB8ACF.1030705@qumranet.com \
--to=avi-atkuwr5tajbwk0htik3j/w@public.gmane.org \
--cc=Laurent.Vivier-6ktuUTfB/bM@public.gmane.org \
--cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=nitin.a.kamble-ral2JQCrhuEAvxtiuMwx3w@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