FreeBSD 14.0でBhyve Linux仮想マシンに対してNvidia GPUパスワードを有効にしようとしています。

FreeBSD 14.0でBhyve Linux仮想マシンに対してNvidia GPUパスワードを有効にしようとしています。

何年も働いてきましたが、FreeBSD 13および14コードに最近追加された変更のため、もう機能しません。私はNvidiaを介してホストオペレーティングシステム(FreeBSD 14.0)でこれを行うことができる機能について話しています。 GPU)を任意のLinux仮想マシンに適用できます。 「昨日」まで動作していたのと同じ手順が動作しなくなりました。

開発者はもはや私のメッセージに応答しません。私はそれが見ているように実際にバグがあるかどうかを確認したいと思い、私が間違いを犯したというわけではありません。では、この機能を有効にする方法を説明します。誰かがこれを試したり、動作する他の手順を試したいと思います。最も重要なのは、この機能を有効にできることです。

そこでしばらく前に、開発者が私に順番に実行するスクリプトを3つ与えました。彼らは:

a) setup_git_140.sh

git clone https://github.com/beckhoff/freebsd-src /usr/corvin-src-140

b) build_branch_140.sh

    #!/bin/sh
    
    usage() {
        cat >&2 << EOF
    Usage: ${0} <branch> [<build_options>]
        Checkouts to <branch> and builds it with 
    <build_options> (see build.sh for more information).
    EOF
        exit 1
    }
    
    set -e
    set -u
    
    readonly script_path="$(cd "$(dirname "${0}")" && pwd)"
    readonly branch="${1?Missing <branch>$(usage)}"
    shift
    echo $branch
    
    cd /usr/corvin-src-140
    git fetch --all --prune
    git checkout -f "${branch}"
    
    ${script_path}/build_140.sh "$@"

C)build_build_140.sh

    #!/bin/sh
    
    usage() {
        cat >&2 << EOF
    Usage: ${0} [--no-bhf] [--reboot] [--verbose] [--without-
    kernel]
        Builds bhyve
    EOF
        exit 1
    }
    
    build_module() {
        local _path
        _path="${1}"
    
        # change to module path
        cd "${_path}"
    
        # clean module
        if test "${clean}" = "true"; then
            make clean > "${cmd_redirect}" 2>&1
        fi
    
        # build module
        make > "${cmd_redirect}" 2>&1
    
        # install module
        make install > "${cmd_redirect}"
    }
    
    build() {
        build_module "${src_dir}/include"
        build_module "${src_dir}/lib/libvmmapi"
        build_module "${src_dir}/sys/modules/vmm"
    
        # build kernel
        if test "${with_kernel}" = "true"; then
            cd "${src_dir}"
            local kern_opts
            kern_opts="-j$(sysctl -n hw.ncpu)"
            if test "${with_bhf}" = "true"; then
                kern_opts="${kern_opts} 
    KERNCONF=BHF"
            fi
            if ! test "${clean}" = "true"; then
                kern_opts="${kern_opts} 
    NO_CLEAN=YES"
            fi
            make kernel ${kern_opts} > "${cmd_redirect}" 2>&1
        fi
    
        build_module "${src_dir}/usr.sbin/bhyve"
        build_module "${src_dir}/usr.sbin/bhyvectl"
        build_module "${src_dir}/usr.sbin/bhyveload"
    
        if test "${with_reboot}" = "true"; then
            reboot
        fi
    }
    
    set -e
    set -u
    
    while test $# -gt 0; do
        case "${1-}" in
            --clean)
                clean="true"
                shift
                ;;
            --reboot)
                with_reboot="true"
                shift
                ;;
            --src-dir=*)
                src_dir="${1#*=}"
                shift
                ;;
            --verbose)
                cmd_redirect="/dev/stdout"
                shift
                ;;
            --without-bhf)
                with_bhf="false"
                shift
                ;;
            --without-kernel)
                with_kernel="false"
                shift
                ;;
            *)
                usage
                ;;
        esac
    done
    
    readonly clean="${clean-"false"}"
    readonly cmd_redirect="${cmd_redirect-"/dev/null"}"
    readonly src_dir="${src_dir-"/usr/corvin-src-140"}"
    echo $src_dir
    readonly with_bhf="${with_bhf-"true"}"
    readonly with_kernel="${with_kernel-"true"}"
    readonly with_reboot="${with_reboot-"false"}"
    
    build

