Re: [PATCH] svm: implement NEXTRIPsave SVM feature

2010-04-11 Thread Alexander Graf
On 11.04.2010, at 23:07, Andre Przywara wrote: > On SVM we set the instruction length of skipped instructions > to hard-coded, well known values, which could be wrong when (bogus, > but valid) prefixes (REX, segment override) are used. > Newer AMD processors (Fam10h 45nm and better, aka. PhenomII

Re: [PATCH] svm: implement NEXTRIPsave SVM feature

2010-04-11 Thread Alexander Graf
On 11.04.2010, at 23:40, Alexander Graf wrote: > > /* Either adds offset n to the instruction counter or takes the next >instruction pointer from the vmcb if the CPU supports it */ > > static u64 svm_next_rip(struct kvm_vcpu *vcpu, int add) > { >if (svm->vmcb->control.next_rip != 0)

Re: [PATCH] svm: implement NEXTRIPsave SVM feature

2010-04-11 Thread Andre Przywara
Alexander Graf wrote: On 11.04.2010, at 23:40, Alexander Graf wrote: /* Either adds offset n to the instruction counter or takes the next instruction pointer from the vmcb if the CPU supports it */ static u64 svm_next_rip(struct kvm_vcpu *vcpu, int add) { if (svm->vmcb->control.next_

Re: [PATCH] svm: implement NEXTRIPsave SVM feature

2010-04-11 Thread Alexander Graf
On 11.04.2010, at 23:51, Andre Przywara wrote: > Alexander Graf wrote: >> On 11.04.2010, at 23:40, Alexander Graf wrote: >>> /* Either adds offset n to the instruction counter or takes the next >>> instruction pointer from the vmcb if the CPU supports it */ >>> >>> static u64 svm_next_rip(stru

Re: [PATCH] svm: implement NEXTRIPsave SVM feature

2010-04-11 Thread Andre Przywara
Alexander Graf wrote: On 11.04.2010, at 23:51, Andre Przywara wrote: Alexander Graf wrote: On 11.04.2010, at 23:40, Alexander Graf wrote: /* Either adds offset n to the instruction counter or takes the next instruction pointer from the vmcb if the CPU supports it */ static u64 svm_next_rip

Re: [PATCH] svm: implement NEXTRIPsave SVM feature

2010-04-11 Thread Alexander Graf
On 12.04.2010, at 00:13, Andre Przywara wrote: > Alexander Graf wrote: >> On 11.04.2010, at 23:51, Andre Przywara wrote: >>> Alexander Graf wrote: On 11.04.2010, at 23:40, Alexander Graf wrote: > /* Either adds offset n to the instruction counter or takes the next > instruction poin

Re: [PATCH] svm: implement NEXTRIPsave SVM feature

2010-04-12 Thread Avi Kivity
On 04/12/2010 12:07 AM, Andre Przywara wrote: On SVM we set the instruction length of skipped instructions to hard-coded, well known values, which could be wrong when (bogus, but valid) prefixes (REX, segment override) are used. Newer AMD processors (Fam10h 45nm and better, aka. PhenomII or Athlo

Re: [PATCH] svm: implement NEXTRIPsave SVM feature

2010-04-12 Thread Alexander Graf
On 12.04.2010, at 12:20, Avi Kivity wrote: > On 04/12/2010 12:07 AM, Andre Przywara wrote: >> On SVM we set the instruction length of skipped instructions >> to hard-coded, well known values, which could be wrong when (bogus, >> but valid) prefixes (REX, segment override) are used. >> Newer AMD p

Re: [PATCH] svm: implement NEXTRIPsave SVM feature

2010-04-12 Thread Avi Kivity
On 04/12/2010 01:29 PM, Alexander Graf wrote: On 12.04.2010, at 12:20, Avi Kivity wrote: On 04/12/2010 12:07 AM, Andre Przywara wrote: On SVM we set the instruction length of skipped instructions to hard-coded, well known values, which could be wrong when (bogus, but valid) prefixes

Re: [PATCH] svm: implement NEXTRIPsave SVM feature

2010-04-13 Thread Marcelo Tosatti
On Sun, Apr 11, 2010 at 11:07:28PM +0200, Andre Przywara wrote: > On SVM we set the instruction length of skipped instructions > to hard-coded, well known values, which could be wrong when (bogus, > but valid) prefixes (REX, segment override) are used. > Newer AMD processors (Fam10h 45nm and better