Skip to contentSkip to conversation

KVM: arm64: Some fixes and code adjustments for pvtime ST

PATCH Applied Keqian Zhu 2 participants 7 messages Aug 17, 2020 – Dec 4, 2020

Subsystems (4)
lore
Share & tools
lore

Keqian Zhu

author
#0 lore raw

v2 cover KVM: arm64: Some fixes and code adjustments for pvtime ST

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(-)
Signature · 6 lines
1.8.3.1

_______________________________________________
kvmarm mailing list
[email protected]
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
author
#1 lore raw

PATCH v2 1/2 KVM: arm64: Some fixes of PV-time interface document

Rename PV_FEATURES to PV_TIME_FEATURES.

---
 Documentation/virt/kvm/arm/pvtime.rst | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Documentation/virt/kvm/arm/pvtime.rst +3 -3
index 687b60d..94bffe2 100644
@@ -3,7 +3,7 @@
 Paravirtualized time support for arm64
 ======================================
 
-Arm specification DEN0057/A defines a standard for paravirtualised time
+Arm specification DEN0057/A defines a standard for paravirtualized time
 support for AArch64 guests:
 
 https://developer.arm.com/docs/den0057/a
@@ -19,8 +19,8 @@ Two new SMCCC compatible hypercalls are defined:
 
 These are only available in the SMC64/HVC64 calling convention as
 paravirtualized time is not available to 32 bit Arm guests. The existence of
-the PV_FEATURES hypercall should be probed using the SMCCC 1.1 ARCH_FEATURES
-mechanism before calling it.
+the PV_TIME_FEATURES hypercall should be probed using the SMCCC 1.1
+ARCH_FEATURES mechanism before calling it.
 
 PV_TIME_FEATURES
     ============= ========    ==========
Signature · 1 line
1.8.3.1
maintainer
#2 lore raw

Re: [PATCH v2 1/2] KVM: arm64: Some fixes of PV-time interface document

Quoted 19 lines · Keqian Zhu

Rename PV_FEATURES to PV_TIME_FEATURES.

---
 Documentation/virt/kvm/arm/pvtime.rst | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Documentation/virt/kvm/arm/pvtime.rst +0 -1
index 687b60d..94bffe2 100644
@@ -3,7 +3,7 @@
 Paravirtualized time support for arm64
 ======================================
 
-Arm specification DEN0057/A defines a standard for paravirtualised 
Quoted 4 lines

time
+Arm specification DEN0057/A defines a standard for paravirtualized time
support for AArch64 guests:

nit: I do object to this change (some of us are British! ;-).

        M.
Signature · 5 lines
Jazz is not dead. It just smells funny...
_______________________________________________
kvmarm mailing list
[email protected]
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
author
#3 lore raw

Re: [PATCH v2 1/2] KVM: arm64: Some fixes of PV-time interface document

Quoted 19 lines · Marc Zyngier
Quoted 18 lines · Keqian Zhu

Rename PV_FEATURES to PV_TIME_FEATURES.

---
 Documentation/virt/kvm/arm/pvtime.rst | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Documentation/virt/kvm/arm/pvtime.rst +0 -0
index 687b60d..94bffe2 100644
@@ -3,7 +3,7 @@
 Paravirtualized time support for arm64
 ======================================
 
Quoted 5 lines

Documentation/virt/kvm/arm/pvtime.rst line 7

Quoted 3 lines
Documentation/virt/kvm/arm/pvtime.rst +1 -1
-Arm specification DEN0057/A defines a standard for paravirtualised time
+Arm specification DEN0057/A defines a standard for paravirtualized time
 support for AArch64 guests:

nit: I do object to this change (some of us are British! ;-).

Oh, I will pay attention to this. Thanks!

Keqian

Quoted 2 lines
        M.

_______________________________________________
kvmarm mailing list
[email protected]
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

author
#4 lore raw

PATCH v2 2/2 KVM: arm64: Use kvm_write_guest_lock when init stolen time

In reply to Keqian Zhu

There is a lock version kvm_write_guest. Use it to simplify code.

---
 arch/arm64/kvm/pvtime.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
arch/arm64/kvm/pvtime.c +1 -5
index f7b52ce..2b24e7f 100644
@@ -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;
 }
Signature · 6 lines
1.8.3.1

_______________________________________________
kvmarm mailing list
[email protected]
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
author
#5 lore raw
In reply to Keqian Zhu

Hi Marc,

Found that this series is not applied for now. Does it need some modification? Wish you can pick it up :-)

Thanks,
Keqian

Quoted 10 lines · Keqian Zhu

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.

Quoted 8 lines

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(-)

_______________________________________________
kvmarm mailing list
[email protected]
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

maintainer Applied
#6 lore raw
In reply to Keqian Zhu
Quoted 11 lines · Keqian Zhu

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.
Signature · 7 lines
Without deviation from the norm, progress is not possible.


_______________________________________________
kvmarm mailing list
[email protected]
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm