RE: [PATCH v2 09/25] KVM: VMX: Switch FRED RSP0 between host and guest

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> On Wed, Feb 07, 2024, Xin Li wrote:
> > Switch MSR_IA32_FRED_RSP0 between host and guest in
> > vmx_prepare_switch_to_{host,guest}().
> >
> > MSR_IA32_FRED_RSP0 is used during ring 3 event delivery only, thus
> > KVM, running on ring 0, can run safely with guest FRED RSP0, i.e., no
> > need to switch between host/guest FRED RSP0 during VM entry and exit.
> >
> > KVM should switch to host FRED RSP0 before returning to user level,
> > and switch to guest FRED RSP0 before entering guest mode.
> 
> Heh, if only KVM had a framework that was specifically designed for context
> switching MSRs on return to userspace.  Translation: please use the
> user_return_msr() APIs.

IIUC the user return MSR framework works for MSRs that are per CPU
constants, but like MSR_KERNEL_GS_BASE, MSR_IA32_FRED_RSP0 is a per
*task* constant, thus we can't use it.





[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux