lkml.org 
[lkml]   [2023]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH v10 016/108] KVM: TDX: create/destroy VM structure
    From
    On 10/30/2022 2:22 PM, isaku.yamahata@intel.com wrote:> +static void
    vt_hardware_unsetup(void)
    > +{
    > + tdx_hardware_unsetup();
    > + vmx_hardware_unsetup();
    > +}
    > +
    > static int vt_vm_init(struct kvm *kvm)
    > {
    > if (is_td(kvm))
    > - return -EOPNOTSUPP; /* Not ready to create guest TD yet. */
    > + return tdx_vm_init(kvm);
    >
    > return vmx_vm_init(kvm);
    > }
    >
    > +static void vt_flush_shadow_all_private(struct kvm *kvm)
    > +{
    > + if (is_td(kvm))
    > + return tdx_mmu_release_hkid(kvm);
    > +}

    nit: there is no need to use the "return" keyword.

    > +
    > +static void vt_vm_destroy(struct kvm *kvm)
    > +{
    > + if (is_td(kvm))
    > + return;
    > +
    > + vmx_vm_destroy(kvm);
    > +}
    > +
    > +static void vt_vm_free(struct kvm *kvm)
    > +{
    > + if (is_td(kvm))
    > + return tdx_vm_free(kvm);
    > +}

    ditto.

    \
     
     \ /
      Last update: 2023-03-26 23:26    [W:3.821 / U:1.780 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site