From patchwork Mon Nov 9 09:45:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 11890807 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D7CF0C56201 for ; Mon, 9 Nov 2020 09:45:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8C88A207BC for ; Mon, 9 Nov 2020 09:45:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="lfFJ0JNb" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729008AbgKIJp5 (ORCPT ); Mon, 9 Nov 2020 04:45:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728866AbgKIJp5 (ORCPT ); Mon, 9 Nov 2020 04:45:57 -0500 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9C96C0613CF for ; Mon, 9 Nov 2020 01:45:55 -0800 (PST) Received: by mail-wr1-x443.google.com with SMTP id p1so7918411wrf.12 for ; Mon, 09 Nov 2020 01:45:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1o8lO3koG16AlBbmrKd/snSNhrR/M4yhMjnc+WbIftA=; b=lfFJ0JNb2rBiiklBvMRWfCR2xuij+pgMCgqsLCy81HP4dnZsGa9ab/tral6KSdVN/S b4DSOQga0Gi+UYhfqO328qbmbgMW+VMAqCGR4HrGkoy2LrW1g6x80sYavGnSv1s98F5v XumyaGK5Or9PB2BeK7vAxuNBbdg1E3V2cPYRJ40N7a7NeO4KY70hCSOoP1Uy4dCvDKWA RqBJfzxMsqqYdwpfdzrM+vVZk8hugomSvGJeExtnJemU135/1Bsnwnhi1ipEEk0qTuVT rRrW9PLQOu7nPQq052VIQSaJT5fJF4/YsBg78TsY0MfddTYxudPiqIVcZgwELwdU5ejr 4nwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=1o8lO3koG16AlBbmrKd/snSNhrR/M4yhMjnc+WbIftA=; b=OtyJmlU8Qo1NP+gWAKEucyDgKAgftNUzxBPCYBetpuUlBFgK/bvHFlvGQ3iqkOmwji SeSdokeG6KiNWLhtvINA+0Ju1vddbInR9twdb8cEG90YMF0oWIRwCMK51q7qUgQMDiDi U41JG0hlY3J4TW2C6Uh5/r5yxefTCQp3EAjt1Et1I1vDs39P358kwyrqSIyhkCVZTdIM jsm2yXEyrJER2XRy7KQs1ap4dtHdWdymuWnz+DG0CBl8pOm0S5wGuXl+yQ98PmNICjY0 nE1uytQ1idAEpReNAiEZ3zuTlbcfmMgbg3MycGC2PugWgIzCAy9iXMNMdAIrpj4MNBwt LedQ== X-Gm-Message-State: AOAM530kblgysvjgrKf2vgFmPfNBkZZtDJACvz0labTSEFr8m3J4SDe/ GK81xLp/2DD5/XpjdnzvhRU= X-Google-Smtp-Source: ABdhPJxc4TZdtgyhqebFbBYMGgeJ98UQ+2SDOy/fHp3mL6Ipg+mK+zm9sk7kmSq1DbuRl+juTBkF8g== X-Received: by 2002:adf:e64e:: with SMTP id b14mr16979874wrn.68.1604915154540; Mon, 09 Nov 2020 01:45:54 -0800 (PST) Received: from localhost.localdomain (234.red-83-42-66.dynamicip.rima-tde.net. [83.42.66.234]) by smtp.gmail.com with ESMTPSA id z191sm12223304wme.30.2020.11.09.01.45.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Nov 2020 01:45:53 -0800 (PST) Sender: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Laurent Vivier , kvm@vger.kernel.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 1/3] accel: Only include TCG stubs in user-mode only builds Date: Mon, 9 Nov 2020 10:45:45 +0100 Message-Id: <20201109094547.2456385-2-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201109094547.2456385-1-f4bug@amsat.org> References: <20201109094547.2456385-1-f4bug@amsat.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org We only require TCG stubs in user-mode emulation. Do not build stubs restricted to system-mode emulation in a user-mode only build. Signed-off-by: Philippe Mathieu-Daudé --- accel/meson.build | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/accel/meson.build b/accel/meson.build index b26cca227a4..609772f129b 100644 --- a/accel/meson.build +++ b/accel/meson.build @@ -1,10 +1,12 @@ softmmu_ss.add(files('accel.c')) -subdir('qtest') -subdir('kvm') subdir('tcg') -subdir('xen') -subdir('stubs') +if have_system + subdir('qtest') + subdir('kvm') + subdir('xen') + subdir('stubs') +endif dummy_ss = ss.source_set() dummy_ss.add(files( From patchwork Mon Nov 9 09:45:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 11890811 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 698F6C4741F for ; Mon, 9 Nov 2020 09:46:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1FADE20719 for ; Mon, 9 Nov 2020 09:46:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Rym4zP1G" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729081AbgKIJqB (ORCPT ); Mon, 9 Nov 2020 04:46:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729045AbgKIJqA (ORCPT ); Mon, 9 Nov 2020 04:46:00 -0500 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88C27C0613D3 for ; Mon, 9 Nov 2020 01:46:00 -0800 (PST) Received: by mail-wr1-x441.google.com with SMTP id k2so4555397wrx.2 for ; Mon, 09 Nov 2020 01:46:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OUYrJMZKmRU5gfzMdZni/PewvUwFGv/yOXLZtLqq/rA=; b=Rym4zP1Gy212Y6DC8Ti9e67ZFiG8o9H/mun5p3eVP/l4unpQXp/SCMc0Y8PVbSUN98 kAb8p6pKNT39Bdaw9Lok8Pk8clFS3Z5J6eHks8SHPVayOLB19Ew8ryEUY0GfP6Q6Pzov Ef8y87K0rjeWrtgyqSe1EcCDTpZ3F9fNmcXZBk4xV6+Naf7HzsJfdTa4kp+/0Tpqso2z Xjo3yVR8AA9FhhZaUtmfJhvq2yJ3rYPEHtjoAbOkDgK+j0IuzzbszzVOJ1TgcCQidyX0 GXnXmusnOxIw/+DdU5w5yeYNDNsoz66Vr35hL6TJ74Rfztu3EgQpoX1/wPqWe9foe3BJ ocqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=OUYrJMZKmRU5gfzMdZni/PewvUwFGv/yOXLZtLqq/rA=; b=BoYIGlKHi0cYgw9Ozi9uiUow+7vcSt2iCBq2j9b73mthuRSnuzMw4DP2gsYmqJKEox G+GqtdGY0sxzivJys2Un7cmfRO/0unvtOIlmzjCyXrBlH60uR5F4oelbO/jKqKo7cOXQ kW4bKw5bGCzwjOdW2fyeMmhX7VjytFnMI1+yYvP/gR4ZNUSSLY4DcImMrhUkGgsSDpxk VCXzubj1aT4IHLfKCL1mObqhyu4AA5ykjRGYt9D8dfGYyFK8R4D2Z8gB4e/ynlkPUuKO Cro/AyG0gRSTiCFGTj315iwT/MVzf+gzvaNl/akEntWNROMaoFIAf7V2VDA/yk2YjWcW cPhg== X-Gm-Message-State: AOAM532WQqupGv4dPMuV8Q4x8qnwiz1YypXkNs4r200butXPw1NJnZZA CHohHJ2RQbYvnd7bgb/mpoQgnqqmOBU= X-Google-Smtp-Source: ABdhPJxt5z9bdv9Mv9Zt4CoeM7KloJcC+UEmkeSWlobZoei3yRhyzsB5igE5vQS+QtJ4sEWc1Ys7xg== X-Received: by 2002:adf:8465:: with SMTP id 92mr16122883wrf.50.1604915159327; Mon, 09 Nov 2020 01:45:59 -0800 (PST) Received: from localhost.localdomain (234.red-83-42-66.dynamicip.rima-tde.net. [83.42.66.234]) by smtp.gmail.com with ESMTPSA id a17sm12837504wra.61.2020.11.09.01.45.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Nov 2020 01:45:58 -0800 (PST) Sender: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Laurent Vivier , kvm@vger.kernel.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 2/3] accel/stubs: Restrict system-mode emulation stubs Date: Mon, 9 Nov 2020 10:45:46 +0100 Message-Id: <20201109094547.2456385-3-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201109094547.2456385-1-f4bug@amsat.org> References: <20201109094547.2456385-1-f4bug@amsat.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org This system-mode emulation stubs are not require in user-mode binaries. Restrict them to system-mode binaries. Signed-off-by: Philippe Mathieu-Daudé --- accel/stubs/meson.build | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/accel/stubs/meson.build b/accel/stubs/meson.build index 12dd1539afa..a83408bc0a7 100644 --- a/accel/stubs/meson.build +++ b/accel/stubs/meson.build @@ -1,4 +1,8 @@ -specific_ss.add(when: 'CONFIG_HAX', if_false: files('hax-stub.c')) -specific_ss.add(when: 'CONFIG_XEN', if_false: files('xen-stub.c')) -specific_ss.add(when: 'CONFIG_KVM', if_false: files('kvm-stub.c')) -specific_ss.add(when: 'CONFIG_TCG', if_false: files('tcg-stub.c')) +accel_stubs_ss = ss.source_set() + +accel_stubs_ss.add(when: 'CONFIG_HAX', if_false: files('hax-stub.c')) +accel_stubs_ss.add(when: 'CONFIG_XEN', if_false: files('xen-stub.c')) +accel_stubs_ss.add(when: 'CONFIG_KVM', if_false: files('kvm-stub.c')) +accel_stubs_ss.add(when: 'CONFIG_TCG', if_false: files('tcg-stub.c')) + +specific_ss.add_all(when: ['CONFIG_SOFTMMU'], if_true: accel_stubs_ss) From patchwork Mon Nov 9 09:45:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 11890813 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 134B0C2D0A3 for ; Mon, 9 Nov 2020 09:46:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B166620719 for ; Mon, 9 Nov 2020 09:46:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="F06rSHBK" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729098AbgKIJqF (ORCPT ); Mon, 9 Nov 2020 04:46:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729053AbgKIJqF (ORCPT ); Mon, 9 Nov 2020 04:46:05 -0500 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46C73C0613CF for ; Mon, 9 Nov 2020 01:46:05 -0800 (PST) Received: by mail-wm1-x343.google.com with SMTP id h2so7343124wmm.0 for ; Mon, 09 Nov 2020 01:46:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=skEK8mcEbaIFgeS0C2weI3p2dBXQu/ugQCxgA8/QJFY=; b=F06rSHBKrzqDcu8FaVWSwws98lz5ArIBJmV6GpbautZMtgl2r+YYdcFYVWealFs9t/ TN5556bSf+/nyhzs1b3SBy/EWxHicKqZ77PPvLiHWH0LYMJsQTkFOCkdv3Gujh0dRK/z AxFEih+MVOq3F3oabqYB24UXKuUiDcZXd0swk1NYUYN7XB2He6dS9pJMeP/hJm+Tusds qIdbGRbFmSd2VGwpJ4N6MxCWNktY+ksnTGEsxY/EY+TaH6l2Q8bRgOUdy3ckSzbeLO1e I5KvkOpoJz7eBHHtPP/6EtSuKEsydtV4zevKzuf8S/v5aLa2bDTolpeFNcJVwqKm/moh aLug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=skEK8mcEbaIFgeS0C2weI3p2dBXQu/ugQCxgA8/QJFY=; b=J+0b7dyZsw0/38THJ0XSsibhG7xdIjWa9g6VpYYu2q+r/AvyQ9VVpCASKqlbFAmSjS cog610XLQ2Gvca4yTrb7iHVv4c8Kb0MJp2A7rVrOkOTBmQ/RJW6RVxhj+sH5W7a/n4MI QJhA2ChttkpdwPEWr9FDzPZa5EPm9L4ZrWg8WbsMPRUwSm04/tR6LtCA+dHy34ZITUnX 6q8JHs5Ekg7Xv41cUS8z1diIEQiljAJT+j8hdWC+mC1Rmp1i0TP+oBX37t0rE11AUizP PMzJsUT/xY95nvefYWZ3ghi/hFi7G4IQdnD+piiK6+UzjC0ZJdMZ0qRycf8m3u6vN6zq 1ZIA== X-Gm-Message-State: AOAM53379EpI0t8XfXWlaOTL/SmjaIeYM93CfxegnRMXcQqtAz38J4Vm Vx8z4O8syNgvYvOkfZ8bXr8= X-Google-Smtp-Source: ABdhPJxDdTB7I9WJICHIIjy4yAPQvmdbvjdorOinX1TetlCZiYP42zLjOjlMNmvL8ohxokfQ4DLVcQ== X-Received: by 2002:a7b:c308:: with SMTP id k8mr10264042wmj.76.1604915164072; Mon, 09 Nov 2020 01:46:04 -0800 (PST) Received: from localhost.localdomain (234.red-83-42-66.dynamicip.rima-tde.net. [83.42.66.234]) by smtp.gmail.com with ESMTPSA id u6sm12219003wmj.40.2020.11.09.01.46.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Nov 2020 01:46:03 -0800 (PST) Sender: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Laurent Vivier , kvm@vger.kernel.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 3/3] accel/stubs: Simplify kvm-stub.c Date: Mon, 9 Nov 2020 10:45:47 +0100 Message-Id: <20201109094547.2456385-4-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201109094547.2456385-1-f4bug@amsat.org> References: <20201109094547.2456385-1-f4bug@amsat.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Now than kvm-stub.c is only built on system-mode emulation, we can simplify its #ifdef'ry. Signed-off-by: Philippe Mathieu-Daudé --- accel/stubs/kvm-stub.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/accel/stubs/kvm-stub.c b/accel/stubs/kvm-stub.c index 680e0994637..68fdfce50ed 100644 --- a/accel/stubs/kvm-stub.c +++ b/accel/stubs/kvm-stub.c @@ -13,10 +13,7 @@ #include "qemu/osdep.h" #include "cpu.h" #include "sysemu/kvm.h" - -#ifndef CONFIG_USER_ONLY #include "hw/pci/msi.h" -#endif KVMState *kvm_state; bool kvm_kernel_irqchip; @@ -91,7 +88,6 @@ int kvm_memcrypt_encrypt_data(uint8_t *ptr, uint64_t len) return 1; } -#ifndef CONFIG_USER_ONLY int kvm_irqchip_add_msi_route(KVMState *s, int vector, PCIDevice *dev) { return -ENOSYS; @@ -158,4 +154,3 @@ bool kvm_arm_supports_user_irq(void) { return false; } -#endif