linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] KVM: arm64: Some fixes and code adjustments for pvtime ST
@ 2020-08-17 11:07 Keqian Zhu
  2020-08-17 11:07 ` [PATCH v2 1/2] KVM: arm64: Some fixes of PV-time interface document Keqian Zhu
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Keqian Zhu @ 2020-08-17 11:07 UTC (permalink / raw)
  To: linux-kernel, linux-arm-kernel, kvmarm, kvm
  Cc: Andrew Jones, Suzuki K Poulose, Marc Zyngier, Keqian Zhu,
	Steven Price, James Morse, Catalin Marinas, wanghaibin.wang,
	Will Deacon

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


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v2 1/2] KVM: arm64: Some fixes of PV-time interface document
  2020-08-17 11:07 [PATCH v2 0/2] KVM: arm64: Some fixes and code adjustments for pvtime ST Keqian Zhu
@ 2020-08-17 11:07 ` Keqian Zhu
  2020-12-03 15:04   ` Marc Zyngier
  2020-08-17 11:07 ` [PATCH v2 2/2] KVM: arm64: Use kvm_write_guest_lock when init stolen time Keqian Zhu
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: Keqian Zhu @ 2020-08-17 11:07 UTC (permalink / raw)
  To: linux-kernel, linux-arm-kernel, kvmarm, kvm
  Cc: Andrew Jones, Suzuki K Poulose, Marc Zyngier, Keqian Zhu,
	Steven Price, James Morse, Catalin Marinas, wanghaibin.wang,
	Will Deacon

Rename PV_FEATURES to PV_TIME_FEATURES.

Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Steven Price <steven.price@arm.com>
---
 Documentation/virt/kvm/arm/pvtime.rst | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Documentation/virt/kvm/arm/pvtime.rst b/Documentation/virt/kvm/arm/pvtime.rst
index 687b60d..94bffe2 100644
--- a/Documentation/virt/kvm/arm/pvtime.rst
+++ b/Documentation/virt/kvm/arm/pvtime.rst
@@ -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
     ============= ========    ==========
-- 
1.8.3.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v2 2/2] KVM: arm64: Use kvm_write_guest_lock when init stolen time
  2020-08-17 11:07 [PATCH v2 0/2] KVM: arm64: Some fixes and code adjustments for pvtime ST Keqian Zhu
  2020-08-17 11:07 ` [PATCH v2 1/2] KVM: arm64: Some fixes of PV-time interface document Keqian Zhu
@ 2020-08-17 11:07 ` Keqian Zhu
  2020-12-03 14:16 ` [PATCH v2 0/2] KVM: arm64: Some fixes and code adjustments for pvtime ST zhukeqian
  2020-12-03 19:03 ` Marc Zyngier
  3 siblings, 0 replies; 7+ messages in thread
From: Keqian Zhu @ 2020-08-17 11:07 UTC (permalink / raw)
  To: linux-kernel, linux-arm-kernel, kvmarm, kvm
  Cc: Andrew Jones, Suzuki K Poulose, Marc Zyngier, Keqian Zhu,
	Steven Price, James Morse, Catalin Marinas, wanghaibin.wang,
	Will Deacon

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

Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Steven Price <steven.price@arm.com>
---
 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


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 0/2] KVM: arm64: Some fixes and code adjustments for pvtime ST
  2020-08-17 11:07 [PATCH v2 0/2] KVM: arm64: Some fixes and code adjustments for pvtime ST Keqian Zhu
  2020-08-17 11:07 ` [PATCH v2 1/2] KVM: arm64: Some fixes of PV-time interface document Keqian Zhu
  2020-08-17 11:07 ` [PATCH v2 2/2] KVM: arm64: Use kvm_write_guest_lock when init stolen time Keqian Zhu
@ 2020-12-03 14:16 ` zhukeqian
  2020-12-03 19:03 ` Marc Zyngier
  3 siblings, 0 replies; 7+ messages in thread
From: zhukeqian @ 2020-12-03 14:16 UTC (permalink / raw)
  To: linux-kernel, linux-arm-kernel, kvmarm, kvm
  Cc: Andrew Jones, Suzuki K Poulose, Marc Zyngier, Steven Price,
	James Morse, Catalin Marinas, wanghaibin.wang, Will Deacon

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 1/2] KVM: arm64: Some fixes of PV-time interface document
  2020-08-17 11:07 ` [PATCH v2 1/2] KVM: arm64: Some fixes of PV-time interface document Keqian Zhu
@ 2020-12-03 15:04   ` Marc Zyngier
  2020-12-04  6:08     ` zhukeqian
  0 siblings, 1 reply; 7+ messages in thread
From: Marc Zyngier @ 2020-12-03 15:04 UTC (permalink / raw)
  To: Keqian Zhu
  Cc: Andrew Jones, kvm, Suzuki K Poulose, Catalin Marinas,
	linux-kernel, Steven Price, James Morse, wanghaibin.wang,
	Will Deacon, kvmarm, linux-arm-kernel

On 2020-08-17 12:07, Keqian Zhu wrote:
> Rename PV_FEATURES to PV_TIME_FEATURES.
> 
> Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com>
> Reviewed-by: Andrew Jones <drjones@redhat.com>
> Reviewed-by: Steven Price <steven.price@arm.com>
> ---
>  Documentation/virt/kvm/arm/pvtime.rst | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/virt/kvm/arm/pvtime.rst
> b/Documentation/virt/kvm/arm/pvtime.rst
> index 687b60d..94bffe2 100644
> --- a/Documentation/virt/kvm/arm/pvtime.rst
> +++ b/Documentation/virt/kvm/arm/pvtime.rst
> @@ -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:

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

         M.
-- 
Jazz is not dead. It just smells funny...

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 0/2] KVM: arm64: Some fixes and code adjustments for pvtime ST
  2020-08-17 11:07 [PATCH v2 0/2] KVM: arm64: Some fixes and code adjustments for pvtime ST Keqian Zhu
                   ` (2 preceding siblings ...)
  2020-12-03 14:16 ` [PATCH v2 0/2] KVM: arm64: Some fixes and code adjustments for pvtime ST zhukeqian
@ 2020-12-03 19:03 ` Marc Zyngier
  3 siblings, 0 replies; 7+ messages in thread
From: Marc Zyngier @ 2020-12-03 19:03 UTC (permalink / raw)
  To: linux-kernel, linux-arm-kernel, kvm, Keqian Zhu, kvmarm
  Cc: Andrew Jones, Suzuki K Poulose, Catalin Marinas, Steven Price,
	James Morse, wanghaibin.wang, Will Deacon

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.



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 1/2] KVM: arm64: Some fixes of PV-time interface document
  2020-12-03 15:04   ` Marc Zyngier
@ 2020-12-04  6:08     ` zhukeqian
  0 siblings, 0 replies; 7+ messages in thread
From: zhukeqian @ 2020-12-04  6:08 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: Andrew Jones, kvm, Suzuki K Poulose, Catalin Marinas,
	linux-kernel, Steven Price, James Morse, wanghaibin.wang,
	Will Deacon, kvmarm, linux-arm-kernel



On 2020/12/3 23:04, Marc Zyngier wrote:
> On 2020-08-17 12:07, Keqian Zhu wrote:
>> Rename PV_FEATURES to PV_TIME_FEATURES.
>>
>> Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com>
>> Reviewed-by: Andrew Jones <drjones@redhat.com>
>> Reviewed-by: Steven Price <steven.price@arm.com>
>> ---
>>  Documentation/virt/kvm/arm/pvtime.rst | 6 +++---
>>  1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/Documentation/virt/kvm/arm/pvtime.rst
>> b/Documentation/virt/kvm/arm/pvtime.rst
>> index 687b60d..94bffe2 100644
>> --- a/Documentation/virt/kvm/arm/pvtime.rst
>> +++ b/Documentation/virt/kvm/arm/pvtime.rst
>> @@ -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:
> 
> nit: I do object to this change (some of us are British! ;-).
Oh, I will pay attention to this. Thanks!

Keqian
> 
>         M.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-12-04  6:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-17 11:07 [PATCH v2 0/2] KVM: arm64: Some fixes and code adjustments for pvtime ST Keqian Zhu
2020-08-17 11:07 ` [PATCH v2 1/2] KVM: arm64: Some fixes of PV-time interface document Keqian Zhu
2020-12-03 15:04   ` Marc Zyngier
2020-12-04  6:08     ` zhukeqian
2020-08-17 11:07 ` [PATCH v2 2/2] KVM: arm64: Use kvm_write_guest_lock when init stolen time Keqian Zhu
2020-12-03 14:16 ` [PATCH v2 0/2] KVM: arm64: Some fixes and code adjustments for pvtime ST zhukeqian
2020-12-03 19:03 ` Marc Zyngier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).