Re: [PATCH] KVM: arm64: add esr_el2 and far_el2 to sysreg

2017-08-08 Thread gengdongjiu
Hi James, On 2017/8/9 0:27, James Morse wrote: > Hi gengdongjiu, > > On 07/08/17 18:43, gengdongjiu wrote: >> Another question, For the SEI, I want to also use SIGBUS both for the KVM >> user and non-kvm user, >> if SEA and SEI Error all use the SIGBUS to notify user space(Qemu), > >

Re: [PATCH] KVM: arm64: add esr_el2 and far_el2 to sysreg

2017-08-08 Thread gengdongjiu
Hi James, On 2017/8/9 0:27, James Morse wrote: > Hi gengdongjiu, > > On 07/08/17 18:43, gengdongjiu wrote: >> Another question, For the SEI, I want to also use SIGBUS both for the KVM >> user and non-kvm user, >> if SEA and SEI Error all use the SIGBUS to notify user space(Qemu), > >

Re: [PATCH] KVM: arm64: add esr_el2 and far_el2 to sysreg

2017-08-08 Thread James Morse
Hi gengdongjiu, On 07/08/17 18:43, gengdongjiu wrote: > Another question, For the SEI, I want to also use SIGBUS both for the KVM > user and non-kvm user, > if SEA and SEI Error all use the SIGBUS to notify user space(Qemu), User-space shouldn't necessarily be notified about Synchronous

Re: [PATCH] KVM: arm64: add esr_el2 and far_el2 to sysreg

2017-08-08 Thread James Morse
Hi gengdongjiu, On 07/08/17 18:43, gengdongjiu wrote: > Another question, For the SEI, I want to also use SIGBUS both for the KVM > user and non-kvm user, > if SEA and SEI Error all use the SIGBUS to notify user space(Qemu), User-space shouldn't necessarily be notified about Synchronous

Re: [PATCH] KVM: arm64: add esr_el2 and far_el2 to sysreg

2017-08-07 Thread gengdongjiu
Marc, On 2017/8/8 0:56, Marc Zyngier wrote: > On 07/08/17 17:23, gengdongjiu wrote: >> Hi Marc, >> As James's suggestion, I move injection SEA Error logic to the user >> space(Qemu), Qemu sets the related guest OS esr/elr/pstate/spsr >> through IOCTL KVM_SET_ONE_REG. For the SEA, when Qemu

Re: [PATCH] KVM: arm64: add esr_el2 and far_el2 to sysreg

2017-08-07 Thread gengdongjiu
Marc, On 2017/8/8 0:56, Marc Zyngier wrote: > On 07/08/17 17:23, gengdongjiu wrote: >> Hi Marc, >> As James's suggestion, I move injection SEA Error logic to the user >> space(Qemu), Qemu sets the related guest OS esr/elr/pstate/spsr >> through IOCTL KVM_SET_ONE_REG. For the SEA, when Qemu

Re: [PATCH] KVM: arm64: add esr_el2 and far_el2 to sysreg

2017-08-07 Thread gengdongjiu
Ok, thanks for James's confirmation. Another question, For the SEI, I want to also use SIGBUS both for the KVM user and non-kvm user, if SEA and SEI Error all use the SIGBUS to notify user space(Qemu), the user space(Qemu) will be confused, and do not know whether this is SEA or SEI error. so

Re: [PATCH] KVM: arm64: add esr_el2 and far_el2 to sysreg

2017-08-07 Thread gengdongjiu
Ok, thanks for James's confirmation. Another question, For the SEI, I want to also use SIGBUS both for the KVM user and non-kvm user, if SEA and SEI Error all use the SIGBUS to notify user space(Qemu), the user space(Qemu) will be confused, and do not know whether this is SEA or SEI error. so

Re: [PATCH] KVM: arm64: add esr_el2 and far_el2 to sysreg

2017-08-07 Thread James Morse
Hi gengdongjiu, On 07/08/17 17:23, gengdongjiu wrote: > As James's suggestion, I move injection SEA Error logic to the user > space(Qemu), Qemu sets the related guest OS esr/elr/pstate/spsr (because for firmware-first its the CPER records that matter, and only QEMU knows where it reserved the

Re: [PATCH] KVM: arm64: add esr_el2 and far_el2 to sysreg

2017-08-07 Thread James Morse
Hi gengdongjiu, On 07/08/17 17:23, gengdongjiu wrote: > As James's suggestion, I move injection SEA Error logic to the user > space(Qemu), Qemu sets the related guest OS esr/elr/pstate/spsr (because for firmware-first its the CPER records that matter, and only QEMU knows where it reserved the

Re: [PATCH] KVM: arm64: add esr_el2 and far_el2 to sysreg

2017-08-07 Thread Marc Zyngier
On 07/08/17 17:23, gengdongjiu wrote: > Hi Marc, > As James's suggestion, I move injection SEA Error logic to the user > space(Qemu), Qemu sets the related guest OS esr/elr/pstate/spsr > through IOCTL KVM_SET_ONE_REG. For the SEA, when Qemu sets the esr_el1.IL > bit, it needs to refer to

Re: [PATCH] KVM: arm64: add esr_el2 and far_el2 to sysreg

2017-08-07 Thread Marc Zyngier
On 07/08/17 17:23, gengdongjiu wrote: > Hi Marc, > As James's suggestion, I move injection SEA Error logic to the user > space(Qemu), Qemu sets the related guest OS esr/elr/pstate/spsr > through IOCTL KVM_SET_ONE_REG. For the SEA, when Qemu sets the esr_el1.IL > bit, it needs to refer to

Re: [PATCH] KVM: arm64: add esr_el2 and far_el2 to sysreg

2017-08-07 Thread gengdongjiu
Hi Marc, As James's suggestion, I move injection SEA Error logic to the user space(Qemu), Qemu sets the related guest OS esr/elr/pstate/spsr through IOCTL KVM_SET_ONE_REG. For the SEA, when Qemu sets the esr_el1.IL bit, it needs to refer to esr_el2.IL, else Qemu does not know the trapped

Re: [PATCH] KVM: arm64: add esr_el2 and far_el2 to sysreg

2017-08-07 Thread gengdongjiu
Hi Marc, As James's suggestion, I move injection SEA Error logic to the user space(Qemu), Qemu sets the related guest OS esr/elr/pstate/spsr through IOCTL KVM_SET_ONE_REG. For the SEA, when Qemu sets the esr_el1.IL bit, it needs to refer to esr_el2.IL, else Qemu does not know the trapped

Re: [PATCH] KVM: arm64: add esr_el2 and far_el2 to sysreg

2017-08-07 Thread Marc Zyngier
+James, since he deals with all things RAS. Please keep him on CC at all times. On 07/08/17 17:08, Dongjiu Geng wrote: > For the firmware-first RAS solution, SEA and SEI is injected > by the user space, user space needs to know the esr_el2 and > far_el2's value, so add them to sysreg. user space

Re: [PATCH] KVM: arm64: add esr_el2 and far_el2 to sysreg

2017-08-07 Thread Marc Zyngier
+James, since he deals with all things RAS. Please keep him on CC at all times. On 07/08/17 17:08, Dongjiu Geng wrote: > For the firmware-first RAS solution, SEA and SEI is injected > by the user space, user space needs to know the esr_el2 and > far_el2's value, so add them to sysreg. user space