From patchwork Fri Jun 26 16:42:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe de Dinechin X-Patchwork-Id: 11628013 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E1B38618 for ; Fri, 26 Jun 2020 16:45:15 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B8F0820781 for ; Fri, 26 Jun 2020 16:45:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="CnugYPWn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B8F0820781 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:36524 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jorTW-00017c-TY for patchwork-qemu-devel@patchwork.kernel.org; Fri, 26 Jun 2020 12:45:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57968) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jorRr-0005ji-2L for qemu-devel@nongnu.org; Fri, 26 Jun 2020 12:43:31 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:22438 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jorRp-0006vT-9y for qemu-devel@nongnu.org; Fri, 26 Jun 2020 12:43:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593189808; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XEuvMOyRqY2e7EBWzIG1Pe1q8IybZJxuzuk4WHyvnvg=; b=CnugYPWnTLcf7R62AvwtHugIBebNIpfYqokXnfS9e5vVzlJy+qd0lYXLvPDWkYMjheAcYd WPzHwUuUTX2InO2rWICYNMklOHngdtyNOWoFkbKCMWizKZFZyGkFE9BeL87Ow73o2f5Y42 Nvkvk9jxR+r3YGMeUpl1EAKsAfrZGlc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-147-LH_W75RrOQa3P1-FWi0faw-1; Fri, 26 Jun 2020 12:43:23 -0400 X-MC-Unique: LH_W75RrOQa3P1-FWi0faw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 52F8718585B2; Fri, 26 Jun 2020 16:43:22 +0000 (UTC) Received: from turbo.com (ovpn-112-91.ams2.redhat.com [10.36.112.91]) by smtp.corp.redhat.com (Postfix) with ESMTP id B9F8C5C1BB; Fri, 26 Jun 2020 16:43:19 +0000 (UTC) From: Christophe de Dinechin To: qemu-devel@nongnu.org Subject: [PATCH 01/10] modules: Provide macros making it easier to identify module exports Date: Fri, 26 Jun 2020 18:42:58 +0200 Message-Id: <20200626164307.3327380-2-dinechin@redhat.com> In-Reply-To: <20200626164307.3327380-1-dinechin@redhat.com> References: <20200626164307.3327380-1-dinechin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.120; envelope-from=dinechin@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/26 01:49:42 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , "Michael S. Tsirkin" , qemu-trivial@nongnu.org, Cleber Rosa , Michael Tokarev , Laurent Vivier , "Dr. David Alan Gilbert" , Gerd Hoffmann , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Paolo Bonzini , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" In order to facilitate the move of large chunks of functionality to load modules, it is simpler to create a wrapper with the same name that simply relays the implementation. For efficiency, this is typically done using inline functions in the header for the corresponding functionality. In that case, we rename the actual implementation by appending _implementation to its name. This makes it easier to select which function you want to put a breakpoint on. Signed-off-by: Christophe de Dinechin --- include/qemu/module.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/include/qemu/module.h b/include/qemu/module.h index 011ae1ae76..1922a0293c 100644 --- a/include/qemu/module.h +++ b/include/qemu/module.h @@ -39,6 +39,30 @@ static void __attribute__((constructor)) do_qemu_init_ ## function(void) \ } #endif +#ifdef CONFIG_MODULES +/* Identify which functions are replaced by a callback stub */ +#ifdef MODULE_STUBS +#define MODIFACE(Ret,Name,Args) \ + Ret (*Name)Args; \ + extern Ret Name##_implementation Args +#else /* !MODULE_STUBS */ +#define MODIFACE(Ret,Name,Args) \ + extern Ret (*Name)Args; \ + extern Ret Name##_implementation Args +#endif /* MODULE_STUBS */ + +#define MODIMPL(Ret,Name,Args) \ + static void __attribute__((constructor)) Name##_register(void) \ + { \ + Name = Name##_implementation; \ + } \ + Ret Name##_implementation Args +#else /* !CONFIG_MODULES */ +/* When not using a module, such functions are called directly */ +#define MODIFACE(Ret,Name,Args) Ret Name Args +#define MODIMPL(Ret,Name,Args) Ret Name Args +#endif /* CONFIG_MODULES */ + typedef enum { MODULE_INIT_MIGRATION, MODULE_INIT_BLOCK, From patchwork Fri Jun 26 16:42:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe de Dinechin X-Patchwork-Id: 11628019 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 79ABF618 for ; Fri, 26 Jun 2020 16:47:25 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4FF1320781 for ; Fri, 26 Jun 2020 16:47:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="CoBOFfwI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4FF1320781 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:44614 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jorVc-00055k-CU for patchwork-qemu-devel@patchwork.kernel.org; Fri, 26 Jun 2020 12:47:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58006) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jorRu-0005tc-6o for qemu-devel@nongnu.org; Fri, 26 Jun 2020 12:43:34 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:60323 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jorRr-0006vo-As for qemu-devel@nongnu.org; Fri, 26 Jun 2020 12:43:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593189810; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GJX9oFYWeI2gJAGUHHop5bfOVja0UQenPIRkX5m0vFQ=; b=CoBOFfwICFtgHI02bJycAxUU3vAtb8D0a3Gm97mOq+LlJdnP/zqsOVc0hNi9KvUy2Yx056 aeDwQ3jRTfXW1l4LGwMoJtOXXubmdk+/YDiAgKEsxzyMX7kgOF1bkIkpAvIN404S54psyV 0Q5YRFGBdDW9HLTXL0OaDku8xj48W3Q= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-396-OWUx_frBP2yBZVixuc0q9g-1; Fri, 26 Jun 2020 12:43:26 -0400 X-MC-Unique: OWUx_frBP2yBZVixuc0q9g-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7B8101005512; Fri, 26 Jun 2020 16:43:25 +0000 (UTC) Received: from turbo.com (ovpn-112-91.ams2.redhat.com [10.36.112.91]) by smtp.corp.redhat.com (Postfix) with ESMTP id AE3795C1BB; Fri, 26 Jun 2020 16:43:22 +0000 (UTC) From: Christophe de Dinechin To: qemu-devel@nongnu.org Subject: [PATCH 02/10] minikconf: Pass variables for modules Date: Fri, 26 Jun 2020 18:42:59 +0200 Message-Id: <20200626164307.3327380-3-dinechin@redhat.com> In-Reply-To: <20200626164307.3327380-1-dinechin@redhat.com> References: <20200626164307.3327380-1-dinechin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.61; envelope-from=dinechin@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/26 02:19:36 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , "Michael S. Tsirkin" , qemu-trivial@nongnu.org, Cleber Rosa , Michael Tokarev , Laurent Vivier , "Dr. David Alan Gilbert" , Gerd Hoffmann , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Paolo Bonzini , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Christophe de Dinechin --- scripts/minikconf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/minikconf.py b/scripts/minikconf.py index bcd91015d3..d60add97f6 100755 --- a/scripts/minikconf.py +++ b/scripts/minikconf.py @@ -690,10 +690,10 @@ if __name__ == '__main__': parser = KconfigParser(data) external_vars = set() for arg in argv[3:]: - m = re.match(r'^(CONFIG_[A-Z0-9_]+)=([yn]?)$', arg) + m = re.match(r'^(CONFIG_[A-Z0-9_]+)=([ymn]?)$', arg) if m is not None: name, value = m.groups() - parser.do_assignment(name, value == 'y') + parser.do_assignment(name, value == 'y' or value == 'm') external_vars.add(name[7:]) else: fp = open(arg, 'rt', encoding='utf-8') From patchwork Fri Jun 26 16:43:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe de Dinechin X-Patchwork-Id: 11628035 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8F5EC912 for ; Fri, 26 Jun 2020 16:49:29 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6666720781 for ; Fri, 26 Jun 2020 16:49:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="B8WZqOfQ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6666720781 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:52852 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jorXb-0000Cd-Fn for patchwork-qemu-devel@patchwork.kernel.org; Fri, 26 Jun 2020 12:49:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58040) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jorRx-00061E-6M for qemu-devel@nongnu.org; Fri, 26 Jun 2020 12:43:37 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:39050 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jorRv-0006yq-L9 for qemu-devel@nongnu.org; Fri, 26 Jun 2020 12:43:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593189815; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=isO5jF/DekPZe6Mj8SRdMtRguAz69F1a7ZhvJaJnjcI=; b=B8WZqOfQwNA7e2bWbmkudqZ3269M33N49mgDF4k+Ugcw9J7BAPTE60VJuDVy50Tm4XTbEP GgmXbpKGoeeMckBdSFCP9XYiYkhBBTO5vVvozC+Pe1gMRLWaFARm1wfq5G2W+lPTlja/cF rGEvAv2xJilI/68bj9U/ihTykw4QO8o= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-236-DfNbjArCPDO1-JNYRSgGXA-1; Fri, 26 Jun 2020 12:43:29 -0400 X-MC-Unique: DfNbjArCPDO1-JNYRSgGXA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8987FEC1A4; Fri, 26 Jun 2020 16:43:28 +0000 (UTC) Received: from turbo.com (ovpn-112-91.ams2.redhat.com [10.36.112.91]) by smtp.corp.redhat.com (Postfix) with ESMTP id D257A5C1BB; Fri, 26 Jun 2020 16:43:25 +0000 (UTC) From: Christophe de Dinechin To: qemu-devel@nongnu.org Subject: [PATCH 03/10] spice: Make spice a module configuration Date: Fri, 26 Jun 2020 18:43:00 +0200 Message-Id: <20200626164307.3327380-4-dinechin@redhat.com> In-Reply-To: <20200626164307.3327380-1-dinechin@redhat.com> References: <20200626164307.3327380-1-dinechin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.61; envelope-from=dinechin@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/26 02:19:36 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , "Michael S. Tsirkin" , qemu-trivial@nongnu.org, Cleber Rosa , Michael Tokarev , Laurent Vivier , "Dr. David Alan Gilbert" , Gerd Hoffmann , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Paolo Bonzini , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" This commit changes the spice configuration 'm' by default, and moves the spice components to obj-m variables. It is sufficient to build without modules enable, but does not link correctly yet, since no shims have been created for the missing functions yet. Signed-off-by: Christophe de Dinechin --- Makefile | 1 + Makefile.objs | 1 + chardev/Makefile.objs | 3 ++- configure | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b29b0eeefa..ee674971a5 100644 --- a/Makefile +++ b/Makefile @@ -477,6 +477,7 @@ dummy := $(call unnest-vars,, \ common-obj-m \ trace-obj-y) + include $(SRC_PATH)/tests/Makefile.include all: $(DOCS) $(if $(BUILD_DOCS),sphinxdocs) $(TOOLS) $(HELPERS-y) recurse-all modules $(vhost-user-json-y) diff --git a/Makefile.objs b/Makefile.objs index 98383972ee..e38768c8d5 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -70,6 +70,7 @@ common-obj-$(CONFIG_TPM) += tpm.o common-obj-y += backends/ common-obj-y += chardev/ +common-obj-m += chardev/ common-obj-$(CONFIG_SECCOMP) += qemu-seccomp.o qemu-seccomp.o-cflags := $(SECCOMP_CFLAGS) diff --git a/chardev/Makefile.objs b/chardev/Makefile.objs index d68e1347f9..fc9910d4f2 100644 --- a/chardev/Makefile.objs +++ b/chardev/Makefile.objs @@ -22,4 +22,5 @@ common-obj-$(CONFIG_BRLAPI) += baum.o baum.o-cflags := $(SDL_CFLAGS) baum.o-libs := $(BRLAPI_LIBS) -common-obj-$(CONFIG_SPICE) += spice.o +common-obj-$(CONFIG_SPICE) += spice.mo +spice.mo-objs := spice.o diff --git a/configure b/configure index 130630b98f..2de1715800 100755 --- a/configure +++ b/configure @@ -7471,7 +7471,7 @@ if test "$posix_memalign" = "yes" ; then fi if test "$spice" = "yes" ; then - echo "CONFIG_SPICE=y" >> $config_host_mak + echo "CONFIG_SPICE=m" >> $config_host_mak fi if test "$smartcard" = "yes" ; then From patchwork Fri Jun 26 16:43:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe de Dinechin X-Patchwork-Id: 11628045 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3C620618 for ; Fri, 26 Jun 2020 16:51:41 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 12CDB206BE for ; Fri, 26 Jun 2020 16:51:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="D2npcwkr" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 12CDB206BE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:33880 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jorZk-0004QD-7D for patchwork-qemu-devel@patchwork.kernel.org; Fri, 26 Jun 2020 12:51:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58098) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jorSA-0006MH-7x for qemu-devel@nongnu.org; Fri, 26 Jun 2020 12:43:51 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:31998 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jorS6-00071t-LE for qemu-devel@nongnu.org; Fri, 26 Jun 2020 12:43:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593189826; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kUK4reOFVx7Y6uLGGUzuxOqez+MxH7/jHg5WH/q9hGI=; b=D2npcwkr1q+vSYmX82wPBaeG+tkGGdF6LO+dc2fJ8lGfT9ILTU1ZMOVnXGrU7/OrIC/r9e xsBB6HdPmArOvPMfRRHsSgJxg3bYvDXbjzJo9iMAG9YKUerAImpSAFRkpKmErUJPcvhm8e teV1Dq5RXgDOWZFVuCby89tTLwwwYrA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-445-T-VK_PluMkiXUddw8QrRMw-1; Fri, 26 Jun 2020 12:43:42 -0400 X-MC-Unique: T-VK_PluMkiXUddw8QrRMw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5FEBF8064AE; Fri, 26 Jun 2020 16:43:40 +0000 (UTC) Received: from turbo.com (ovpn-112-91.ams2.redhat.com [10.36.112.91]) by smtp.corp.redhat.com (Postfix) with ESMTP id DCC435C1BB; Fri, 26 Jun 2020 16:43:28 +0000 (UTC) From: Christophe de Dinechin To: qemu-devel@nongnu.org Subject: [PATCH 04/10] spice: Move all the spice-related code in spice-app.so Date: Fri, 26 Jun 2020 18:43:01 +0200 Message-Id: <20200626164307.3327380-5-dinechin@redhat.com> In-Reply-To: <20200626164307.3327380-1-dinechin@redhat.com> References: <20200626164307.3327380-1-dinechin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.81; envelope-from=dinechin@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/26 03:23:21 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , "Michael S. Tsirkin" , qemu-trivial@nongnu.org, Cleber Rosa , Michael Tokarev , Laurent Vivier , "Dr. David Alan Gilbert" , Gerd Hoffmann , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Paolo Bonzini , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" If we want to build spice as a separately loadable module, we need to put all the spice code in one loadable module, because the build system does not know how to deal with dependencies yet. Signed-off-by: Christophe de Dinechin --- audio/Makefile.objs | 2 +- chardev/Makefile.objs | 3 +-- ui/Makefile.objs | 8 ++++---- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/audio/Makefile.objs b/audio/Makefile.objs index b4a4c11f31..298c895ff5 100644 --- a/audio/Makefile.objs +++ b/audio/Makefile.objs @@ -1,5 +1,5 @@ common-obj-y = audio.o audio_legacy.o noaudio.o wavaudio.o mixeng.o -common-obj-$(CONFIG_SPICE) += spiceaudio.o +spice-app.mo-objs += ../audio/spiceaudio.o common-obj-$(CONFIG_AUDIO_COREAUDIO) += coreaudio.o common-obj-$(CONFIG_AUDIO_DSOUND) += dsoundaudio.o common-obj-$(CONFIG_AUDIO_WIN_INT) += audio_win_int.o diff --git a/chardev/Makefile.objs b/chardev/Makefile.objs index fc9910d4f2..955fac0cf9 100644 --- a/chardev/Makefile.objs +++ b/chardev/Makefile.objs @@ -22,5 +22,4 @@ common-obj-$(CONFIG_BRLAPI) += baum.o baum.o-cflags := $(SDL_CFLAGS) baum.o-libs := $(BRLAPI_LIBS) -common-obj-$(CONFIG_SPICE) += spice.mo -spice.mo-objs := spice.o +spice-app.mo-objs += ../chardev/spice.o diff --git a/ui/Makefile.objs b/ui/Makefile.objs index 504b196479..1ab515e23d 100644 --- a/ui/Makefile.objs +++ b/ui/Makefile.objs @@ -11,7 +11,6 @@ common-obj-y += keymaps.o console.o cursor.o qemu-pixman.o common-obj-y += input.o input-keymap.o input-legacy.o kbd-state.o common-obj-y += input-barrier.o common-obj-$(CONFIG_LINUX) += input-linux.o -common-obj-$(CONFIG_SPICE) += spice-core.o spice-input.o spice-display.o common-obj-$(CONFIG_COCOA) += cocoa.o common-obj-$(CONFIG_VNC) += $(vnc-obj-y) common-obj-$(call lnot,$(CONFIG_VNC)) += vnc-stubs.o @@ -53,10 +52,11 @@ curses.mo-objs := curses.o curses.mo-cflags := $(CURSES_CFLAGS) $(ICONV_CFLAGS) curses.mo-libs := $(CURSES_LIBS) $(ICONV_LIBS) -ifeq ($(CONFIG_GIO)$(CONFIG_SPICE),yy) -common-obj-$(if $(CONFIG_MODULES),m,y) += spice-app.mo +common-obj-$(CONFIG_SPICE) += spice-app.mo +spice-app.mo-objs += spice-core.o spice-input.o spice-display.o +ifeq ($(CONFIG_GIO)$(CONFIG_SPICE),ym) +spice-app.mo-objs += spice-app.o endif -spice-app.mo-objs := spice-app.o spice-app.mo-cflags := $(GIO_CFLAGS) spice-app.mo-libs := $(GIO_LIBS) From patchwork Fri Jun 26 16:43:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe de Dinechin X-Patchwork-Id: 11628049 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0F42092A for ; Fri, 26 Jun 2020 16:52:50 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DB643207E8 for ; Fri, 26 Jun 2020 16:52:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="XG+4hjFE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DB643207E8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:38746 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jorar-0006jR-5Q for patchwork-qemu-devel@patchwork.kernel.org; Fri, 26 Jun 2020 12:52:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58120) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jorSB-0006N3-Ju for qemu-devel@nongnu.org; Fri, 26 Jun 2020 12:43:51 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:40024 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jorS9-00072L-Vm for qemu-devel@nongnu.org; Fri, 26 Jun 2020 12:43:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593189828; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cHmWsD7TdMBnDkwEPK2MWxr1O4ADw/p/CSafcY/zKvM=; b=XG+4hjFEnk+8P6pB4nCOSVl3WkKsNSjhnLBzipDTRbnE6ysgYGWq4EhsFd3rtn23Rt1Vn0 PwqNjLgG3Vdg0OCtqN96fw3TV+5wqeMJMd3mc8cLpLj85WaAs1QNyvo2XymO5XoHP5i22Q d4EdoJE2j1f9YyEyIdi9An3AeNHgij4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-248-CY1vl2BQP-ybxKli0_eT7Q-1; Fri, 26 Jun 2020 12:43:44 -0400 X-MC-Unique: CY1vl2BQP-ybxKli0_eT7Q-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5821EEC1B3; Fri, 26 Jun 2020 16:43:43 +0000 (UTC) Received: from turbo.com (ovpn-112-91.ams2.redhat.com [10.36.112.91]) by smtp.corp.redhat.com (Postfix) with ESMTP id B4AAE5C1BB; Fri, 26 Jun 2020 16:43:40 +0000 (UTC) From: Christophe de Dinechin To: qemu-devel@nongnu.org Subject: [PATCH 05/10] build: Avoid build failure when building drivers as modules Date: Fri, 26 Jun 2020 18:43:02 +0200 Message-Id: <20200626164307.3327380-6-dinechin@redhat.com> In-Reply-To: <20200626164307.3327380-1-dinechin@redhat.com> References: <20200626164307.3327380-1-dinechin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.120; envelope-from=dinechin@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/26 01:55:55 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , "Michael S. Tsirkin" , qemu-trivial@nongnu.org, Cleber Rosa , Michael Tokarev , Laurent Vivier , "Dr. David Alan Gilbert" , Gerd Hoffmann , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Paolo Bonzini , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Gerd Hoffmann Signed-off-by: Christophe de Dinechin --- Makefile.objs | 1 + Makefile.target | 7 +++++++ hw/Makefile.objs | 1 + 3 files changed, 9 insertions(+) diff --git a/Makefile.objs b/Makefile.objs index e38768c8d5..6703353493 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -86,6 +86,7 @@ endif # CONFIG_SOFTMMU # Target-independent parts used in system and user emulation common-obj-y += cpus-common.o common-obj-y += hw/ +common-obj-m += hw/ common-obj-y += qom/ common-obj-y += disas/ diff --git a/Makefile.target b/Makefile.target index 8ed1eba95b..3f3b5ee058 100644 --- a/Makefile.target +++ b/Makefile.target @@ -179,6 +179,13 @@ endif # CONFIG_SOFTMMU dummy := $(call unnest-vars,,obj-y) all-obj-y := $(obj-y) +# +# common-obj-m has some crap here, probably as side effect from +# filling obj-y. Clear it. Fixes suspicious dependency errors when +# building devices as modules. +# +common-obj-m := + include $(SRC_PATH)/Makefile.objs dummy := $(call unnest-vars,.., \ authz-obj-y \ diff --git a/hw/Makefile.objs b/hw/Makefile.objs index 4cbe5e4e57..d6d387b74b 100644 --- a/hw/Makefile.objs +++ b/hw/Makefile.objs @@ -43,4 +43,5 @@ devices-dirs-y += smbios/ endif common-obj-y += $(devices-dirs-y) +common-obj-m := display/ obj-y += $(devices-dirs-y) From patchwork Fri Jun 26 16:43:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe de Dinechin X-Patchwork-Id: 11628069 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EB479618 for ; Fri, 26 Jun 2020 16:56:35 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C05C4207E8 for ; Fri, 26 Jun 2020 16:56:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="fJNWWC+w" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C05C4207E8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:53354 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1joreV-0005KS-1T for patchwork-qemu-devel@patchwork.kernel.org; Fri, 26 Jun 2020 12:56:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58134) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jorSC-0006OW-LH for qemu-devel@nongnu.org; Fri, 26 Jun 2020 12:43:52 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:26676 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jorSA-00072h-2T for qemu-devel@nongnu.org; Fri, 26 Jun 2020 12:43:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593189829; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nTFkrvJ14i6LRcPTyAk6w009kR/PIZnJ4nrd9yvqzqM=; b=fJNWWC+wIr0JwKzzHjWGR1w/LLufnF9skBiYPUJfzOI0NLtL8scKehhb7EZ01+Ya9HZa8h t1GMz4bs2hOk2JQ4enrxtGJrK6Zd89HgE0h7jcYNjS/8eMe0jtrxxS8/tFz8k2QmzLV8Xj /rtfs7tJJ8gR4BJZMhFqoVU2Jp6EENA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-49-6aFiivT4N56EiplDQ_qBjg-1; Fri, 26 Jun 2020 12:43:47 -0400 X-MC-Unique: 6aFiivT4N56EiplDQ_qBjg-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 59B5A80400C; Fri, 26 Jun 2020 16:43:46 +0000 (UTC) Received: from turbo.com (ovpn-112-91.ams2.redhat.com [10.36.112.91]) by smtp.corp.redhat.com (Postfix) with ESMTP id A50AA5C1BB; Fri, 26 Jun 2020 16:43:43 +0000 (UTC) From: Christophe de Dinechin To: qemu-devel@nongnu.org Subject: [PATCH 06/10] trivial: Remove extra trailing whitespace Date: Fri, 26 Jun 2020 18:43:03 +0200 Message-Id: <20200626164307.3327380-7-dinechin@redhat.com> In-Reply-To: <20200626164307.3327380-1-dinechin@redhat.com> References: <20200626164307.3327380-1-dinechin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dinechin@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.120; envelope-from=dinechin@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/26 01:49:42 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , "Michael S. Tsirkin" , qemu-trivial@nongnu.org, Cleber Rosa , Michael Tokarev , Laurent Vivier , "Dr. David Alan Gilbert" , Gerd Hoffmann , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Paolo Bonzini , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Christophe de Dinechin --- hw/display/qxl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/display/qxl.c b/hw/display/qxl.c index d5627119ec..28caf878cd 100644 --- a/hw/display/qxl.c +++ b/hw/display/qxl.c @@ -51,7 +51,7 @@ #undef ALIGN #define ALIGN(a, b) (((a) + ((b) - 1)) & ~((b) - 1)) -#define PIXEL_SIZE 0.2936875 //1280x1024 is 14.8" x 11.9" +#define PIXEL_SIZE 0.2936875 //1280x1024 is 14.8" x 11.9" #define QXL_MODE(_x, _y, _b, _o) \ { .x_res = _x, \ From patchwork Fri Jun 26 16:43:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe de Dinechin X-Patchwork-Id: 11628051 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 955E7618 for ; Fri, 26 Jun 2020 16:53:55 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2C0DB206BE for ; Fri, 26 Jun 2020 16:53:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="QTpiS+bP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2C0DB206BE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:44462 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jorbu-0000nf-3a for patchwork-qemu-devel@patchwork.kernel.org; Fri, 26 Jun 2020 12:53:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58188) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jorSH-0006RK-Qo for qemu-devel@nongnu.org; Fri, 26 Jun 2020 12:43:58 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:54233 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jorSF-00074k-9a for qemu-devel@nongnu.org; Fri, 26 Jun 2020 12:43:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593189834; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TqgoKOgCXruRooTvbiddn1OM2i3remTJcN406x0BcnE=; b=QTpiS+bPEI6oHVqU5TfUNnkHadcnNEU+UCEFl195rsduAd6ynyZ7myeKGe3WrWKp4N/nsc nP294DSYDb4/Si4egE5Y8SJoiCsEP1GkjUKQj9VCQbwvmGvDmciREAWTm+oOkGXI9o5CQ5 RxbA3UbjBTqr2NGPpJW8OfNMzwziGyQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-243-8ZD0XLe5M0axqkeEX4hX1g-1; Fri, 26 Jun 2020 12:43:50 -0400 X-MC-Unique: 8ZD0XLe5M0axqkeEX4hX1g-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 48FE3800C60; Fri, 26 Jun 2020 16:43:49 +0000 (UTC) Received: from turbo.com (ovpn-112-91.ams2.redhat.com [10.36.112.91]) by smtp.corp.redhat.com (Postfix) with ESMTP id AD2975C1BB; Fri, 26 Jun 2020 16:43:46 +0000 (UTC) From: Christophe de Dinechin To: qemu-devel@nongnu.org Subject: [PATCH 07/10] qxl - FIXME: Build as module Date: Fri, 26 Jun 2020 18:43:04 +0200 Message-Id: <20200626164307.3327380-8-dinechin@redhat.com> In-Reply-To: <20200626164307.3327380-1-dinechin@redhat.com> References: <20200626164307.3327380-1-dinechin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.81; envelope-from=dinechin@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/26 03:23:21 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , "Michael S. Tsirkin" , qemu-trivial@nongnu.org, Cleber Rosa , Michael Tokarev , Laurent Vivier , "Dr. David Alan Gilbert" , Gerd Hoffmann , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Paolo Bonzini , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Forcibly build qxl as a module to see if we can load it Signed-off-by: Christophe de Dinechin --- hw/display/Makefile.objs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/display/Makefile.objs b/hw/display/Makefile.objs index 77a7d622bd..f51411619b 100644 --- a/hw/display/Makefile.objs +++ b/hw/display/Makefile.objs @@ -44,7 +44,8 @@ common-obj-$(CONFIG_ARTIST) += artist.o obj-$(CONFIG_VGA) += vga.o -common-obj-$(CONFIG_QXL) += qxl.o qxl-logger.o qxl-render.o +common-obj-$(CONFIG_QXL:y=m) += qxl.mo +qxl.mo-objs := qxl.o qxl-logger.o qxl-render.o obj-$(CONFIG_VIRTIO_GPU) += virtio-gpu-base.o virtio-gpu.o virtio-gpu-3d.o obj-$(CONFIG_VHOST_USER_GPU) += vhost-user-gpu.o From patchwork Fri Jun 26 16:43:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe de Dinechin X-Patchwork-Id: 11628055 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F0854618 for ; Fri, 26 Jun 2020 16:54:23 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C844E207E8 for ; Fri, 26 Jun 2020 16:54:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="HJ2f23KI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C844E207E8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:46340 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jorcN-0001bO-44 for patchwork-qemu-devel@patchwork.kernel.org; Fri, 26 Jun 2020 12:54:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58290) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jorSQ-0006he-0x for qemu-devel@nongnu.org; Fri, 26 Jun 2020 12:44:06 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:23327 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jorSO-00078Q-4g for qemu-devel@nongnu.org; Fri, 26 Jun 2020 12:44:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593189843; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jopcFLzYJYJJslTMVzSauZtrYKoS/LSXGVIDKJZrsog=; b=HJ2f23KIwLF4+EjkZFYIrwj8CYbhyMY9zBcisMhCTa4+1eeD/Rp8SIx8ZOag/O3uu7Nk/q 9eXecoH8l2/HstjVWlpt6FFjpstPnpYnosUcVy4YWnGs0LuNSGzQZiwRUEUMZG6hl3Ol4s MoiddkG3ma1cl44hZjA6XkYNJexMnaA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-439-VuqSWe4OO9Or-vvCL_rZBg-1; Fri, 26 Jun 2020 12:44:02 -0400 X-MC-Unique: VuqSWe4OO9Or-vvCL_rZBg-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 527FA1005512; Fri, 26 Jun 2020 16:44:00 +0000 (UTC) Received: from turbo.com (ovpn-112-91.ams2.redhat.com [10.36.112.91]) by smtp.corp.redhat.com (Postfix) with ESMTP id 969A65C1BB; Fri, 26 Jun 2020 16:43:49 +0000 (UTC) From: Christophe de Dinechin To: qemu-devel@nongnu.org Subject: [PATCH 08/10] build: Add SPICE_CFLAGS and SPICE_LIBS to relevant files Date: Fri, 26 Jun 2020 18:43:05 +0200 Message-Id: <20200626164307.3327380-9-dinechin@redhat.com> In-Reply-To: <20200626164307.3327380-1-dinechin@redhat.com> References: <20200626164307.3327380-1-dinechin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.81; envelope-from=dinechin@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/26 03:23:21 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , "Michael S. Tsirkin" , qemu-trivial@nongnu.org, Cleber Rosa , Michael Tokarev , Laurent Vivier , "Dr. David Alan Gilbert" , Gerd Hoffmann , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Paolo Bonzini , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Instead of adding the spice build flags to the top-level build options, add them where they are necessary. This is a step to move the burden of linking with spice libraries away from the top-level qemu. Signed-off-by: Christophe de Dinechin --- configure | 4 ++-- hw/display/Makefile.objs | 1 + hw/i386/Makefile.objs | 1 + monitor/Makefile.objs | 3 +++ softmmu/Makefile.objs | 2 +- stubs/Makefile.objs | 2 +- ui/Makefile.objs | 4 ++-- util/module.c | 13 +++++++++++-- 8 files changed, 22 insertions(+), 8 deletions(-) diff --git a/configure b/configure index 2de1715800..ac83aea242 100755 --- a/configure +++ b/configure @@ -5148,8 +5148,6 @@ EOF $pkg_config --atleast-version=0.12.3 spice-protocol && \ compile_prog "$spice_cflags" "$spice_libs" ; then spice="yes" - libs_softmmu="$libs_softmmu $spice_libs" - QEMU_CFLAGS="$QEMU_CFLAGS $spice_cflags" spice_protocol_version=$($pkg_config --modversion spice-protocol) spice_server_version=$($pkg_config --modversion spice-server) else @@ -7472,6 +7470,8 @@ fi if test "$spice" = "yes" ; then echo "CONFIG_SPICE=m" >> $config_host_mak + echo "SPICE_CFLAGS=$spice_cflags" >> $config_host_mak + echo "SPICE_LIBS=$spice_libs" >> $config_host_mak fi if test "$smartcard" = "yes" ; then diff --git a/hw/display/Makefile.objs b/hw/display/Makefile.objs index f51411619b..273a956d96 100644 --- a/hw/display/Makefile.objs +++ b/hw/display/Makefile.objs @@ -46,6 +46,7 @@ obj-$(CONFIG_VGA) += vga.o common-obj-$(CONFIG_QXL:y=m) += qxl.mo qxl.mo-objs := qxl.o qxl-logger.o qxl-render.o +qxl.mo-cflags += $(SPICE_CFLAGS) obj-$(CONFIG_VIRTIO_GPU) += virtio-gpu-base.o virtio-gpu.o virtio-gpu-3d.o obj-$(CONFIG_VHOST_USER_GPU) += vhost-user-gpu.o diff --git a/hw/i386/Makefile.objs b/hw/i386/Makefile.objs index 6abc74551a..bf9856be2a 100644 --- a/hw/i386/Makefile.objs +++ b/hw/i386/Makefile.objs @@ -2,6 +2,7 @@ obj-$(CONFIG_KVM) += kvm/ obj-y += e820_memory_layout.o multiboot.o obj-y += x86.o obj-$(CONFIG_PC) += pc.o pc_sysfw.o +pc.o-cflags += $(SPICE_CFLAGS) obj-$(CONFIG_I440FX) += pc_piix.o obj-$(CONFIG_Q35) += pc_q35.o obj-$(CONFIG_MICROVM) += microvm.o diff --git a/monitor/Makefile.objs b/monitor/Makefile.objs index a8533c9dd7..fd58d80195 100644 --- a/monitor/Makefile.objs +++ b/monitor/Makefile.objs @@ -2,5 +2,8 @@ obj-y += misc.o common-obj-y += monitor.o qmp.o hmp.o common-obj-y += qmp-cmds.o qmp-cmds-control.o common-obj-y += hmp-cmds.o +qmp-cmds.o-cflags += $(SPICE_CFLAGS) +hmp-cmds.o-cflags += $(SPICE_CFLAGS) +misc.o-cflags += $(SPICE_CFLAGS) storage-daemon-obj-y += monitor.o qmp.o qmp-cmds-control.o diff --git a/softmmu/Makefile.objs b/softmmu/Makefile.objs index dd15c24346..0e7605bd32 100644 --- a/softmmu/Makefile.objs +++ b/softmmu/Makefile.objs @@ -1,3 +1,3 @@ softmmu-main-y = softmmu/main.o obj-y += vl.o -vl.o-cflags := $(GPROF_CFLAGS) $(SDL_CFLAGS) +vl.o-cflags := $(GPROF_CFLAGS) $(SDL_CFLAGS) $(SPICE_CFLAGS) diff --git a/stubs/Makefile.objs b/stubs/Makefile.objs index f32b9e47a3..1df8bb3814 100644 --- a/stubs/Makefile.objs +++ b/stubs/Makefile.objs @@ -19,10 +19,10 @@ stub-obj-y += replay.o stub-obj-y += runstate-check.o stub-obj-$(CONFIG_SOFTMMU) += semihost.o stub-obj-y += set-fd-handler.o -stub-obj-y += vmgenid.o stub-obj-y += sysbus.o stub-obj-y += tpm.o stub-obj-y += trace-control.o +stub-obj-y += vmgenid.o stub-obj-y += vmstate.o stub-obj-$(CONFIG_SOFTMMU) += win32-kbd-hook.o diff --git a/ui/Makefile.objs b/ui/Makefile.objs index 1ab515e23d..6a6fda2f06 100644 --- a/ui/Makefile.objs +++ b/ui/Makefile.objs @@ -57,8 +57,8 @@ spice-app.mo-objs += spice-core.o spice-input.o spice-display.o ifeq ($(CONFIG_GIO)$(CONFIG_SPICE),ym) spice-app.mo-objs += spice-app.o endif -spice-app.mo-cflags := $(GIO_CFLAGS) -spice-app.mo-libs := $(GIO_LIBS) +spice-app.mo-cflags := $(GIO_CFLAGS) $(SPICE_CFLAGS) +spice-app.mo-libs := $(GIO_LIBS) $(SPICE_LIBS) common-obj-$(CONFIG_OPENGL) += shader.o common-obj-$(CONFIG_OPENGL) += console-gl.o diff --git a/util/module.c b/util/module.c index 2fa93561fe..29b4806520 100644 --- a/util/module.c +++ b/util/module.c @@ -22,11 +22,11 @@ #ifdef CONFIG_MODULE_UPGRADES #include "qemu-version.h" #endif -#ifdef CONFIG_TRACE_RECORDER #include "trace/recorder.h" -#endif +RECORDER(modules, 16, "QEMU load modules"); + typedef struct ModuleEntry { void (*init)(void); @@ -85,6 +85,15 @@ void register_dso_module_init(void (*fn)(void), module_init_type type) { ModuleEntry *e; +#ifdef CONFIG_TRACE_RECORDER + static const char *name[] = { + "MIGRATION", "BLOCK", "OPTS", "QOM", + "TRACE", "XEN_BACKEND", "LIBQOS", "FUZZ_TARGET", + "MAX" + }; +#endif + record(modules, "Register DSO module init %p type %u %+s", + fn, type, name[type]); init_lists(); e = g_malloc0(sizeof(*e)); From patchwork Fri Jun 26 16:43:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe de Dinechin X-Patchwork-Id: 11628077 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7684F92A for ; Fri, 26 Jun 2020 16:58:20 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4DF66206BE for ; Fri, 26 Jun 2020 16:58:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Ck/hcDDr" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4DF66206BE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:58244 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jorgB-0007oK-KK for patchwork-qemu-devel@patchwork.kernel.org; Fri, 26 Jun 2020 12:58:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58380) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jorSe-0007KJ-R9 for qemu-devel@nongnu.org; Fri, 26 Jun 2020 12:44:20 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:30781 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jorSc-0007Cz-Km for qemu-devel@nongnu.org; Fri, 26 Jun 2020 12:44:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593189858; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JHHQF6mkyWRgUe0IWsRd24TZpPx3i5fw+ACFDGTzfv0=; b=Ck/hcDDr3uyu+GdSvNCE/FzwpOf1YGLMWPqXuI6Z/yBvI5fqxQNbv5GmmrRXDU44gxujLp /c0X1StKLTqMyIa/lpg3xlKC8tqVLKvNXHdh/ZhBResZ/A8mfBaIdI2KJXlh0zW1KaPeGD iCn8fheb4XelGnVQzpmKap0JarVoHGI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-439-2UCQmw4jOF-ApRI5WOHq_w-1; Fri, 26 Jun 2020 12:44:16 -0400 X-MC-Unique: 2UCQmw4jOF-ApRI5WOHq_w-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 22B557BAC; Fri, 26 Jun 2020 16:44:15 +0000 (UTC) Received: from turbo.com (ovpn-112-91.ams2.redhat.com [10.36.112.91]) by smtp.corp.redhat.com (Postfix) with ESMTP id A2E855C6C0; Fri, 26 Jun 2020 16:44:00 +0000 (UTC) From: Christophe de Dinechin To: qemu-devel@nongnu.org Subject: [PATCH 09/10] spice: Put spice functions in a separate load module Date: Fri, 26 Jun 2020 18:43:06 +0200 Message-Id: <20200626164307.3327380-10-dinechin@redhat.com> In-Reply-To: <20200626164307.3327380-1-dinechin@redhat.com> References: <20200626164307.3327380-1-dinechin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.81; envelope-from=dinechin@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/26 03:23:21 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , "Michael S. Tsirkin" , qemu-trivial@nongnu.org, Cleber Rosa , Michael Tokarev , Laurent Vivier , "Dr. David Alan Gilbert" , Gerd Hoffmann , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Paolo Bonzini , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Use the MODIFACE and MODIMPL macros to to redirect the highest-level qemu_spice functions into the spice-app.so load module when SPICE is compiled as a module. With these changes, the following shared libraries are no longer necessary in the top-level qemu binary: libspice-server.so.1 => /lib64/libspice-server.so.1 (HEX) libopus.so.0 => /lib64/libopus.so.0 (HEX) liblz4.so.1 => /lib64/liblz4.so.1 (HEX) libgstapp-1.0.so.0 => /lib64/libgstapp-1.0.so.0 (HEX) libgstvideo-1.0.so.0 => /lib64/libgstvideo-1.0.so.0 (HEX) libgstbase-1.0.so.0 => /lib64/libgstbase-1.0.so.0 (HEX) libgstreamer-1.0.so.0 => /lib64/libgstreamer-1.0.so.0 (HEX) libssl.so.1.1 => /lib64/libssl.so.1.1 (HEX) liborc-0.4.so.0 => /lib64/liborc-0.4.so.0 (HEX) Signed-off-by: Christophe de Dinechin --- include/ui/qemu-spice.h | 24 +++++++++++++++--------- monitor/hmp-cmds.c | 6 ++++++ softmmu/vl.c | 1 + ui/spice-core.c | 31 +++++++++++++++++++++---------- ui/spice-display.c | 2 +- 5 files changed, 44 insertions(+), 20 deletions(-) diff --git a/include/ui/qemu-spice.h b/include/ui/qemu-spice.h index 8c23dfe717..0f7e139da5 100644 --- a/include/ui/qemu-spice.h +++ b/include/ui/qemu-spice.h @@ -24,22 +24,28 @@ #include #include "qemu/config-file.h" +#include "qemu/module.h" -extern int using_spice; +#define using_spice (qemu_is_using_spice()) -void qemu_spice_init(void); +MODIFACE(bool, qemu_is_using_spice,(void)); +MODIFACE(void, qemu_start_using_spice, (void)); +MODIFACE(void, qemu_spice_init, (void)); void qemu_spice_input_init(void); void qemu_spice_audio_init(void); -void qemu_spice_display_init(void); -int qemu_spice_display_add_client(int csock, int skipauth, int tls); +MODIFACE(void, qemu_spice_display_init, (void)); +MODIFACE(int, qemu_spice_display_add_client, (int csock, int skipauth, int tls)); int qemu_spice_add_interface(SpiceBaseInstance *sin); bool qemu_spice_have_display_interface(QemuConsole *con); int qemu_spice_add_display_interface(QXLInstance *qxlin, QemuConsole *con); -int qemu_spice_set_passwd(const char *passwd, - bool fail_if_connected, bool disconnect_if_connected); -int qemu_spice_set_pw_expire(time_t expires); -int qemu_spice_migrate_info(const char *hostname, int port, int tls_port, - const char *subject); +MODIFACE(int, qemu_spice_set_passwd, (const char *passwd, + bool fail_if_connected, + bool disconnect_if_connected)); +MODIFACE(int, qemu_spice_set_pw_expire,(time_t expires)); +MODIFACE(int, qemu_spice_migrate_info,(const char *hostname, + int port, int tls_port, + const char *subject)); +MODIFACE(struct SpiceInfo *,qemu_spice_query, (Error **errp)); #if !defined(SPICE_SERVER_VERSION) || (SPICE_SERVER_VERSION < 0xc06) #define SPICE_NEEDS_SET_MM_TIME 1 diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c index 2b0b58a336..6bd9c52658 100644 --- a/monitor/hmp-cmds.c +++ b/monitor/hmp-cmds.c @@ -56,6 +56,7 @@ #include "migration/misc.h" #ifdef CONFIG_SPICE +#include "ui/qemu-spice.h" #include #endif @@ -573,6 +574,11 @@ void hmp_info_vnc(Monitor *mon, const QDict *qdict) #endif #ifdef CONFIG_SPICE +SpiceInfo *qmp_query_spice(Error **errp) +{ + return qemu_spice_query(errp); +} + void hmp_info_spice(Monitor *mon, const QDict *qdict) { SpiceChannelList *chan; diff --git a/softmmu/vl.c b/softmmu/vl.c index 3e15ee2435..c94b4fa49b 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -22,6 +22,7 @@ * THE SOFTWARE. */ +#define MODULE_STUBS #include "qemu/osdep.h" #include "qemu-common.h" #include "qemu/units.h" diff --git a/ui/spice-core.c b/ui/spice-core.c index ecc2ec2c55..dbc1886b77 100644 --- a/ui/spice-core.c +++ b/ui/spice-core.c @@ -48,7 +48,7 @@ static time_t auth_expires = TIME_MAX; static int spice_migration_completed; static int spice_display_is_running; static int spice_have_target_host; -int using_spice = 0; +static int is_using_spice = 0; static QemuThread me; @@ -503,7 +503,7 @@ static QemuOptsList qemu_spice_opts = { }, }; -SpiceInfo *qmp_query_spice(Error **errp) +MODIMPL(SpiceInfo *,qemu_spice_query,(Error **errp)) { QemuOpts *opts = QTAILQ_FIRST(&qemu_spice_opts.head); int port, tls_port; @@ -579,8 +579,9 @@ static void migration_state_notifier(Notifier *notifier, void *data) } } -int qemu_spice_migrate_info(const char *hostname, int port, int tls_port, - const char *subject) +MODIMPL(int, qemu_spice_migrate_info, (const char *hostname, + int port, int tls_port, + const char *subject)) { int ret; @@ -634,7 +635,17 @@ static void vm_change_state_handler(void *opaque, int running, } } -void qemu_spice_init(void) +MODIMPL(bool, qemu_is_using_spice, (void)) +{ + return is_using_spice; +} + +MODIMPL(void, qemu_start_using_spice, (void)) +{ + is_using_spice = 1; +} + +MODIMPL(void, qemu_spice_init, (void)) { QemuOpts *opts = QTAILQ_FIRST(&qemu_spice_opts.head); const char *password, *str, *x509_dir, *addr, @@ -796,7 +807,7 @@ void qemu_spice_init(void) error_report("failed to initialize spice server"); exit(1); }; - using_spice = 1; + qemu_start_using_spice(); migration_state.notify = migration_state_notifier; add_migration_state_change_notifier(&migration_state); @@ -945,8 +956,8 @@ static int qemu_spice_set_ticket(bool fail_if_conn, bool disconnect_if_conn) fail_if_conn, disconnect_if_conn); } -int qemu_spice_set_passwd(const char *passwd, - bool fail_if_conn, bool disconnect_if_conn) +MODIMPL(int, qemu_spice_set_passwd,(const char *passwd, + bool fail_if_conn, bool disconnect_if_conn)) { if (strcmp(auth, "spice") != 0) { return -1; @@ -957,13 +968,13 @@ int qemu_spice_set_passwd(const char *passwd, return qemu_spice_set_ticket(fail_if_conn, disconnect_if_conn); } -int qemu_spice_set_pw_expire(time_t expires) +MODIMPL(int, qemu_spice_set_pw_expire, (time_t expires)) { auth_expires = expires; return qemu_spice_set_ticket(false, false); } -int qemu_spice_display_add_client(int csock, int skipauth, int tls) +MODIMPL(int, qemu_spice_display_add_client, (int csock, int skipauth, int tls)) { if (tls) { return spice_server_add_ssl_client(spice_server, csock, skipauth); diff --git a/ui/spice-display.c b/ui/spice-display.c index 19632fdf6c..90529695fe 100644 --- a/ui/spice-display.c +++ b/ui/spice-display.c @@ -1164,7 +1164,7 @@ static void qemu_spice_display_init_one(QemuConsole *con) register_displaychangelistener(&ssd->dcl); } -void qemu_spice_display_init(void) +MODIMPL(void, qemu_spice_display_init,(void)) { QemuOptsList *olist = qemu_find_opts("spice"); QemuOpts *opts = QTAILQ_FIRST(&olist->head); From patchwork Fri Jun 26 16:43:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe de Dinechin X-Patchwork-Id: 11628075 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 64A5392A for ; Fri, 26 Jun 2020 16:58:03 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3ACFF206BE for ; Fri, 26 Jun 2020 16:58:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="NDlQ6Fm1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3ACFF206BE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:57408 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jorfu-0007T1-A5 for patchwork-qemu-devel@patchwork.kernel.org; Fri, 26 Jun 2020 12:58:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58566) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jorT7-00006l-9R for qemu-devel@nongnu.org; Fri, 26 Jun 2020 12:44:49 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:57551 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jorT5-0007MA-JY for qemu-devel@nongnu.org; Fri, 26 Jun 2020 12:44:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593189886; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=THjSHFXW5OWYQXUjbOgTZCQR9lPztYkWqZ/Y57Uc3s8=; b=NDlQ6Fm1dnszwt0dgCneIpqFaLNXGLY6kAK6WrFkewOr7aP1OpG/HJlXF0i9Xmo+9lOWH+ FbeALTopmPjYAO5cXahFfWDUyvj5+iBi2knc9jkSVliB1B+GNWvYpIsExc4E38igEUTRpa 9I1n8JgysLx9QOIGxjfBhZtwdtjlrb8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-259-p7x5DZ_xPSSBFUlrg42wsg-1; Fri, 26 Jun 2020 12:44:45 -0400 X-MC-Unique: p7x5DZ_xPSSBFUlrg42wsg-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 03AFA805EEF; Fri, 26 Jun 2020 16:44:44 +0000 (UTC) Received: from turbo.com (ovpn-112-91.ams2.redhat.com [10.36.112.91]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6FA1D1757A; Fri, 26 Jun 2020 16:44:15 +0000 (UTC) From: Christophe de Dinechin To: qemu-devel@nongnu.org Subject: [PATCH 10/10] REMOVE: Instrumentation to show the module functions being replaced Date: Fri, 26 Jun 2020 18:43:07 +0200 Message-Id: <20200626164307.3327380-11-dinechin@redhat.com> In-Reply-To: <20200626164307.3327380-1-dinechin@redhat.com> References: <20200626164307.3327380-1-dinechin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.81; envelope-from=dinechin@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/26 03:23:21 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , "Michael S. Tsirkin" , qemu-trivial@nongnu.org, Cleber Rosa , Michael Tokarev , Laurent Vivier , "Dr. David Alan Gilbert" , Gerd Hoffmann , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Paolo Bonzini , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Christophe de Dinechin --- include/qemu/module.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/qemu/module.h b/include/qemu/module.h index 1922a0293c..8d6e10ba81 100644 --- a/include/qemu/module.h +++ b/include/qemu/module.h @@ -14,10 +14,13 @@ #ifndef QEMU_MODULE_H #define QEMU_MODULE_H +#include "trace/recorder.h" #define DSO_STAMP_FUN glue(qemu_stamp, CONFIG_STAMP) #define DSO_STAMP_FUN_STR stringify(DSO_STAMP_FUN) +RECORDER_DECLARE(modules); + #ifdef BUILD_DSO void DSO_STAMP_FUN(void); /* This is a dummy symbol to identify a loaded DSO as a QEMU module, so we can @@ -55,6 +58,7 @@ static void __attribute__((constructor)) do_qemu_init_ ## function(void) \ static void __attribute__((constructor)) Name##_register(void) \ { \ Name = Name##_implementation; \ + record(modules, "Setting " #Name " to %p", Name); \ } \ Ret Name##_implementation Args #else /* !CONFIG_MODULES */