Page MenuHomeFreeBSD

crowston_protonmail.com (Robert Crowston)
User

Projects

User does not belong to any projects.

User Details

User Since
Nov 9 2019, 6:03 PM (231 w, 5 d)

Recent Activity

Jan 21 2023

crowston_protonmail.com added a comment to D37972: bhyve: help rendezvous request when waiting for IDLE vcpu state.
In D37972#864943, @rew wrote:

I applied your patch to -CURRENT, but unfortunately I get a panic in vm_iommu_modify(): "vm mem_segs not locked "

That doesn't seem related to this change.

Can you try the following to fix vm mem_segs not locked @ /usr/src/sys/amd64/vmm/vmm.c:1189

https://reviews.freebsd.org/D37962
https://reviews.freebsd.org/D38071

Jan 21 2023, 8:45 PM

Jan 15 2023

crowston_protonmail.com added a comment to D37972: bhyve: help rendezvous request when waiting for IDLE vcpu state.
In D37972#864943, @rew wrote:

I applied your patch to -CURRENT, but unfortunately I get a panic in vm_iommu_modify(): "vm mem_segs not locked "

That doesn't seem related to this change.

Can you try the following to fix vm mem_segs not locked @ /usr/src/sys/amd64/vmm/vmm.c:1189

https://reviews.freebsd.org/D37962
https://reviews.freebsd.org/D38071

Jan 15 2023, 10:38 PM
crowston_protonmail.com added a comment to D37972: bhyve: help rendezvous request when waiting for IDLE vcpu state.
In D37972#863506, @kib wrote:

Right, and at this moment the thread is no longer the vcpu thread, as you noted, the vpcu state becoming IDLE.
My change should just run the rendezvous handler on this vcpu.

Jan 15 2023, 9:31 PM

Jan 9 2023

crowston_protonmail.com added a comment to D37972: bhyve: help rendezvous request when waiting for IDLE vcpu state.

This is perhaps the point where I am getting confused. How could vcpu2 be in vcpu_lock_all()? Rather, vcpu_lock_all() is executed by some thread which is performing ioctl op on behalf of the userspace counterpart. In other words, the look at code suggests that vcpu_lock_all()/vcpu_lock_one() are never called from a context which represents running vcpu thread.

Jan 9 2023, 6:51 AM

Jan 8 2023

crowston_protonmail.com added a comment to D37972: bhyve: help rendezvous request when waiting for IDLE vcpu state.
In D37972#862875, @kib wrote:

Isn't it simply enough to handle rendezvous request for all vcpus we freeze?

