Re: [PATCH 3/3] KVM: arm64: Implement accessors for vGIC CPU interface registers

2015-09-01 Thread Christoffer Dall
On Tue, Sep 01, 2015 at 04:09:18PM +0300, Pavel Fedin wrote: > Hello! > > > Have you thought about proper locking/serializing of access to the GIC > > state in these accessor functions? > > I am in the process of rewriting the whole thing, and i came to this point. > What kind of locking wo

RE: [PATCH 3/3] KVM: arm64: Implement accessors for vGIC CPU interface registers

2015-09-01 Thread Pavel Fedin
Hello! > Have you thought about proper locking/serializing of access to the GIC > state in these accessor functions? I am in the process of rewriting the whole thing, and i came to this point. What kind of locking would you expect ? It's a CPU interface, it does not affect state of any oth

RE: [PATCH 3/3] KVM: arm64: Implement accessors for vGIC CPU interface registers

2015-08-31 Thread Pavel Fedin
Hello! > I think it's worth moving the thing to device attributes, yes, > especially given that I never expect us to trap and emulate GICv3 system > register accesses from a guest in KVM. Is that correct? Yes, but nevertheless, for GICv2 attributes we reuse the same code which is expected to

Re: [PATCH 3/3] KVM: arm64: Implement accessors for vGIC CPU interface registers

2015-08-31 Thread Christoffer Dall
On Sun, Aug 30, 2015 at 07:39:05PM +0100, Peter Maydell wrote: > On 30 August 2015 at 17:50, Christoffer Dall > wrote: > > I had imagined we would encode the GICv3 register accesses through the > > device API and not through the system register API, since I'm not crazy > > about polluting the gene

Re: [PATCH 3/3] KVM: arm64: Implement accessors for vGIC CPU interface registers

2015-08-31 Thread Christoffer Dall
On Mon, Aug 31, 2015 at 10:43:27AM +0300, Pavel Fedin wrote: > Hello! > > > > I had imagined we would encode the GICv3 register accesses through the > > > device API and not through the system register API, since I'm not crazy > > > about polluting the general system register handling logic with

RE: [PATCH 3/3] KVM: arm64: Implement accessors for vGIC CPU interface registers

2015-08-31 Thread Pavel Fedin
Hello! > > I had imagined we would encode the GICv3 register accesses through the > > device API and not through the system register API, since I'm not crazy > > about polluting the general system register handling logic with GIC > > registers solely for the purposes of migration. > > There's an

Re: [PATCH 3/3] KVM: arm64: Implement accessors for vGIC CPU interface registers

2015-08-30 Thread Peter Maydell
On 30 August 2015 at 17:50, Christoffer Dall wrote: > I had imagined we would encode the GICv3 register accesses through the > device API and not through the system register API, since I'm not crazy > about polluting the general system register handling logic with GIC > registers solely for the pu

Re: [PATCH 3/3] KVM: arm64: Implement accessors for vGIC CPU interface registers

2015-08-30 Thread Christoffer Dall
On Fri, Aug 28, 2015 at 03:56:12PM +0300, Pavel Fedin wrote: > This commit adds accessors for all registers, being part of saved vGIC > context in the form of ICH_VMCR_EL2. This is necessary for enabling vGICv3 > live migration. > > Signed-off-by: Pavel Fedin > --- > arch/arm64/kvm/sys_regs.c