KVM
Macros | Functions
svm_onhyperv.c File Reference
#include <linux/kvm_host.h>
#include <asm/mshyperv.h>
#include "svm.h"
#include "svm_ops.h"
#include "hyperv.h"
#include "kvm_onhyperv.h"
#include "svm_onhyperv.h"
Include dependency graph for svm_onhyperv.c:

Go to the source code of this file.

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 

Functions

int svm_hv_enable_l2_tlb_flush (struct kvm_vcpu *vcpu)
 

Macro Definition Documentation

◆ pr_fmt

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 5 of file svm_onhyperv.c.

Function Documentation

◆ svm_hv_enable_l2_tlb_flush()

int svm_hv_enable_l2_tlb_flush ( struct kvm_vcpu *  vcpu)

Definition at line 18 of file svm_onhyperv.c.

19 {
20  struct hv_vmcb_enlightenments *hve;
21  hpa_t partition_assist_page = hv_get_partition_assist_page(vcpu);
22 
23  if (partition_assist_page == INVALID_PAGE)
24  return -ENOMEM;
25 
26  hve = &to_svm(vcpu)->vmcb->control.hv_enlightenments;
27 
28  hve->partition_assist_page = partition_assist_page;
29  hve->hv_vm_id = (unsigned long)vcpu->kvm;
30  if (!hve->hv_enlightenments_control.nested_flush_hypercall) {
31  hve->hv_enlightenments_control.nested_flush_hypercall = 1;
32  vmcb_mark_dirty(to_svm(vcpu)->vmcb, HV_VMCB_NESTED_ENLIGHTENMENTS);
33  }
34 
35  return 0;
36 }
struct vmcb * vmcb
Definition: svm.h:212
static __always_inline struct vcpu_svm * to_svm(struct kvm_vcpu *vcpu)
Definition: svm.h:364
static void vmcb_mark_dirty(struct vmcb *vmcb, int bit)
Definition: svm.h:354
Here is the call graph for this function: