qemu: Enable secure boot
In qemu, enabling this feature boils down to adding the following
onto the command line:
-global driver=cfi.pflash01,property=secure,value=on
However, there are some constraints resulting from the
implementation. For instance, System Management Mode (SMM) is
required to be enabled, the machine type must be q35-2.4 or
later, and the guest should be x86_64. While technically it is
possible to have 32 bit guests with secure boot, some non-trivial
CPU flags tuning is required (for instance lm and nx flags must
be prohibited). Given complexity of our CPU driver, this is not
trivial. Therefore I've chosen to forbid 32 bit guests for now.
If there's ever need, we can refine the check later.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2016-07-13 09:33:52 +00:00
|
|
|
LC_ALL=C \
|
|
|
|
PATH=/bin \
|
2019-03-06 12:29:01 +00:00
|
|
|
HOME=/tmp/lib/domain--1-test-bios \
|
qemu: Enable secure boot
In qemu, enabling this feature boils down to adding the following
onto the command line:
-global driver=cfi.pflash01,property=secure,value=on
However, there are some constraints resulting from the
implementation. For instance, System Management Mode (SMM) is
required to be enabled, the machine type must be q35-2.4 or
later, and the guest should be x86_64. While technically it is
possible to have 32 bit guests with secure boot, some non-trivial
CPU flags tuning is required (for instance lm and nx flags must
be prohibited). Given complexity of our CPU driver, this is not
trivial. Therefore I've chosen to forbid 32 bit guests for now.
If there's ever need, we can refine the check later.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2016-07-13 09:33:52 +00:00
|
|
|
USER=test \
|
|
|
|
LOGNAME=test \
|
2019-03-08 11:15:07 +00:00
|
|
|
XDG_DATA_HOME=/tmp/lib/domain--1-test-bios/.local/share \
|
|
|
|
XDG_CACHE_HOME=/tmp/lib/domain--1-test-bios/.cache \
|
|
|
|
XDG_CONFIG_HOME=/tmp/lib/domain--1-test-bios/.config \
|
2017-04-06 16:19:48 +00:00
|
|
|
/usr/bin/qemu-system-x86_64 \
|
2021-08-10 14:39:38 +00:00
|
|
|
-name guest=test-bios,debug-threads=on \
|
qemu: Enable secure boot
In qemu, enabling this feature boils down to adding the following
onto the command line:
-global driver=cfi.pflash01,property=secure,value=on
However, there are some constraints resulting from the
implementation. For instance, System Management Mode (SMM) is
required to be enabled, the machine type must be q35-2.4 or
later, and the guest should be x86_64. While technically it is
possible to have 32 bit guests with secure boot, some non-trivial
CPU flags tuning is required (for instance lm and nx flags must
be prohibited). Given complexity of our CPU driver, this is not
trivial. Therefore I've chosen to forbid 32 bit guests for now.
If there's ever need, we can refine the check later.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2016-07-13 09:33:52 +00:00
|
|
|
-S \
|
2021-09-21 15:50:00 +00:00
|
|
|
-object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-test-bios/master-key.aes \
|
2022-07-20 13:37:19 +00:00
|
|
|
-blockdev '{"driver":"file","filename":"/usr/share/OVMF/OVMF_CODE.secboot.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
|
|
|
|
-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \
|
|
|
|
-blockdev '{"driver":"file","filename":"/some/user/nvram/path/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \
|
|
|
|
-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \
|
|
|
|
-machine q35,usb=off,smm=on,dump-guest-core=off,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format \
|
2021-11-05 08:38:10 +00:00
|
|
|
-accel tcg \
|
qemu: Enable secure boot
In qemu, enabling this feature boils down to adding the following
onto the command line:
-global driver=cfi.pflash01,property=secure,value=on
However, there are some constraints resulting from the
implementation. For instance, System Management Mode (SMM) is
required to be enabled, the machine type must be q35-2.4 or
later, and the guest should be x86_64. While technically it is
possible to have 32 bit guests with secure boot, some non-trivial
CPU flags tuning is required (for instance lm and nx flags must
be prohibited). Given complexity of our CPU driver, this is not
trivial. Therefore I've chosen to forbid 32 bit guests for now.
If there's ever need, we can refine the check later.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2016-07-13 09:33:52 +00:00
|
|
|
-global driver=cfi.pflash01,property=secure,value=on \
|
|
|
|
-m 1024 \
|
2022-02-10 11:57:26 +00:00
|
|
|
-overcommit mem-lock=off \
|
qemu: Enable secure boot
In qemu, enabling this feature boils down to adding the following
onto the command line:
-global driver=cfi.pflash01,property=secure,value=on
However, there are some constraints resulting from the
implementation. For instance, System Management Mode (SMM) is
required to be enabled, the machine type must be q35-2.4 or
later, and the guest should be x86_64. While technically it is
possible to have 32 bit guests with secure boot, some non-trivial
CPU flags tuning is required (for instance lm and nx flags must
be prohibited). Given complexity of our CPU driver, this is not
trivial. Therefore I've chosen to forbid 32 bit guests for now.
If there's ever need, we can refine the check later.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2016-07-13 09:33:52 +00:00
|
|
|
-smp 1,sockets=1,cores=1,threads=1 \
|
|
|
|
-uuid 362d1fc1-df7d-193e-5c18-49a71bd1da66 \
|
2018-03-29 10:51:55 +00:00
|
|
|
-display none \
|
2018-03-29 10:51:55 +00:00
|
|
|
-no-user-config \
|
qemu: Enable secure boot
In qemu, enabling this feature boils down to adding the following
onto the command line:
-global driver=cfi.pflash01,property=secure,value=on
However, there are some constraints resulting from the
implementation. For instance, System Management Mode (SMM) is
required to be enabled, the machine type must be q35-2.4 or
later, and the guest should be x86_64. While technically it is
possible to have 32 bit guests with secure boot, some non-trivial
CPU flags tuning is required (for instance lm and nx flags must
be prohibited). Given complexity of our CPU driver, this is not
trivial. Therefore I've chosen to forbid 32 bit guests for now.
If there's ever need, we can refine the check later.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2016-07-13 09:33:52 +00:00
|
|
|
-nodefaults \
|
2022-02-03 12:31:28 +00:00
|
|
|
-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
|
2018-03-28 22:04:58 +00:00
|
|
|
-mon chardev=charmonitor,id=monitor,mode=control \
|
2018-03-29 10:51:55 +00:00
|
|
|
-rtc base=utc \
|
2018-03-29 10:51:55 +00:00
|
|
|
-no-shutdown \
|
2022-06-09 13:02:19 +00:00
|
|
|
-boot strict=on \
|
2022-06-22 13:36:23 +00:00
|
|
|
-audiodev '{"id":"audio1","driver":"none"}' \
|
2021-08-10 15:07:10 +00:00
|
|
|
-msg timestamp=on
|