[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 6/9] KVM: x86: Add Heki hypervisor support
|
From: |
Wei Liu |
|
Subject: |
Re: [PATCH v1 6/9] KVM: x86: Add Heki hypervisor support |
|
Date: |
Mon, 8 May 2023 21:18:29 +0000 |
On Fri, May 05, 2023 at 05:20:43PM +0200, Mickaël Salaün wrote:
> From: Madhavan T. Venkataraman <madvenka@linux.microsoft.com>
>
> Each supported hypervisor in x86 implements a struct x86_hyper_init to
> define the init functions for the hypervisor. Define a new init_heki()
> entry point in struct x86_hyper_init. Hypervisors that support Heki
> must define this init_heki() function. Call init_heki() of the chosen
> hypervisor in init_hypervisor_platform().
>
> Create a heki_hypervisor structure that each hypervisor can fill
> with its data and functions. This will allow the Heki feature to work
> in a hypervisor agnostic way.
>
> Declare and initialize a "heki_hypervisor" structure for KVM so KVM can
> support Heki. Define the init_heki() function for KVM. In init_heki(),
> set the hypervisor field in the generic "heki" structure to the KVM
> "heki_hypervisor". After this point, generic Heki code can access the
> KVM Heki data and functions.
>
[...]
> +static void kvm_init_heki(void)
> +{
> + long err;
> +
> + if (!kvm_para_available())
> + /* Cannot make KVM hypercalls. */
> + return;
> +
> + err = kvm_hypercall3(KVM_HC_LOCK_MEM_PAGE_RANGES, -1, -1, -1);
Why not do a proper version check or capability check here? If the ABI
or supported features ever change then we have something to rely on?
Thanks,
Wei.
- [PATCH v1 5/9] KVM: x86: Add new hypercall to lock control registers, (continued)
- [PATCH v1 3/9] virt: Implement Heki common code, Mickaël Salaün, 2023/05/05
- [PATCH v1 6/9] KVM: x86: Add Heki hypervisor support, Mickaël Salaün, 2023/05/05
- Re: [PATCH v1 6/9] KVM: x86: Add Heki hypervisor support,
Wei Liu <=
- [PATCH v1 7/9] KVM: VMX: Add MBEC support, Mickaël Salaün, 2023/05/05
- [PATCH v1 1/9] KVM: x86: Add kvm_x86_ops.fault_gva(), Mickaël Salaün, 2023/05/05
- [PATCH v1 2/9] KVM: x86/mmu: Add support for prewrite page tracking, Mickaël Salaün, 2023/05/05
[PATCH v1 9/9] virt: Add Heki KUnit tests, Mickaël Salaün, 2023/05/05
[PATCH v1 8/9] KVM: x86/mmu: Enable guests to lock themselves thanks to MBEC, Mickaël Salaün, 2023/05/05