Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

armhf guest on arm64 host support #1580

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion shared/cfg/machines.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ variants:
del rtc_drift
del soundcards
- arm64-mmio:
only aarch64
only aarch64, armhf
auto_cpu_model = "no"
cpu_model = host
machine_type = arm64-mmio:virt
Expand Down
22 changes: 16 additions & 6 deletions virttest/qemu_devices/qcontainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -893,17 +893,22 @@ def get_aavmf_vars(params):
devices = []
devices.append(qdevices.QStringDevice('machine', cmdline=cmd))
# EFI pflash
aavmf_code = ("-drive file=/usr/share/AAVMF/AAVMF_CODE.fd,"
"if=pflash,format=raw,unit=0,readonly=on")
aavmf = params.get("aavmf")
if not aavmf:
aavmf = "/usr/share/AAVMF/AAVMF_CODE.fd"
aavmf_code = ("-drive file=%s,if=pflash,format=raw,unit=0,readonly=on" % aavmf)
devices.append(qdevices.QStringDevice('AAVMF_CODE',
cmdline=aavmf_code))
aavmf_vars_template = params.get("aavmf_vars_template")
if not aavmf_vars_template:
aavmf_vars_template = "/usr/share/AAVMF/AAVMF_VARS.fd"
aavmf_vars = get_aavmf_vars(params)
if not os.path.exists(aavmf_vars):
logging.warn("AAVMF variables file '%s' doesn't exist, "
"recreating it from the template (this should "
"only happen when you install the machine as "
"there is no default boot in EFI!)", aavmf_vars)
shutil.copy2('/usr/share/AAVMF/AAVMF_VARS.fd', aavmf_vars)
shutil.copy2(aavmf_vars_template, aavmf_vars)
aavmf_vars = ("-drive file=%s,if=pflash,format=raw,unit=1"
% aavmf_vars)
devices.append(qdevices.QStringDevice('AAVMF_VARS',
Expand Down Expand Up @@ -943,17 +948,22 @@ def get_aavmf_vars(params):
devices = []
devices.append(qdevices.QStringDevice('machine', cmdline=cmd))
# EFI pflash
aavmf_code = ("-drive file=/usr/share/AAVMF/AAVMF_CODE.fd,"
"if=pflash,format=raw,unit=0,readonly=on")
aavmf = params.get("aavmf")
if not aavmf:
aavmf = "/usr/share/AAVMF/AAVMF_CODE.fd"
aavmf_code = ("-drive file=%s,if=pflash,format=raw,unit=0,readonly=on" % aavmf)
devices.append(qdevices.QStringDevice('AAVMF_CODE',
cmdline=aavmf_code))
aavmf_vars_template = params.get("aavmf_vars_template")
if not aavmf_vars_template:
aavmf_vars_template = "/usr/share/AAVMF/AAVMF_VARS.fd"
aavmf_vars = get_aavmf_vars(params)
if not os.path.exists(aavmf_vars):
logging.warn("AAVMF variables file '%s' doesn't exist, "
"recreating it from the template (this should "
"only happen when you install the machine as "
"there is no default boot in EFI!)", aavmf_vars)
shutil.copy2('/usr/share/AAVMF/AAVMF_VARS.fd', aavmf_vars)
shutil.copy2(aavmf_vars_template, aavmf_vars)
aavmf_vars = ("-drive file=%s,if=pflash,format=raw,unit=1"
% aavmf_vars)
devices.append(qdevices.QStringDevice('AAVMF_VARS',
Expand Down