Re: [Qemu-devel] [PATCH 5/5] hw: arm_gic_kvm: Add KVM VGIC save/restore logic

2013-09-23 Thread Christoffer Dall
On Mon, Sep 23, 2013 at 09:02:44PM +0900, Peter Maydell wrote: > On 23 September 2013 11:14, Christoffer Dall > wrote: > > On Sat, Sep 21, 2013 at 06:38:19PM +0900, Peter Maydell wrote: > > (2) How does the arm_gic_kvm.c code detect the underlying host CPU that > > the kernel read the regist

Re: [Qemu-devel] [PATCH 5/5] hw: arm_gic_kvm: Add KVM VGIC save/restore logic

2013-09-23 Thread Peter Maydell
On 23 September 2013 11:14, Christoffer Dall wrote: > On Sat, Sep 21, 2013 at 06:38:19PM +0900, Peter Maydell wrote: > (2) How does the arm_gic_kvm.c code detect the underlying host CPU that > the kernel read the register from when it returned the value of the > register to do the prope

Re: [Qemu-devel] [PATCH 5/5] hw: arm_gic_kvm: Add KVM VGIC save/restore logic

2013-09-22 Thread Christoffer Dall
On Sat, Sep 21, 2013 at 06:38:19PM +0900, Peter Maydell wrote: > On 21 September 2013 06:46, Christoffer Dall > wrote: > > On Sat, Sep 21, 2013 at 06:22:23AM +0900, Peter Maydell wrote: > >> *) for getting TCG<->KVM and KVM-with-non-host-CPU cases > >> right we need to do translation anyway, or a

Re: [Qemu-devel] [PATCH 5/5] hw: arm_gic_kvm: Add KVM VGIC save/restore logic

2013-09-21 Thread Peter Maydell
On 21 September 2013 06:46, Christoffer Dall wrote: > On Sat, Sep 21, 2013 at 06:22:23AM +0900, Peter Maydell wrote: >> *) for getting TCG<->KVM and KVM-with-non-host-CPU cases >> right we need to do translation anyway, or at least think about it. > > Why? Wouldn't we always only support the case

Re: [Qemu-devel] [PATCH 5/5] hw: arm_gic_kvm: Add KVM VGIC save/restore logic

2013-09-20 Thread Christoffer Dall
On Fri, Sep 20, 2013 at 11:09:47PM +0200, Paolo Bonzini wrote: > Il 20/09/2013 22:41, Christoffer Dall ha scritto: > >> > kvm_arm_gic_dist_readr > >> > kvm_arm_gic_dist_writer > >> > > >> > Why not get_reg/set_reg (I was quite surprised to see readr instead of > >> > reader :) and it took me a whi

Re: [Qemu-devel] [PATCH 5/5] hw: arm_gic_kvm: Add KVM VGIC save/restore logic

2013-09-20 Thread Christoffer Dall
On Sat, Sep 21, 2013 at 06:22:23AM +0900, Peter Maydell wrote: > On 21 September 2013 04:50, Christoffer Dall > wrote: > > On Fri, Sep 06, 2013 at 04:13:32PM +0100, Peter Maydell wrote: > >> > /* these registers are mainly used for save/restore of KVM state */ > >> > uint8_t binary_poin

Re: [Qemu-devel] [PATCH 5/5] hw: arm_gic_kvm: Add KVM VGIC save/restore logic

2013-09-20 Thread Paolo Bonzini
Il 20/09/2013 22:41, Christoffer Dall ha scritto: >> > kvm_arm_gic_dist_readr >> > kvm_arm_gic_dist_writer >> > >> > Why not get_reg/set_reg (I was quite surprised to see readr instead of >> > reader :) and it took me a while to understand the convention)? Or if >> > the name is too long, s/readr

Re: [Qemu-devel] [PATCH 5/5] hw: arm_gic_kvm: Add KVM VGIC save/restore logic

2013-09-20 Thread Peter Maydell
On 21 September 2013 04:50, Christoffer Dall wrote: > On Fri, Sep 06, 2013 at 04:13:32PM +0100, Peter Maydell wrote: >> > /* these registers are mainly used for save/restore of KVM state */ >> > uint8_t binary_point[2][NCPU]; /* [0]: group 0, [1]: group 1 */ >> > +uint32_t active_pr

Re: [Qemu-devel] [PATCH 5/5] hw: arm_gic_kvm: Add KVM VGIC save/restore logic

2013-09-20 Thread Christoffer Dall
On Fri, Sep 06, 2013 at 04:57:05PM +0200, Paolo Bonzini wrote: > Il 25/08/2013 17:47, Alexander Graf ha scritto: > > > > On 23.08.2013, at 21:10, Christoffer Dall wrote: > > > >> Save and restore the ARM KVM VGIC state from the kernel. We rely on > >> QEMU to marshal the GICState data structure

Re: [Qemu-devel] [PATCH 5/5] hw: arm_gic_kvm: Add KVM VGIC save/restore logic

2013-09-20 Thread Christoffer Dall
On Sun, Aug 25, 2013 at 04:47:59PM +0100, Alexander Graf wrote: > > On 23.08.2013, at 21:10, Christoffer Dall wrote: > > > Save and restore the ARM KVM VGIC state from the kernel. We rely on > > QEMU to marshal the GICState data structure and therefore simply > > synchronize the kernel state wit

Re: [Qemu-devel] [PATCH 5/5] hw: arm_gic_kvm: Add KVM VGIC save/restore logic

2013-09-20 Thread Christoffer Dall
On Fri, Sep 06, 2013 at 04:13:32PM +0100, Peter Maydell wrote: > On 23 August 2013 21:10, Christoffer Dall wrote: > > Save and restore the ARM KVM VGIC state from the kernel. We rely on > > QEMU to marshal the GICState data structure and therefore simply > > synchronize the kernel state with the

Re: [Qemu-devel] [PATCH 5/5] hw: arm_gic_kvm: Add KVM VGIC save/restore logic

2013-09-06 Thread Paolo Bonzini
Il 25/08/2013 17:47, Alexander Graf ha scritto: > > On 23.08.2013, at 21:10, Christoffer Dall wrote: > >> Save and restore the ARM KVM VGIC state from the kernel. We rely on >> QEMU to marshal the GICState data structure and therefore simply >> synchronize the kernel state with the QEMU emulated

Re: [Qemu-devel] [PATCH 5/5] hw: arm_gic_kvm: Add KVM VGIC save/restore logic

2013-09-06 Thread Peter Maydell
On 23 August 2013 21:10, Christoffer Dall wrote: > Save and restore the ARM KVM VGIC state from the kernel. We rely on > QEMU to marshal the GICState data structure and therefore simply > synchronize the kernel state with the QEMU emulated state in both > directions. > > We take some care on the

Re: [Qemu-devel] [PATCH 5/5] hw: arm_gic_kvm: Add KVM VGIC save/restore logic

2013-08-25 Thread Alexander Graf
On 23.08.2013, at 21:10, Christoffer Dall wrote: > Save and restore the ARM KVM VGIC state from the kernel. We rely on > QEMU to marshal the GICState data structure and therefore simply > synchronize the kernel state with the QEMU emulated state in both > directions. > > We take some care on th

[Qemu-devel] [PATCH 5/5] hw: arm_gic_kvm: Add KVM VGIC save/restore logic

2013-08-23 Thread Christoffer Dall
Save and restore the ARM KVM VGIC state from the kernel. We rely on QEMU to marshal the GICState data structure and therefore simply synchronize the kernel state with the QEMU emulated state in both directions. We take some care on the restore path to check the VGIC has been configured with enoug