All of lore.kernel.org
 help / color / mirror / Atom feed
* ms_sysenter_eip zero value
@ 2011-01-23 11:25 Matteo Signorini
  2011-01-26 11:24 ` Avi Kivity
  0 siblings, 1 reply; 3+ messages in thread
From: Matteo Signorini @ 2011-01-23 11:25 UTC (permalink / raw)
  To: kvm

Hi,

I'm having some problems understanding the sysenter instruction.
As far as I know, in order to successfully call the sysenter instruction,
MSR_IA32_SYSENTER_CS and MSR_IA32_SYSENTER_EIP registers have to be
correctly set.

So I printed the value of such registers while the VM was running but
the output is 0 for both.

now:

1) I'm having this problem ONLY with the Intel CPU (vmx.c source code).
When I run the same code on an AMD CPU (svm.c source code)
MSR_IA32_SYSENTER_EIP and MSR_IA32_SYSENTER_CS contain nonzero values.

2) I am 100% sure the guest is not executing an int80 but a sysenter

so there is something here I can't understand...
please help me solving this problem.

thank you for enlightening me on this issue,
Matteo

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ms_sysenter_eip zero value
  2011-01-23 11:25 ms_sysenter_eip zero value Matteo Signorini
@ 2011-01-26 11:24 ` Avi Kivity
  2011-01-27 13:01   ` Matteo
  0 siblings, 1 reply; 3+ messages in thread
From: Avi Kivity @ 2011-01-26 11:24 UTC (permalink / raw)
  To: Matteo Signorini; +Cc: kvm

On 01/23/2011 01:25 PM, Matteo Signorini wrote:
> Hi,
>
> I'm having some problems understanding the sysenter instruction.
> As far as I know, in order to successfully call the sysenter instruction,
> MSR_IA32_SYSENTER_CS and MSR_IA32_SYSENTER_EIP registers have to be
> correctly set.
>
> So I printed the value of such registers while the VM was running but
> the output is 0 for both.
>
> now:
>
> 1) I'm having this problem ONLY with the Intel CPU (vmx.c source code).
> When I run the same code on an AMD CPU (svm.c source code)
> MSR_IA32_SYSENTER_EIP and MSR_IA32_SYSENTER_CS contain nonzero values.
>
> 2) I am 100% sure the guest is not executing an int80 but a sysenter
>
> so there is something here I can't understand...
> please help me solving this problem.

How are you printing out the values? Maybe the problem is there?

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ms_sysenter_eip zero value
  2011-01-26 11:24 ` Avi Kivity
@ 2011-01-27 13:01   ` Matteo
  0 siblings, 0 replies; 3+ messages in thread
From: Matteo @ 2011-01-27 13:01 UTC (permalink / raw)
  To: Avi Kivity; +Cc: kvm

On 01/26/2011 12:24 PM, Avi Kivity wrote:
> On 01/23/2011 01:25 PM, Matteo Signorini wrote:
>> Hi,
>>
>> I'm having some problems understanding the sysenter instruction.
>> As far as I know, in order to successfully call the sysenter 
>> instruction,
>> MSR_IA32_SYSENTER_CS and MSR_IA32_SYSENTER_EIP registers have to be
>> correctly set.
>>
>> So I printed the value of such registers while the VM was running but
>> the output is 0 for both.
>>
>> now:
>>
>> 1) I'm having this problem ONLY with the Intel CPU (vmx.c source code).
>> When I run the same code on an AMD CPU (svm.c source code)
>> MSR_IA32_SYSENTER_EIP and MSR_IA32_SYSENTER_CS contain nonzero values.
>>
>> 2) I am 100% sure the guest is not executing an int80 but a sysenter
>>
>> so there is something here I can't understand...
>> please help me solving this problem.
>
> How are you printing out the values? Maybe the problem is there?
>

arguably there is something I'm doing wrong but I don't think it's the  print format.

Let me explain what I'm doing. I have modified a little bit the  "cpu_dump_state" function called by the monitor's "do_info_registers"  function in order to print  an additional element and precisely the env->sysenter_cs/eip value.

Now, as stated before I don't think the problem is the format because if  I  use the same code on an AMD machine, the value printed during the VM  execution is a  non zero value so I'm wondering why this difference from amd and intel?

Matteo



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-01-27 13:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-23 11:25 ms_sysenter_eip zero value Matteo Signorini
2011-01-26 11:24 ` Avi Kivity
2011-01-27 13:01   ` Matteo

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.