During picking up pvtime LPT support for arm64, I do some trivial fixes for
pvtime ST.
change log:
v2:
- Add Andrew's and Steven's R-b.
- Correct commit message of the first patch.
- Drop the second patch.
Keqian Zhu (2):
KVM: arm64: Some fixes of PV-time interface document
KVM: arm64: Use kvm_write_guest_lock when init stolen time
Documentation/virt/kvm/arm/pvtime.rst | 6 +++---
arch/arm64/kvm/pvtime.c | 6 +-----
2 files changed, 4 insertions(+), 8 deletions(-)
--
1.8.3.1
There is a lock version kvm_write_guest. Use it to simplify code.
Signed-off-by: Keqian Zhu <[email protected]>
Reviewed-by: Andrew Jones <[email protected]>
Reviewed-by: Steven Price <[email protected]>
---
arch/arm64/kvm/pvtime.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/arch/arm64/kvm/pvtime.c b/arch/arm64/kvm/pvtime.c
index f7b52ce..2b24e7f 100644
--- a/arch/arm64/kvm/pvtime.c
+++ b/arch/arm64/kvm/pvtime.c
@@ -55,7 +55,6 @@ gpa_t kvm_init_stolen_time(struct kvm_vcpu *vcpu)
struct pvclock_vcpu_stolen_time init_values = {};
struct kvm *kvm = vcpu->kvm;
u64 base = vcpu->arch.steal.base;
- int idx;
if (base == GPA_INVALID)
return base;
@@ -66,10 +65,7 @@ gpa_t kvm_init_stolen_time(struct kvm_vcpu *vcpu)
*/
vcpu->arch.steal.steal = 0;
vcpu->arch.steal.last_steal = current->sched_info.run_delay;
-
- idx = srcu_read_lock(&kvm->srcu);
- kvm_write_guest(kvm, base, &init_values, sizeof(init_values));
- srcu_read_unlock(&kvm->srcu, idx);
+ kvm_write_guest_lock(kvm, base, &init_values, sizeof(init_values));
return base;
}
--
1.8.3.1
Hi Marc,
Found that this series is not applied for now.
Does it need some modification? Wish you can pick it up :-)
Thanks,
Keqian
On 2020/8/17 19:07, Keqian Zhu wrote:
> During picking up pvtime LPT support for arm64, I do some trivial fixes for
> pvtime ST.
>
> change log:
>
> v2:
> - Add Andrew's and Steven's R-b.
> - Correct commit message of the first patch.
> - Drop the second patch.
>
> Keqian Zhu (2):
> KVM: arm64: Some fixes of PV-time interface document
> KVM: arm64: Use kvm_write_guest_lock when init stolen time
>
> Documentation/virt/kvm/arm/pvtime.rst | 6 +++---
> arch/arm64/kvm/pvtime.c | 6 +-----
> 2 files changed, 4 insertions(+), 8 deletions(-)
>
On Mon, 17 Aug 2020 19:07:26 +0800, Keqian Zhu wrote:
> During picking up pvtime LPT support for arm64, I do some trivial fixes for
> pvtime ST.
>
> change log:
>
> v2:
> - Add Andrew's and Steven's R-b.
> - Correct commit message of the first patch.
> - Drop the second patch.
>
> [...]
Applied to kvm-arm64/misc-5.11, thanks!
[1/2] KVM: arm64: Some fixes of PV-time interface document
commit: 94558543213ae8c83be5d01b83c1fe7530e8a1a0
[2/2] KVM: arm64: Use kvm_write_guest_lock when init stolen time
commit: 652d0b701d136ede6bc8a977b3abbe2d420226b9
Cheers,
M.
--
Without deviation from the norm, progress is not possible.