首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Radeon 5450通过windows无法分配资源

Radeon 5450通过windows无法分配资源
EN

Ask Ubuntu用户
提问于 2018-08-15 14:00:28
回答 1查看 715关注 0票数 1

我试图通过一个Radeon 5450 GPU从一个Ubuntu18.04热情片的胜利7客人。在使用virt管理器创建VM时,我使用的是机器类型的q35,因为我读到它应该更适合通过。当使用默认的pc-i440fx-仿生机器类型时,图形驱动程序会崩溃。当使用q35时,它不会崩溃,但是驱动程序不能分配资源。

下面是机器的定义。

我有卡片在05:00.0:

代码语言:javascript
复制
05:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Cedar [Radeon HD 5000/6000/7350/8350 Series]

当我安装AMD驱动程序(催化剂)时,驱动程序会安装,但是它不能分配IO范围和IRQ:

代码语言:javascript
复制
This device cannot find enough free resources that is can use (Code 12)

我的定义有什么问题?

代码语言:javascript
复制
  win7-2
  ae01eb73-b725-4abb-9ce2-d544393de40e
  8290304
  8290304
  4
  
    /machine
  
  
    hvm
    
    
  
  
    
    
    
      
      
      
    
    
  
  
    Opteron_G5
    
    
    
    
  
  
    
    
    
    
  
  destroy
  restart
  destroy
  
    
    
  
  
    /usr/bin/kvm-spice
    
      
      
      
      
      
      
    
    
      
      
      
      
      
      
      
    
    
      
      
    
    
      
      
      
    
    
      
      
      
    
    
      
      
      
    
    
      
      
    
    
      
    
    
      
      
      
    
    
      
      
      
      
    
    
      
      
      
      
    
    
      
      
      
      
    
    
      
      
      
      
    
    
      
      
      
      
    
    
      
      
    
    
      
      
      
      
      
      
    
    
      
      
        
      
      
    
    
      
      
      
    
    
      
      
      
    
    
      
      
    
    
      
    
    
      
    
    
      
      
    
    
      
      
    
    
      
      
      
    
    
      
      
        
      
      
      
    
    
      
      
    
    
      
      
    
    
      
      
    
  
  
    libvirt-ae01eb73-b725-4abb-9ce2-d544393de40e
    libvirt-ae01eb73-b725-4abb-9ce2-d544393de40e
  
  
    +64055:+131
    +64055:+131
EN

回答 1

Ask Ubuntu用户

发布于 2018-08-23 19:16:29

本教程开始,我得到了AMD5450主显卡的通过率(主机运行无头),使用下面的脚本。

  • 客人UEFI (来自apt-get install ovmf的OVMF图像)
  • 在Windows中禁用使用的-vga qlx和以后的qlx监视器(显示设置)
  • video=efifb:off添加到cmdline,否则efifb将在vfio之前获取PCI条。
  • 如果以这种方式运行(使用-vga qlx),则AMD5450不需要for文件。

剧本:

代码语言:javascript
复制
#!/bin/bash

b=$(pwd)

passthrough=0
qxl=1
uefi=1
ovmf=0
net=0
while getopts "bpQUon" opt; do
  case $opt in
      p) passthrough=1 ;;
      Q) qxl=0 ;;
      U) uefi=0 ;;
      n) net=1 ;;
      o) ovmf=1 ;;
  esac
done

cp ${b}/uefi/usr/share/edk2.git/ovmf-x64/OVMF_VARS-pure-efi.fd .
OPTS=""
# Basic CPU settings.
OPTS="$OPTS -cpu host,kvm=off"
OPTS="$OPTS -smp 4,sockets=1,cores=4,threads=1"
# Enable KVM full virtualization support.
OPTS="$OPTS -enable-kvm"
# Assign memory to the vm.
OPTS="$OPTS -m 4000"

# VFIO GPU and GPU sound passthrough.
if [ "$passthrough" == "1" ]; then
    #,multifunction=on,romfile=/mnt/nvidia_efi.rom" ,romfile=${b}/bioses/XFX.HD5450.1024.110612.rom
    #OPTS="$OPTS -device vfio-pci,host=05:00.0,multifunction=on,romfile=${b}/bioses/XFX.HD5450.1024.110612.rom"
    #,romfile=${b}/bioses/XFX.HD5450.1024.110612_1.rom
    OPTS="$OPTS -device vfio-pci,host=01:00.0,multifunction=on" 
    #,romfile=/mnt/data-n0/vms-win/romfile_radeon.bin
    #,romfile=/mnt/nvidia_efi.rom"
    OPTS="$OPTS -device vfio-pci,host=01:00.1"
