Re: [RFC PATCH] hw/arm/virt: Support NMI injection

2020-02-05 Thread Marc Zyngier
On Tue, 4 Feb 2020 14:51:39 +1100 Gavin Shan wrote: [...] > The mechanism I figured out is to inject SError to guest, as below snippet > shows. It > helps to get a panic and guest rebooting, which looks similar to what x86/p > pc have. I think being able to inject a SError is a reasonable thin

Re: [RFC PATCH] hw/arm/virt: Support NMI injection

2020-02-04 Thread Shan Gavin
Peter Maydell 于2020年2月4日周二 下午9:22写道: > On Tue, 4 Feb 2020 at 03:51, Gavin Shan wrote: > > Note: I'm still investigating the code to see how SError can be injected > when TCG > > is used. I think we need same function when TCG is enabled, or it's > something for > > future. > > TCG doesn't curren

Re: [RFC PATCH] hw/arm/virt: Support NMI injection

2020-02-04 Thread Peter Maydell
On Tue, 4 Feb 2020 at 03:51, Gavin Shan wrote: > Note: I'm still investigating the code to see how SError can be injected when > TCG > is used. I think we need same function when TCG is enabled, or it's something > for > future. TCG doesn't currently implement SError -- it could be added, but t

Re: [RFC PATCH] hw/arm/virt: Support NMI injection

2020-02-03 Thread Gavin Shan
On 1/31/20 8:39 PM, Marc Zyngier wrote: On 2020-01-31 06:59, Gavin Shan wrote: On 1/29/20 8:04 PM, Marc Zyngier wrote: On 2020-01-29 02:44, Alexey Kardashevskiy wrote: On 28/01/2020 17:48, Gavin Shan wrote: but a NMI is injected through LAPIC on x86. So I'm not sure what architect (system res

Re: [RFC PATCH] hw/arm/virt: Support NMI injection

2020-01-31 Thread Marc Zyngier
On 2020-01-31 06:59, Gavin Shan wrote: On 1/29/20 8:04 PM, Marc Zyngier wrote: On 2020-01-29 02:44, Alexey Kardashevskiy wrote: On 28/01/2020 17:48, Gavin Shan wrote: but a NMI is injected through LAPIC on x86. So I'm not sure what architect (system reset on ppc or injecting NMI on x86) aarc

Re: [RFC PATCH] hw/arm/virt: Support NMI injection

2020-01-30 Thread Gavin Shan
On 1/29/20 8:04 PM, Marc Zyngier wrote: On 2020-01-29 02:44, Alexey Kardashevskiy wrote: On 28/01/2020 17:48, Gavin Shan wrote: but a NMI is injected through LAPIC on x86. So I'm not sure what architect (system reset on ppc or injecting NMI on x86) aarch64 should follow. I'd say whatever trig

Re: [RFC PATCH] hw/arm/virt: Support NMI injection

2020-01-30 Thread Gavin Shan
On 1/30/20 9:58 PM, Marc Zyngier wrote: On 2020-01-29 21:54, Gavin Shan wrote: On 1/29/20 6:57 PM, Julien Thierry wrote: On 1/29/20 3:46 AM, Gavin Shan wrote: On 1/28/20 7:29 PM, Julien Thierry wrote: .../... Julien, thanks for the explanation. The question we're not sure if NMI should be

Re: [RFC PATCH] hw/arm/virt: Support NMI injection

2020-01-30 Thread Marc Zyngier
Gavin, On 2020-01-29 21:54, Gavin Shan wrote: On 1/29/20 6:57 PM, Julien Thierry wrote: On 1/29/20 3:46 AM, Gavin Shan wrote: On 1/28/20 7:29 PM, Julien Thierry wrote: .../... Julien, thanks for the explanation. The question we're not sure if NMI should be injected on receiving HMP/QMP "

Re: [RFC PATCH] hw/arm/virt: Support NMI injection

