Skip to content

Commit

Permalink
qemu_storage: support the vdpa device
Browse files Browse the repository at this point in the history
add vdpa device support to the related functions

Signed-off-by: Houqi (Nick) Zuo <[email protected]>
  • Loading branch information
nickzhq committed Aug 21, 2023
1 parent f827338 commit 7b6a81e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions virttest/qemu_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,9 @@ def filename_to_file_opts(filename):

if matches['user'] is not None:
file_opts['username'] = matches['user']
# FIXME: vdpa is a customized protocol instead of a standard protocol.
elif filename.startswith("vdpa:"):
file_opts = {'driver': 'virtio-blk-vhost-vdpa', 'path': filename}
# FIXME: Judge the host device by the string starts with "/dev/".
elif filename.startswith('/dev/'):
file_opts = {'driver': 'host_device', 'filename': filename}
Expand Down

0 comments on commit 7b6a81e

Please sign in to comment.