[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 8/8] x86emul: build with -Os
- To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Wed, 15 Jun 2022 12:01:59 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=AnM2uO5eniVgAzvSjds26CJAnOXmHdpe3X1nHICp8gU=; b=WI0THgEG0Q98BUvTsGKSt6F+PlMTn6S1JI0vubUKDg7NkJ+9bpaResBFss2OBzkBClX1U3gAX2Y6zJSqVsie0S7iruaUbBpR3Se3N0RKmHm0XhnRTqTP/AbB5rj/lUwpdkr3W7A87Rq/rlrSOiPxISOeGaHG/vIHkZco6YRXdkP92gBDn1pyQxygNTmigE1cMKxDAWlamk+reKzqaGPIPK2GEITHo7SBPg7SctoQ8SwHytnJBGIg2CHEUzexC88mNv2KXLVh0WIWzirTB/MX2GDaSp62ASt4hpkTR4g6aFOHm5d1W0t2H72YUfv3OkeUhXfwPt6bQewJw28JorDHCw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kYp65T//nkR28kV3cdx87RQ7bQ3kDUJC7v2Sp4RRfTqwg0SHFOLtu5qy+qxufXkDrJWZZzvHuvHc3r1KBS+60rWN6TRu7YfteQ19ym/6HwXPBiXF3YyyBBVxzAwDfzIuDrZwrWu+dviuK42a3HNgrKitds67h7l+pqLgwpgw1NJ+FuPb+QIXPgX15ee+meZQyIrv848uQW9vmxA/Jj1IVQckMzUSN25uaXqq6D7faiPhIyFVBhfrAnMBHIHkPafgQ/2S2uPOx8R3PVpaR973qQBkLtRPr1ivol1yBlJW5xrPzlXDQZlewsvogQnp/jE5PuWCac2J0t4Hb3ZVHa38SQ==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Delivery-date: Wed, 15 Jun 2022 10:02:05 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Emulator code is large and involving it in guest operations cannot be
expected to be fast anyway. Help binary size as well as, for release
builds at least, compile time by building all involved code with size
optimization, independent of the build being a debug or a release one.
The size savings observed in a release build (with AMX and KeyLocker
code in place on top of what's upstream) are above 48k of .text, with
gcc 11.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
v2: New.
--- a/xen/arch/x86/Makefile
+++ b/xen/arch/x86/Makefile
@@ -89,6 +89,7 @@ hostprogs-y += efi/mkreloc
# Allows usercopy.c to include itself
$(obj)/usercopy.o: CFLAGS-y += -iquote .
+$(obj)/x86_emulate.o: CFLAGS-y += -Os
ifneq ($(CONFIG_HVM),y)
$(obj)/x86_emulate.o: CFLAGS-y += -Wno-unused-label
endif
--- a/xen/arch/x86/x86_emulate/Makefile
+++ b/xen/arch/x86/x86_emulate/Makefile
@@ -1,3 +1,5 @@
+CFLAGS-y += -Os
+
obj-y += 0f01.o
obj-y += 0fae.o
obj-y += 0fc7.o
|