2020-01-29 Thread Gavin Shan
On 1/29/20 6:57 PM, Julien Thierry wrote: On 1/29/20 3:46 AM, Gavin Shan wrote: On 1/28/20 7:29 PM, Julien Thierry wrote: .../... Julien, thanks for the explanation. The question we're not sure if NMI should be injected on receiving HMP/QMP "nmi" command. It means it's not clear what behavi

Re: [RFC PATCH] hw/arm/virt: Support NMI injection

2020-01-29 Thread Marc Zyngier
On 2020-01-29 02:44, Alexey Kardashevskiy wrote: On 28/01/2020 17:48, Gavin Shan wrote: but a NMI is injected through LAPIC on x86. So I'm not sure what architect (system reset on ppc or injecting NMI on x86) aarch64 should follow. I'd say whatever triggers in-kernel debugger or kdump but I am

Re: [RFC PATCH] hw/arm/virt: Support NMI injection

2020-01-28 Thread Julien Thierry
On 1/29/20 3:46 AM, Gavin Shan wrote: On 1/28/20 7:29 PM, Julien Thierry wrote: Hi Gavin, On 1/28/20 6:48 AM, Gavin Shan wrote: [including more folks into the discussion] On Fri, 17 Jan 2020 at 14:00, Peter Maydell wrote: On Thu, 19 Dec 2019 at 04:06, Gavin Shan wrote: This supports NM

Re: [RFC PATCH] hw/arm/virt: Support NMI injection

2020-01-28 Thread Gavin Shan
On 1/28/20 7:29 PM, Julien Thierry wrote: Hi Gavin, On 1/28/20 6:48 AM, Gavin Shan wrote: [including more folks into the discussion] On Fri, 17 Jan 2020 at 14:00, Peter Maydell wrote: On Thu, 19 Dec 2019 at 04:06, Gavin Shan wrote: This supports NMI injection for virtual machine and curre

Re: [RFC PATCH] hw/arm/virt: Support NMI injection

2020-01-28 Thread Gavin Shan
On 1/29/20 1:44 PM, Alexey Kardashevskiy wrote: On 28/01/2020 17:48, Gavin Shan wrote: [including more folks into the discussion] On Fri, 17 Jan 2020 at 14:00, Peter Maydell wrote: On Thu, 19 Dec 2019 at 04:06, Gavin Shan wrote: This supports NMI injection for virtual machine and current

Re: [RFC PATCH] hw/arm/virt: Support NMI injection

2020-01-28 Thread Gavin Shan
On 1/28/20 9:56 PM, Auger Eric wrote: Hi Marc, On 1/28/20 10:25 AM, Marc Zyngier wrote: Gavin, Eric, On 2020-01-28 08:05, Auger Eric wrote: Hi, On 1/28/20 7:48 AM, Gavin Shan wrote: [including more folks into the discussion] On Fri, 17 Jan 2020 at 14:00, Peter Maydell wrote: On Thu, 19 D

Re: [RFC PATCH] hw/arm/virt: Support NMI injection

2020-01-28 Thread Alexey Kardashevskiy
On 28/01/2020 17:48, Gavin Shan wrote: > [including more folks into the discussion] > >> On Fri, 17 Jan 2020 at 14:00, Peter Maydell >> wrote: >>> On Thu, 19 Dec 2019 at 04:06, Gavin Shan wrote: This supports NMI injection for virtual machine and currently it's only supported on GIC

Re: [RFC PATCH] hw/arm/virt: Support NMI injection

2020-01-28 Thread Julien Thierry
Hi Gavin, On 1/28/20 6:48 AM, Gavin Shan wrote: [including more folks into the discussion] On Fri, 17 Jan 2020 at 14:00, Peter Maydell wrote: On Thu, 19 Dec 2019 at 04:06, Gavin Shan wrote: This supports NMI injection for virtual machine and currently it's only supported on GICv3 controlle

Re: [RFC PATCH] hw/arm/virt: Support NMI injection

