mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-08 04:55:03 +00:00
Make TDX accept the same virtio-net parameters as the normal setting
This commit is contained in:
parent
e9c85ff158
commit
13287c752e
25
OSDK.toml
25
OSDK.toml
@ -47,30 +47,7 @@ supported_archs = ["x86_64"]
|
|||||||
build.features = ["cvm_guest"]
|
build.features = ["cvm_guest"]
|
||||||
boot.method = "grub-qcow2"
|
boot.method = "grub-qcow2"
|
||||||
grub.boot_protocol = "linux"
|
grub.boot_protocol = "linux"
|
||||||
qemu.args = """\
|
qemu.args = "$(./tools/qemu_args.sh tdx)"
|
||||||
-name process=tdxvm,debug-threads=on \
|
|
||||||
-m ${MEM:-8G} \
|
|
||||||
-smp ${SMP:-1} \
|
|
||||||
-vga none \
|
|
||||||
-nographic \
|
|
||||||
-monitor pty \
|
|
||||||
-no-hpet \
|
|
||||||
-nodefaults \
|
|
||||||
-bios /usr/share/qemu/OVMF.fd \
|
|
||||||
-object tdx-guest,sept-ve-disable=on,id=tdx,quote-generation-service=vsock:2:4050 \
|
|
||||||
-cpu host,-kvm-steal-time,pmu=off \
|
|
||||||
-machine q35,kernel_irqchip=split,confidential-guest-support=tdx,memory-backend=ram1 \
|
|
||||||
-object memory-backend-memfd-private,id=ram1,size=${MEM:-8G} \
|
|
||||||
-device virtio-net-pci,netdev=mynet0 \
|
|
||||||
-device virtio-keyboard-pci,disable-legacy=on,disable-modern=off \
|
|
||||||
-netdev user,id=mynet0,hostfwd=tcp::10027-:22 \
|
|
||||||
-chardev stdio,id=mux,mux=on,logfile=qemu.log \
|
|
||||||
-device virtio-serial,romfile= \
|
|
||||||
-device virtconsole,chardev=mux \
|
|
||||||
-device isa-debug-exit,iobase=0xf4,iosize=0x04 \
|
|
||||||
-monitor chardev:mux \
|
|
||||||
-serial chardev:mux \
|
|
||||||
"""
|
|
||||||
|
|
||||||
[scheme."riscv"]
|
[scheme."riscv"]
|
||||||
boot.method = "qemu-direct"
|
boot.method = "qemu-direct"
|
||||||
|
@ -44,6 +44,36 @@ else
|
|||||||
NETDEV_ARGS="-nic none"
|
NETDEV_ARGS="-nic none"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$1" = "tdx" ]; then
|
||||||
|
QEMU_ARGS="\
|
||||||
|
-name process=tdxvm,debug-threads=on \
|
||||||
|
-m ${MEM:-8G} \
|
||||||
|
-smp ${SMP:-1} \
|
||||||
|
-vga none \
|
||||||
|
-nographic \
|
||||||
|
-monitor pty \
|
||||||
|
-no-hpet \
|
||||||
|
-nodefaults \
|
||||||
|
-bios /usr/share/qemu/OVMF.fd \
|
||||||
|
-object tdx-guest,sept-ve-disable=on,id=tdx,quote-generation-service=vsock:2:4050 \
|
||||||
|
-cpu host,-kvm-steal-time,pmu=off \
|
||||||
|
-machine q35,kernel_irqchip=split,confidential-guest-support=tdx,memory-backend=ram1 \
|
||||||
|
-object memory-backend-memfd-private,id=ram1,size=${MEM:-8G} \
|
||||||
|
-device virtio-net-pci,netdev=net01,disable-legacy=on,disable-modern=off$VIRTIO_NET_FEATURES \
|
||||||
|
-device virtio-keyboard-pci,disable-legacy=on,disable-modern=off \
|
||||||
|
$NETDEV_ARGS \
|
||||||
|
$QEMU_OPT_ARG_DUMP_PACKETS \
|
||||||
|
-chardev stdio,id=mux,mux=on,logfile=qemu.log \
|
||||||
|
-device virtio-serial,romfile= \
|
||||||
|
-device virtconsole,chardev=mux \
|
||||||
|
-device isa-debug-exit,iobase=0xf4,iosize=0x04 \
|
||||||
|
-monitor chardev:mux \
|
||||||
|
-serial chardev:mux \
|
||||||
|
"
|
||||||
|
echo $QEMU_ARGS
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
COMMON_QEMU_ARGS="\
|
COMMON_QEMU_ARGS="\
|
||||||
-cpu Icelake-Server,+x2apic \
|
-cpu Icelake-Server,+x2apic \
|
||||||
-smp ${SMP:-1} \
|
-smp ${SMP:-1} \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user