Commit 1347830b authored by Michal Berger's avatar Michal Berger Committed by Tomasz Zawadzki
Browse files

scripts/vagrant: Allow to mix CMB and PMR setup



As of latest qemu (>= 6.0.0) these can now be used together as
different BARs are used to accommodate for both.

Signed-off-by: default avatarMichal Berger <michalx.berger@intel.com>
Change-Id: Icf32f491fd33ef733f0d946f9b5caaeb87137d28
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8217


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
parent a5c3f72a
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -140,18 +140,13 @@ def setup_nvme_disk(libvirt, disk, index)
    nvme_drive << ",namespaces=#{nvme_namespaces[index]}"
  end

  cmb_set = "false"
  pmr_cmdline = ""

  if !nvme_cmbs[index].nil? && nvme_cmbs[index] == "true"
    # Fix the size of the buffer to 128M
    nvme_drive << ",cmb_size_mb=128"
    cmb_set = "true"
  end
  if !nvme_pmrs[index].nil?
    if cmb_set == "true"
      abort("CMB and PMR are mutually exclusive, aborting (#{nvme_disk})")
    end
    pmr_path, pmr_size = nvme_pmrs[index].split(':')
    if !File.exist?(pmr_path)
      abort("#{pmr_path} does not exist, aborting")