fi

# Supply OVMF (general UEFI bios, needed for EFI boot support with GPT disks).
if [ "$uefi" == "1" ]; then
    if [ "$ovmf" == "0" ]; then
    OPTS="$OPTS -drive if=pflash,format=raw,readonly,file=${b}/uefi/usr/share/edk2.git/ovmf-x64/OVMF_VARS-pure-efi.fd"
    OPTS="$OPTS -drive if=pflash,format=raw,file=${b}/OVMF_VARS-pure-efi.fd"
    else
    mkdir -p ${b}/hda-contents
    #OPTS="$OPTS -pflash ${b}/ovmf_pkg/OVMF.fd"
    OPTS="$OPTS -drive if=pflash,format=raw,readonly,file=${b}/ovmf_pkg/OVMF.fd"
    OPTS="$OPTS -drive if=pflash,format=raw,file=${b}/OVMF_VARS-pure-efi.fd"
    fi
fi

# Load our created VM image as a harddrive.
OPTS="$OPTS -hda ${b}/win10_uefi_cpu_host_qemu_vm.qcow2"
# Load our OS setup image e.g. ISO file.

#OPTS="$OPTS -cdrom ${b}/windows_10.iso"
OPTS="$OPTS -cdrom ${b}/virtio-win-0.1.141.iso"

if [ "$qxl" == "1" ]; then
    # Use the following emulated video device (use none for disabled).
    OPTS="$OPTS -vga qxl"
else
    # Use an emulated video device (use none for disabled).
    #  -vga none -device qxl
    OPTS="$OPTS -vga none -device qxl "
fi

OPTS="$OPTS -spice port=5900,addr=127.0.0.1,disable-ticketing "

# Redirect QEMU's console input and output.
OPTS="$OPTS -monitor stdio"

if [ "${net}" == "1" ]; then
    # Improve the network performance by utilizing virtio-net.
    OPTS="$OPTS -device virtio-net,netdev=net0,mac=de:ad:be:ef:33:4a"
    OPTS="$OPTS -netdev tap,id=net0,ifname=vmtap0,script=./qemu-ifup,downscript=./qemu-ifdown"
else
    OPTS="$OPTS -net none "
fi

#Bus 003 Device 004: ID 1c4f:0002 SiGma Micro Keyboard TRACER Gamma Ivory
#Bus 003 Device 002: ID 1a40:0201 Terminus Technology Inc. FE 2.1 7-port Hub

# USB mouse
if [ "$passthrough" == "1" ]; then
    OPTS="$OPTS -usb"
    OPTS="$OPTS -device usb-ehci,id=ehci"
    OPTS="$OPTS -device usb-host,bus=usb-bus.0,vendorid=0x17ef,productid=0x6019 "
    OPTS="$OPTS -device usb-host,bus=usb-bus.0,vendorid=0x1c4f,productid=0x0002 "
fi
#if [ "$passthrough" == "1" ]; then
#    OPTS="$OPTS -usb"
#    OPTS="$OPTS -device usb-ehci,id=ehci"
#    OPTS="$OPTS -device usb-host,bus=usb-bus.0,vendorid=0x17ef,productid=0x6019 "
#    OPTS="$OPTS -device usb-host,bus=usb-bus.0,vendorid=0x1c4f,productid=0x0002 "
#fi

#OPTS="$OPTS -device usb-host,hostbus=3,hostaddr=4"
#OPTS="$OPTS -device usb-host,hostbus=3,hostaddr=2"

#OPTS="$OPTS -device usb-host,bus=xhci.0,vendorid=0x1c4f,productid=0x0002 "
#OPTS="$OPTS -device usb-host,bus=xhci.0,vendorid=0x1a40,productid=0x0201 "

#OPTS="$OPTS -usbdevice host:1c4f:0002"
# USB keyboard
#OPTS="$OPTS -usbdevice host:1a40:0201"

sudo qemu-system-x86_64 $OPTS
票数 0
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1065589

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档