ここです。これは、FreeBSD 14.0でnvidia gpuへのパスを使用できるようにする、動作するbhyveシステムファイルを生成するコンパイルを開始するために行ったことです。

a) ./setup_git_140.sh

b) ./build_branch_140.sh origin/phab/corvink/14.0/nvidia-wip --without-bhf --verbose

[OK] 以下の現象が発生した場合は、特定のポイントまでエラーなしでコードをコンパイルします。コードにエラーがあるかどうかを知りたいです。助けてください:

/usr/corvin-src-140/usr.sbin/bhyve/pci_passthru.c:1174:21: 
error: use of undeclared identifier 'ctx'
                passthru_cfgwrite(ctx, vcpu, pi, offset - 
0x88000, size, value);
                                  ^
/usr/corvin-src-140/usr.sbin/bhyve/pci_passthru.c:1174:26: 
error: use of undeclared identifier 'vcpu'
                passthru_cfgwrite(ctx, vcpu, pi, offset - 
0x88000, size, value);
                                       ^
/usr/corvin-src-140/usr.sbin/bhyve/pci_passthru.c:1209:20: 
error: use of undeclared identifier 'ctx'
                passthru_cfgread(ctx, vcpu, pi, offset - 
0x88000, size, (uint32_t *)&val);
                                 ^
/usr/corvin-src-140/usr.sbin/bhyve/pci_passthru.c:1209:25: 
error: use of undeclared identifier 'vcpu'
                passthru_cfgread(ctx, vcpu, pi, offset - 
0x88000, size, (uint32_t *)&val);
                                      ^
/usr/corvin-src-140/usr.sbin/bhyve/pci_passthru.c:1302:29: 
error: use of undeclared identifier 'ctx'
                        if (vm_unmap_pptdev_mmio(ctx, sc-
>psc_sel.pc_bus,
                                                 ^
/usr/corvin-src-140/usr.sbin/bhyve/pci_passthru.c:1309:27: 
error: use of undeclared identifier 'ctx'
                        if (vm_map_pptdev_mmio(ctx, sc-
>psc_sel.pc_bus,
                                               ^
/usr/corvin-src-140/usr.sbin/bhyve/pci_passthru.c:1327:29: 
error: use of undeclared identifier 'ctx'
                        if (vm_unmap_pptdev_mmio(ctx, sc-
>psc_sel.pc_bus,
                                                 ^
/usr/corvin-src-140/usr.sbin/bhyve/pci_passthru.c:1334:27: 
error: use of undeclared identifier 'ctx'
                        if (vm_map_pptdev_mmio(ctx, sc-
>psc_sel.pc_bus,
                                               ^
8 errors generated.
*** Error code 1

私が説明した内容に従わないと、Linux仮想マシン内のnvidiaカードパスは機能しません。 FreeBSD Wikiはnvidia gpuについては議論せず、ネットワークインタフェースについてのみ議論します。私を助けたい場合は、nvidiaカードがあり、それをLinux VMに渡すには、私がすでに説明した手順を繰り返す必要があります。コードを正常にコンパイルできるかどうか教えてください。

ありがとう

ベストアンサー1

TAGで確認してください

ラベルを確認するには:

  1. まず、すべてのタグを収集してみましょう。git fetch --all --tags
  2. 利用可能なタグを見つけた後:git checkout tags/<tag> -b <branch>

TAGとBRANCH NAMEは比較的一致する必要があります。

Fetchコマンドを更新するか、開発者に提供したスクリプトからタグを収集してから印刷して、選択したタグまたは最新のタグを取得するように指示します。

2番目の方法

  1. 訪問するブックマークページ
  2. ご覧のとおり、14はまだタグ付けされていませんが、/usr/corvon/src準備ができたらソースtarballをダウンロードしてその場所に抽出できます。

ソースコードをビルドする準備ができたら、提供した方法を使用できます。ジョブの進行状況を表示進行中のタスク。常にビルドされていない毎日/夜のビルドとしてこれを考えなさい。

おすすめ記事