No, because

  • vcpu 1 can be waiting for rendezvous completion;
  • vcpu 2 can be in vcpu_lock_all trying to lock vcpu 1 (and won't therefore perform the rendezvous for vcpu 2)
Jan 8 2023, 9:53 PM
crowston_protonmail.com added a comment to D37972: bhyve: help rendezvous request when waiting for IDLE vcpu state.

I found I still have the same problem where, for m < n,

  • vCPU m requests rendezvous and executes its own rendezvous func
  • thread for vCPU n tries to obtain lock_all
  • thread for vCPU n gets stalled waiting for vCPU m to go to idle state and, since m < n, it never reaches vCPU n
    • it can perform the rendezvous for vCPU m, but that's already complete
  • vCPU m is waiting for vCPU n to do its rendezvous.
Jan 8 2023, 6:50 PM
crowston_protonmail.com added a comment to D37972: bhyve: help rendezvous request when waiting for IDLE vcpu state.

Figured out what bool vm_handle_rendezvous_help_one(struct vcpu *vcpu) it must be -- but nope, with sufficient CPUs I still get a deadlock. This time I have

  • vcpu == 0 has invoked its rendezvous func but is spinning waiting for the rest of the rendezvous to complete;
  • thread 10 in vcpu_set_state_locked() waiting for the lock on vcpu 0. The rendezvous for vcpu 0 is already complete, so it just spins -- as before.
  • all other cpus have completed their rendezvous and are waiting for vcpu 10 to do its rendezvous.
Jan 8 2023, 12:41 AM

Jan 7 2023

crowston_protonmail.com added a comment to D37972: bhyve: help rendezvous request when waiting for IDLE vcpu state.

Do you have the implementation of bool vm_handle_rendezvous_help_one() ? It didn't make it into this patch.

Jan 7 2023, 11:36 PM
crowston_protonmail.com added inline comments to D37972: bhyve: help rendezvous request when waiting for IDLE vcpu state.
Jan 7 2023, 4:15 PM
crowston_protonmail.com added a comment to D37972: bhyve: help rendezvous request when waiting for IDLE vcpu state.

Unfortunately I see the same behaviour with the patch. (Though I had to make some small tweaks to backport the patch to 13/Stable.)

Jan 7 2023, 4:04 PM
crowston_protonmail.com added a comment to D37972: bhyve: help rendezvous request when waiting for IDLE vcpu state.
In D37972#862712, @kib wrote:

Right, but vCPU5 would unfreeze after the rendezvous is completed and allow the progress on vCPU2 then.

Jan 7 2023, 3:13 PM
crowston_protonmail.com added a comment to D37972: bhyve: help rendezvous request when waiting for IDLE vcpu state.

I think the problem is that the vCPU needing help is not the vCPU that is contending on the lock.

Jan 7 2023, 12:13 PM

Apr 13 2021

crowston_protonmail.com added a comment to D29696: bhyve: enhance debug info for memory range clash.

Yes, https://github.com/RobCrowston/freebsd/commit/ff8c12d94281e37f866e9ef2a401ef397850b16f

Apr 13 2021, 11:02 PM

Apr 12 2021

crowston_protonmail.com abandoned D29698: bhyve: do not intercept PCI BAR probe addresses.
Apr 12 2021, 10:14 PM
crowston_protonmail.com added a comment to D29698: bhyve: do not intercept PCI BAR probe addresses.

This problem went away after I updated uefi-edk2-bhyve from 0.2_1,1 to g20210214,2

Apr 12 2021, 10:14 PM
crowston_protonmail.com added a comment to D29698: bhyve: do not intercept PCI BAR probe addresses.
In D29698#666736, @jhb wrote:

What problem are you trying to solve? Competent OS's should disable decoding so that 'decode' is false here. If a busted OS leaves it enabled, bhyve should faithfully brick the guest just as real hardware would (and real hardware does.. doing this for the frame buffer BAR without disabling decoding is a great way to lock up real hardware). Ignoring writes of all ones would leave the BAR registered at its old address which would result in confusion if a subsequent write moved the bar to a new address after it was sized resulting in the BAR being active in two places. Barring a really good reason, I think this is probably a bad idea.

Apr 12 2021, 8:00 PM

Apr 10 2021

crowston_protonmail.com added a comment to D29698: bhyve: do not intercept PCI BAR probe addresses.

Urgh, I realised my handling of the high 64 bit BAR is incorrect.

Apr 10 2021, 10:01 PM
crowston_protonmail.com requested review of D29698: bhyve: do not intercept PCI BAR probe addresses.
Apr 10 2021, 8:14 PM
crowston_protonmail.com requested review of D29696: bhyve: enhance debug info for memory range clash.
Apr 10 2021, 7:17 PM

Oct 19 2020

crowston_protonmail.com added a comment to D26853: RPI4: enable USB-boot for the 8GB-model etc.

But the FreeBSD kernel does need to deal with the VL805-firmware issue in that context and does so without the .dtb file change.

So why would u-boot need the change when the kernel does not? (Again: out of my depth here.) Are you saying that the FreeBSD kernell is doing something wrong currently and needs to be fixed once the .dtb adjustment is in place?

Oct 19 2020, 9:23 PM

Oct 11 2020

crowston_protonmail.com added inline comments to D26344: bcm2838_pci.c: Respect DMA limits of controller..
Oct 11 2020, 11:57 AM

Oct 4 2020

crowston_protonmail.com added inline comments to D23021: vmm: Expose per-cpu guest time counters in a new sysctl.
Oct 4 2020, 2:01 PM
crowston_protonmail.com updated the diff for D23021: vmm: Expose per-cpu guest time counters in a new sysctl.

Updated as per comments.

Oct 4 2020, 1:56 PM

Sep 11 2020

crowston_protonmail.com updated the test plan for D26344: bcm2838_pci.c: Respect DMA limits of controller..
Sep 11 2020, 11:21 AM
crowston_protonmail.com added inline comments to D26344: bcm2838_pci.c: Respect DMA limits of controller..
Sep 11 2020, 11:05 AM
crowston_protonmail.com updated the diff for D26344: bcm2838_pci.c: Respect DMA limits of controller..
  • Re-express comments, rename constant, limit segsize also.
Sep 11 2020, 11:04 AM

Sep 7 2020

crowston_protonmail.com updated the diff for D26344: bcm2838_pci.c: Respect DMA limits of controller..
  • Fix comments.
Sep 7 2020, 9:57 PM
crowston_protonmail.com added a comment to D26344: bcm2838_pci.c: Respect DMA limits of controller..

My understanding is that different devices have different DMA limits. XHCI has 3 GiB but others have 1 GiB. There is not one DMA controller enforcing one limit common to all contexts but multiple separate limits. Using the smallest limit for all devices may well be an alternative but that is not what the ACPI tables describe (from what I read on the lists).

Sep 7 2020, 8:57 PM

Sep 6 2020

crowston_protonmail.com updated the summary of D26344: bcm2838_pci.c: Respect DMA limits of controller..
Sep 6 2020, 6:14 PM
crowston_protonmail.com requested review of D26344: bcm2838_pci.c: Respect DMA limits of controller..
Sep 6 2020, 6:09 PM

Jul 25 2020

crowston_protonmail.com updated the diff for D25261: Handle Raspberry Pi 4 xhci firmware loading..

Updated as per comments.

Jul 25 2020, 8:16 PM

Jul 19 2020

crowston_protonmail.com added inline comments to D25261: Handle Raspberry Pi 4 xhci firmware loading..
Jul 19 2020, 9:30 PM

Jul 7 2020

crowston_protonmail.com updated the diff for D25261: Handle Raspberry Pi 4 xhci firmware loading..

Add additional comments to explain the probe.

Jul 7 2020, 8:13 PM

Jul 4 2020

crowston_protonmail.com updated the diff for D25068: Add driver for bcm2838 PCI express controller.
  • bcm2838_pci.c: fix one type.
Jul 4 2020, 11:08 PM
crowston_protonmail.com added a comment to D25068: Add driver for bcm2838 PCI express controller.

My bad, I didn't test this on a 32 bit platform. I fixed some types to use the right type (pci_addr_t instead of bus_addr_t) and checked it builds on armv7 and aarch64.

Jul 4 2020, 10:58 PM
crowston_protonmail.com updated the diff for D25068: Add driver for bcm2838 PCI express controller.
  • bcm2838_pci.c: fix some types for armv7.
Jul 4 2020, 10:56 PM

Jun 28 2020

crowston_protonmail.com added a comment to D25068: Add driver for bcm2838 PCI express controller.

Any volunteers for a committer?

Jun 28 2020, 12:20 PM

Jun 22 2020

crowston_protonmail.com added a comment to D25068: Add driver for bcm2838 PCI express controller.
In D25068#553228, @mmel wrote:

Why you choose to use pci_host_generic as base class?

Jun 22 2020, 9:56 PM
crowston_protonmail.com updated the diff for D25068: Add driver for bcm2838 PCI express controller.

Updated per comments and to handle changes made in pci_host_generic.c.

Jun 22 2020, 9:49 PM
crowston_protonmail.com abandoned D25394: pci_host_generic: allocate PCI, not CPU addresses..
Jun 22 2020, 9:34 PM
crowston_protonmail.com updated the summary of D25394: pci_host_generic: allocate PCI, not CPU addresses..
Jun 22 2020, 12:06 AM
crowston_protonmail.com requested review of D25394: pci_host_generic: allocate PCI, not CPU addresses..
Jun 22 2020, 12:05 AM

Jun 21 2020

crowston_protonmail.com added a comment to rS362397: Use the correct address when creating pci resources.

This is now inconsistent with pci_host_generic_core_alloc_resource(). It seems to me that you are using the rman to manage PCI bus addresses, then trying to allocate CPU addresses out of that. When those ranges do not overlap, the allocation always fails.

Jun 21 2020, 10:53 PM
crowston_protonmail.com added a comment to D25268: Fix reboot command on the Raspberry Pi series..

Thank you.

Jun 21 2020, 9:27 PM

Jun 20 2020

crowston_protonmail.com updated subscribers of D22493: Support for bcm2838 RNG.
Jun 20 2020, 10:21 PM · arm64
crowston_protonmail.com added a comment to D22493: Support for bcm2838 RNG.

James Mintram <me@jamesrm.com> reworked the patch I wrote after some email discussion. Submitting his updates on top.

Jun 20 2020, 10:19 PM · arm64
crowston_protonmail.com updated the diff for D22493: Support for bcm2838 RNG.

Updated per review, sent to me by James Mintram <me@jamesrm.com>.

Jun 20 2020, 10:18 PM · arm64
crowston_protonmail.com added a comment to D25268: Fix reboot command on the Raspberry Pi series..

Is there a process to follow to get this change from "accepted" to committed?

Jun 20 2020, 9:37 PM

Jun 15 2020

crowston_protonmail.com added inline comments to D25261: Handle Raspberry Pi 4 xhci firmware loading..
Jun 15 2020, 7:22 PM

Jun 14 2020

crowston_protonmail.com requested review of D25268: Fix reboot command on the Raspberry Pi series..
Jun 14 2020, 3:46 PM
crowston_protonmail.com added a reviewer for D25251: Add support for bcm54213PE in brgphy.: karels.
Jun 14 2020, 2:43 PM
crowston_protonmail.com added inline comments to D25251: Add support for bcm54213PE in brgphy..
Jun 14 2020, 2:43 PM
crowston_protonmail.com updated the diff for D25251: Add support for bcm54213PE in brgphy..
  • if_genet: rename MIIF_RXID, MIIF_TXID.
Jun 14 2020, 2:42 PM
crowston_protonmail.com updated the summary of D25261: Handle Raspberry Pi 4 xhci firmware loading..
Jun 14 2020, 12:24 AM
crowston_protonmail.com updated the summary of D25261: Handle Raspberry Pi 4 xhci firmware loading..
Jun 14 2020, 12:23 AM
crowston_protonmail.com requested review of D25261: Handle Raspberry Pi 4 xhci firmware loading..
Jun 14 2020, 12:22 AM

Jun 13 2020

crowston_protonmail.com added inline comments to D25121: Clean up the pci host generic driver.
Jun 13 2020, 9:56 PM
crowston_protonmail.com added a comment to D25068: Add driver for bcm2838 PCI express controller.

@andrew Now that I have an 8 GB Pi4 I realise I need to change the dma mapping to ensure that DMA is only performed in the lower 3 GB of the physical address space (this is a hardware limitation of the controller). The bus_dma_tag_create() call is right in the guts of pci_host_generic_core_attach(). Any thoughts on the best way to thread this through?

Jun 13 2020, 3:25 PM
crowston_protonmail.com added inline comments to D25251: Add support for bcm54213PE in brgphy..
Jun 13 2020, 12:51 PM
crowston_protonmail.com updated the diff for D25251: Add support for bcm54213PE in brgphy..
  • if_genet: remove MIFF_DOPAUSE mode.
Jun 13 2020, 12:49 PM
crowston_protonmail.com added inline comments to D25147: Allow for PCI controllers with different register layout.
Jun 13 2020, 12:42 AM
crowston_protonmail.com added a comment to D25121: Clean up the pci host generic driver.

I am not an expert by any means but these changes look good to me.

Jun 13 2020, 12:34 AM
crowston_protonmail.com accepted D25121: Clean up the pci host generic driver.
Jun 13 2020, 12:34 AM
crowston_protonmail.com requested review of D25251: Add support for bcm54213PE in brgphy..
Jun 13 2020, 12:25 AM

Jun 6 2020

crowston_protonmail.com added inline comments to D25147: Allow for PCI controllers with different register layout.
Jun 6 2020, 11:52 AM
crowston_protonmail.com added a comment to D25147: Allow for PCI controllers with different register layout.

Why not make it part of the pcib_interface?

Jun 6 2020, 11:45 AM

Jun 1 2020

crowston_protonmail.com added inline comments to D25068: Add driver for bcm2838 PCI express controller.
Jun 1 2020, 8:08 AM

May 30 2020

crowston_protonmail.com updated the test plan for D25068: Add driver for bcm2838 PCI express controller.
May 30 2020, 1:37 PM
crowston_protonmail.com requested review of D25068: Add driver for bcm2838 PCI express controller.
May 30 2020, 1:27 PM

Jan 18 2020

crowston_protonmail.com added inline comments to D22493: Support for bcm2838 RNG.
Jan 18 2020, 11:03 PM · arm64
crowston_protonmail.com added inline comments to D22493: Support for bcm2838 RNG.
Jan 18 2020, 9:16 PM · arm64
crowston_protonmail.com added a comment to D22493: Support for bcm2838 RNG.

Thanks for reviewing this.

Jan 18 2020, 6:07 PM · arm64

Jan 3 2020

crowston_protonmail.com updated the diff for D23021: vmm: Expose per-cpu guest time counters in a new sysctl.
  • vmm: Accesses to guest_counters pointer itself need not be atomic.
Jan 3 2020, 5:58 PM
crowston_protonmail.com updated the summary of D23021: vmm: Expose per-cpu guest time counters in a new sysctl.
Jan 3 2020, 3:52 PM
crowston_protonmail.com updated the summary of D23021: vmm: Expose per-cpu guest time counters in a new sysctl.
Jan 3 2020, 3:44 PM
crowston_protonmail.com created D23021: vmm: Expose per-cpu guest time counters in a new sysctl.
Jan 3 2020, 3:42 PM

Nov 22 2019

crowston_protonmail.com created D22493: Support for bcm2838 RNG.
Nov 22 2019, 12:11 AM · arm64