Re: [RFC PATCH 1/1] KVM: ARM: add vgic state save and restore support

2012-12-04 Thread Dong Aisheng
On Tue, Dec 04, 2012 at 12:45:12PM +, Peter Maydell wrote: > On 4 December 2012 12:27, Dong Aisheng wrote: > > On Mon, Dec 03, 2012 at 01:22:07PM +, Peter Maydell wrote: > >> What we're really providing the guest here is a hardware-accelerated > >

Re: [RFC PATCH 1/1] KVM: ARM: add vgic state save and restore support

2012-12-04 Thread Dong Aisheng
On Tue, Dec 04, 2012 at 12:05:12PM +, Peter Maydell wrote: > On 4 December 2012 11:44, Dong Aisheng wrote: > > On Mon, Dec 03, 2012 at 12:02:55PM +, Peter Maydell wrote: > > > Probably one way we could try to avoid this issue is also saving the > > banked registe

Re: [RFC PATCH 1/1] KVM: ARM: add vgic state save and restore support

2012-12-04 Thread Dong Aisheng
On Mon, Dec 03, 2012 at 01:22:07PM +, Peter Maydell wrote: > On 3 December 2012 12:02, Peter Maydell wrote: > > By far the largest part of the save/restore work here is figuring out > > what the right state to expose to userspace is so we can retain that > > compatibility guarantee. > > Some

Re: [RFC PATCH 1/1] KVM: ARM: add vgic state save and restore support

2012-12-04 Thread Dong Aisheng
On Mon, Dec 03, 2012 at 12:02:55PM +, Peter Maydell wrote: > On 3 December 2012 10:36, Dong Aisheng wrote: > > The patch is mainly for implementing the vgic state save and retore > > function. > > I'm not sure the current implementation method is the most proper wa

[RFC PATCH 1/1] KVM: ARM: add vgic state save and restore support

2012-12-03 Thread Dong Aisheng
From: Dong Aisheng Add vgic state save and retore via KVM_SET_IRQCHIP/KVM_GET_IRQCHIP. Signed-off-by: Dong Aisheng --- The patch is mainly for implementing the vgic state save and retore function. I'm not sure the current implementation method is the most proper way. So i'd like t

Re: [PATCH v4 06/13] ARM: KVM: VGIC distributor handling

2012-11-12 Thread Dong Aisheng
; + pr_warn("Unhandled access %d %08llx %d\n", > + mmio->is_write, mmio->phys_addr, mmio->len); > + return false; > + } > + > + spin_lock(&vcpu->kvm->arch.vgic.lock); > + updated_state = range-&

Re: [PATCH v4 05/13] ARM: KVM: VGIC accept vcpu and dist base addresses from user space

2012-11-12 Thread Dong Aisheng
-ENODEV; > + } > + > + if (vgic_ioaddr_overlap(kvm)) { > + kvm->arch.vgic.vgic_dist_base = VGIC_ADDR_UNDEF; > + kvm->arch.vgic.vgic_cpu_base = VGIC_ADDR_UNDEF; Missing mutex_unlock? > + return -EINVAL; > + } > + > +

Re: [PATCH v4 04/13] ARM: KVM: Initial VGIC MMIO support code

2012-11-12 Thread Dong Aisheng
+ > + while (r->len) { > + if (addr >= r->base && > + (addr + mmio->len) <= (r->base + r->len)) > + return r; > + r++; > + } > + > + return NULL; > +} > + > +/** >