[PATCH v3 0/5] i386: Enable newly introduced KVM Hyper-V enlightenments

Vitaly Kuznetsov posted 5 patches 2 years ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20220419144803.1698337-1-vkuznets@redhat.com
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Marcelo Tosatti <mtosatti@redhat.com>
There is a newer version of this series
docs/hyperv.txt                | 34 ++++++++++++++++++++++
target/i386/cpu.c              |  8 +++++
target/i386/cpu.h              |  5 +++-
target/i386/kvm/hyperv-proto.h |  9 +++++-
target/i386/kvm/kvm.c          | 53 +++++++++++++++++++++++++++++-----
5 files changed, 99 insertions(+), 10 deletions(-)
[PATCH v3 0/5] i386: Enable newly introduced KVM Hyper-V enlightenments
Posted by Vitaly Kuznetsov 2 years ago
This is a continuation of "[PATCH v2 0/3] i386: Add support for Hyper-V
Enlightened MSR-Bitmap and XMM fast hypercall input features":
https://lore.kernel.org/qemu-devel/20220217142949.297454-1-vkuznets@redhat.com/
work which wasn't merged for 7.0, thus 'v3'.

This series enables four new KVM Hyper-V enlightenmtes:

'XMM fast hypercall input feature' is supported by KVM since v5.14,
it allows for faster Hyper-V hypercall processing.

'Enlightened MSR-Bitmap' is a new nested specific enlightenment speeds up
L2 vmexits by avoiding unnecessary updates to L2 MSR-Bitmap. KVM support
for the feature on Intel CPUs is in v5.17 and in  5.18 for AMD CPUs.

'Extended GVA ranges for TLB flush hypercalls' indicates that extended GVA
ranges are allowed to be passed to Hyper-V TLB flush hypercalls.

'Direct TLB flush hypercall' features allows L0 (KVM) to directly handle 
L2's TLB flush hypercalls without the need to exit to L1 (Hyper-V).

The last two features are not merged in KVM yet:
https://lore.kernel.org/kvm/20220414132013.1588929-1-vkuznets@redhat.com/
however, there's no direct dependency on the kernel part as thanks to
KVM_GET_SUPPORTED_HV_CPUID no new capabilities are introduced.

Vitaly Kuznetsov (5):
  i386: Use hv_build_cpuid_leaf() for HV_CPUID_NESTED_FEATURES
  i386: Hyper-V Enlightened MSR bitmap feature
  i386: Hyper-V XMM fast hypercall input feature
  i386: Hyper-V Support extended GVA ranges for TLB flush hypercalls
  i386: Hyper-V Direct TLB flush hypercall

 docs/hyperv.txt                | 34 ++++++++++++++++++++++
 target/i386/cpu.c              |  8 +++++
 target/i386/cpu.h              |  5 +++-
 target/i386/kvm/hyperv-proto.h |  9 +++++-
 target/i386/kvm/kvm.c          | 53 +++++++++++++++++++++++++++++-----
 5 files changed, 99 insertions(+), 10 deletions(-)

-- 
2.35.1
Re: [PATCH v3 0/5] i386: Enable newly introduced KVM Hyper-V enlightenments
Posted by Paolo Bonzini 1 year, 11 months ago
> This series enables four new KVM Hyper-V enlightenmtes [...]
>
> docs/hyperv.txt                | 34 ++++++++++++++++++++++

Queued, thanks.  Would you please convert hyperv.txt to rST in docs/system/i386?
The various enlightenments can be converted to a definition list.

Paolo
Re: [PATCH v3 0/5] i386: Enable newly introduced KVM Hyper-V enlightenments
Posted by Vitaly Kuznetsov 1 year, 11 months ago
Paolo Bonzini <pbonzini@redhat.com> writes:

>> This series enables four new KVM Hyper-V enlightenmtes [...]
>>
>> docs/hyperv.txt                | 34 ++++++++++++++++++++++
>
> Queued, thanks.  

Thanks!

> Would you please convert hyperv.txt to rST in docs/system/i386?

Sure, it's on my TODO list.

-- 
Vitaly
Re: [PATCH v3 0/5] i386: Enable newly introduced KVM Hyper-V enlightenments
Posted by Vitaly Kuznetsov 1 year, 10 months ago
Vitaly Kuznetsov <vkuznets@redhat.com> writes:

> Paolo Bonzini <pbonzini@redhat.com> writes:
>
>>> This series enables four new KVM Hyper-V enlightenmtes [...]
>>>
>>> docs/hyperv.txt                | 34 ++++++++++++++++++++++
>>
>> Queued, thanks.  
>
> Thanks!
>

It seems these patches didn't make it upstream yet but there's a
(small) conflict with

commit 73d24074078a2cefb5305047e3bf50b73daa3f98
Author: Jon Doron <arilou@gmail.com>
Date:   Wed Feb 16 12:24:59 2022 +0200

    hyperv: Add support to process syndbg commands

which did.

>> Would you please convert hyperv.txt to rST in docs/system/i386?
>
> Sure, it's on my TODO list.

I've sent it out some time ago:
https://lore.kernel.org/qemu-devel/20220503144906.3618426-1-vkuznets@redhat.com/

but it also conflicts with 73d24074078a now because of 'hv-syndbg'. I'm
going to send out 'v4' including the conversion to rst to (hopefully)
facilitate acceptance.

-- 
Vitaly