Re: [PATCH v11 0/4] set VSESR_EL2 by user space and support NOTIFY_SEI notification
James, > >> I do not know when it is merge-window. About the apply version, it does not >> have limited. > > 'git fetch' Linus' tree and look at the tags. 'v4.16' lost its '-rc' suffixes, > and there isn't a 'v4.17-rc1' yet, so we are still in the merge window. > > Linus sends a message to LKML. eg: > https://lkml.org/lkml/2018/4/1/175 > > net-next closes shortly before the merge window, and re-opens afterwards. > There > is a handy web page: > http://vger.kernel.org/~davem/net-next.html Thanks for this information, got it.
Re: [PATCH v11 0/4] set VSESR_EL2 by user space and support NOTIFY_SEI notification
Hi gengdongjiu, On 12/04/18 07:09, gengdongjiu wrote: > On 2018/4/10 22:15, James Morse wrote: >> On 09/04/18 22:36, Dongjiu Geng wrote: >>> 1. Detect whether KVM can set set guest SError syndrome >>> 2. Support to Set VSESR_EL2 and inject SError by user space. >>> 3. Support live migration to keep SError pending state and VSESR_EL2 value. >>> 4. ACPI 6.1 adds support for NOTIFY_SEI as a GHES notification mechanism, >>> so support this >>>notification in software, KVM or kernel ARCH code call >>> handle_guest_sei() to let ACP driver >>>to handle this notification. >> >> Please don't post code during the merge-window, will this apply to >> v4.17-rc1? We >> can't know until its tagged. Posting code during the merge-window isn't helpful as the kernel is a moving target, its better to wait for an 'rc' to base it on. > I do not know when it is merge-window. About the apply version, it does not > have limited. 'git fetch' Linus' tree and look at the tags. 'v4.16' lost its '-rc' suffixes, and there isn't a 'v4.17-rc1' yet, so we are still in the merge window. Linus sends a message to LKML. eg: https://lkml.org/lkml/2018/4/1/175 net-next closes shortly before the merge window, and re-opens afterwards. There is a handy web page: http://vger.kernel.org/~davem/net-next.html >> This series is doing two separate things, please split it into two series. > OK, thanks! > >> >> But on the ACPI front: I don't see how any OS can support your NOTIFY_SEI >> when >> firmware is ignoring the normal world's PSTATE.A. >> >> The latest lobe of that discussion was on the list here: >> https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1611496.html > I have replied the mail. > I still have some questions that need to clarify with you. > After clarification, we will follow that. > The question is in the reply of this mail > "https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1611496.html"; Lets keep that discussion on v9 then. >> As it is, we would need to spot SError being delivered while SError is >> masked, >> spray nasty messages about firmware being horrifically buggy, then panic(). >> For >> a corrected error, this looks bad, but its preferable to letting firmware >> silently overwrite the exception registers, causing linux to spin through the >> vectors 'eret' with all exceptions masked. >> I still think its best to wait for firmware that does the right thing. > Let us discuss that in another mail. > In a summary, I think firmware follow below rule can be OK, right? > 1. The exception came from the EL that SError should be routed to(according > to hcr_EL2.{AMO, TGE}),but PSTATE.A was set, EL3 firmware can't deliver > SError; > 2. The exception came from the EL that SError should not be routed > to(according to hcr_EL2.{AMO, TGE}),even though the PSTATE.A was set,EL3 > firmware still deliver SError Problem here, more on v9. Thanks, James
Re: [PATCH v11 0/4] set VSESR_EL2 by user space and support NOTIFY_SEI notification
Hi James, thanks for this mail. On 2018/4/10 22:15, James Morse wrote: > Hi Dongjiu Geng, > > On 09/04/18 22:36, Dongjiu Geng wrote: >> 1. Detect whether KVM can set set guest SError syndrome >> 2. Support to Set VSESR_EL2 and inject SError by user space. >> 3. Support live migration to keep SError pending state and VSESR_EL2 value. >> 4. ACPI 6.1 adds support for NOTIFY_SEI as a GHES notification mechanism, so >> support this >>notification in software, KVM or kernel ARCH code call handle_guest_sei() >> to let ACP driver >>to handle this notification. > > Please don't post code during the merge-window, will this apply to v4.17-rc1? > We > can't know until its tagged. I do not know when it is merge-window. About the apply version, it does not have limited. > > > This series is doing two separate things, please split it into two series. OK, thanks! > > But on the ACPI front: I don't see how any OS can support your NOTIFY_SEI when > firmware is ignoring the normal world's PSTATE.A. > > The latest lobe of that discussion was on the list here: > https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1611496.html I have replied the mail. I still have some questions that need to clarify with you. After clarification, we will follow that. The question is in the reply of this mail "https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1611496.html"; > > > As it is, we would need to spot SError being delivered while SError is masked, > spray nasty messages about firmware being horrifically buggy, then panic(). > For > a corrected error, this looks bad, but its preferable to letting firmware > silently overwrite the exception registers, causing linux to spin through the > vectors 'eret' with all exceptions masked. > I still think its best to wait for firmware that does the right thing. Let us discuss that in another mail. In a summary, I think firmware follow below rule can be OK, right? 1. The exception came from the EL that SError should be routed to(according to hcr_EL2.{AMO, TGE}),but PSTATE.A was set, EL3 firmware can't deliver SError; 2. The exception came from the EL that SError should not be routed to(according to hcr_EL2.{AMO, TGE}),even though the PSTATE.A was set,EL3 firmware still deliver SError > > > Thanks, > > James > > . >
Re: [PATCH v11 0/4] set VSESR_EL2 by user space and support NOTIFY_SEI notification
Hi Dongjiu Geng, On 09/04/18 22:36, Dongjiu Geng wrote: > 1. Detect whether KVM can set set guest SError syndrome > 2. Support to Set VSESR_EL2 and inject SError by user space. > 3. Support live migration to keep SError pending state and VSESR_EL2 value. > 4. ACPI 6.1 adds support for NOTIFY_SEI as a GHES notification mechanism, so > support this >notification in software, KVM or kernel ARCH code call handle_guest_sei() > to let ACP driver >to handle this notification. Please don't post code during the merge-window, will this apply to v4.17-rc1? We can't know until its tagged. This series is doing two separate things, please split it into two series. But on the ACPI front: I don't see how any OS can support your NOTIFY_SEI when firmware is ignoring the normal world's PSTATE.A. The latest lobe of that discussion was on the list here: https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1611496.html As it is, we would need to spot SError being delivered while SError is masked, spray nasty messages about firmware being horrifically buggy, then panic(). For a corrected error, this looks bad, but its preferable to letting firmware silently overwrite the exception registers, causing linux to spin through the vectors 'eret' with all exceptions masked. I still think its best to wait for firmware that does the right thing. Thanks, James
[PATCH v11 0/4] set VSESR_EL2 by user space and support NOTIFY_SEI notification
1. Detect whether KVM can set set guest SError syndrome 2. Support to Set VSESR_EL2 and inject SError by user space. 3. Support live migration to keep SError pending state and VSESR_EL2 value. 4. ACPI 6.1 adds support for NOTIFY_SEI as a GHES notification mechanism, so support this notification in software, KVM or kernel ARCH code call handle_guest_sei() to let ACP driver to handle this notification. Change since V10: Address James's comments, thanks James 1. Merge the helper function with the user. 2. Move the ISS_MASK into pend_guest_serror() to clear top bits 3. Make kvm_vcpu_events struct align to 4 bytes 4. Add something check in the kvm_arm_vcpu_set_events() 5. Check kvm_arm_vcpu_get/set_events()'s return value. 6. Initialise kvm_vcpu_events to 0 so that padding transferred to user-space doesn't contain kernel stack. Dongjiu Geng (4): arm64: KVM: export the capability to set guest SError syndrome arm/arm64: KVM: Add KVM_GET/SET_VCPU_EVENTS ACPI / APEI: Add SEI notification type support for ARMv8 arm64: handle NOTIFY_SEI notification by the APEI driver Documentation/virtual/kvm/api.txt| 39 -- arch/arm/include/asm/kvm_host.h | 6 arch/arm/kvm/guest.c | 12 arch/arm64/include/asm/kvm_emulate.h | 5 arch/arm64/include/asm/kvm_host.h| 7 + arch/arm64/include/asm/system_misc.h | 1 + arch/arm64/include/uapi/asm/kvm.h| 12 arch/arm64/kernel/traps.c| 4 +++ arch/arm64/kvm/guest.c | 31 + arch/arm64/kvm/inject_fault.c| 7 - arch/arm64/kvm/reset.c | 4 +++ arch/arm64/mm/fault.c| 10 +++ drivers/acpi/apei/Kconfig| 15 ++ drivers/acpi/apei/ghes.c | 53 include/acpi/ghes.h | 1 + include/uapi/linux/kvm.h | 1 + virt/kvm/arm/arm.c | 21 ++ 17 files changed, 226 insertions(+), 3 deletions(-) -- 1.9.1