Re: [PATCH 1/2] KVM: arm64: Don't write junk to sysregs on reset

2019-08-05 Thread Zenghui Yu
Hi Marc, On 2019/8/5 20:15, Marc Zyngier wrote: At the moment, the way we reset system registers is mildly insane: We write junk to them, call the reset functions, and then check that we have something else in them. The "fun" thing is that this can happen while the guest is running (PSCI, for e

Re: [PATCH 1/9] KVM: arm64: Document PV-time interface

2019-08-05 Thread Christophe de Dinechin
Steven Price writes: > Introduce a paravirtualization interface for KVM/arm64 based on the > "Arm Paravirtualized Time for Arm-Base Systems" specification DEN 0057A. > > This only adds the details about "Stolen Time" as the details of "Live > Physical Time" have not been fully agreed. > [...] >

Re: [PATCH 6/9] KVM: arm64: Provide a PV_TIME device to user space

2019-08-05 Thread Marc Zyngier
On 05/08/2019 17:10, Steven Price wrote: > On 03/08/2019 13:51, Marc Zyngier wrote: >> On Fri, 2 Aug 2019 15:50:14 +0100 >> Steven Price wrote: >> >>> Allow user space to inform the KVM host where in the physical memory >>> map the paravirtualized time structures should be located. >>> >>> A devi

Re: [PATCH 6/9] KVM: arm64: Provide a PV_TIME device to user space

2019-08-05 Thread Steven Price
On 03/08/2019 13:51, Marc Zyngier wrote: > On Fri, 2 Aug 2019 15:50:14 +0100 > Steven Price wrote: > >> Allow user space to inform the KVM host where in the physical memory >> map the paravirtualized time structures should be located. >> >> A device is created which provides the base address of

Re: [PATCH 4/9] KVM: arm64: Support stolen time reporting via shared structure

2019-08-05 Thread Steven Price
On 03/08/2019 19:13, Marc Zyngier wrote: > On Sat, 3 Aug 2019 18:58:17 +0100 > Marc Zyngier wrote: > >> On Fri, 2 Aug 2019 15:50:12 +0100 >> Steven Price wrote: >> >>> Implement the service call for configuring a shared structre between a >>> VCPU and the hypervisor in which the hypervisor can

Re: [PATCH 4/9] KVM: arm64: Support stolen time reporting via shared structure

2019-08-05 Thread Steven Price
On 03/08/2019 12:55, Marc Zyngier wrote: > On Fri, 2 Aug 2019 15:50:12 +0100 > Steven Price wrote: > >> Implement the service call for configuring a shared structre between a > > structure > >> VCPU and the hypervisor in which the hypervisor can write the time >> stolen from the VCPU's executi

Re: [PATCH 0/9] arm64: Stolen time support

2019-08-05 Thread Marc Zyngier
On 05/08/2019 14:06, Steven Price wrote: > On 03/08/2019 19:05, Marc Zyngier wrote: >> On Fri, 2 Aug 2019 15:50:08 +0100 >> Steven Price wrote: >> >> Hi Steven, >> >>> This series add support for paravirtualized time for arm64 guests and >>> KVM hosts following the specification in Arm's document

Re: [PATCH 3/9] KVM: arm64: Implement PV_FEATURES call

2019-08-05 Thread Steven Price
On 03/08/2019 12:21, Marc Zyngier wrote: > On Fri, 2 Aug 2019 15:50:11 +0100 > Steven Price wrote: > >> This provides a mechanism for querying which paravirtualized features >> are available in this hypervisor. >> >> Also add the header file which defines the ABI for the paravirtualized >> clock

Re: [PATCH 1/9] KVM: arm64: Document PV-time interface

2019-08-05 Thread Steven Price
On 05/08/2019 04:23, Zenghui Yu wrote: > Hi Steven, > > On 2019/8/2 22:50, Steven Price wrote: >> Introduce a paravirtualization interface for KVM/arm64 based on the >> "Arm Paravirtualized Time for Arm-Base Systems" specification DEN 0057A. >> >> This only adds the details about "Stolen Time" as

Re: [PATCH 1/9] KVM: arm64: Document PV-time interface

2019-08-05 Thread Steven Price
On 03/08/2019 12:13, Marc Zyngier wrote: > On Fri, 2 Aug 2019 15:50:09 +0100 > Steven Price wrote: > > [+Peter for the userspace aspect of things] > > Hi Steve, > >> Introduce a paravirtualization interface for KVM/arm64 based on the >> "Arm Paravirtualized Time for Arm-Base Systems" specifica

Re: [PATCH 0/9] arm64: Stolen time support

2019-08-05 Thread Steven Price
On 03/08/2019 19:05, Marc Zyngier wrote: > On Fri, 2 Aug 2019 15:50:08 +0100 > Steven Price wrote: > > Hi Steven, > >> This series add support for paravirtualized time for arm64 guests and >> KVM hosts following the specification in Arm's document DEN 0057A: >> >> https://developer.arm.com/docs

[PATCH 2/2] KVM: arm: Don't write junk to CP15 registers on reset

2019-08-05 Thread Marc Zyngier
At the moment, the way we reset CP15 registers is mildly insane: We write junk to them, call the reset functions, and then check that we have something else in them. The "fun" thing is that this can happen while the guest is running (PSCI, for example). If anything in KVM has to evaluate the state

[PATCH 1/2] KVM: arm64: Don't write junk to sysregs on reset

2019-08-05 Thread Marc Zyngier
At the moment, the way we reset system registers is mildly insane: We write junk to them, call the reset functions, and then check that we have something else in them. The "fun" thing is that this can happen while the guest is running (PSCI, for example). If anything in KVM has to evaluate the sta

[PATCH 0/2] KVM: arm/arm64: Revamp sysreg reset checks

2019-08-05 Thread Marc Zyngier
The way we deal with sysreg reset is terrible, as we write junk to them while other parts of the system may be evaluating these. That's obviously wrong. Instead, let's switch to a mode where we track which sysregs have had a reset function applied to them. The result is less bad, but my gut feelin

Re: [PATCH 7/9] arm/arm64: Provide a wrapper for SMCCC 1.1 calls

2019-08-05 Thread Will Deacon
On Fri, Aug 02, 2019 at 03:50:15PM +0100, Steven Price wrote: > SMCCC 1.1 calls may use either HVC or SMC depending on the PSCI > conduit. Rather than coding this in every call site provide a macro > which uses the correct instruction. The macro also handles the case > where no PSCI conduit is conf