Skip to contentSkip to conversation

FXSAVE instruction emulation

DISCUSSION Abhinav Srivastava 2 participants 3 messages Jul 17, 2008 – Jul 18, 2008

lore
Share & tools
lore
#0 lore raw

Hi there,

I am using Xen-3.2 on Intel-VT hardware. My guest VM is running Linux kernel 2.6.21 in HVM mode.

I was trying to do some emulation from the hypervisor and my code was failing to emulate FXSAVE instructions. I looked on the mailing list and found the following patch that does that:

"[Xen-devel] [PATCH 2/4] Enable VirtualPC 2007 run on top of XEN: fxsave" from [Su, Disheng]

However, when I applied this patch it is still not working. I am going to the default case of this patch that directly calls "goto cannot_emulate". When I printed the instruction it is like this: 0f ae e8. The value of modrm_reg that patch uses to check which case statement to execute is 05. The patch only handles the value 0.

Could some explain what does this mean? And, how to solve this problem?

Any help would be appreciated.

Thanks,
Abhinav

Explore your hobbies and interests. Go to http://in.promos.yahoo.com/groups/

#1 lore raw
Quoted 9 lines · Abhinav Srivastava

Hi there,

I am using Xen-3.2 on Intel-VT hardware. My guest VM is running Linux kernel 2.6.21 in HVM mode.

I was trying to do some emulation from the hypervisor and my code was failing to emulate FXSAVE instructions. I looked on the mailing list and found the following patch that does that:

Quoted 9 lines

"[Xen-devel] [PATCH 2/4] Enable VirtualPC 2007 run on top of XEN:
fxsave" from [Su, Disheng]

However, when I applied this patch it is still not working. I am going to the default case of this patch that directly calls "goto cannot_emulate". When I printed the instruction it is like this: 0f ae e8. The value of modrm_reg that patch uses to check which case statement to execute is 05. The patch only handles the value 0.

"0f ae e8" is the lfence instruction. It isn't handled in this patch... You can refer to Intel Software Developer Manual Vol.2B A.4.2 for detail information.

Quoted 3 lines

Could some explain what does this mean? And, how to solve this problem?

Don't why you need to emulate this instruction...
Do you want to emulate instructions step by step?
How about bypass this "lfence"?

Quoted 7 lines

Any help would be appreciated.

Thanks,
Abhinav

Quoted 7 lines

Explore your hobbies and interests. Go to
http://in.promos.yahoo.com/groups/

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

Best Regards,
Disheng, Su

#2 lore raw

Yes, I am trying to emulate instructions step by step in some scenarios and I am getting this instruction. I tried skipping this instruction but it did not work. Do you know any patch or workaround for that?

Thanks,
Abhinav

Quoted 62 lines · Disheng

From: Su, Disheng <[email protected]>
Subject: RE: [Xen-devel] FXSAVE instruction emulation
To: [email protected], [email protected]
Cc: "Su, Disheng" <[email protected]>
Date: Friday, 18 July, 2008, 8:51 AM

Quoted 3 lines · Abhinav Srivastava

Hi there,

I am using Xen-3.2 on Intel-VT hardware. My guest VM

is running Linux

Quoted 3 lines

kernel 2.6.21 in HVM mode.

I was trying to do some emulation from the hypervisor

and my code was

Quoted 1 line

failing to emulate FXSAVE instructions. I looked on

the mailing list

Quoted 3 lines

and found the following patch that does that:

"[Xen-devel] [PATCH 2/4] Enable VirtualPC 2007

run on top of XEN:

Quoted 3 lines

fxsave" from [Su, Disheng]

However, when I applied this patch it is still not

working. I am

Quoted 1 line

going to the default case of this patch that directly

calls "goto

Quoted 1 line

cannot_emulate". When I printed the instruction

it is like this: 0f

Quoted 1 line

ae e8. The value of modrm_reg that patch uses to check

which case

Quoted 1 line

statement to execute is 05. The patch only handles the

value 0.

Quoted 1 line

"0f ae e8" is the lfence instruction. It
isn't handled in this patch...
You can refer to Intel Software Developer Manual Vol.2B A.4.2 for detail
information.

Quoted 1 line

Could some explain what does this mean? And, how to

solve this

Quoted 2 lines

problem?

Don't why you need to emulate this instruction... Do you want to emulate instructions step by step? How about bypass this "lfence"?

Quoted 7 lines

Any help would be appreciated.

Thanks,
Abhinav

Quoted 7 lines

Explore your hobbies and interests. Go to
http://in.promos.yahoo.com/groups/

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

Quoted 7 lines

Best Regards,
Disheng, Su

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

Bring your gang together. Do your thing. Find your favourite Yahoo! group at http://in.promos.yahoo.com/groups/