Re: [PATCH v3 08/11] KVM: arm: implement dirty bit mechanism for debug registers

2015-07-13 Thread zichao
On 2015/7/9 19:50, Christoffer Dall wrote: > On Tue, Jul 07, 2015 at 11:24:06AM +0100, Will Deacon wrote: >> On Tue, Jul 07, 2015 at 11:06:57AM +0100, Zhichao Huang wrote: >>> Chazy and me are talking about how to reduce the saving/restoring >>> overhead for debug registers. >>> We want to add a s

Re: [PATCH v3 04/11] KVM: arm: common infrastructure for handling AArch32 CP14/CP15

2015-07-01 Thread zichao
On June 30, 2015 3:43:34 AM GMT+08:00, Christoffer Dall wrote: >On Mon, Jun 22, 2015 at 06:41:27PM +0800, Zhichao Huang wrote: >> As we're about to trap a bunch of CP14 registers, let's rework >> the CP15 handling so it can be generalized and work with multiple >> tables. >> >> Signed-off-by:

Re: [PATCH v3 06/11] KVM: arm: add trap handlers for 32-bit debug registers

2015-07-01 Thread zichao
On June 30, 2015 5:16:41 AM GMT+08:00, Christoffer Dall wrote: >On Mon, Jun 22, 2015 at 06:41:29PM +0800, Zhichao Huang wrote: >> Add handlers for all the 32-bit debug registers. >> >> Signed-off-by: Zhichao Huang >> --- >> arch/arm/include/asm/kvm_asm.h | 12 >> arch/arm/include/asm/

Re: [PATCH v3 01/11] KVM: arm: plug guest debug exploit

2015-07-01 Thread zichao
On June 29, 2015 11:49:53 PM GMT+08:00, Christoffer Dall wrote: >On Mon, Jun 22, 2015 at 06:41:24PM +0800, Zhichao Huang wrote: >> Hardware debugging in guests is not intercepted currently, it means >> that a malicious guest can bring down the entire machine by writing >> to the debug registers

Re: [PATCH v2 05/11] KVM: arm: check ordering of all system register tables

2015-06-14 Thread zichao
On 2015/6/10 21:52, Alex Bennée wrote: > > Zhichao Huang writes: > >> We now have multiple tables for the various system registers >> we trap. Make sure we check the order of all of them, as it is >> critical that we get the order right (been there, done that...). >> >> Signed-off-by: Zhichao

Re: [PATCH v2 04/11] KVM: arm: common infrastructure for handling AArch32 CP14/CP15

2015-06-14 Thread zichao
On 2015/6/9 18:45, Alex Bennée wrote: > > Zhichao Huang writes: > >> As we're about to trap a bunch of CP14 registers, let's rework >> the CP15 handling so it can be generalized and work with multiple >> tables. >> >> Signed-off-by: Zhichao Huang >> --- >> arch/arm/kvm/coproc.c | 17

Re: [PATCH v2 01/11] KVM: arm: plug guest debug exploit

2015-06-14 Thread zichao
and the host, would it be acceptable? On 2015/6/15 0:08, zichao wrote: > Hi, Marc, > > On 2015/6/9 18:29, Marc Zyngier wrote: >> On 07/06/15 14:40, zichao wrote: >>> Hi, Marc, >>> >>> On 2015/6/1 18:56, Marc Zyngier wrote: >>>> Hi Zhi

Re: [PATCH v2 01/11] KVM: arm: plug guest debug exploit

2015-06-14 Thread zichao
Hi, Marc, On 2015/6/9 18:29, Marc Zyngier wrote: > On 07/06/15 14:40, zichao wrote: >> Hi, Marc, >> >> On 2015/6/1 18:56, Marc Zyngier wrote: >>> Hi Zhichao, >>> >>> On 31/05/15 05:27, Zhichao Huang wrote: >>>> Hardware debugging

Re: [PATCH v2 09/11] KVM: arm: disable debug mode if we don't actually need it.

2015-06-07 Thread zichao
Hi, Will, On 2015/6/1 18:16, Will Deacon wrote: > On Sun, May 31, 2015 at 05:27:10AM +0100, Zhichao Huang wrote: >> Until now we enable debug mode all the time even if we don't >> actually need it. >> >> Inspired by the implementation in arm64, disable debug mode if >> we don't need it. And then w

Re: [PATCH v2 01/11] KVM: arm: plug guest debug exploit

2015-06-07 Thread zichao
Hi, Marc, On 2015/6/1 18:56, Marc Zyngier wrote: > Hi Zhichao, > > On 31/05/15 05:27, Zhichao Huang wrote: >> Hardware debugging in guests is not intercepted currently, it means >> that a malicious guest can bring down the entire machine by writing >> to the debug registers. >> >> This patch enab