search for: current_top_of_stack

Displaying 5 results from an estimated 5 matches for "current_top_of_stack".

2020 Jun 23
2
Should SEV-ES #VC use IST? (Re: [PATCH] Allow RDTSC and RDTSCP from userspace)
...tack as soon as possible, freeing it for re-use. The flow would be roughly like this upon entering the handler; build_pt_regs(); RSP = pt_regs->sp; if (RSP in VC_IST_stack) error("unallowed nesting") if (RSP in current_kernel_stack) RSP = round_down_to_8(RSP) else RSP = current_top_of_stack() // non-ist kernel stack copy_pt_regs(pt_regs, RSP); switch_stack_to(RSP); To make this NMI safe, the NMI handler needs some logic too. Upon entering NMI, it needs to check the return RSP, and if it is in the #VC IST stack, it must do the above flow by itself and update the return RSP and RIP....
2020 Jun 23
0
Should SEV-ES #VC use IST? (Re: [PATCH] Allow RDTSC and RDTSCP from userspace)
...ould be roughly like this upon entering the handler; > > build_pt_regs(); > > RSP = pt_regs->sp; > > if (RSP in VC_IST_stack) > error("unallowed nesting") > > if (RSP in current_kernel_stack) > RSP = round_down_to_8(RSP) > else > RSP = current_top_of_stack() // non-ist kernel stack > > copy_pt_regs(pt_regs, RSP); > switch_stack_to(RSP); > > To make this NMI safe, the NMI handler needs some logic too. Upon > entering NMI, it needs to check the return RSP, and if it is in the #VC > IST stack, it must do the above flow by itself...
2020 Apr 25
5
[PATCH] Allow RDTSC and RDTSCP from userspace
On Sat, Apr 25, 2020 at 1:23 PM Joerg Roedel <joro at 8bytes.org> wrote: > > On Sat, Apr 25, 2020 at 12:47:31PM -0700, Andy Lutomirski wrote: > > I assume the race you mean is: > > > > #VC > > Immediate NMI before IST gets shifted > > #VC > > > > Kaboom. > > > > How are you dealing with this? Ultimately, I think that NMI will need
2017 May 19
13
[PATCH 00/10] paravirt: make amount of paravirtualization configurable
Today paravirtualization is a all-or-nothing game: either a kernel is compiled with no paravirtualization support at all, or it is supporting paravirtualized environments like Xen pv-guests or lguest additionally to some paravirtualized tuning for KVM, Hyperv, VMWare or Xen HVM-guests. As support of pv-guests requires quite intrusive pv-hooks (e.g. all access functions to page table entries,
2017 May 19
13
[PATCH 00/10] paravirt: make amount of paravirtualization configurable
Today paravirtualization is a all-or-nothing game: either a kernel is compiled with no paravirtualization support at all, or it is supporting paravirtualized environments like Xen pv-guests or lguest additionally to some paravirtualized tuning for KVM, Hyperv, VMWare or Xen HVM-guests. As support of pv-guests requires quite intrusive pv-hooks (e.g. all access functions to page table entries,