-
Notifications
You must be signed in to change notification settings - Fork 242
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
skip the processing of pflash vars file when it's not set #3769
skip the processing of pflash vars file when it's not set #3769
Conversation
Tested with the code file and vars file, the results were passed. (1/2) Host_RHEL.m9.u4.ovmf.ceph.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.4.0.x86_64.io-github-autotest-qemu.remote_image_snapshot.to_local.q35: STARTED (1/6) Host_RHEL.m9.u4.v0.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.4.0.x8 Tested with code file and without vars file, the result was passed. ovmf_path = /usr/share/edk2/ovmf qemu command line: ovmf_path = /usr/share/edk2/ovmf -blockdev '{"node-name": "file_ovmf_code", "driver": "file", "filename": "/usr/share/edk2/ovmf/OVMF.amdsev.fd", "auto-read-only": true, "discard": "unmap"}' |
@zhencliu @YongxueHong @zixi-chen As we discussed before, add the workaround, could you please help review it? Many thanks. |
Test with sev kernelHashes install case pass. (1/2) Host_RHEL.m9.u4.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.3.0.x86_64.io-github-autotest-qemu.unattended_install.cdrom.extra_cdrom_ks.default_install.aio_threads.q35: STARTED |
LGTM.Acked-by: Zhenyu Zhang [email protected]
@PaulYuuu Could you pls help review when you are free. thanks. |
For this workaround, I am thinking about more. Actually, code file and image name have no relevance, but we have avocado-vt/virttest/qemu_devices/qcontainer.py Lines 1084 to 1085 in 5e7f791
So if possible, make all of them can be added separately, this makes pflash more flexible. if firmware_path:
...
...
if pflash_code_filename:
...
... @YongxueHong @zhencliu @XueqiangWei, what do you think?
Hi @XueqiangWei @zhenyzha @PaulYuuu |
@PaulYuuu @YongxueHong As we discussed, this patch just handle "skip the processing of pflash vars file when it's not set". The next phase, I will refactoring and optimizing this part of the code. |
virttest/qemu_devices/qcontainer.py
Outdated
# To ignore the influence from backends | ||
first_image = images[0] | ||
img_params = params.object_params(first_image) | ||
img_params["backing_chain"] = "no" | ||
img_obj = qemu_storage.QemuImg(img_params, | ||
current_data_dir, | ||
first_image) | ||
img_info = json.loads(img_obj.info(True, "json")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the previous logic, the definition of this part should be independence, we should move it out of the block if pflash_vars_filename:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated, thanks.
ef19fb1
to
74d10c8
Compare
Updated and retested with the code file and vars file, the results were passed. (1/2) Host_RHEL.m9.u3.ovmf.ceph.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.4.0.x86_64.io-github-autotest-qemu.remote_image_snapshot.to_local.q35: STARTED Tested with code file and without vars file, the result was passed. ovmf_path = /usr/share/edk2/ovmf qemu command line: ovmf_path = /usr/share/edk2/ovmf -blockdev '{"node-name": "file_ovmf_code", "driver": "file", "filename": "/usr/share/edk2/ovmf/OVMF.amdsev.fd", "auto-read-only": true, "discard": "unmap"}' @YongxueHong Could you please help review it again? Many thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Hi @PaulYuuu , @zhencliu , @zixi-chen , @zhenyzha |
For OVMF with SEV-ES support and OVMF with TDX support, the vm can be booted without vars file. Add a workaround, skip the processing of pflash vars file when ovmf_vars_files =. Signed-off-by: Xueqiang Wei <[email protected]>
74d10c8
to
838a212
Compare
According to Zhenchao's feedback, update the commit message, add "qcontainer:" in commit header. Thanks. |
ack
|
@XueqiangWei I verified this with sev, it looks good to me. python3 ConfigTest.py --testcase=sev_dhcert_boot --guestname=RHEL.9.4.0 --platform=x86_64 --clone=no --profile=profile(1/1) Host_RHEL.m9.u4.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.4.0.x86_64.io-github-autotest-qemu.sev_dhcert_boot.q35: PASS (80.19 s) |
Thanks all, let's merge it. |
For OVMF with SEV-ES support and OVMF with TDX support, the vm can be booted without vars file. Add a workaround, skip the processing of pflash vars file when ovmf_vars_files =.
Signed-off-by: Xueqiang Wei [email protected]
ID: 1390