Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
40ece7c7
Commit
40ece7c7
authored
Aug 18, 2010
by
Avi Kivity
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
KVM: x86 emulator: implement RET imm16 (opcode C2)
Signed-off-by:
Avi Kivity
<
avi@redhat.com
>
parent
b250e605
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
1 deletion
+18
-1
arch/x86/kvm/emulate.c
arch/x86/kvm/emulate.c
+18
-1
No files found.
arch/x86/kvm/emulate.c
View file @
40ece7c7
...
@@ -2249,6 +2249,21 @@ static int em_call_far(struct x86_emulate_ctxt *ctxt)
...
@@ -2249,6 +2249,21 @@ static int em_call_far(struct x86_emulate_ctxt *ctxt)
return
X86EMUL_CONTINUE
;
return
X86EMUL_CONTINUE
;
}
}
static
int
em_ret_near_imm
(
struct
x86_emulate_ctxt
*
ctxt
)
{
struct
decode_cache
*
c
=
&
ctxt
->
decode
;
int
rc
;
c
->
dst
.
type
=
OP_REG
;
c
->
dst
.
addr
.
reg
=
&
c
->
eip
;
c
->
dst
.
bytes
=
c
->
op_bytes
;
rc
=
emulate_pop
(
ctxt
,
ctxt
->
ops
,
&
c
->
dst
.
val
,
c
->
op_bytes
);
if
(
rc
!=
X86EMUL_CONTINUE
)
return
rc
;
register_address_increment
(
c
,
&
c
->
regs
[
VCPU_REGS_RSP
],
c
->
src
.
val
);
return
X86EMUL_CONTINUE
;
}
#define D(_y) { .flags = (_y) }
#define D(_y) { .flags = (_y) }
#define N D(0)
#define N D(0)
#define G(_f, _g) { .flags = ((_f) | Group), .u.group = (_g) }
#define G(_f, _g) { .flags = ((_f) | Group), .u.group = (_g) }
...
@@ -2394,7 +2409,9 @@ static struct opcode opcode_table[256] = {
...
@@ -2394,7 +2409,9 @@ static struct opcode opcode_table[256] = {
X8
(
D
(
DstReg
|
SrcImm
|
Mov
)),
X8
(
D
(
DstReg
|
SrcImm
|
Mov
)),
/* 0xC0 - 0xC7 */
/* 0xC0 - 0xC7 */
D
(
ByteOp
|
DstMem
|
SrcImm
|
ModRM
),
D
(
DstMem
|
SrcImmByte
|
ModRM
),
D
(
ByteOp
|
DstMem
|
SrcImm
|
ModRM
),
D
(
DstMem
|
SrcImmByte
|
ModRM
),
N
,
D
(
ImplicitOps
|
Stack
),
N
,
N
,
I
(
ImplicitOps
|
Stack
|
SrcImmU16
,
em_ret_near_imm
),
D
(
ImplicitOps
|
Stack
),
N
,
N
,
D
(
ByteOp
|
DstMem
|
SrcImm
|
ModRM
|
Mov
),
D
(
DstMem
|
SrcImm
|
ModRM
|
Mov
),
D
(
ByteOp
|
DstMem
|
SrcImm
|
ModRM
|
Mov
),
D
(
DstMem
|
SrcImm
|
ModRM
|
Mov
),
/* 0xC8 - 0xCF */
/* 0xC8 - 0xCF */
N
,
N
,
N
,
D
(
ImplicitOps
|
Stack
),
N
,
N
,
N
,
D
(
ImplicitOps
|
Stack
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment