mbox series

[v2,0/6] KVM: arm64: pvtime: Fixes and a new cap

Message ID 20200804170604.42662-1-drjones@redhat.com (mailing list archive)
Headers show
Series KVM: arm64: pvtime: Fixes and a new cap | expand

Message

Andrew Jones Aug. 4, 2020, 5:05 p.m. UTC
v2:
  - ARM_SMCCC_HV_PV_TIME_FEATURES now also returns SMCCC_RET_NOT_SUPPORTED
    when steal time is not supported
  - Added READ_ONCE() for the run_delay read
  - Reworked kvm_put/get_guest to not require type as a parameter
  - Added some more text to the documentation for KVM_CAP_STEAL_TIME
  - Enough changed that I didn't pick up Steven's r-b's


The first four patches in the series are fixes that come from testing
and reviewing pvtime code while writing the QEMU support[*]. The last
patch is only a convenience for userspace, and I wouldn't be heartbroken
if it wasn't deemed worth it. The QEMU patches are currently written
without the cap. However, if the cap is accepted, then I'll change the
QEMU code to use it.

Thanks,
drew

[*] https://lists.gnu.org/archive/html/qemu-devel/2020-07/msg03856.html
    (a v2 of this series will also be posted shortly)

Andrew Jones (6):
  KVM: arm64: pvtime: steal-time is only supported when configured
  KVM: arm64: pvtime: Fix potential loss of stolen time
  KVM: arm64: Drop type input from kvm_put_guest
  KVM: arm64: pvtime: Fix stolen time accounting across migration
  KVM: Documentation: Minor fixups
  arm64/x86: KVM: Introduce steal-time cap

 Documentation/virt/kvm/api.rst    | 22 ++++++++++++++++++----
 arch/arm64/include/asm/kvm_host.h |  2 +-
 arch/arm64/kvm/arm.c              |  3 +++
 arch/arm64/kvm/pvtime.c           | 29 +++++++++++++----------------
 arch/x86/kvm/x86.c                |  3 +++
 include/linux/kvm_host.h          | 31 ++++++++++++++++++++++++++-----
 include/uapi/linux/kvm.h          |  1 +
 7 files changed, 65 insertions(+), 26 deletions(-)

Comments

Steven Price Aug. 5, 2020, 3:37 p.m. UTC | #1
On 04/08/2020 18:05, Andrew Jones wrote:
> v2:
>    - ARM_SMCCC_HV_PV_TIME_FEATURES now also returns SMCCC_RET_NOT_SUPPORTED
>      when steal time is not supported
>    - Added READ_ONCE() for the run_delay read
>    - Reworked kvm_put/get_guest to not require type as a parameter
>    - Added some more text to the documentation for KVM_CAP_STEAL_TIME
>    - Enough changed that I didn't pick up Steven's r-b's

Feel free to add my r-b's - the changes all look fine to me.

Thanks,

Steve

> 
> The first four patches in the series are fixes that come from testing
> and reviewing pvtime code while writing the QEMU support[*]. The last
> patch is only a convenience for userspace, and I wouldn't be heartbroken
> if it wasn't deemed worth it. The QEMU patches are currently written
> without the cap. However, if the cap is accepted, then I'll change the
> QEMU code to use it.
> 
> Thanks,
> drew
> 
> [*] https://lists.gnu.org/archive/html/qemu-devel/2020-07/msg03856.html
>      (a v2 of this series will also be posted shortly)
> 
> Andrew Jones (6):
>    KVM: arm64: pvtime: steal-time is only supported when configured
>    KVM: arm64: pvtime: Fix potential loss of stolen time
>    KVM: arm64: Drop type input from kvm_put_guest
>    KVM: arm64: pvtime: Fix stolen time accounting across migration
>    KVM: Documentation: Minor fixups
>    arm64/x86: KVM: Introduce steal-time cap
> 
>   Documentation/virt/kvm/api.rst    | 22 ++++++++++++++++++----
>   arch/arm64/include/asm/kvm_host.h |  2 +-
>   arch/arm64/kvm/arm.c              |  3 +++
>   arch/arm64/kvm/pvtime.c           | 29 +++++++++++++----------------
>   arch/x86/kvm/x86.c                |  3 +++
>   include/linux/kvm_host.h          | 31 ++++++++++++++++++++++++++-----
>   include/uapi/linux/kvm.h          |  1 +
>   7 files changed, 65 insertions(+), 26 deletions(-)
>
Andrew Jones Aug. 19, 2020, 12:50 p.m. UTC | #2
On Tue, Aug 04, 2020 at 07:05:58PM +0200, Andrew Jones wrote:
> v2:
>   - ARM_SMCCC_HV_PV_TIME_FEATURES now also returns SMCCC_RET_NOT_SUPPORTED
>     when steal time is not supported
>   - Added READ_ONCE() for the run_delay read
>   - Reworked kvm_put/get_guest to not require type as a parameter
>   - Added some more text to the documentation for KVM_CAP_STEAL_TIME
>   - Enough changed that I didn't pick up Steven's r-b's
> 
> 
> The first four patches in the series are fixes that come from testing
> and reviewing pvtime code while writing the QEMU support[*]. The last
> patch is only a convenience for userspace, and I wouldn't be heartbroken
> if it wasn't deemed worth it. The QEMU patches are currently written
> without the cap. However, if the cap is accepted, then I'll change the
> QEMU code to use it.
> 
> Thanks,
> drew
> 
> [*] https://lists.gnu.org/archive/html/qemu-devel/2020-07/msg03856.html
>     (a v2 of this series will also be posted shortly)
> 
> Andrew Jones (6):
>   KVM: arm64: pvtime: steal-time is only supported when configured
>   KVM: arm64: pvtime: Fix potential loss of stolen time
>   KVM: arm64: Drop type input from kvm_put_guest
>   KVM: arm64: pvtime: Fix stolen time accounting across migration
>   KVM: Documentation: Minor fixups
>   arm64/x86: KVM: Introduce steal-time cap
> 
>  Documentation/virt/kvm/api.rst    | 22 ++++++++++++++++++----
>  arch/arm64/include/asm/kvm_host.h |  2 +-
>  arch/arm64/kvm/arm.c              |  3 +++
>  arch/arm64/kvm/pvtime.c           | 29 +++++++++++++----------------
>  arch/x86/kvm/x86.c                |  3 +++
>  include/linux/kvm_host.h          | 31 ++++++++++++++++++++++++++-----
>  include/uapi/linux/kvm.h          |  1 +
>  7 files changed, 65 insertions(+), 26 deletions(-)
> 
> -- 
> 2.25.4
> 
> _______________________________________________
> kvmarm mailing list
> kvmarm@lists.cs.columbia.edu
> https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
>

Hi Marc,

Gentle ping. I'd like to to switch the QEMU code to using the proposed
KVM cap, if the cap is accepted.

Thanks,
drew
Marc Zyngier Aug. 21, 2020, 1:04 p.m. UTC | #3
On 2020-08-19 13:50, Andrew Jones wrote:
> On Tue, Aug 04, 2020 at 07:05:58PM +0200, Andrew Jones wrote:
>> v2:
>>   - ARM_SMCCC_HV_PV_TIME_FEATURES now also returns 
>> SMCCC_RET_NOT_SUPPORTED
>>     when steal time is not supported
>>   - Added READ_ONCE() for the run_delay read
>>   - Reworked kvm_put/get_guest to not require type as a parameter
>>   - Added some more text to the documentation for KVM_CAP_STEAL_TIME
>>   - Enough changed that I didn't pick up Steven's r-b's
>> 
>> 
>> The first four patches in the series are fixes that come from testing
>> and reviewing pvtime code while writing the QEMU support[*]. The last
>> patch is only a convenience for userspace, and I wouldn't be 
>> heartbroken
>> if it wasn't deemed worth it. The QEMU patches are currently written
>> without the cap. However, if the cap is accepted, then I'll change the
>> QEMU code to use it.
>> 
>> Thanks,
>> drew
>> 
>> [*] 
>> https://lists.gnu.org/archive/html/qemu-devel/2020-07/msg03856.html
>>     (a v2 of this series will also be posted shortly)
>> 
>> Andrew Jones (6):
>>   KVM: arm64: pvtime: steal-time is only supported when configured
>>   KVM: arm64: pvtime: Fix potential loss of stolen time
>>   KVM: arm64: Drop type input from kvm_put_guest
>>   KVM: arm64: pvtime: Fix stolen time accounting across migration
>>   KVM: Documentation: Minor fixups
>>   arm64/x86: KVM: Introduce steal-time cap
>> 
>>  Documentation/virt/kvm/api.rst    | 22 ++++++++++++++++++----
>>  arch/arm64/include/asm/kvm_host.h |  2 +-
>>  arch/arm64/kvm/arm.c              |  3 +++
>>  arch/arm64/kvm/pvtime.c           | 29 +++++++++++++----------------
>>  arch/x86/kvm/x86.c                |  3 +++
>>  include/linux/kvm_host.h          | 31 
>> ++++++++++++++++++++++++++-----
>>  include/uapi/linux/kvm.h          |  1 +
>>  7 files changed, 65 insertions(+), 26 deletions(-)
>> 
>> --
>> 2.25.4
>> 
>> _______________________________________________
>> kvmarm mailing list
>> kvmarm@lists.cs.columbia.edu
>> https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
>> 
> 
> Hi Marc,
> 
> Gentle ping. I'd like to to switch the QEMU code to using the proposed
> KVM cap, if the cap is accepted.

I'm fine with it. To be honest, this series is mostly fixes, except
for that last patch.

Paolo, are you OK with me sending the whole thing as fixes, including
the UAPI patch? At least we'd have something consistent for 5.9.

Thanks,

         M.