Skip to contentSkip to conversation

KVM: x86 emulator mark VMMCALL and LMSW as privileged

PATCH In review Gleb Natapov 2 participants 5 messages Mar 3, 2010 – Mar 7, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 KVM: x86 emulator mark VMMCALL and LMSW as privileged

LMSW is present in both group tables. It was marked privileged only in one of them. Intel analog of VMMCALL is already marked privileged.

arch/x86/kvm/emulate.c +2 -2
index 3d2e115..3af63d2 100644
@@ -363,9 +363,9 @@ static u32 group_table[] = {
 
 static u32 group2_table[] = {
 	[Group7*8] =
-	SrcNone | ModRM | Priv, 0, 0, SrcNone | ModRM,
+	SrcNone | ModRM | Priv, 0, 0, SrcNone | ModRM | Priv,
 	SrcNone | ModRM | DstMem | Mov, 0,
-	SrcMem16 | ModRM | Mov, 0,
+	SrcMem16 | ModRM | Mov | Priv, 0,
 	[Group9*8] =
 	0, 0, 0, 0, 0, 0, 0, 0,
 };

--
Gleb.

#1 lore raw
Quoted 4 lines · Gleb Natapov

LMSW is present in both group tables. It was marked privileged only in one of them. Intel analog of VMMCALL is already marked privileged.

Both VMCALL and VMMCALL are unprivileged.

Signature · 1 line
error compiling committee.c: too many arguments to function
#2 lore raw
Quoted 7 lines · Avi Kivity
Quoted 3 lines · Gleb Natapov

LMSW is present in both group tables. It was marked privileged only in one of them. Intel analog of VMMCALL is already marked privileged.

Both VMCALL and VMMCALL are unprivileged.

But _we_ do not allow them in CPL!=0.

--
Gleb.

#3 lore raw
Quoted 4 lines · Gleb Natapov
Quoted 2 lines · Avi Kivity

On 03/03/2010 05:53 PM, Gleb Natapov wrote:

Quoted 9 lines
Quoted 7 lines
Quoted 4 lines

LMSW is present in both group tables. It was marked privileged only in one of them. Intel analog of VMMCALL is already marked privileged.

Both VMCALL and VMMCALL are unprivileged.

But _we_ do not allow them in CPL!=0.

Then that should be done outside the emulator.

Signature · 1 line
error compiling committee.c: too many arguments to function
#4 lore raw
Quoted 12 lines · Avi Kivity
Quoted 8 lines · Gleb Natapov
Quoted 6 lines · Avi Kivity
Quoted 3 lines · Gleb Natapov

LMSW is present in both group tables. It was marked privileged only in one of them. Intel analog of VMMCALL is already marked privileged.

Both VMCALL and VMMCALL are unprivileged.

But _we_ do not allow them in CPL!=0.

Then that should be done outside the emulator.

As long as KVM is the only user of the emulator it doesn't matter.

--
Gleb.