public inbox for kvmarm@lists.cs.columbia.edu
 help / color / mirror / Atom feed
* [PATCH v3 0/4] kvm: arm/arm64: vgic: APRn uaccess support.
@ 2017-08-23  1:05 wanghaibin
  2017-08-23  1:05 ` [PATCH v3 1/4] kvm: arm/arm64: vgic: Implement the vGICv2 GICC_APRn uaccess interface wanghaibin
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: wanghaibin @ 2017-08-23  1:05 UTC (permalink / raw)
  To: cdall, marc.zyngier, kvmarm; +Cc: wu.wubin

v3: Coding style fix.
    Add the valid APRn access check which Marc proposed. 

v2: Split the patch again to make it easier for review
    some fixes were proposed by Marc

v1: the problem describe:
In the case (GICv2 on GICv3 migration), I did the test on my board as follow:
vm boot => migrate to destination => shutdown at destination => start at destination 
=> migrate back to source ... go round and begin again;

I tested many times, but unlucky, there maybe failed by accident when shutdown the vm 
at destination. (GICv3 on GICv3 migration, 1000+ times, That's OK).
while failed,  we can watch the interrupts in the vm, some vcpus of the vm can not 
receive the virt timer interrupt. And, these vcpus will 100% with top tool at host.

vgic_state debug file at destination shows(a active virt timer interrupt) that:
VCPU 0 TYP   ID TGT_ID PLAEHC     HWID   TARGET SRC PRI VCPU_ID
---------------------------------------------------------------
            ....................
       PPI   25      0 000001        0        1   0 160      -1
       PPI   26      0 000001        0        1   0 160      -1
       PPI   27      0 011111       27        1   0 160       0


I added log to print ICH* registers for VCPU0 at destination:
**HCR:0x1, VMCR:0xf0ec0001,SRE:0x0, ELRSR:0xe**
-----AP0R:0: 0x0------
-----AP0R:1: 0x0------
-----AP0R:2: 0x0------
-----AP0R:3: 0x0------
-----AP1R:0: 0x0------
-----AP1R:1: 0x0------
-----AP1R:2: 0x0------
-----AP1R:3: 0x0------
-----LR:0: 0xa0a0001b0000001b------
-----LR:1: 0x0------
-----LR:2: 0x0------
-----LR:3: 0x0------

and the ICH_AP1R0 value is 0x10000 at source.

At present, QEMU have supproted GICC_APRn put/set interface for emulated GICv2,
and kvm does not support the uaccess interface. This patchset try to support this.


wanghaibin (4):
  kvm: arm/arm64: vgic: Implement the vGICv2 GICC_APRn uaccess
    interface.
  kvm: arm/arm64: vgic-v2: Add GICH_APRn accessors for GICv2
  kvm: arm/arm64: vgic-v3: add ICH_AP[01]Rn accessors for GICv3
  kvm: arm/arm64: vgic: clean up vGICv3 ICC_APRn sysreg uaccess

 arch/arm64/kvm/vgic-sys-reg-v3.c | 25 +++++----------------
 virt/kvm/arm/vgic/vgic-mmio-v2.c | 22 ++++++++++++++++--
 virt/kvm/arm/vgic/vgic-mmio.c    | 28 +++++++++++++++++++++++
 virt/kvm/arm/vgic/vgic-v2.c      | 18 +++++++++++++++
 virt/kvm/arm/vgic/vgic-v3.c      | 48 ++++++++++++++++++++++++++++++++++++++++
 virt/kvm/arm/vgic/vgic.h         |  7 ++++++
 6 files changed, 126 insertions(+), 22 deletions(-)

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-09-05  0:56 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-23  1:05 [PATCH v3 0/4] kvm: arm/arm64: vgic: APRn uaccess support wanghaibin
2017-08-23  1:05 ` [PATCH v3 1/4] kvm: arm/arm64: vgic: Implement the vGICv2 GICC_APRn uaccess interface wanghaibin
2017-08-23  1:05 ` [PATCH v3 2/4] kvm: arm/arm64: vgic-v2: Add GICH_APRn accessors for GICv2 wanghaibin
2017-08-23  1:05 ` [PATCH v3 3/4] kvm: arm/arm64: vgic-v3: add ICH_AP[01]Rn accessors for GICv3 wanghaibin
2017-08-23  1:05 ` [PATCH v3 4/4] kvm: arm/arm64: vgic: clean up vGICv3 ICC_APRn sysreg uaccess wanghaibin
2017-08-31 20:33 ` [PATCH v3 0/4] kvm: arm/arm64: vgic: APRn uaccess support Christoffer Dall
2017-09-01  4:10   ` wanghaibin
2017-09-01  9:44     ` Christoffer Dall
2017-09-01 15:15       ` Marc Zyngier
2017-09-04 17:27       ` Christoffer Dall
2017-09-05  0:56         ` wanghaibin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox