[PATCH v4 0/6] i386: Enable newly introduced KVM Hyper-V enlightenments

Vitaly Kuznetsov posted 6 patches 1 year, 11 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20220525115949.1294004-1-vkuznets@redhat.com
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Marcelo Tosatti <mtosatti@redhat.com>
docs/hyperv.txt                | 270 -------------------------------
docs/system/i386/hyperv.rst    | 288 +++++++++++++++++++++++++++++++++
docs/system/target-i386.rst    |   1 +
target/i386/cpu.c              |   8 +
target/i386/cpu.h              |   5 +-
target/i386/kvm/hyperv-proto.h |   9 +-
target/i386/kvm/kvm.c          |  55 +++++--
7 files changed, 354 insertions(+), 282 deletions(-)
delete mode 100644 docs/hyperv.txt
create mode 100644 docs/system/i386/hyperv.rst
[PATCH v4 0/6] i386: Enable newly introduced KVM Hyper-V enlightenments
Posted by Vitaly Kuznetsov 1 year, 11 months ago
Changes since v3:
- Rebase, resolve merge conflict with 73d24074078a ("hyperv: Add support to
  process syndbg commands")
- Include "i386: docs:  Convert hyperv.txt to rST" patch which was previously
  posted separately.

Original description:

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/20220525090133.1264239-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 (6):
  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
  i386: docs:  Convert hyperv.txt to rST

 docs/hyperv.txt                | 270 -------------------------------
 docs/system/i386/hyperv.rst    | 288 +++++++++++++++++++++++++++++++++
 docs/system/target-i386.rst    |   1 +
 target/i386/cpu.c              |   8 +
 target/i386/cpu.h              |   5 +-
 target/i386/kvm/hyperv-proto.h |   9 +-
 target/i386/kvm/kvm.c          |  55 +++++--
 7 files changed, 354 insertions(+), 282 deletions(-)
 delete mode 100644 docs/hyperv.txt
 create mode 100644 docs/system/i386/hyperv.rst

-- 
2.35.3
Re: [PATCH v4 0/6] i386: Enable newly introduced KVM Hyper-V enlightenments
Posted by Paolo Bonzini 1 year, 11 months ago
On 5/25/22 13:59, Vitaly Kuznetsov wrote:
> Changes since v3:
> - Rebase, resolve merge conflict with 73d24074078a ("hyperv: Add support to
>    process syndbg commands")
> - Include "i386: docs:  Convert hyperv.txt to rST" patch which was previously
>    posted separately.

Thank you very much for reposting this.

Paolo

> Original description:
> 
> 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/20220525090133.1264239-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 (6):
>    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
>    i386: docs:  Convert hyperv.txt to rST
> 
>   docs/hyperv.txt                | 270 -------------------------------
>   docs/system/i386/hyperv.rst    | 288 +++++++++++++++++++++++++++++++++
>   docs/system/target-i386.rst    |   1 +
>   target/i386/cpu.c              |   8 +
>   target/i386/cpu.h              |   5 +-
>   target/i386/kvm/hyperv-proto.h |   9 +-
>   target/i386/kvm/kvm.c          |  55 +++++--
>   7 files changed, 354 insertions(+), 282 deletions(-)
>   delete mode 100644 docs/hyperv.txt
>   create mode 100644 docs/system/i386/hyperv.rst
>