Re: [PATCH v10 005/108] KVM: TDX: Initialize the TDX module when loading the KVM intel kernel module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Oct 29, 2022 at 11:24 PM <isaku.yamahata@xxxxxxxxx> wrote:
>
> From: Isaku Yamahata <isaku.yamahata@xxxxxxxxx>

> +int __init tdx_hardware_setup(struct kvm_x86_ops *x86_ops)
> +{
> +       int r;
> +
> +       if (!enable_ept) {
> +               pr_warn("Cannot enable TDX with EPT disabled\n");
> +               return -EINVAL;
> +       }
> +
> +       /* MOVDIR64B instruction is needed. */
> +       if (!static_cpu_has(X86_FEATURE_MOVDIR64B)) {
> +               pr_warn("Cannot enable TDX with MOVDIR64B supported ");
> +               return -ENODEV;
> +       }
> +
> +       /* TDX requires VMX. */
> +       r = vmxon_all();
> +       if (!r)
> +               r = tdx_module_setup();
> +       vmxoff_all();

if few CPUs have VMX enabled, this will disable VMX in all of them.
Depending on what enabled VMX on those CPUs, would this not cause
kernel crashes/problems?



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux