Page MenuHomeFreeBSD

xen: introduce a per-arch scratch mapping ranges
ClosedPublic

Authored by royger on Jul 25 2024, 10:47 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 9, 3:11 AM
Unknown Object (File)
Nov 14 2024, 9:52 PM
Unknown Object (File)
Nov 14 2024, 3:35 PM
Unknown Object (File)
Oct 9 2024, 10:24 AM
Unknown Object (File)
Oct 9 2024, 10:24 AM
Unknown Object (File)
Oct 9 2024, 10:24 AM
Unknown Object (File)
Oct 9 2024, 10:01 AM
Unknown Object (File)
Sep 24 2024, 1:20 AM
Subscribers

Details

Summary

The current approach is to create foreign mappings in any unpopulated address
on the memory map. This however can cause issues, as late-loaded drivers could
then found their MMIO region has been stolen to be used as foreign mapping
scratch space (due to the Xen drivers having started first).

Add a local resource manager to the xenpv bus driver, architectures can add
suitable resources to that resource manager at boot in order to be used in
preference of the generic MMIO resource allocator.

No functional change, as the introduced scratch mapping range is not yet
populated.

Sponsored by: Cloud Software Group
MFC after: 1 week

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

I had expected to simply handle D44251 as a squash review, though this works too. I do want to note what the output of devinfo -u looks like.

# devinfo -u
I/O memory addresses:
    0x0-0x3000fff (root0)
    0x3001000-0x3001fff (gic0)
    0x3002000-0x3003fff (gic0)
    0x3004000-0x37ffffff (root0)
    0x38000000-0x38ffffff (xen0)
    0x39000000-0x3fffffff (root0)
    0x40000000-0x641fffff (ram0)
    0x64200000-0x6592bfff (root0)
    0x6592c000-0x6c27ffff (ram0)
    0x6c280000-0x6c3fffff (root0)
    0x6c400000-0x6c402fff (ram0)
    0x6c403000-0x6c403fff (root0)
    0x6c404000-0x6f6dffff (ram0)
    0x6f6e0000-0x6f76ffff (root0)
    0x6f770000-0x6f7affff (ram0)
    0x6f7b0000-0x6f89ffff (root0)
    0x6f8a0000-0x6fffffff (ram0)
    0x70000000-0xffffffff (xen0)
    0x100000000-0x1ffffffff (root0)
    0x200000000-0xffffffffff (xen0)
    0x10000000000-0xfffffffffff (root0)
Interrupts:
    0x0 (generic_timer0)
    0x1 (generic_timer0)
    0x2 (generic_timer0)
    0x3 (xen0)
    0x4-0xfffffffe (root0)
Xen scratch memory:
    0x38000000-0x3803ffff (granttable0)
    0x38040000-0x38ffffff (root0)
    0x70000000-0xffffffff (root0)
    0x200000000-0xffffffffff (root0)
#

The new string is definitely better. I'm fine with this now, though I'm sure more tweaks can be made.

sys/dev/xen/bus/xenpv.c
75

I definitely like this string better than the previous.

This revision is now accepted and ready to land.Jul 30 2024, 3:57 AM