2020-01-28 Thread Marc Zyngier
On 2020-01-28 10:59, Peter Maydell wrote: On Tue, 28 Jan 2020 at 10:56, Auger Eric wrote: On 1/28/20 10:25 AM, Marc Zyngier wrote: > You *could* try something like SDEI [1], but that's a pretty terrible > interface too. Thank you for the pointer. There was a patchset recently that had an SDE

Re: [RFC PATCH] hw/arm/virt: Support NMI injection

2020-01-28 Thread Peter Maydell
On Tue, 28 Jan 2020 at 10:56, Auger Eric wrote: > On 1/28/20 10:25 AM, Marc Zyngier wrote: > > You *could* try something like SDEI [1], but that's a pretty terrible > > interface too. > > Thank you for the pointer. There was a patchset recently that had an SDEI implementation, but I would strongl

Re: [RFC PATCH] hw/arm/virt: Support NMI injection

2020-01-28 Thread Auger Eric
Hi Marc, On 1/28/20 10:25 AM, Marc Zyngier wrote: > Gavin, Eric, > > On 2020-01-28 08:05, Auger Eric wrote: >> Hi, >> >> On 1/28/20 7:48 AM, Gavin Shan wrote: >>> [including more folks into the discussion] >>> On Fri, 17 Jan 2020 at 14:00, Peter Maydell wrote: > On Thu, 19 Dec 2019

Re: [RFC PATCH] hw/arm/virt: Support NMI injection

2020-01-28 Thread Marc Zyngier
Gavin, Eric, On 2020-01-28 08:05, Auger Eric wrote: Hi, On 1/28/20 7:48 AM, Gavin Shan wrote: [including more folks into the discussion] On Fri, 17 Jan 2020 at 14:00, Peter Maydell wrote: On Thu, 19 Dec 2019 at 04:06, Gavin Shan wrote: This supports NMI injection for virtual machine and

Re: [RFC PATCH] hw/arm/virt: Support NMI injection

2020-01-28 Thread Auger Eric
Hi, On 1/28/20 7:48 AM, Gavin Shan wrote: > [including more folks into the discussion] > >> On Fri, 17 Jan 2020 at 14:00, Peter Maydell >> wrote: >>> On Thu, 19 Dec 2019 at 04:06, Gavin Shan wrote: This supports NMI injection for virtual machine and currently it's only supported on GI

Re: [RFC PATCH] hw/arm/virt: Support NMI injection

2020-01-27 Thread Gavin Shan
[including more folks into the discussion] On Fri, 17 Jan 2020 at 14:00, Peter Maydell wrote: On Thu, 19 Dec 2019 at 04:06, Gavin Shan wrote: This supports NMI injection for virtual machine and currently it's only supported on GICv3 controller, which is emulated by qemu or host kernel. The d

Re: [RFC PATCH] hw/arm/virt: Support NMI injection

2020-01-17 Thread Peter Maydell
On Thu, 19 Dec 2019 at 04:06, Gavin Shan wrote: > This supports NMI injection for virtual machine and currently it's only > supported on GICv3 controller, which is emulated by qemu or host kernel. > The design is highlighted as below: > >* The NMI is identified by its priority (0x20). In the g

Re: [RFC PATCH] hw/arm/virt: Support NMI injection

2020-01-14 Thread Gavin Shan
On 12/19/19 3:06 PM, Gavin Shan wrote: This supports NMI injection for virtual machine and currently it's only supported on GICv3 controller, which is emulated by qemu or host kernel. The design is highlighted as below: * The NMI is identified by its priority (0x20). In the guest (linux)

[RFC PATCH] hw/arm/virt: Support NMI injection

2019-12-18 Thread Gavin Shan
This supports NMI injection for virtual machine and currently it's only supported on GICv3 controller, which is emulated by qemu or host kernel. The design is highlighted as below: * The NMI is identified by its priority (0x20). In the guest (linux) kernel, the GICC_PMR is set to 0x80, to