Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 08 Mar 2024 13:46:06 +0000
From:      bugzilla-noreply@freebsd.org
To:        virtualization@FreeBSD.org
Subject:   [Bug 277559] kldload vmm sometimes hangs kernel on arm64
Message-ID:  <bug-277559-27103-DmBT6kzNhC@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-277559-27103@https.bugs.freebsd.org/bugzilla/>
References:  <bug-277559-27103@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D277559

--- Comment #2 from John F. Carr <jfc@mit.edu> ---
Loading vmm sometimes hangs on either type of CPU.  Hangs appear to be more
likely on the low numbered A53 CPUs.

The bits are the same whichever CPU is in charge, tcr_el2=3D80823510 and
vtcr_el2=3D80023559.

Notably, one of the hangs on CPU 0 had debugging output from after the
smp_rendezvous:

  # cpuset -l 0 kldload vmm
  vgic0: <Virtual GIC v3> on gic0
  vmm_handler 0xffffa000f4017180 0 0
  vmmdev_init()
  vmmdev init returned
  vmm_init vm_maxcpu =3D 6
  vmm_regs_init returned 0
  vmmops_modinit 0
  ID_AA64MMFR0_EL1 =3D 1122
  vmm_virt_bits =3D 39
  vmmops_modinit rendezvous 0xffff0000d5e18380 {80823510, 80023559}
  vmmops_modinit rendezvous returned
  vmmops_modinit disable interrupts

The last lines come from this code I added at the end of vmmops_modinit:

  printf("vmmops_modinit disable interrupts\n");
  pause("vmmon", 2);
          daif =3D intr_disable();
          cnthctl_el2 =3D vmm_call_hyp(HYP_READ_REGISTER, HYP_REG_CNTHCTL);
          intr_restore(daif);
  printf("vmmops_modinit enable interrupts\n");

          vgic_init();
  printf("vmmops_modinit vgic ininitalized\n");
          vtimer_init(cnthctl_el2);
  printf("vmmops_modinit vtimer_init(cnthctl_el2=3D%lx) returned\n",
cnthctl_el2);

The next time I tried the same command it worked:

  # cpuset -l 0 kldload vmm
  vgic0: <Virtual GIC v3> on gic0
  vmm_handler 0xffffa00002782300 0 0
  vmmdev_init()
  vmmdev init returned
  vmm_init vm_maxcpu =3D 6
  vmm_regs_init returned 0
  vmmops_modinit 0
  ID_AA64MMFR0_EL1 =3D 1122
  vmm_virt_bits =3D 39
  vmmops_modinit rendezvous 0xffff0000bd5e7380 {80823510, 80023559}
  vmmops_modinit rendezvous returned
  vmmops_modinit disable interrupts
  vmmops_modinit enable interrupts
  vmmops_modinit vgic ininitalized
  vmmops_modinit vtimer_init(cnthctl_el2=3D3) returned
  vmm init returned 0

Console output from every other hang stopped before the "vmmops_modinit
rendezvous returned" message.

Has anybody successfully used a JTAG debugger on the RockPro64?

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-277559-27103-DmBT6kzNhC>