Skip to content

Commit a9f84fb

Browse files
KAGA-KOKOsuryasaimadhu
authored andcommitted
x86/fpu: Remove redundant XCOMP_BV initialization
fpu_copy_uabi_to_guest_fpstate() initializes the XCOMP_BV field in the XSAVE header. That's a leftover from the old KVM FPU buffer handling code. Since d69c138 ("x86/kvm: Convert FPU handling to a single swap buffer") KVM uses the FPU core allocation code, which initializes the XCOMP_BV field already. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Borislav Petkov <bp@suse.de> Link: https://lore.kernel.org/r/20220324134623.408932232@linutronix.de
1 parent 4009a4a commit a9f84fb

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

arch/x86/kernel/fpu/core.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -415,9 +415,6 @@ int fpu_copy_uabi_to_guest_fpstate(struct fpu_guest *gfpu, const void *buf,
415415
xpkru = get_xsave_addr(&kstate->regs.xsave, XFEATURE_PKRU);
416416
*vpkru = xpkru->pkru;
417417
}
418-
419-
/* Ensure that XCOMP_BV is set up for XSAVES */
420-
xstate_init_xcomp_bv(&kstate->regs.xsave, kstate->xfeatures);
421418
return 0;
422419
}
423420
EXPORT_SYMBOL_GPL(fpu_copy_uabi_to_guest_fpstate);

0 commit comments

Comments
 (0)