Skip to content

Commit ef6fdc0

Browse files
committed
Merge tag 'kvm-x86-vmx-6.13' of https://github.com/kvm-x86/linux into HEAD
KVM VMX change for 6.13 - Remove __invept()'s unused @gpa param, which was left behind when KVM dropped code for invalidating a specific GPA (Intel never officially documented support for single-address INVEPT; presumably pre-production CPUs supported it at some point).
2 parents edd1e59 + bc17fcc commit ef6fdc0

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

arch/x86/kvm/vmx/vmx.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -481,10 +481,9 @@ noinline void invvpid_error(unsigned long ext, u16 vpid, gva_t gva)
481481
ext, vpid, gva);
482482
}
483483

484-
noinline void invept_error(unsigned long ext, u64 eptp, gpa_t gpa)
484+
noinline void invept_error(unsigned long ext, u64 eptp)
485485
{
486-
vmx_insn_failed("invept failed: ext=0x%lx eptp=%llx gpa=0x%llx\n",
487-
ext, eptp, gpa);
486+
vmx_insn_failed("invept failed: ext=0x%lx eptp=%llx\n", ext, eptp);
488487
}
489488

490489
static DEFINE_PER_CPU(struct vmcs *, vmxarea);

arch/x86/kvm/vmx/vmx_ops.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ void vmwrite_error(unsigned long field, unsigned long value);
1515
void vmclear_error(struct vmcs *vmcs, u64 phys_addr);
1616
void vmptrld_error(struct vmcs *vmcs, u64 phys_addr);
1717
void invvpid_error(unsigned long ext, u16 vpid, gva_t gva);
18-
void invept_error(unsigned long ext, u64 eptp, gpa_t gpa);
18+
void invept_error(unsigned long ext, u64 eptp);
1919

2020
#ifndef CONFIG_CC_HAS_ASM_GOTO_OUTPUT
2121
/*
@@ -312,13 +312,13 @@ static inline void __invvpid(unsigned long ext, u16 vpid, gva_t gva)
312312
vmx_asm2(invvpid, "r"(ext), "m"(operand), ext, vpid, gva);
313313
}
314314

315-
static inline void __invept(unsigned long ext, u64 eptp, gpa_t gpa)
315+
static inline void __invept(unsigned long ext, u64 eptp)
316316
{
317317
struct {
318-
u64 eptp, gpa;
319-
} operand = {eptp, gpa};
320-
321-
vmx_asm2(invept, "r"(ext), "m"(operand), ext, eptp, gpa);
318+
u64 eptp;
319+
u64 reserved_0;
320+
} operand = { eptp, 0 };
321+
vmx_asm2(invept, "r"(ext), "m"(operand), ext, eptp);
322322
}
323323

324324
static inline void vpid_sync_vcpu_single(int vpid)
@@ -355,13 +355,13 @@ static inline void vpid_sync_vcpu_addr(int vpid, gva_t addr)
355355

356356
static inline void ept_sync_global(void)
357357
{
358-
__invept(VMX_EPT_EXTENT_GLOBAL, 0, 0);
358+
__invept(VMX_EPT_EXTENT_GLOBAL, 0);
359359
}
360360

361361
static inline void ept_sync_context(u64 eptp)
362362
{
363363
if (cpu_has_vmx_invept_context())
364-
__invept(VMX_EPT_EXTENT_CONTEXT, eptp, 0);
364+
__invept(VMX_EPT_EXTENT_CONTEXT, eptp);
365365
else
366366
ept_sync_global();
367367
}

0 commit comments

Comments
 (0)