Re: [PATCH 1/2] X86/KVM: Properly update 'tsc_offset' to represent the running guest

2018-04-14 Thread Raslan, KarimAllah
On Fri, 2018-04-13 at 17:35 +0200, Paolo Bonzini wrote: > On 13/04/2018 14:40, Raslan, KarimAllah wrote: > > > > > > > > > > > static void update_ia32_tsc_adjust_msr(struct kvm_vcpu *vcpu, s64 offset) > > > { > > > - u64 curr_offset = vcpu->arch.tsc_offset; > > > + u64 curr_offset =

Re: [PATCH 1/2] X86/KVM: Properly update 'tsc_offset' to represent the running guest

2018-04-14 Thread Raslan, KarimAllah
On Fri, 2018-04-13 at 17:35 +0200, Paolo Bonzini wrote: > On 13/04/2018 14:40, Raslan, KarimAllah wrote: > > > > > > > > > > > static void update_ia32_tsc_adjust_msr(struct kvm_vcpu *vcpu, s64 offset) > > > { > > > - u64 curr_offset = vcpu->arch.tsc_offset; > > > + u64 curr_offset =

Re: [PATCH 1/2] X86/KVM: Properly update 'tsc_offset' to represent the running guest

2018-04-13 Thread Raslan, KarimAllah
On Fri, 2018-04-13 at 18:04 +0200, Paolo Bonzini wrote: > On 13/04/2018 18:02, Jim Mattson wrote: > > > > On Fri, Apr 13, 2018 at 4:23 AM, Paolo Bonzini wrote: > > > > > > From: KarimAllah Ahmed > > > > > > Update 'tsc_offset' on vmenty/vmexit of L2

Re: [PATCH 1/2] X86/KVM: Properly update 'tsc_offset' to represent the running guest

2018-04-13 Thread Raslan, KarimAllah
On Fri, 2018-04-13 at 18:04 +0200, Paolo Bonzini wrote: > On 13/04/2018 18:02, Jim Mattson wrote: > > > > On Fri, Apr 13, 2018 at 4:23 AM, Paolo Bonzini wrote: > > > > > > From: KarimAllah Ahmed > > > > > > Update 'tsc_offset' on vmenty/vmexit of L2 guests to ensure that it always > > >

Re: [PATCH 1/2] X86/KVM: Properly update 'tsc_offset' to represent the running guest

2018-04-13 Thread Paolo Bonzini
On 13/04/2018 18:02, Jim Mattson wrote: > On Fri, Apr 13, 2018 at 4:23 AM, Paolo Bonzini wrote: >> From: KarimAllah Ahmed >> >> Update 'tsc_offset' on vmenty/vmexit of L2 guests to ensure that it always >> captures the TSC_OFFSET of the running guest

Re: [PATCH 1/2] X86/KVM: Properly update 'tsc_offset' to represent the running guest

2018-04-13 Thread Paolo Bonzini
On 13/04/2018 18:02, Jim Mattson wrote: > On Fri, Apr 13, 2018 at 4:23 AM, Paolo Bonzini wrote: >> From: KarimAllah Ahmed >> >> Update 'tsc_offset' on vmenty/vmexit of L2 guests to ensure that it always >> captures the TSC_OFFSET of the running guest whether it is the L1 or L2 >> guest. >> >>

Re: [PATCH 1/2] X86/KVM: Properly update 'tsc_offset' to represent the running guest

2018-04-13 Thread Jim Mattson
On Fri, Apr 13, 2018 at 4:23 AM, Paolo Bonzini wrote: > From: KarimAllah Ahmed > > Update 'tsc_offset' on vmenty/vmexit of L2 guests to ensure that it always > captures the TSC_OFFSET of the running guest whether it is the L1 or L2 > guest. > > Cc: Jim

Re: [PATCH 1/2] X86/KVM: Properly update 'tsc_offset' to represent the running guest

2018-04-13 Thread Jim Mattson
On Fri, Apr 13, 2018 at 4:23 AM, Paolo Bonzini wrote: > From: KarimAllah Ahmed > > Update 'tsc_offset' on vmenty/vmexit of L2 guests to ensure that it always > captures the TSC_OFFSET of the running guest whether it is the L1 or L2 > guest. > > Cc: Jim Mattson > Cc: Paolo Bonzini > Cc: Radim

Re: [PATCH 1/2] X86/KVM: Properly update 'tsc_offset' to represent the running guest

2018-04-13 Thread Paolo Bonzini
On 13/04/2018 14:40, Raslan, KarimAllah wrote: >> >> static void update_ia32_tsc_adjust_msr(struct kvm_vcpu *vcpu, s64 offset) >> { >> -u64 curr_offset = vcpu->arch.tsc_offset; >> +u64 curr_offset = kvm_x86_ops->read_l1_tsc_offset(vcpu); > I might be missing something but is this

Re: [PATCH 1/2] X86/KVM: Properly update 'tsc_offset' to represent the running guest

2018-04-13 Thread Paolo Bonzini
On 13/04/2018 14:40, Raslan, KarimAllah wrote: >> >> static void update_ia32_tsc_adjust_msr(struct kvm_vcpu *vcpu, s64 offset) >> { >> -u64 curr_offset = vcpu->arch.tsc_offset; >> +u64 curr_offset = kvm_x86_ops->read_l1_tsc_offset(vcpu); > I might be missing something but is this

Re: [PATCH 1/2] X86/KVM: Properly update 'tsc_offset' to represent the running guest

2018-04-13 Thread Raslan, KarimAllah
On Fri, 2018-04-13 at 13:23 +0200, Paolo Bonzini wrote: > From: KarimAllah Ahmed > > Update 'tsc_offset' on vmenty/vmexit of L2 guests to ensure that it always > captures the TSC_OFFSET of the running guest whether it is the L1 or L2 > guest. > > Cc: Jim Mattson

Re: [PATCH 1/2] X86/KVM: Properly update 'tsc_offset' to represent the running guest

2018-04-13 Thread Raslan, KarimAllah
On Fri, 2018-04-13 at 13:23 +0200, Paolo Bonzini wrote: > From: KarimAllah Ahmed > > Update 'tsc_offset' on vmenty/vmexit of L2 guests to ensure that it always > captures the TSC_OFFSET of the running guest whether it is the L1 or L2 > guest. > > Cc: Jim Mattson > Cc: Paolo Bonzini > Cc:

[PATCH 1/2] X86/KVM: Properly update 'tsc_offset' to represent the running guest

2018-04-13 Thread Paolo Bonzini
From: KarimAllah Ahmed Update 'tsc_offset' on vmenty/vmexit of L2 guests to ensure that it always captures the TSC_OFFSET of the running guest whether it is the L1 or L2 guest. Cc: Jim Mattson Cc: Paolo Bonzini Cc: Radim Krčmář

[PATCH 1/2] X86/KVM: Properly update 'tsc_offset' to represent the running guest

2018-04-13 Thread Paolo Bonzini
From: KarimAllah Ahmed Update 'tsc_offset' on vmenty/vmexit of L2 guests to ensure that it always captures the TSC_OFFSET of the running guest whether it is the L1 or L2 guest. Cc: Jim Mattson Cc: Paolo Bonzini Cc: Radim Krčmář Cc: k...@vger.kernel.org Cc: linux-kernel@vger.kernel.org