From ae3c59fc0bfeabe793af787c372a3da6220ebfc1 Mon Sep 17 00:00:00 2001 From: David Brazdil Date: Tue, 12 Oct 2021 16:09:56 +0000 Subject: [PATCH] Revert^2: pKVM: Include pvmfw and virt APEX in gs101 builds Support for pKVM is being added to all gs101 builds starting with T, disabled by default. So far, the userspace components have been included only in special _pkvm builds. Include them unconditionally. Also move BOARD_* variables specifying location and partition size of pvmfw from vendor board config file here. This adds 89MB to the size of the system image. Bug: 192819132 Test: build a gs101 target, check /apex/com.android.virt exists Change-Id: Ie46b0ad5f45bd4757570b72cb275d002df7b4616 --- BoardConfig-common.mk | 6 ++++++ device.mk | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/BoardConfig-common.mk b/BoardConfig-common.mk index d0d62790..18d0a405 100644 --- a/BoardConfig-common.mk +++ b/BoardConfig-common.mk @@ -422,4 +422,10 @@ BOARD_KERNEL_CMDLINE += at24.write_timeout=100 # Enable larger logbuf BOARD_KERNEL_CMDLINE += log_buf_len=1024K +# Protected VM firmware +BOARD_PREBUILT_PVMFWIMAGE := packages/modules/Virtualization/pvmfw/pvmfw.img +BOARD_PVMFWIMAGE_PARTITION_SIZE := 0x00100000 +# TODO(ptosi): Delete this variable once AOSP starts using the other one +BOARD_PVMFWIMG_PARTITION_SIZE = $(BOARD_PVMFWIMAGE_PARTITION_SIZE) + -include vendor/google_devices/gs101/proprietary/BoardConfigVendor.mk diff --git a/device.mk b/device.mk index 18d8d236..57456d2d 100644 --- a/device.mk +++ b/device.mk @@ -1068,9 +1068,9 @@ PRODUCT_PACKAGES += \ vendor.samsung_slsi.hardware.tetheroffload@1.1-service # pKVM +$(call inherit-product, packages/modules/Virtualization/apex/product_packages.mk) +PRODUCT_BUILD_PVMFW_IMAGE := true ifeq ($(TARGET_PKVM_ENABLED),true) - $(call inherit-product, packages/modules/Virtualization/apex/product_packages.mk) - PRODUCT_BUILD_PVMFW_IMAGE := true PRODUCT_PACKAGES += pkvm_enabler endif