which kernel version merged these commits

This isn't really straightforward as FreeBSD does not use merges and rather uses cherry-pick to backport changes from main, which change the commit hash. Luckily we have the "cherry-picked from" in commit messages (should have, at least), so you could use the commit hashes from main as arguments to git log, e.g.
Code:
$ git log --grep cf5d1112408ddef3fdff8212599727c49ba90fa4 origin/releng/13.0
commit 61acb3179a90a93ecb2fe9230986069712f918df
Author: Ka Ho Ng <khng@FreeBSD.org>
Date:   Sat Mar 20 15:40:55 2021 +0800

    virtio_pci_legacy: Allow memory space for configuration

    For guests running under some kind of VMMs, configuration structure is
    available in memory space but not I/O space.

    Approved by:    so
    Security:       EN-21:15.virtio
    Reported by:    Yuan Rui <number201724@me.com>
    Reviewed by:    rpokala, bryanv, jhb
    Approved by:    philip (mentor)
    Differential Revision:  https://reviews.freebsd.org/D28818

    (cherry picked from commit cf5d1112408ddef3fdff8212599727c49ba90fa4)
    (cherry picked from commit 2e107638eac2a721bc024314ae79d4688edfc130)

So it's in 13.0 and all newer versions.

P.S. it's possible there's another proper way of doing this and I'm just not aware about it.
 
Back
Top