search for: kvm_steal_time_set_preempted

Displaying 19 results from an estimated 19 matches for "kvm_steal_time_set_preempted".

2016 Dec 19
2
[PATCH v7 08/11] x86, kvm/x86.c: support vcpu preempted check
...an at linux.vnet.ibm.com> > Acked-by: Paolo Bonzini <pbonzini at redhat.com> > --- > arch/x86/include/uapi/asm/kvm_para.h | 4 +++- > arch/x86/kvm/x86.c | 16 ++++++++++++++++ > 2 files changed, 19 insertions(+), 1 deletion(-) > [..] > +static void kvm_steal_time_set_preempted(struct kvm_vcpu *vcpu) > +{ > + if (!(vcpu->arch.st.msr_val & KVM_MSR_ENABLED)) > + return; > + > + vcpu->arch.st.steal.preempted = 1; > + > + kvm_write_guest_offset_cached(vcpu->kvm, &vcpu->arch.st.stime, > + &vcpu->arch.st.steal.preempted, &gt...
2016 Dec 19
2
[PATCH v7 08/11] x86, kvm/x86.c: support vcpu preempted check
...an at linux.vnet.ibm.com> > Acked-by: Paolo Bonzini <pbonzini at redhat.com> > --- > arch/x86/include/uapi/asm/kvm_para.h | 4 +++- > arch/x86/kvm/x86.c | 16 ++++++++++++++++ > 2 files changed, 19 insertions(+), 1 deletion(-) > [..] > +static void kvm_steal_time_set_preempted(struct kvm_vcpu *vcpu) > +{ > + if (!(vcpu->arch.st.msr_val & KVM_MSR_ENABLED)) > + return; > + > + vcpu->arch.st.steal.preempted = 1; > + > + kvm_write_guest_offset_cached(vcpu->kvm, &vcpu->arch.st.stime, > + &vcpu->arch.st.steal.preempted, &gt...
2016 Dec 19
0
[PATCH v7 08/11] x86, kvm/x86.c: support vcpu preempted check
...;> Acked-by: Paolo Bonzini <pbonzini at redhat.com> >> --- >> arch/x86/include/uapi/asm/kvm_para.h | 4 +++- >> arch/x86/kvm/x86.c | 16 ++++++++++++++++ >> 2 files changed, 19 insertions(+), 1 deletion(-) >> > [..] >> +static void kvm_steal_time_set_preempted(struct kvm_vcpu *vcpu) >> +{ >> + if (!(vcpu->arch.st.msr_val & KVM_MSR_ENABLED)) >> + return; >> + >> + vcpu->arch.st.steal.preempted = 1; >> + >> + kvm_write_guest_offset_cached(vcpu->kvm, &vcpu->arch.st.stime, >> + &vcpu-...
2016 Oct 24
2
[PATCH v4 5/5] x86, kvm: support vcpu preempted check
...empted = 1; >>> > + kvm_write_guest_cached(vcpu->kvm, &vcpu->arch.st.stime, >>> > + &vcpu->arch.st.steal, >>> > + sizeof(struct kvm_steal_time)); >>> > + } >> Please name this block of code. Something like >> kvm_steal_time_set_preempted(vcpu); > > While at it: > > 1) the kvm_read_guest_cached is not necessary. You can rig the call to > kvm_write_guest_cached so that it only writes vcpu->arch.st.steal.preempted. I agree. kvm_write_guest_cached() always writes from offset 0, so we'd want a new function tha...
2016 Oct 24
2
[PATCH v4 5/5] x86, kvm: support vcpu preempted check
...empted = 1; >>> > + kvm_write_guest_cached(vcpu->kvm, &vcpu->arch.st.stime, >>> > + &vcpu->arch.st.steal, >>> > + sizeof(struct kvm_steal_time)); >>> > + } >> Please name this block of code. Something like >> kvm_steal_time_set_preempted(vcpu); > > While at it: > > 1) the kvm_read_guest_cached is not necessary. You can rig the call to > kvm_write_guest_cached so that it only writes vcpu->arch.st.steal.preempted. I agree. kvm_write_guest_cached() always writes from offset 0, so we'd want a new function tha...
2016 Nov 02
13
[PATCH v7 00/11] implement vcpu preempted check
change from v6: fix typos and remove uncessary comments. change from v5: spilt x86/kvm patch into guest/host part. introduce kvm_write_guest_offset_cached. fix some typos. rebase patch onto 4.9.2 change from v4: spilt x86 kvm vcpu preempted check into two patches. add documentation patch. add x86 vcpu preempted check patch under xen add s390 vcpu preempted check patch change from v3:
2016 Nov 02
13
[PATCH v7 00/11] implement vcpu preempted check
change from v6: fix typos and remove uncessary comments. change from v5: spilt x86/kvm patch into guest/host part. introduce kvm_write_guest_offset_cached. fix some typos. rebase patch onto 4.9.2 change from v4: spilt x86 kvm vcpu preempted check into two patches. add documentation patch. add x86 vcpu preempted check patch under xen add s390 vcpu preempted check patch change from v3:
2016 Oct 19
3
[PATCH v4 5/5] x86, kvm: support vcpu preempted check
...f(struct kvm_steal_time)) == 0) { > + vcpu->arch.st.steal.preempted = 1; > + kvm_write_guest_cached(vcpu->kvm, &vcpu->arch.st.stime, > + &vcpu->arch.st.steal, > + sizeof(struct kvm_steal_time)); > + } Please name this block of code. Something like kvm_steal_time_set_preempted(vcpu); Thanks.
2016 Oct 19
3
[PATCH v4 5/5] x86, kvm: support vcpu preempted check
...f(struct kvm_steal_time)) == 0) { > + vcpu->arch.st.steal.preempted = 1; > + kvm_write_guest_cached(vcpu->kvm, &vcpu->arch.st.stime, > + &vcpu->arch.st.steal, > + sizeof(struct kvm_steal_time)); > + } Please name this block of code. Something like kvm_steal_time_set_preempted(vcpu); Thanks.
2016 Nov 02
0
[PATCH v7 08/11] x86, kvm/x86.c: support vcpu preempted check
...rch.st.steal.preempted = 0; + if (vcpu->arch.st.steal.version & 1) vcpu->arch.st.steal.version += 1; /* first time write, random junk */ @@ -2810,8 +2812,22 @@ void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu) kvm_make_request(KVM_REQ_STEAL_UPDATE, vcpu); } +static void kvm_steal_time_set_preempted(struct kvm_vcpu *vcpu) +{ + if (!(vcpu->arch.st.msr_val & KVM_MSR_ENABLED)) + return; + + vcpu->arch.st.steal.preempted = 1; + + kvm_write_guest_offset_cached(vcpu->kvm, &vcpu->arch.st.stime, + &vcpu->arch.st.steal.preempted, + offsetof(struct kvm_steal_time, preempt...
2016 Oct 20
0
[PATCH v5 6/9] x86, kvm: support vcpu preempted check
...rch.st.steal.preempted = 0; + if (vcpu->arch.st.steal.version & 1) vcpu->arch.st.steal.version += 1; /* first time write, random junk */ @@ -2810,8 +2812,24 @@ void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu) kvm_make_request(KVM_REQ_STEAL_UPDATE, vcpu); } +static void kvm_steal_time_set_preempted(struct kvm_vcpu *vcpu) +{ + if (!(vcpu->arch.st.msr_val & KVM_MSR_ENABLED)) + return; + + if (unlikely(kvm_read_guest_cached(vcpu->kvm, &vcpu->arch.st.stime, + &vcpu->arch.st.steal, sizeof(struct kvm_steal_time)))) + return; + + vcpu->arch.st.steal.preempted = 1; + +...
2016 Oct 24
0
[PATCH v4 5/5] x86, kvm: support vcpu preempted check
...pu->arch.st.steal.preempted = 1; >> > + kvm_write_guest_cached(vcpu->kvm, &vcpu->arch.st.stime, >> > + &vcpu->arch.st.steal, >> > + sizeof(struct kvm_steal_time)); >> > + } > Please name this block of code. Something like > kvm_steal_time_set_preempted(vcpu); While at it: 1) the kvm_read_guest_cached is not necessary. You can rig the call to kvm_write_guest_cached so that it only writes vcpu->arch.st.steal.preempted. 2) split the patch in host and guest sides. Paolo
2016 Oct 24
0
[PATCH v4 5/5] x86, kvm: support vcpu preempted check
...>>> + kvm_write_guest_cached(vcpu->kvm, &vcpu->arch.st.stime, >>>>> + &vcpu->arch.st.steal, >>>>> + sizeof(struct kvm_steal_time)); >>>>> + } >>> Please name this block of code. Something like >>> kvm_steal_time_set_preempted(vcpu); >> >> While at it: >> >> 1) the kvm_read_guest_cached is not necessary. You can rig the call to >> kvm_write_guest_cached so that it only writes vcpu->arch.st.steal.preempted. > > I agree. kvm_write_guest_cached() always writes from offset 0, so we...
2016 Oct 20
15
[PATCH v5 0/9] implement vcpu preempted check
change from v4: spilt x86 kvm vcpu preempted check into two patches. add documentation patch. add x86 vcpu preempted check patch under xen add s390 vcpu preempted check patch change from v3: add x86 vcpu preempted check patch change from v2: no code change, fix typos, update some comments change from v1: a simplier definition of default vcpu_is_preempted skip mahcine type check on ppc,
2016 Oct 20
15
[PATCH v5 0/9] implement vcpu preempted check
change from v4: spilt x86 kvm vcpu preempted check into two patches. add documentation patch. add x86 vcpu preempted check patch under xen add s390 vcpu preempted check patch change from v3: add x86 vcpu preempted check patch change from v2: no code change, fix typos, update some comments change from v1: a simplier definition of default vcpu_is_preempted skip mahcine type check on ppc,
2016 Oct 28
16
[PATCH v6 00/11] implement vcpu preempted check
change from v5: spilt x86/kvm patch into guest/host part. introduce kvm_write_guest_offset_cached. fix some typos. rebase patch onto 4.9.2 change from v4: spilt x86 kvm vcpu preempted check into two patches. add documentation patch. add x86 vcpu preempted check patch under xen add s390 vcpu preempted check patch change from v3: add x86 vcpu preempted check patch change from v2: no code
2016 Oct 28
16
[PATCH v6 00/11] implement vcpu preempted check
change from v5: spilt x86/kvm patch into guest/host part. introduce kvm_write_guest_offset_cached. fix some typos. rebase patch onto 4.9.2 change from v4: spilt x86 kvm vcpu preempted check into two patches. add documentation patch. add x86 vcpu preempted check patch under xen add s390 vcpu preempted check patch change from v3: add x86 vcpu preempted check patch change from v2: no code
2016 Oct 19
10
[PATCH v4 0/5] implement vcpu preempted check
change from v3: add x86 vcpu preempted check patch change from v2: no code change, fix typos, update some comments change from v1: a simplier definition of default vcpu_is_preempted skip mahcine type check on ppc, and add config. remove dedicated macro. add one patch to drop overload of rwsem_spin_on_owner and mutex_spin_on_owner. add more comments thanks boqun and Peter's suggestion.
2016 Oct 19
10
[PATCH v4 0/5] implement vcpu preempted check
change from v3: add x86 vcpu preempted check patch change from v2: no code change, fix typos, update some comments change from v1: a simplier definition of default vcpu_is_preempted skip mahcine type check on ppc, and add config. remove dedicated macro. add one patch to drop overload of rwsem_spin_on_owner and mutex_spin_on_owner. add more comments thanks boqun and Peter's suggestion.