RE: [PATCH v10 28/38] x86/fred: FRED entry/exit and dispatch code

2023-09-21 Thread Li, Xin3
> > Since future kernels will support boottime toggling of whether 32bit > > syscall interface should be enabled or not as per: > > https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?h= > > x86/entry&id=1da5c9bc119d3a749b519596b93f9b2667e93c4a > > > > It will make more sense to rep

RE: [PATCH v10 16/38] x86/ptrace: Add FRED additional information to the pt_regs structure

2023-09-21 Thread Li, Xin3
> > I guess you have FRED 3.0 spec, no? > Doh you are right, I was looking at the wrong version of the document > sorry for > the noise. Actually I appreciate your review so much!

Re: [PATCH v10 28/38] x86/fred: FRED entry/exit and dispatch code

2023-09-21 Thread Thomas Gleixner
On Thu, Sep 21 2023 at 12:48, Nikolay Borisov wrote: > On 14.09.23 г. 7:47 ч., Xin Li wrote: >> + >> +/* INT80 */ >> +case IA32_SYSCALL_VECTOR: >> +if (likely(IS_ENABLED(CONFIG_IA32_EMULATION))) { > > Since future kernels will support boottime toggling of whether 32bit > syscal

Re: [PATCH v10 28/38] x86/fred: FRED entry/exit and dispatch code

2023-09-21 Thread Nikolay Borisov
On 14.09.23 г. 7:47 ч., Xin Li wrote: From: "H. Peter Anvin (Intel)" The code to actually handle kernel and event entry/exit using FRED. It is split up into two files thus: - entry_64_fred.S contains the actual entrypoints and exit code, and saves and restores registers. - entry_fred.c c

Re: [PATCH v10 33/38] x86/entry: Add fred_entry_from_kvm() for VMX to handle IRQ/NMI

2023-09-21 Thread Nikolay Borisov
On 14.09.23 г. 7:48 ч., Xin Li wrote: In IRQ/NMI induced VM exits, KVM VMX needs to execute the respective handlers, which requires the software to create a FRED stack frame, and use it to invoke the handlers. Add fred_irq_entry_from_kvm() for this job. Export fred_entry_from_kvm() because VM

Re: [PATCH v10 33/38] x86/entry: Add fred_entry_from_kvm() for VMX to handle IRQ/NMI

2023-09-21 Thread Paolo Bonzini
On 9/21/23 14:11, Nikolay Borisov wrote: +SYM_FUNC_START(asm_fred_entry_from_kvm) +    push %rbp +    mov %rsp, %rbp use FRAME_BEGIN/FRAME_END macros to ommit this code if CONFIG_FRAME_POINTER is disabled. No, the previous stack pointer is used below, so the code might as well use %rbp for

Re: [PATCH v10 16/38] x86/ptrace: Add FRED additional information to the pt_regs structure

2023-09-21 Thread Nikolay Borisov
On 20.09.23 г. 20:23 ч., Li, Xin3 wrote: +struct fred_ss { + u64 ss : 16, // SS selector Is this structure conformant to the return state as described in FRED 5.0? — The stack segment of the interrupted context, 64 bits formatted as follows: • Bits 15:0 contain the SS sele