File: hyperv.c

package info (click to toggle)
linux 6.18.15-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,742,528 kB
  • sloc: ansic: 26,787,393; asm: 272,099; sh: 148,804; python: 79,243; makefile: 57,755; perl: 36,527; xml: 19,542; cpp: 5,913; yacc: 4,939; lex: 2,950; awk: 1,607; sed: 30; ruby: 25
file content (18 lines) | stat: -rw-r--r-- 514 bytes parent folder | download | duplicates (31)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// SPDX-License-Identifier: GPL-2.0-only
/*
 * AMD SVM specific code for Hyper-V on KVM.
 *
 * Copyright 2022 Red Hat, Inc. and/or its affiliates.
 */
#include "hyperv.h"

void svm_hv_inject_synthetic_vmexit_post_tlb_flush(struct kvm_vcpu *vcpu)
{
	struct vcpu_svm *svm = to_svm(vcpu);

	svm->vmcb->control.exit_code = HV_SVM_EXITCODE_ENL;
	svm->vmcb->control.exit_code_hi = 0;
	svm->vmcb->control.exit_info_1 = HV_SVM_ENL_EXITCODE_TRAP_AFTER_FLUSH;
	svm->vmcb->control.exit_info_2 = 0;
	nested_svm_vmexit(svm);
}