Re: [RFC 21/55] KVM: arm64: Forward HVC instruction to the guest hypervisor

2017-06-26 Thread Jintack Lim
On Wed, Feb 22, 2017 at 6:47 AM, Christoffer Dall wrote: > On Mon, Jan 09, 2017 at 01:24:17AM -0500, Jintack Lim wrote: >> Forward exceptions due to hvc instruction to the guest hypervisor. >> >> Signed-off-by: Jintack Lim >> --- >>

[PATCH v4 3/3] arm64: kvm: inject SError with user space specified syndrome

2017-06-26 Thread Dongjiu Geng
when SError happen, kvm notifies user space to record the CPER, user space specifies and passes the contents of ESR_EL1 on taking a virtual SError interrupt to KVM, KVM enables virtual system error or asynchronous abort with this specifies syndrome. This patch modify the world-switch to restore

Re: [RFC 06/55] KVM: arm64: Add EL2 execution context for nesting

2017-06-26 Thread Jintack Lim
Hi Christoffer, On Wed, Feb 22, 2017 at 6:10 AM, Christoffer Dall wrote: > On Mon, Jan 09, 2017 at 01:24:02AM -0500, Jintack Lim wrote: >> With the nested virtualization support, the context of the guest >> includes EL2 register states. The host manages a set of virtual EL2 >>

[PATCH v4 2/3] arm64: kvm: route synchronous external abort exceptions to el2

2017-06-26 Thread Dongjiu Geng
In the firmware-first RAS solution, guest OS receives an synchronous external abort, then trapped to EL3 by SCR_EL3.EA. Firmware inspects the HCR_EL2.TEA and chooses the target to send APEI's SEA notification. If the SCR_EL3.EA is set, delegates the error exception to the hypervisor, otherwise it

[PATCH v4 1/3] arm64: kvm: support user space to detect RAS extension feature

2017-06-26 Thread Dongjiu Geng
Handle userspace's detection for RAS extension, because sometimes the userspace needs to know the CPU's capacity Signed-off-by: Dongjiu Geng --- arch/arm64/kvm/reset.c | 11 +++ include/uapi/linux/kvm.h | 1 + 2 files changed, 12 insertions(+) diff --git

[PATCH v4] arm64: kvm: inject SError with user space specified syndrome

2017-06-26 Thread Dongjiu Geng
when SError happen, kvm notifies user space to record the CPER, user space specifies and passes the contents of ESR_EL1 on taking a virtual SError interrupt to KVM, KVM enables virtual system error or asynchronous abort with this specifies syndrome. This patch modify the world-switch to restore

Re: [PATCH v3 1/3] arm64: kvm: support kvmtool to detect RAS extension feature

2017-06-26 Thread gengdongjiu
Hi James, I have changed the SEA/SEI injection method according you suggestion, but I think this patch may also be needed. Now for the SEI, the virtual ESR value is specified by the userspace. only RAS extension support to set the virtual ESR value. so user space will check it to decide

Re: [PATCH v2] arm64: kvm: route synchronous external abort exceptions to el2

2017-06-26 Thread kbuild test robot
-external-abort-exceptions-to-el2/20170626-051545 base: https://git.kernel.org/pub/scm/virt/kvm/kvm.git linux-next config: arm64-defconfig (attached as .config) compiler: aarch64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705 reproduce: wget https://raw.githubusercontent.com/01org/lkp-tests

[PATCH v2] arm64: kvm: route synchronous external abort exceptions to el2

2017-06-26 Thread Dongjiu Geng
In the firmware-first RAS solution, guest OS receives an synchronous external abort, then trapped to EL3 by SCR_EL3.EA. Firmware inspects the HCR_EL2.TEA and chooses the target to send APEI's SEA notification. If the SCR_EL3.EA is set, delegates the error exception to the hypervisor, otherwise it

Re: [PATCH v2] KVM: arm/arm64: Signal SIGBUS when stage2 discovers hwpoison memory

2017-06-26 Thread gengdongjiu
Hi James, sorry for the late response. On 2017/6/23 17:38, James Morse wrote: > Hi gengdongjiu, > > I've spotted where we are disagreeing: there are two bits in the ESR relevant > to > external aborts. I've been treating them the same. Ok. > > It looks like KVM is testing the wrong bit. I

Re: [PATCH v2] KVM: arm/arm64: Signal SIGBUS when stage2 discovers hwpoison memory

2017-06-26 Thread gengdongjiu
Hi Peter, 2017-06-23 18:18 GMT+08:00, Peter Maydell : > On 23 June 2017 at 10:38, James Morse wrote: >> So the v8 ARM-ARM has two ways of indicating an external abort, KVM tests >> bit 9 >> The v7 ARM-ARm has a '{D,I}FSR.ExT' bit, which I think is

Re: [PATCH v2] KVM: arm/arm64: Signal SIGBUS when stage2 discovers hwpoison memory

2017-06-26 Thread gengdongjiu
Hi James, 2017-06-23 0:39 GMT+08:00, James Morse : > Hi gengdongjiu, > > On 22/06/17 07:47, gengdongjiu wrote: >> On 2017/6/21 20:44, James Morse wrote: >>> On 21/06/17 11:59, gengdongjiu wrote: On 2017/6/21 17:53, James Morse wrote: > I think we discussed this

Re: [Qemu-devel] [PATCH v3 1/4] ACPI: Add APEI GHES Table Generation support

2017-06-26 Thread gengdongjiu
Laszlo, Thank you very much for your carefully review again and again. I am following your suggestion. 2017-06-03 20:01 GMT+08:00, Laszlo Ersek : > On 05/22/17 16:23, Laszlo Ersek wrote: >> Keeping some context: >> >> On 05/12/17 23:00, Laszlo Ersek wrote: >>> On 04/30/17

[PATCH v1] arm64: kvm: route synchronous external abort exceptions to el2

2017-06-26 Thread Dongjiu Geng
In the firmware-first RAS solution, guest OS receives an synchronous external abort, then trapped to EL3 by SCR_EL3.EA. Firmware inspects the HCR_EL2.TEA and chooses the target to send APEI's SEA notification. If the SCR_EL3.EA is set, delegates the error exception to the hypervisor, otherwise it