From patchwork Wed May 24 09:37:35 2023 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: 685313 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp149830wrt; Wed, 24 May 2023 02:38:34 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4zb0x3IFJelVtdcZJCuxMsUhaeVQ577H6/10JbgtXfq+dUhmQ6qrfL1qtrVqeiPz4cxuIr X-Received: by 2002:a05:620a:1d67:b0:75b:23a1:d8c9 with SMTP id dm39-20020a05620a1d6700b0075b23a1d8c9mr7779823qkb.13.1684921114363; Wed, 24 May 2023 02:38:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684921114; cv=none; d=google.com; s=arc-20160816; b=xa+zLy1bComp/v+PzE4JYAGmXdsHSjiP5fE/HWha2tdfB4sTTQe689KAAACcpYWM0q HcvTpmofvDuyHmFO8i9VjdcfVGXNC9xV6S1HA1injCpKigo5wIEBi9NXRvyhDT3/kOcM dR8EyU8mFkmEy/9RbDT/GZnxW7rUwpUxepoe3EasWZHW6npOFFHiUYYF5q6iawOu5qnq ey8lAIqfN/F5AcHkCDSkxqdLaroqqszJy2loE47XZdK9LvKMp6wpcKdgSuzP2XHVtLCg U3ZVIMBWmIuw6cuV3S5a6lwStg7vwBmqFPJlhUVZ+4xz2qR3YrOUy/8gP1otfWhvLfVy kqPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=NIcA0PvZwprADJczJqLbuRMLXgSZuvk7SexYJ3+yvxo=; b=SPa/4DbZBvAWJ8+I8VDzjrP59v7xAooDRwuFO0QB4W0faljfF9yqD3NmoBVGTxdnKZ cHbovy9lDxPIzCtce8rNrByROdFh/Tqt0vzsUbvNTCW4ai1NqvCFGNVSWZm2hf/uEtIU UBPO69ddonVJtntDgj80LDBSA0VW7Jz7T5qbo8IvN7ewHmzO23cNaTAmZcsLLo6lyTj5 wTz9KbtCXIXO+rmR50adZ94A2O4SPcKUH2dvDbudcSKsusW0+dYe3vZmwgMvLXgq2OeY wEPjHDXhNx5IguSXjAyDu7OfrBlvyrSj/CtPhXoEjtosDn5GzV9JoNb+a/yToSeUtQzZ N/gA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=en5yceAZ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id p1-20020a05620a112100b007577a865012si5899327qkk.330.2023.05.24.02.38.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 May 2023 02:38:34 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=en5yceAZ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q1kwV-0004hJ-If; Wed, 24 May 2023 05:38:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q1kwT-0004S0-2n for qemu-devel@nongnu.org; Wed, 24 May 2023 05:38:01 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q1kwQ-0006mf-JD for qemu-devel@nongnu.org; Wed, 24 May 2023 05:38:00 -0400 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-3f42ba32e24so6287065e9.3 for ; Wed, 24 May 2023 02:37:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684921077; x=1687513077; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=NIcA0PvZwprADJczJqLbuRMLXgSZuvk7SexYJ3+yvxo=; b=en5yceAZyLoK2aO/2T9Bnfvl5rgwZ49K3a6wWlI9mnaRFxqKIFZbxkNPzH+5UD2TlC yGshVDcVMTUEqdsWqsWXRDHtkTw//aFnDEcq5+LVmYgGyvWoylIPFzvHWwtraQ3BE4O7 w6iD5CLQfN5o9V325ZDO6oY4fsqIZDcj4Bf7s9sQoG1c22Xk14LinrB/wa23zWaquDCT D4ETy0ok8QvBHQZrYUj6H5aISQ8wIt2pE/ql7mOVyxPYP0yTpX+p1YyMXheEVU5QuC+g fANZV8T+riIrpoidczy1SO4zQSe5mNO4wMgo64LHv83zdPLq1bnhVxm+6Cx/ULt+aY/6 90iA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684921077; x=1687513077; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NIcA0PvZwprADJczJqLbuRMLXgSZuvk7SexYJ3+yvxo=; b=AhgxGRP3PjLBbAm/uYJ9BWF5Pw7vnGy/TKIACuzqLBy/UH+QsqOVfCofqN2RuwR815 MWWwkzhyHZL0QL0jOulWAaJs7bDJce0i3pig2atid+UoXiphCzi9mL7I7Wg5vxWIJ4G+ 2DKBJKujeEInaCSdOr5AEjctlJizYpLcOGOET1ZEwLLPCm1YZTVMLQeBbT1/O27JFyPN A0WJMwJGkQ1ktZyK6ueDpW+bmxdrJRXo5bQUNeUiLG3cNaO0PhiUYtxbRqZ9Yq3h0TeS yvFGD/iJL9lDRNJ1BfRndhMAk7UxqAIPQCxFSG7dDjsn288FpVRZR6bZHoyFaxeLST0F hStA== X-Gm-Message-State: AC+VfDyLLj4XtCHrMCgJZiq2DI08CatLZBJlj6Uje/SPcq+UF7chdJFd 3kPvkqlJjf4X/kwZESe3Y/VTuwINONdWGAy2t1ViFQ== X-Received: by 2002:adf:f683:0:b0:304:8149:239b with SMTP id v3-20020adff683000000b003048149239bmr13080694wrp.50.1684921076839; Wed, 24 May 2023 02:37:56 -0700 (PDT) Received: from localhost.localdomain (fac34-h02-176-184-31-246.dsl.sta.abo.bbox.fr. [176.184.31.246]) by smtp.gmail.com with ESMTPSA id b15-20020a5d4b8f000000b00306344eaebfsm13882355wrt.28.2023.05.24.02.37.53 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 24 May 2023 02:37:56 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Fam Zheng , Thomas Huth , Paolo Bonzini , Eric Farman , Peter Xu , Hanna Reitz , Christian Borntraeger , "Michael S. Tsirkin" , Raphael Norwitz , Ilya Leoshkevich , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , Eric Auger , "Gonglei (Arei)" , David Hildenbrand , Stefan Hajnoczi , qemu-s390x@nongnu.org, Cornelia Huck , Halil Pasic , qemu-block@nongnu.org, Kevin Wolf Subject: [PATCH v2 01/10] softmmu: Introduce qemu_target_page_mask() helper Date: Wed, 24 May 2023 11:37:35 +0200 Message-Id: <20230524093744.88442-2-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230524093744.88442-1-philmd@linaro.org> References: <20230524093744.88442-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=philmd@linaro.org; helo=mail-wm1-x32c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Since TARGET_PAGE_MASK is poisoned in target-agnostic code, introduce the qemu_target_page_mask() helper to get this value from target-agnostic code at runtime. Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée --- include/exec/target_page.h | 1 + softmmu/physmem.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/include/exec/target_page.h b/include/exec/target_page.h index bbf37aea17..98ffbb5c23 100644 --- a/include/exec/target_page.h +++ b/include/exec/target_page.h @@ -15,6 +15,7 @@ #define EXEC_TARGET_PAGE_H size_t qemu_target_page_size(void); +int qemu_target_page_mask(void); int qemu_target_page_bits(void); int qemu_target_page_bits_min(void); diff --git a/softmmu/physmem.c b/softmmu/physmem.c index 9d7e172260..8067742df0 100644 --- a/softmmu/physmem.c +++ b/softmmu/physmem.c @@ -3354,6 +3354,11 @@ size_t qemu_target_page_size(void) return TARGET_PAGE_SIZE; } +int qemu_target_page_mask(void) +{ + return TARGET_PAGE_MASK; +} + int qemu_target_page_bits(void) { return TARGET_PAGE_BITS; From patchwork Wed May 24 09:37:36 2023 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: 685314 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp149839wrt; Wed, 24 May 2023 02:38:35 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6/5y6PeO02U4WCYU/IHzH/Mt98vTrP+hCvh3jslVm12nJnsjgQaJ3/38o+5GHpvgSaqI2x X-Received: by 2002:ac8:5a84:0:b0:3f6:bbf6:3c2e with SMTP id c4-20020ac85a84000000b003f6bbf63c2emr4872832qtc.13.1684921115438; Wed, 24 May 2023 02:38:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684921115; cv=none; d=google.com; s=arc-20160816; b=qMWMjkVru7FjjWyZZHE1FBJ2LmBxtAHtpHzYYECm5vLi2tSBu4ylbgqvw9ljOiZrWQ YLJ+xXb+Yz18pcRN8QDEZ9os//15VWNaDaHCJRsrhuxJzjpSsdT1sSuwOkwkgZazX3LS eEdH59kDKwuH82LYaCtpN281k/2wT4VNd5T0+iO47r06aOZ9LUWcUtEb5sa+P4c1SHSw cn4HzGFIRmybjWAg82kPTlHwInWXHgv3hI01iiAxaT+BxtrkRdDqC99IKeNdboAjlRAW zSnnpVA9lNj7wGi+yGpnZ4KzCWNEO5ds9TUucfAz/Bg6ieoFQ65TmlQAMeGveR65Mw+/ 5c+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=lnZlj3i7pDAPQ4/SoUu9ZpheF+HMfcfUHEdU+g8AbV4=; b=xnjPNWke3P/1FHpUrXM5Lz5Ks7kCuqsNXKsmufIkYYlD8E0fGn7XO/08/GbPXGub3Y olHbeuWaqh0/WsyAw+I/qN5kz/fio32w6DeYDVjMPbiWvU0E+yN4JqM7Vf8qmlq2NbFN gQDxRG3Pdr82pPBy0w1MStPRMRkfRPC6DAo6znmSfobDDVfSAlCzFEGm9/V0XhSyrOsu Cx/Xy+1Plz94o5Q9vwiba6swJzX1XghRttE3X3MG2o4GNOBZGakCQmDhMJR5czIGjmwh mJ0IrUv/AIOVeNCkmV6TO8rGmT04XqYuT8Pfx/420eoLbHvgozjl8Tt2LC99F+DDD2fU 5DCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OZZU2QTS; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id y8-20020a05622a164800b003f43703b305si6358183qtj.714.2023.05.24.02.38.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 May 2023 02:38:35 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OZZU2QTS; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q1kwd-00059T-B2; Wed, 24 May 2023 05:38:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q1kwZ-00056c-Tr for qemu-devel@nongnu.org; Wed, 24 May 2023 05:38:07 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q1kwY-0006o1-4u for qemu-devel@nongnu.org; Wed, 24 May 2023 05:38:07 -0400 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-3f623adec61so3116945e9.0 for ; Wed, 24 May 2023 02:38:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684921083; x=1687513083; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=lnZlj3i7pDAPQ4/SoUu9ZpheF+HMfcfUHEdU+g8AbV4=; b=OZZU2QTSCg/8tbuBctWLi/qUL4Fm9Hohcz2y6Mbv4cs32moaLIIlCOjFuwD/5rJJLX Tjeam4+GQEI/FoZRcVOXjTKvB/bJReZn73SIO398kXdcDvQh6pHEg9s1pjQgYLjOjhf2 xZzbh/zE6LUxJc+iP7yElzmW5UA3z7ZU1cdx8rrvMSBvShTLkXG48gXD+QafVLh5BG6G MO5XzYcCqEnA1CADu2L17JhrDU5uDOyILDfulZOk6OKjEMA6HLvdalAXFxZV74JND08d k4bt8BAgFABG0Z2z1T+7PLiG5lkjJ1lN74/6Ex5WLE/MWHESHgWRMuifPRAUHkCv6/h7 TO5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684921083; x=1687513083; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lnZlj3i7pDAPQ4/SoUu9ZpheF+HMfcfUHEdU+g8AbV4=; b=GAkdbwwztj2SvBAoIAh1854eg7dPF/qDdQh76ZpmHY8ipMpytpfnBkgNz9BsMcUGQj U+5RiikWvGJT8SfNaTZp55WgkAB1+7sSxg0S+xiiT9tX8jw4oAHNp1AABgADQANJhY6F nJ8W0ppm5E2tRAv0FSoac/JLhB82wmvNl+iYJCsGj7YFrOqhqQ5w7G6r4Ari6ERu6F2R eLJIhNoDs2YSLMkqR83MP9qSllc1TgABD9TBEm8jyyEte1wXK0n3f+2QpAPjZlv8ToxP FG/Fi15jEDzEyEBAOeHVQ7m8EUcAvYeWO4D8W7ufosj4eMIL7MYGSEmNLmJ5Bevb4k8m 6oFw== X-Gm-Message-State: AC+VfDyrgeMms4B6lLhBReQhTe+kdjbhEbDSKhs7pqf5AzKK+kmVNDQs MxOFNqUMzcauUMZqyUD4XSaa3cB4Rf/Rxpp+i1dyuA== X-Received: by 2002:a05:600c:2185:b0:3f6:459:eba3 with SMTP id e5-20020a05600c218500b003f60459eba3mr6773029wme.0.1684921083386; Wed, 24 May 2023 02:38:03 -0700 (PDT) Received: from localhost.localdomain (fac34-h02-176-184-31-246.dsl.sta.abo.bbox.fr. [176.184.31.246]) by smtp.gmail.com with ESMTPSA id 2-20020a05600c028200b003f42cc3262asm1652892wmk.34.2023.05.24.02.38.01 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 24 May 2023 02:38:02 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Fam Zheng , Thomas Huth , Paolo Bonzini , Eric Farman , Peter Xu , Hanna Reitz , Christian Borntraeger , "Michael S. Tsirkin" , Raphael Norwitz , Ilya Leoshkevich , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , Eric Auger , "Gonglei (Arei)" , David Hildenbrand , Stefan Hajnoczi , qemu-s390x@nongnu.org, Cornelia Huck , Halil Pasic , qemu-block@nongnu.org, Kevin Wolf Subject: [PATCH v2 02/10] hw/scsi: Introduce VHOST_SCSI_COMMON symbol in Kconfig Date: Wed, 24 May 2023 11:37:36 +0200 Message-Id: <20230524093744.88442-3-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230524093744.88442-1-philmd@linaro.org> References: <20230524093744.88442-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=philmd@linaro.org; helo=mail-wm1-x334.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Instead of adding 'vhost-scsi-common.c' twice (for VHOST_SCSI and VHOST_USER_SCSI), have it depend on VHOST_SCSI_COMMON, selected by both symbols. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée --- hw/scsi/Kconfig | 6 ++++++ hw/scsi/meson.build | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/hw/scsi/Kconfig b/hw/scsi/Kconfig index e7b34dc8e2..1feab84c4c 100644 --- a/hw/scsi/Kconfig +++ b/hw/scsi/Kconfig @@ -48,13 +48,19 @@ config VIRTIO_SCSI depends on VIRTIO select SCSI +config VHOST_SCSI_COMMON + bool + depends on VIRTIO + config VHOST_SCSI bool default y + select VHOST_SCSI_COMMON depends on VIRTIO && VHOST_KERNEL config VHOST_USER_SCSI bool # Only PCI devices are provided for now default y if VIRTIO_PCI + select VHOST_SCSI_COMMON depends on VIRTIO && VHOST_USER && LINUX diff --git a/hw/scsi/meson.build b/hw/scsi/meson.build index 923a34f344..fa9198e69f 100644 --- a/hw/scsi/meson.build +++ b/hw/scsi/meson.build @@ -17,8 +17,10 @@ specific_scsi_ss = ss.source_set() virtio_scsi_ss = ss.source_set() virtio_scsi_ss.add(files('virtio-scsi.c', 'virtio-scsi-dataplane.c')) -virtio_scsi_ss.add(when: 'CONFIG_VHOST_SCSI', if_true: files('vhost-scsi-common.c', 'vhost-scsi.c')) -virtio_scsi_ss.add(when: 'CONFIG_VHOST_USER_SCSI', if_true: files('vhost-scsi-common.c', 'vhost-user-scsi.c')) + +virtio_scsi_ss.add(when: 'CONFIG_VHOST_SCSI_COMMON', if_true: files('vhost-scsi-common.c')) +virtio_scsi_ss.add(when: 'CONFIG_VHOST_SCSI', if_true: files('vhost-scsi.c')) +virtio_scsi_ss.add(when: 'CONFIG_VHOST_USER_SCSI', if_true: files('vhost-user-scsi.c')) specific_scsi_ss.add_all(when: 'CONFIG_VIRTIO_SCSI', if_true: virtio_scsi_ss) specific_scsi_ss.add(when: 'CONFIG_SPAPR_VSCSI', if_true: files('spapr_vscsi.c')) From patchwork Wed May 24 09:37:37 2023 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: 685315 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp149865wrt; Wed, 24 May 2023 02:38:38 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4WIRtA2rKM1+Vd3ZXlqWWjq6cxDRstPoQQlyVzdcNmTe5pFh/+dZqJCm8/GkLuCnI2kZ7Z X-Received: by 2002:a05:620a:c17:b0:75b:23a1:475 with SMTP id l23-20020a05620a0c1700b0075b23a10475mr5418064qki.59.1684921118013; Wed, 24 May 2023 02:38:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684921117; cv=none; d=google.com; s=arc-20160816; b=wa6twUg1KlV9YeMawzI+QOaYhisgyjZS/yAUHneUdgq8U9xHnpAOk1S9kxLTjn6BMe ponpnuamwcJxRgdei+5tdCuC1Q7xm6PqtegCBLyYx7Ko/EYZ+VBksBz+EGwXpw3N370I Jf4VU+YfCvCHC4sigUkkO2RV5IfpGa0vTbPJ4Obs9HCAhONGw9WUaLyntWGwTo2Oq58H AwkvGXEESyobgR27ygzFQq5vaA2zAtVfkd0BA8ioINDXfBwIOdp2+aB6t7XO26VA+b5c Hcls8SxD22V35ix28OeSvM9SWc/yu1qNBhzn89wqrqg6k7hIr5gLxLs/phxIfJbEXUFv JEAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=mwQD6JYFIZC5qczhg65V50jxbUCRyR+PfLPe0OmMdzU=; b=b/trnyot3FpsflKjq6va/ID4MptxV5I0/ojOScK76ciymv8102s4+NXX8YDI7tEv4R 4U1CpdKCMkbAHkb22t9JAdRrRiNXYWulejyXTcJ70kzgpTBsNiOKy3tXs9cqCeFmUMhm aH9/BQVwyDSCG3nG45NFPAs1e4MZGSPXE6/H7OYIzXg2Mv/jvoYTkhVOao4u5WfL54fj qjcU1s9dcW2AnmwT2iGoSNBcppZ+oecwvU0vh04wMOLyB89xKJzcyLYWPJ86JBFqD6sJ xOY4hjs3GbQJYwdOBtEi65kPtSYlt8PZanC0rUaCqOysXDggEgIJ1SPbBZLFg7/8jjga Hlvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TPpxTlxe; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id op51-20020a05620a537300b0075b0744fe70si4635647qkn.295.2023.05.24.02.38.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 May 2023 02:38:37 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TPpxTlxe; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q1kwh-0005IO-5f; Wed, 24 May 2023 05:38:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q1kwe-0005C3-Rq for qemu-devel@nongnu.org; Wed, 24 May 2023 05:38:12 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q1kwd-0006lC-7u for qemu-devel@nongnu.org; Wed, 24 May 2023 05:38:12 -0400 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-3078cc99232so543053f8f.3 for ; Wed, 24 May 2023 02:38:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684921090; x=1687513090; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mwQD6JYFIZC5qczhg65V50jxbUCRyR+PfLPe0OmMdzU=; b=TPpxTlxeGhpTurw1nq/ZP/IRQ59dn1cbib5105WbXOHl2kAjHI8DSJoSR4ViDX+6IA ePCszzVAF8TR/GgPD13fwdmFUuN1jpAIwXeIF6BpFGM6KMTWMCAW4FGEtytizfFRM5W0 NNiUJYULWuBbVkN82ca7Nt36J1ETvPRB0uJl/Eqph7JTHRQrp56Uk5Twmm2Fmij+Dg5d f0ral41h9m43kQxyiWqrBcnl9s5FVUfJV5VXNDN1TzWdwzyQgCuRKaqtAbUTSbYUdJcP RRzw+NzM1lj2ZybY1Ge6inNi+xjNnZWFR2/NI6pIXFOqoTaNuSrl1p8wpnRsRsVPB9+s Mlig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684921090; x=1687513090; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mwQD6JYFIZC5qczhg65V50jxbUCRyR+PfLPe0OmMdzU=; b=Enu9mNviqHRTHOJjfwqM/AgZXxRgWgpX+MtmCKEMpUQpoZ3+qlV/6tEkeTACcUZoPg WWL9eHe1GR2qkMIJNDjuxKAXWvOsMUqZeSGi2zZ0S4tadAjvkW5ggHHQl7ahdNgTJBuw oSaGFhGEybm0d3PBmlGt8peOPDdy95X2NM2RrejHkrp88TgKWxbbxbtkRYwwzKVYwgyy QJYjtrzW+A5MT5An0L4KkrAhRm0fozpYRsLLtJEZRL8wxdvYQtbjWdDzqILApTsUGAMz zWJ31qnSfs384IRSjJUJywYXYUqW7f8x4jlLnzTmPPmilqQZGu/vbswS5nU6qP1A0rlM 97Qg== X-Gm-Message-State: AC+VfDwNTXWSSQ26NHEUkORvTP0SYvbw52R+zgD46CT7KzxgXt2VnaTP bNQj3f7M89FtNKh9vtfuWxMx0pR495ImoPkdUmZ52w== X-Received: by 2002:adf:fc47:0:b0:307:7fa4:527d with SMTP id e7-20020adffc47000000b003077fa4527dmr12093289wrs.58.1684921090123; Wed, 24 May 2023 02:38:10 -0700 (PDT) Received: from localhost.localdomain (fac34-h02-176-184-31-246.dsl.sta.abo.bbox.fr. [176.184.31.246]) by smtp.gmail.com with ESMTPSA id a2-20020a056000100200b0030903d44dbcsm13881751wrx.33.2023.05.24.02.38.07 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 24 May 2023 02:38:09 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Fam Zheng , Thomas Huth , Paolo Bonzini , Eric Farman , Peter Xu , Hanna Reitz , Christian Borntraeger , "Michael S. Tsirkin" , Raphael Norwitz , Ilya Leoshkevich , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , Eric Auger , "Gonglei (Arei)" , David Hildenbrand , Stefan Hajnoczi , qemu-s390x@nongnu.org, Cornelia Huck , Halil Pasic , qemu-block@nongnu.org, Kevin Wolf Subject: [PATCH v2 03/10] hw/scsi: Rearrange meson.build Date: Wed, 24 May 2023 11:37:37 +0200 Message-Id: <20230524093744.88442-4-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230524093744.88442-1-philmd@linaro.org> References: <20230524093744.88442-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=philmd@linaro.org; helo=mail-wr1-x430.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org We will modify this file shortly. Re-arrange it slightly first, declaring source sets first. No logical change. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Alex Bennée --- hw/scsi/meson.build | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/scsi/meson.build b/hw/scsi/meson.build index fa9198e69f..f2da0bc5ae 100644 --- a/hw/scsi/meson.build +++ b/hw/scsi/meson.build @@ -1,4 +1,7 @@ scsi_ss = ss.source_set() +specific_scsi_ss = ss.source_set() +virtio_scsi_ss = ss.source_set() + scsi_ss.add(files( 'emulation.c', 'scsi-bus.c', @@ -11,18 +14,15 @@ scsi_ss.add(when: 'CONFIG_LSI_SCSI_PCI', if_true: files('lsi53c895a.c')) scsi_ss.add(when: 'CONFIG_MEGASAS_SCSI_PCI', if_true: files('megasas.c')) scsi_ss.add(when: 'CONFIG_MPTSAS_SCSI_PCI', if_true: files('mptsas.c', 'mptconfig.c', 'mptendian.c')) scsi_ss.add(when: 'CONFIG_VMW_PVSCSI_SCSI_PCI', if_true: files('vmw_pvscsi.c')) -softmmu_ss.add_all(when: 'CONFIG_SCSI', if_true: scsi_ss) -specific_scsi_ss = ss.source_set() - -virtio_scsi_ss = ss.source_set() virtio_scsi_ss.add(files('virtio-scsi.c', 'virtio-scsi-dataplane.c')) - virtio_scsi_ss.add(when: 'CONFIG_VHOST_SCSI_COMMON', if_true: files('vhost-scsi-common.c')) virtio_scsi_ss.add(when: 'CONFIG_VHOST_SCSI', if_true: files('vhost-scsi.c')) virtio_scsi_ss.add(when: 'CONFIG_VHOST_USER_SCSI', if_true: files('vhost-user-scsi.c')) + specific_scsi_ss.add_all(when: 'CONFIG_VIRTIO_SCSI', if_true: virtio_scsi_ss) specific_scsi_ss.add(when: 'CONFIG_SPAPR_VSCSI', if_true: files('spapr_vscsi.c')) +softmmu_ss.add_all(when: 'CONFIG_SCSI', if_true: scsi_ss) specific_ss.add_all(when: 'CONFIG_SCSI', if_true: specific_scsi_ss) From patchwork Wed May 24 09:37:38 2023 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: 685312 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp149814wrt; Wed, 24 May 2023 02:38:31 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7j2Yrf6ImfNqrl9TyW0ngY/QEmonA8enOmUGQ0CGQ0m9TvmG/7/M2EfbFC8gEsDRWuXZxO X-Received: by 2002:a05:6214:5296:b0:5ef:6841:492 with SMTP id kj22-20020a056214529600b005ef68410492mr9466331qvb.46.1684921111013; Wed, 24 May 2023 02:38:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684921110; cv=none; d=google.com; s=arc-20160816; b=IikufsKW0G/KsDnotejyv54FKfl8XMZTTk74EtyiTjCSjapWsa5zb/4OGvKykx1+Jb QyEJLbrX45W2pJSArJHf2vU8wj4TM4ZnOKMCt6cC9CNDKdp9UUsRMZBKipLr8gYZ3MYP +w/7kJVcmTnV8NCAWI4DpxK1znZm/XVTnnHH6lKZnice1D+4NK2JoMccOiXJlLp6IKaI IzIOoXlOvEByPkiRsl4GJkhoQwd1Ap3zUeEzLztsQ+yL1goNoslTdFzQEdL+VT8tGP27 iDDCt9alWzgWVcOSK4goT/LHBn+HzZ+H/QNmj1u9ayWx56QjXGAm7zPw3LzoQhD2wX7R aZ8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=F64YgIxEgVdDKFKSPKxj4a8a5AWO26EEsIqp9A+2/F4=; b=ELAOpgh9HgHbo4HPQQueRG2U4R8hOGA7zckKgJvNhQWpZ6fs9iY7IwhKAz62LC0kWl YEnbYtnAhzrzKIUizpZtwsDV1NWQDP49BsStg4AUvAEcdRnVcF27aI4a0QnY7hO4tSXZ ZEaKOrVSNmedxXdDPfKCA5WLI+2GW6vSV5OHzZ4NeIRvpb9gBtVFz+9/3gLB9SkzjAz0 wpge2qlEqiJxV8kIZjefsVUmuerfEpSqSO3QuknLpCR3WiriCc20IukY91qJdXy5TBzB Fl3GsWfmOHxSZM4GAPclNRJYVypjiInfD63LM9xbb4ybN8p6JPumB0GlDlwxSP4KcLGY 6z7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NZ9jIWAt; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id if7-20020a0562141c4700b0062581cf07bcsi4319871qvb.82.2023.05.24.02.38.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 May 2023 02:38:30 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NZ9jIWAt; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q1kwp-0005wn-El; Wed, 24 May 2023 05:38:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q1kwn-0005sT-9j for qemu-devel@nongnu.org; Wed, 24 May 2023 05:38:21 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q1kwk-0006qI-Pj for qemu-devel@nongnu.org; Wed, 24 May 2023 05:38:21 -0400 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-3095557dd99so532252f8f.1 for ; Wed, 24 May 2023 02:38:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684921097; x=1687513097; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=F64YgIxEgVdDKFKSPKxj4a8a5AWO26EEsIqp9A+2/F4=; b=NZ9jIWAtS2nS/bGVVaEE/gxWMRfc0ChqxVhLh6QeZPwgSvKSAPkyI8CopQfviUKl8a 0PlzbYBBo8ciaQhOXGf+wTF0Zf7IPQwUMAhHB2r3AtnQqXvNVoWSfVp7a9Bmprv0SH5C lwBVQ0bpINRAvPRUP/CLR5it5b220cGb/Cc7Kt9sjia6gk3QtyBv8KwysyTzkAzpZk9c NAN+MuD27AqvZ6dwPWmGKjGHVYbBlaOYnU0v91/q9waevijSfdVRZGcghdBs0doJhGR3 G766jZYwdFZ00ojqssoDDtq2EnyT/zDZ4TRi2kZX7/uugbA98lQyBqyWFBfXelTScFLp SDfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684921097; x=1687513097; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=F64YgIxEgVdDKFKSPKxj4a8a5AWO26EEsIqp9A+2/F4=; b=fiHM5LRYHYlVnE8Kbp/yrIkb28NTANVQPMHumXPWzkC8si7jo4ZyqHmzGZR7MxkgMc fwfE6EwwdVoZV2HyWlsdPDDUGLl15QNMB+mC8e8o5hV3bW6l2bnheZSzoYdow0q2i+QV ++4aSInlHOJm3mBOIiAODk9D+ie0x1StfTQ5+eUWlRSLWRptXuC78M36fTR7Np35d6XA lWJtWryRt5sfZ8J1MEtZsbA3EknADbtJ4szNd3jQ2cefekq8zvzd4Gfd483FL5BvePy5 BRMkG9NKZYalYuZGryE1Sl7dcephcT8XTnMG5qz43AnF69E9+DNAJxG8NsJKy6ps6K/s vfag== X-Gm-Message-State: AC+VfDx9H6tjNNRWTEQzE4SXssyTAAM0VZnRFiIXN9VZwkZRZWObF23m 2FUW9RJfr5avv88ny70tPvNoVgmN+j9xNcetYKoBrA== X-Received: by 2002:adf:f74d:0:b0:306:2b2b:8c56 with SMTP id z13-20020adff74d000000b003062b2b8c56mr11979140wrp.37.1684921096852; Wed, 24 May 2023 02:38:16 -0700 (PDT) Received: from localhost.localdomain (fac34-h02-176-184-31-246.dsl.sta.abo.bbox.fr. [176.184.31.246]) by smtp.gmail.com with ESMTPSA id o2-20020a056000010200b002ca864b807csm14155965wrx.0.2023.05.24.02.38.14 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 24 May 2023 02:38:16 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Fam Zheng , Thomas Huth , Paolo Bonzini , Eric Farman , Peter Xu , Hanna Reitz , Christian Borntraeger , "Michael S. Tsirkin" , Raphael Norwitz , Ilya Leoshkevich , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , Eric Auger , "Gonglei (Arei)" , David Hildenbrand , Stefan Hajnoczi , qemu-s390x@nongnu.org, Cornelia Huck , Halil Pasic , qemu-block@nongnu.org, Kevin Wolf Subject: [PATCH v2 04/10] hw/scsi: Rename target-specific source set as 'specific_virtio_scsi_ss' Date: Wed, 24 May 2023 11:37:38 +0200 Message-Id: <20230524093744.88442-5-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230524093744.88442-1-philmd@linaro.org> References: <20230524093744.88442-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=philmd@linaro.org; helo=mail-wr1-x434.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Following the SCSI variable named '[specific_]scsi_ss', rename the target-specific VirtIO/SCSI set prefixed with 'specific_'. This will help when adding target-agnostic VirtIO/SCSI set in few commits. No logical change. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth --- hw/scsi/meson.build | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/scsi/meson.build b/hw/scsi/meson.build index f2da0bc5ae..bde72df19c 100644 --- a/hw/scsi/meson.build +++ b/hw/scsi/meson.build @@ -1,6 +1,6 @@ scsi_ss = ss.source_set() specific_scsi_ss = ss.source_set() -virtio_scsi_ss = ss.source_set() +specific_virtio_scsi_ss = ss.source_set() scsi_ss.add(files( 'emulation.c', @@ -15,12 +15,12 @@ scsi_ss.add(when: 'CONFIG_MEGASAS_SCSI_PCI', if_true: files('megasas.c')) scsi_ss.add(when: 'CONFIG_MPTSAS_SCSI_PCI', if_true: files('mptsas.c', 'mptconfig.c', 'mptendian.c')) scsi_ss.add(when: 'CONFIG_VMW_PVSCSI_SCSI_PCI', if_true: files('vmw_pvscsi.c')) -virtio_scsi_ss.add(files('virtio-scsi.c', 'virtio-scsi-dataplane.c')) -virtio_scsi_ss.add(when: 'CONFIG_VHOST_SCSI_COMMON', if_true: files('vhost-scsi-common.c')) -virtio_scsi_ss.add(when: 'CONFIG_VHOST_SCSI', if_true: files('vhost-scsi.c')) -virtio_scsi_ss.add(when: 'CONFIG_VHOST_USER_SCSI', if_true: files('vhost-user-scsi.c')) +specific_virtio_scsi_ss.add(files('virtio-scsi.c', 'virtio-scsi-dataplane.c')) +specific_virtio_scsi_ss.add(when: 'CONFIG_VHOST_SCSI_COMMON', if_true: files('vhost-scsi-common.c')) +specific_virtio_scsi_ss.add(when: 'CONFIG_VHOST_SCSI', if_true: files('vhost-scsi.c')) +specific_virtio_scsi_ss.add(when: 'CONFIG_VHOST_USER_SCSI', if_true: files('vhost-user-scsi.c')) -specific_scsi_ss.add_all(when: 'CONFIG_VIRTIO_SCSI', if_true: virtio_scsi_ss) +specific_scsi_ss.add_all(when: 'CONFIG_VIRTIO_SCSI', if_true: specific_virtio_scsi_ss) specific_scsi_ss.add(when: 'CONFIG_SPAPR_VSCSI', if_true: files('spapr_vscsi.c')) From patchwork Wed May 24 09:37:39 2023 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: 685317 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp150040wrt; Wed, 24 May 2023 02:39:13 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5fEiru3Ua9D60yKnvF0aYIAb2Ed53+a/Yedw1/gI75Qm2cXHIgdNPkjsJd1ya75cXAgEaX X-Received: by 2002:a05:6214:627:b0:605:648b:2adc with SMTP id a7-20020a056214062700b00605648b2adcmr23860413qvx.19.1684921153318; Wed, 24 May 2023 02:39:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684921153; cv=none; d=google.com; s=arc-20160816; b=jwx+Nf8pDk5KSCFB7pGeJdH0yHc6YpcYCFoumjN1VC3bY8SbDjKxoKbD6zGu66HIjT sc+FSk/GEFyD/E0R3SZ3gi8SdU/oDrYIaVU6qYtYl6xu21No/4YlwN3ZSlrCFpXsfNfa Q4IF73zeOvhf2zgTOTPFoRgi7ACaqRMNcCFbpzqd3A6vqRtLLh/s1L3fo1lq9B41aYt3 tBQMhZss1hQdWBjVEWnQ9TYnup121QxU2jyEyKmPGiycX8x85ZtxM53U3LWU313ZLbfy kBd7w0vJB4dg/w4mTilzs/5FToZMdh+VOp/zGHtGR9NRzfO0SC0naoWRh6rBiJGlh+C1 34sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=wU1WpV67IYL3BYTiEXvsZGAK6CKVN9GrbnEP+5A6mow=; b=jgGUu83RCuKV5cCVSHpUfZAKfc3OHkBfvO/dz12aC04dXnjzL+4hFKO9ezPPheT91/ aLzkh7UX4QJlPBdqBS8fwHrUjj41hrgi4f49bxdxQz0Bg0efpEh6UBlbleA6DJHPCKSu ODrCZ0h6sbD4xebkdwWVVQ85bXSxU9YfyTqiCOSPeziWeNY0oui+IJ7V1oiBzrFHbdfW 4+WSWpPLXP+H5+DzPia+Z6RboUtkq/v7VVYev2Vz1YTtltrwo5zgVnZrykPhsLmSAAk0 fESnRNIXOHZ6xDJcyYPjZdCLR27dSFAjjHvPISVm+npcGgBJACIYyseAzX8BcwvQcVqw 72tQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="K/8Moi5d"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id dv8-20020ad44ee8000000b00621291caaa2si6355123qvb.587.2023.05.24.02.39.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 May 2023 02:39:13 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="K/8Moi5d"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q1kwx-0006UV-KK; Wed, 24 May 2023 05:38:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q1kwv-0006BC-9l for qemu-devel@nongnu.org; Wed, 24 May 2023 05:38:29 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q1kws-0006rS-C7 for qemu-devel@nongnu.org; Wed, 24 May 2023 05:38:28 -0400 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-3f607839b89so6273495e9.3 for ; Wed, 24 May 2023 02:38:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684921104; x=1687513104; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wU1WpV67IYL3BYTiEXvsZGAK6CKVN9GrbnEP+5A6mow=; b=K/8Moi5dWE1duPrGDhW6dB+k0c1N+pKp8ldP/tKrPO8rws9weB9QWcclS22pQ5ORuj t9a0u9MHQbhdRn4eAWNZVShyQS1nIKB0UBOYU+P7LNf/OEP1/YtXxnulhPn021W/Jg0L 7CDD2LaRfUUv01XS5yIL3DJYOOKHR3C8cmg9dO8fN0cSv8KFBMYdYFjGKa9Qt8FrS+f6 VXC9Y2pOh7GgDHFQglAj4zc7lWT8OY6zi4e2kgFiuNfwrBlY1/l0cD9yaxRPDg8iYjvp 0/e1R6BLYHs2TG6v5Gle+8SNKBQaBvUjlLkQI4OFUjL85F9KoGEdhkoAj4pvhlPwAg6F 3RDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684921104; x=1687513104; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wU1WpV67IYL3BYTiEXvsZGAK6CKVN9GrbnEP+5A6mow=; b=bnHtdfdDtkrHIq87w7tvOZkpCwQUSD20AEiz5MUrBQehP0OnPEL640Jo14A1i77KGK Z1uoaaQa0eYXqjZC234KrTft/T6OHxkEALwaq1/hjik8Pqf9YxGHPMitjIOYuLS+uIBT sK/STSbWCFzT6MGU9AEec7pZCTEkTztqXsHXcPreQtRuLBoiZNuF5pF/PyrANY+6XVPC AbbR2KKxh+iYL5E0ptr7rrCEJSu2CZOSjHX+jS4g5WRZAqoLucwAY5ETeIruQDTzf2J6 4m0QQzR/9aDKnsi+T4gUwWbJJ40aZXUgUcvswB8TXh7ZdN69ShpsxsezCRg0Pe16O5xm 8wxw== X-Gm-Message-State: AC+VfDzBwq3kjiyRlt0UnMWeKG/1NQ3LauaXlLoPavfwIv6GLZvDHaeE WkFyZwuabuwC40OdEmYtj1P1hXkG/zWgoy+QTaj6KQ== X-Received: by 2002:adf:d092:0:b0:307:c471:7b38 with SMTP id y18-20020adfd092000000b00307c4717b38mr11216415wrh.59.1684921104399; Wed, 24 May 2023 02:38:24 -0700 (PDT) Received: from localhost.localdomain (fac34-h02-176-184-31-246.dsl.sta.abo.bbox.fr. [176.184.31.246]) by smtp.gmail.com with ESMTPSA id k16-20020a5d5190000000b003078c535277sm13766984wrv.91.2023.05.24.02.38.21 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 24 May 2023 02:38:23 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Fam Zheng , Thomas Huth , Paolo Bonzini , Eric Farman , Peter Xu , Hanna Reitz , Christian Borntraeger , "Michael S. Tsirkin" , Raphael Norwitz , Ilya Leoshkevich , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , Eric Auger , "Gonglei (Arei)" , David Hildenbrand , Stefan Hajnoczi , qemu-s390x@nongnu.org, Cornelia Huck , Halil Pasic , qemu-block@nongnu.org, Kevin Wolf Subject: [PATCH v2 05/10] hw/virtio: Introduce VHOST_VSOCK_COMMON symbol in Kconfig Date: Wed, 24 May 2023 11:37:39 +0200 Message-Id: <20230524093744.88442-6-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230524093744.88442-1-philmd@linaro.org> References: <20230524093744.88442-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=philmd@linaro.org; helo=mail-wm1-x32f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Instead of adding 'vhost-vsock-common.c' twice (for VHOST_VSOCK and VHOST_USER_VSOCK), have it depend on VHOST_VSOCK_COMMON, selected by both symbols. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth Reviewed-by: Alex Bennée Reviewed-by: Stefano Garzarella --- hw/virtio/Kconfig | 6 ++++++ hw/virtio/meson.build | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/hw/virtio/Kconfig b/hw/virtio/Kconfig index 89e9e426d8..de7a35429a 100644 --- a/hw/virtio/Kconfig +++ b/hw/virtio/Kconfig @@ -56,14 +56,20 @@ config VIRTIO_MEM depends on VIRTIO_MEM_SUPPORTED select MEM_DEVICE +config VHOST_VSOCK_COMMON + bool + depends on VIRTIO + config VHOST_VSOCK bool default y + select VHOST_VSOCK_COMMON depends on VIRTIO && VHOST_KERNEL config VHOST_USER_VSOCK bool default y + select VHOST_VSOCK_COMMON depends on VIRTIO && VHOST_USER config VHOST_USER_I2C diff --git a/hw/virtio/meson.build b/hw/virtio/meson.build index bdec78bfc6..54c90c24fb 100644 --- a/hw/virtio/meson.build +++ b/hw/virtio/meson.build @@ -23,8 +23,9 @@ specific_virtio_ss.add(when: 'CONFIG_VIRTIO_BALLOON', if_true: files('virtio-bal specific_virtio_ss.add(when: 'CONFIG_VIRTIO_CRYPTO', if_true: files('virtio-crypto.c')) specific_virtio_ss.add(when: 'CONFIG_VHOST_USER_FS', if_true: files('vhost-user-fs.c')) specific_virtio_ss.add(when: 'CONFIG_VIRTIO_PMEM', if_true: files('virtio-pmem.c')) -specific_virtio_ss.add(when: 'CONFIG_VHOST_VSOCK', if_true: files('vhost-vsock.c', 'vhost-vsock-common.c')) -specific_virtio_ss.add(when: 'CONFIG_VHOST_USER_VSOCK', if_true: files('vhost-user-vsock.c', 'vhost-vsock-common.c')) +specific_virtio_ss.add(when: 'CONFIG_VHOST_VSOCK_COMMON', if_true: files('vhost-vsock-common.c')) +specific_virtio_ss.add(when: 'CONFIG_VHOST_VSOCK', if_true: files('vhost-vsock.c')) +specific_virtio_ss.add(when: 'CONFIG_VHOST_USER_VSOCK', if_true: files('vhost-user-vsock.c')) specific_virtio_ss.add(when: 'CONFIG_VIRTIO_RNG', if_true: files('virtio-rng.c')) specific_virtio_ss.add(when: 'CONFIG_VIRTIO_IOMMU', if_true: files('virtio-iommu.c')) specific_virtio_ss.add(when: 'CONFIG_VIRTIO_MEM', if_true: files('virtio-mem.c')) From patchwork Wed May 24 09:37:40 2023 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: 685318 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp150049wrt; Wed, 24 May 2023 02:39:15 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7X3HPnH8050u/yKM2wO/HS5TjnEjhGQKmkfuomWXfl4PcYbHiVtJM2z+tM+464S2n1nleJ X-Received: by 2002:a05:6214:2526:b0:621:1c72:af3 with SMTP id gg6-20020a056214252600b006211c720af3mr29831115qvb.0.1684921154812; Wed, 24 May 2023 02:39:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684921154; cv=none; d=google.com; s=arc-20160816; b=tL1feoRAHkRCJVq23lRM9pnzYiuYDve0j54Y/2wtofRGOFwYfqq8/sj/9DnkUMqhpc +jJklUiu7VELMmNtXSP2ePp4BLq/Jg7w1IXb7oHqMLxMik7CERoTM5GvzqH4t0ClPYyW GaWpaLnn8rgrE5c92g2RAilDYla/IeDsLz4ll1Vz3Tj1Xmyfc0zLeQImZmCuI2xhUF+Q 6gcrEGsdW+tEiw17yTyIksngZI+Edo+aP3OaYuGroy7Qbo3MSO/E1Yq6PBrUL9JtCX3P aextRvJW1AIKKneKa4SW2VQGi0fj2H/oEuunZqfOH+tu9dDea2+0WB2D8Xr1gnOwr3Qq Am9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=sD8LkN6PYocK+4LFobiH3Rbgv5aMaPCfkIOTcADWQcM=; b=eIHMpXFijFQEt4XFpdbJYlSxt9GaxvwcDcmOZt7R6UEiQlqcF1NFMkPLAOIrz6UNP0 hoXL4WD5A8lqcvK7nFZtHDPcWpqgaJG62pyxcwFg8SbZqqeu0sIgYL7qs8+ye7IWyVow 20C1meCj8ACe+m/YdrxhAm6lT6E6zxDD3K84gGjC95SJq2CmoIYvBBmvQOV+o0rM0MHH s2YYdYMVohGjLNjyV4bOru20vElTwbHQqce2dBDjU/V7zmPHDDp1BvAD695p3Am9zNys fbWFpxRy6hsnmSPQ/9RYNDYgA7khV7sFamwUQJO+LdTr5EfeOCC47S7Qsk8GNoRXa5e9 NRjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=t5ZS5eHH; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ib15-20020a0562141c8f00b005ab0738009dsi6429731qvb.263.2023.05.24.02.39.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 May 2023 02:39:14 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=t5ZS5eHH; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q1kx3-00071u-K8; Wed, 24 May 2023 05:38:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q1kx1-0006tN-U5 for qemu-devel@nongnu.org; Wed, 24 May 2023 05:38:35 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q1kwz-0006sr-G7 for qemu-devel@nongnu.org; Wed, 24 May 2023 05:38:35 -0400 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-3f603d4bc5bso8702035e9.3 for ; Wed, 24 May 2023 02:38:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684921111; x=1687513111; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=sD8LkN6PYocK+4LFobiH3Rbgv5aMaPCfkIOTcADWQcM=; b=t5ZS5eHH7Za4n9Bz14C1Zm4CppR4RqeHROlfglbpyICimhk6WaMmXbjJo10duj+nXA 3wN1DafWuiueCU5T59SQG4DDMuzjw2/MAqDO/fRIVr5cbQ9Gge9P5prg0dZyIDsna8AZ oSZSHyqX10vODrzBcoDKgggcnum5jpBNtuGlA1RDKn86DDt3jlwJpGzjON+fXq/e/ZO0 8uYzHuyHKzlS+B4Tg30TcMUOhL+NPV+SCWVRAnG4DDKJ7PTyUSt0G1/T/KwEqNI6DyMw rlN2oW120/Y9VbujjsxT9iAPmIbLnIfQVK1jf5q1H7pMNQUj36I3wWltInZX5KDwHPOS fsiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684921111; x=1687513111; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sD8LkN6PYocK+4LFobiH3Rbgv5aMaPCfkIOTcADWQcM=; b=TSf+R3tNSNxywEst3OmMzvnv24IAc2xC+FwYH7V35fy6S928cojNaSzJEwopysGxDE GDixDQs9bDm3mFmqsk3SOuEcAhzJTXjsX2o5fqU5JpmM6XYb2qErajtYklx5Opk8nLS6 1P7LWumCXwwPX/iTrxuhAhjg84ta9xg0r5L3fRE/FrDo1HRejw/r17ZJnQ/4rXYeqXro 9f0RkOKFRnbLmWJScB0HxfwzZ3U+/IiBOM5kcGmEGbncUFtpzSJgj+wgHz9MLHCCUq6V NYBiMGezobXSmWxWLdy98IqJ2P5iyDjbcyl4NO7caCW6wrvEXJnMQbjcmVT8rT/KA44n kxag== X-Gm-Message-State: AC+VfDzxg1SiflDTnmZ5dHSfB6q4d4OVDCM2bfIVMPvkPizdtG0SooMd t43iIzd6RNX9kugqhW5gPp2PjuLNX5O/wxfCiZtgbg== X-Received: by 2002:a05:600c:3655:b0:3f3:f7f0:2203 with SMTP id y21-20020a05600c365500b003f3f7f02203mr11925911wmq.12.1684921111471; Wed, 24 May 2023 02:38:31 -0700 (PDT) Received: from localhost.localdomain (fac34-h02-176-184-31-246.dsl.sta.abo.bbox.fr. [176.184.31.246]) by smtp.gmail.com with ESMTPSA id l5-20020a1c7905000000b003f4289b18a7sm1753181wme.5.2023.05.24.02.38.28 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 24 May 2023 02:38:30 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Fam Zheng , Thomas Huth , Paolo Bonzini , Eric Farman , Peter Xu , Hanna Reitz , Christian Borntraeger , "Michael S. Tsirkin" , Raphael Norwitz , Ilya Leoshkevich , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , Eric Auger , "Gonglei (Arei)" , David Hildenbrand , Stefan Hajnoczi , qemu-s390x@nongnu.org, Cornelia Huck , Halil Pasic , qemu-block@nongnu.org, Kevin Wolf Subject: [PATCH v2 06/10] hw/virtio/virtio-mem: Use qemu_ram_get_fd() helper Date: Wed, 24 May 2023 11:37:40 +0200 Message-Id: <20230524093744.88442-7-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230524093744.88442-1-philmd@linaro.org> References: <20230524093744.88442-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=philmd@linaro.org; helo=mail-wm1-x329.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Avoid accessing RAMBlock internals, use the provided qemu_ram_get_fd() getter to get the file descriptor. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Hildenbrand Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée --- hw/virtio/virtio-mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/virtio/virtio-mem.c b/hw/virtio/virtio-mem.c index 538b695c29..74e63bd47a 100644 --- a/hw/virtio/virtio-mem.c +++ b/hw/virtio/virtio-mem.c @@ -135,7 +135,7 @@ static bool virtio_mem_has_shared_zeropage(RAMBlock *rb) * anonymous RAM. In any other case, reading unplugged *can* populate a * fresh page, consuming actual memory. */ - return !qemu_ram_is_shared(rb) && rb->fd < 0 && + return !qemu_ram_is_shared(rb) && qemu_ram_get_fd(rb) < 0 && qemu_ram_pagesize(rb) == qemu_real_host_page_size(); } #endif /* VIRTIO_MEM_HAS_LEGACY_GUESTS */ From patchwork Wed May 24 09:37:41 2023 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: 685316 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp149971wrt; Wed, 24 May 2023 02:38:58 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4ugPMy4sbz1zHYk9InMrnWj3BYYzN7ATmubZdbjgzlfYJPhY2uMKJEDDimIwiSqW8HK2KK X-Received: by 2002:a05:622a:180f:b0:3f6:bfe9:664a with SMTP id t15-20020a05622a180f00b003f6bfe9664amr4276032qtc.7.1684921137734; Wed, 24 May 2023 02:38:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684921137; cv=none; d=google.com; s=arc-20160816; b=S0I9yZmV55OUkV/dRFITs/4GWOydAR2yJ6bZwq0rskeFKNZ95ux2AV8c0KY4IawSfl 0cgp9Mg+JiziFoj+Q1SwwIqmTtjmOoTPAKuObgEPpYQ13VjkZ5PHM3Bxtv7EM2JiDUXP mKkFtocdXJTKnt2ZS2ShA+niamLO3AkZPwN32hGW7TdlfcKJwMeiYJlxinN6SgnUn9UN +IkHuPUy4J1roxbr0fYb/PS1VDAmsbSemWVogzm/LqIpalICcMqmPRyBp0lEniYR+mc5 0OplI9EnuDg7xZB6/pQfaR6XkvSrjAFrK2Ch+dZ4Ms75QNj0jsnYbGPpYg4ii5qHjU2M OdqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Y71HOv/BFUZkHdZXVOBhlaxJVZQ7sC8HQC7IQ2KJf9Q=; b=djBd7PX3r8BzL8r6i+TghoaTDLyYOA6jzeWMqmWwlQh8+WoWsnd0QaatJWY5EA83mN gKDD73XVMmwxixtt5RuVKj7xh4N7XTO+EhsYKFZxFuaPKD/XpaqThldaQ656WI/6IwS0 MfSiySqqTQTFumvyiNz6bUrkl+S+6YRGgtg/X192krnNo8+1yYNy7Hwwj3hPZqFvgIei 95PXYWS78PSfvXm8dIZkxGaAf3MWNB0dACE1ug5M0OLkcbmKXABVffe/nLe+VkdYcQ6G bJ6ZLKCqxP1gZrqpLSxZA0A9uCHO46bdoOkQo5kBGheDKVEJxDJwJlRQpZwyj4d2jhJL 71BA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YGZTM+c7; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id y9-20020a05622a164900b003f38a512345si6392419qtj.661.2023.05.24.02.38.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 May 2023 02:38:57 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YGZTM+c7; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q1kx9-0007OC-Ht; Wed, 24 May 2023 05:38:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q1kx8-0007KY-5y for qemu-devel@nongnu.org; Wed, 24 May 2023 05:38:42 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q1kx6-0006us-90 for qemu-devel@nongnu.org; Wed, 24 May 2023 05:38:41 -0400 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-3f607059b4eso6495055e9.0 for ; Wed, 24 May 2023 02:38:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684921118; x=1687513118; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Y71HOv/BFUZkHdZXVOBhlaxJVZQ7sC8HQC7IQ2KJf9Q=; b=YGZTM+c7sLE0JiKyq7AgHGt+phLWINb+zVpdHtMaN+WBJJmBi3qaj91c1HH/Qba+dz pftvqQTTP1321ruQch2JqfUkO0gnDHk/16Lhh4Ljo/ZveaHAqnl6bMfE04TOJZy13+8g cEy2pGTYCjcjJBnWudC6KlprwdBcZRGcO7qocJJWymAA751/o1lIrMC/8O7/jMu+vPQb 9cGfkfJt5S0RtxSmyNCUWdw7aqbGchlsU7XnP47RkIJKq4p5EW7qtasPgAnl3E8cvkm4 LiyeEfG0Xi0QrVw6MvZWTs8wajhJUkVTcHEk8C0tOSZEP2aNW9X341UijcY+xit+p00Z eIvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684921118; x=1687513118; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Y71HOv/BFUZkHdZXVOBhlaxJVZQ7sC8HQC7IQ2KJf9Q=; b=Hbg/MHIi1YhMoJ99IqkfNmrazNpCWsLDWyzpisyQvGaXPamdAyM9l5f69GZ+3OH+C0 JnBvaoGyJWEGH7wOd2IBsFiJLGOy+66q7MBU+BN6rLgR8Ed/8QOAz6ijplbA3JAxwkXG sz0gaKGKWxC/yRdgkXwVGO/9jHLAQF6qyotf0jJQhPTpQZzSBt0+CiAH9+lAEFfuO461 +UoHn+cTOlkaaSveNtLPpzu+e0MSpQg3QuNYy8FoLYs8q0kZbRqhcIBjcTfc8yBUsHuk LOphLi53z8NBkTAxPkdwt3AKwgs0CGcB/S2lfnfWYCvD3tYkRSzkA5nDVXOvS3RMw+2c jwaQ== X-Gm-Message-State: AC+VfDw75nfI26CYgW7lEna/FNT7bpFdvNRRF1yEjVFeyNDHBPVy4XEU Cs3aWtsxaxxnjiRnSeEyOim4zX1aYZlAOiLARfu4yw== X-Received: by 2002:a1c:7503:0:b0:3f4:fffc:cd74 with SMTP id o3-20020a1c7503000000b003f4fffccd74mr12493082wmc.16.1684921118195; Wed, 24 May 2023 02:38:38 -0700 (PDT) Received: from localhost.localdomain (fac34-h02-176-184-31-246.dsl.sta.abo.bbox.fr. [176.184.31.246]) by smtp.gmail.com with ESMTPSA id s15-20020a7bc38f000000b003f6028a4c85sm1699924wmj.16.2023.05.24.02.38.35 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 24 May 2023 02:38:37 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Fam Zheng , Thomas Huth , Paolo Bonzini , Eric Farman , Peter Xu , Hanna Reitz , Christian Borntraeger , "Michael S. Tsirkin" , Raphael Norwitz , Ilya Leoshkevich , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , Eric Auger , "Gonglei (Arei)" , David Hildenbrand , Stefan Hajnoczi , qemu-s390x@nongnu.org, Cornelia Huck , Halil Pasic , qemu-block@nongnu.org, Kevin Wolf Subject: [PATCH v2 07/10] hw/virtio/vhost-vsock: Include missing 'virtio/virtio-bus.h' header Date: Wed, 24 May 2023 11:37:41 +0200 Message-Id: <20230524093744.88442-8-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230524093744.88442-1-philmd@linaro.org> References: <20230524093744.88442-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=philmd@linaro.org; helo=mail-wm1-x330.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Instead of having "virtio/virtio-bus.h" implicitly included, explicitly include it, to avoid when rearranging headers: hw/virtio/vhost-vsock-common.c: In function ‘vhost_vsock_common_start’: hw/virtio/vhost-vsock-common.c:51:5: error: unknown type name ‘VirtioBusClass’; did you mean ‘VirtioDeviceClass’? 51 | VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus); | ^~~~~~~~~~~~~~ | VirtioDeviceClass hw/virtio/vhost-vsock-common.c:51:25: error: implicit declaration of function ‘VIRTIO_BUS_GET_CLASS’; did you mean ‘VIRTIO_DEVICE_CLASS’? [-Werror=implicit-function-declaration] 51 | VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus); | ^~~~~~~~~~~~~~~~~~~~ | VIRTIO_DEVICE_CLASS Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Alex Bennée Reviewed-by: Stefano Garzarella --- hw/virtio/vhost-vsock-common.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/virtio/vhost-vsock-common.c b/hw/virtio/vhost-vsock-common.c index d2b5519d5a..e89af9b329 100644 --- a/hw/virtio/vhost-vsock-common.c +++ b/hw/virtio/vhost-vsock-common.c @@ -11,6 +11,7 @@ #include "qemu/osdep.h" #include "standard-headers/linux/virtio_vsock.h" #include "qapi/error.h" +#include "hw/virtio/virtio-bus.h" #include "hw/virtio/virtio-access.h" #include "qemu/error-report.h" #include "hw/qdev-properties.h" From patchwork Wed May 24 09:37:42 2023 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: 685320 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp150089wrt; Wed, 24 May 2023 02:39:22 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5dIluATgoUDMLGjvdAvwEKrgC0oFkuWIK8K+qChaKjA4NNEblcKW2mrjLF3a75vv+1Sevk X-Received: by 2002:a05:6214:2309:b0:623:8818:197e with SMTP id gc9-20020a056214230900b006238818197emr28617431qvb.21.1684921162494; Wed, 24 May 2023 02:39:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684921162; cv=none; d=google.com; s=arc-20160816; b=ByTsB5PX+cOHt+8f9EBa8KwMfwW3otkhMEYXlgeF8Z+KhGubXsKN7envZcQsV4klo2 FGYdXeI/MJ9b75r0KHNt76Ky9Tr5ps65vvVj/Cd5wU7GaW7HxCYeVpFVntrPFufF5QMt fuLQNUxMtZ6VhJcnSiB/SU+sfQ9h18QEeuvkceArSYpwdqFJCWflzgM8zc1pZNtdkl1y 3mJFd8vVljp7qzkzCltGAV4cDzHSqBhZy+upXIAHYkCsuvY/d7myrh/xVxNX1BZmJV42 p2wUe7AGrANy4IXtY8e4fcDEoV7jCUQ3fgm8IQ7pMrrb5WCk0PcIS3t+w/12oMYjN5sc DHcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=rA2E0VH092ZQeXxfwZplt9KPxzZ4le7EuV+DMB+BMgk=; b=s2YhrF2ACfzXeQPEkfxyVoOCnkDk91S1Kmt1+bq8TtdHNhVNu/pnC5xN9TyeCpQBpC lHRcUbpgV88a6d9B+NFrlF+2+hP3NEz38TrRYqJbogUP4k8K0JJrJlL8PYYswsiqKVDC Z0ef+ub4ay0Xqy2BWlDM9W90llIdAxCCW9SB+ocuN2Psz1BkCrlYnWCDt6ZIFn4cw1HF VCmxqkRkZGv2X/o6Ea6XKXnbI3bbohvefz0KhHzSkwLqWOBsRELuFWsxjKvxe53mebHe ZunU4OKbH77A/Uky2uvB418IHhozXjCgNeVAPA27od3Rd1r+xqg32Et+7377vkfO1z+a vWvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bzdCTHDs; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id kc6-20020a056214410600b005ea91383205si6134817qvb.603.2023.05.24.02.39.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 May 2023 02:39:22 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bzdCTHDs; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q1kxH-0007tO-3s; Wed, 24 May 2023 05:38:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q1kxF-0007oY-NK for qemu-devel@nongnu.org; Wed, 24 May 2023 05:38:49 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q1kxD-0006xf-AF for qemu-devel@nongnu.org; Wed, 24 May 2023 05:38:49 -0400 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-309550263e0so547523f8f.2 for ; Wed, 24 May 2023 02:38:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684921125; x=1687513125; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=rA2E0VH092ZQeXxfwZplt9KPxzZ4le7EuV+DMB+BMgk=; b=bzdCTHDsrFLbd4FeluP1rhAMBAe2glkBNYTtOouvC2Ix8rLijsTEWUSChBgsJTrl1a XBQDoXcB0BfwcN2hQaHEpjBuXmd/XlkIGbtoGjpn3/PIq5VV9jdSFD40Eex7fstf0KE1 Cg2aOFbO4sN0WtF4Jol8j9HMPZmsyYuFLpn46+ILTpKvGS4ExuYQLykA4cqBGlvbz1IZ 9Z7SAj3zV6ECrmcI+9ZVCa7WDjJYX2lJ2z2POjjbiZvhpJuGhQDBdvb9hrg7dgob2Yrs FahIT5loF6cdmkhEWHww8gdwLiA0why4oM6DEWd11pWfCLWlM1zfwsgwcmsOvn3qRUrl PUQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684921125; x=1687513125; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rA2E0VH092ZQeXxfwZplt9KPxzZ4le7EuV+DMB+BMgk=; b=A/+2svSm0LhVjzDyq7fbJ7rJHyCBtPLKGnrHQvAkBsPa74IWFjB9cdUq04wZlHDYT7 H1TCFZk3U3BXYn+iIWF7vOM2pmcNT6QGnDGPcXzmtyL/7/azHzy++VnPYAon9+6VPXEm GBZTanaqa71Xbd5S3+XV84HuSDD/WZayC89zfgAcsFEuKuFtkAzm/jtjWCOxkIZxRJGs WFFY4/oaVPLnS+QyrOP1R96TOghCDFIqiJ2VE321pm8E5H3dfRWckKD2YIZ7xpvKR7Up PeDTV2F3TrCFioR5XXyMLuCChjctHukdfagnP+Aun0Q53QhH+AzQ+JFgNfFwjWdUuSKS tCZw== X-Gm-Message-State: AC+VfDyKWLDaDSQqTYQkfpNozKNslyShO5Wt+mht64dGJxvEGO04NqDa YRG76eV6bcrPw+xbxf8M7Xlb0mcnKt+5TvxXl5PjrQ== X-Received: by 2002:adf:ee44:0:b0:309:421a:192c with SMTP id w4-20020adfee44000000b00309421a192cmr11263859wro.7.1684921125488; Wed, 24 May 2023 02:38:45 -0700 (PDT) Received: from localhost.localdomain (fac34-h02-176-184-31-246.dsl.sta.abo.bbox.fr. [176.184.31.246]) by smtp.gmail.com with ESMTPSA id n1-20020a5d4001000000b003062ad45243sm13930442wrp.14.2023.05.24.02.38.42 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 24 May 2023 02:38:44 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Fam Zheng , Thomas Huth , Paolo Bonzini , Eric Farman , Peter Xu , Hanna Reitz , Christian Borntraeger , "Michael S. Tsirkin" , Raphael Norwitz , Ilya Leoshkevich , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , Eric Auger , "Gonglei (Arei)" , David Hildenbrand , Stefan Hajnoczi , qemu-s390x@nongnu.org, Cornelia Huck , Halil Pasic , qemu-block@nongnu.org, Kevin Wolf Subject: [PATCH v2 08/10] hw/virtio/virtio-iommu: Use target-agnostic qemu_target_page_mask() Date: Wed, 24 May 2023 11:37:42 +0200 Message-Id: <20230524093744.88442-9-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230524093744.88442-1-philmd@linaro.org> References: <20230524093744.88442-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=philmd@linaro.org; helo=mail-wr1-x42b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org In order to have virtio-iommu.c become target-agnostic, we need to avoid using TARGET_PAGE_MASK. Get it with the qemu_target_page_mask() helper. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Eric Auger Reviewed-by: Alex Bennée --- hw/virtio/virtio-iommu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/virtio/virtio-iommu.c b/hw/virtio/virtio-iommu.c index 1cd258135d..85905a9e3d 100644 --- a/hw/virtio/virtio-iommu.c +++ b/hw/virtio/virtio-iommu.c @@ -20,6 +20,7 @@ #include "qemu/osdep.h" #include "qemu/log.h" #include "qemu/iov.h" +#include "exec/target_page.h" #include "hw/qdev-properties.h" #include "hw/virtio/virtio.h" #include "sysemu/kvm.h" @@ -1164,7 +1165,7 @@ static void virtio_iommu_device_realize(DeviceState *dev, Error **errp) * in vfio realize */ s->config.bypass = s->boot_bypass; - s->config.page_size_mask = TARGET_PAGE_MASK; + s->config.page_size_mask = qemu_target_page_mask(); s->config.input_range.end = UINT64_MAX; s->config.domain_range.end = UINT32_MAX; s->config.probe_size = VIOMMU_PROBE_SIZE; From patchwork Wed May 24 09:37:43 2023 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: 685319 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp150061wrt; Wed, 24 May 2023 02:39:17 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5uEAjN50/BPENYScuQN1VlLek/rNIo+7dCt9bjkBU8gKVz3xVEDx18EtKt2vZ9RSVF0ZSr X-Received: by 2002:a37:65c7:0:b0:75b:23a1:364c with SMTP id z190-20020a3765c7000000b0075b23a1364cmr6769576qkb.13.1684921157113; Wed, 24 May 2023 02:39:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684921157; cv=none; d=google.com; s=arc-20160816; b=jKreG/VF/e/rF2fVdY8s9lBGKFEb1wBHiSFYkYcZnX1O6TnO2zZ1wXrSvPejE9ej6L VkXt+N3hYxF1nmPjBU2iKlirH1SjuA2pyQe9csY8XxqOKmelr2Pk4NdRinS4Pw0RGeBx AVuSv5pILeA34BtEMQIm1dqUKTwI8hsYj76fJvl4pq8Zi7xzNypKqUF0FBWQw6LYdkqA VmAntpiRF9Jb0kDKk+J+hcRpQVUHlxN5WAnQG0jWNp9hMMnXosRLkc1Wt8qgP+zxcoNu 5dCF0yrOoOHpczyAbZ/dTWCO4ORTrQh0dEiihE3epz3kK0Tp0HZ52vfkqel7JsGDzgpt j6Mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=L/JwS6FTcZAmFyGBOIMDJAjNiVsKo6s2wZtG1yzHHqw=; b=WU5gMJqUoXc4KyBlQtk8pgY0+cP6suRBKbj2f5Ke18C/+Emlkf4XXIJGFGRFfqTc8w b5ibXZ/KCwn9hXh4XsPsb95cvqz7jpmTSQXi5yiHvG7bqluKJLLex82l7K1CwL3zP7w4 X5+z96u5nEXoYzE739nJcfAeEgWAdZHUGDoMntSi0A7SG6qdGT7m8nIhxqchDO2z2Lrl IlE2v3oPljiy0OsKC1IIWmGlTihNicjRjaHL6y+xIJsnPU9kjb1d7PnHcw4AEnMs0SJm v7+ywvsUDNVa5RUDnJ4zUETU6tEzR9oC2jDKAla4Uqw4hqfyiVIaH4K+vJN+snY12Yxp tPhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QM3vZeIe; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id x25-20020a05620a14b900b0074e37540419si6131852qkj.510.2023.05.24.02.39.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 May 2023 02:39:17 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QM3vZeIe; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q1kxb-0001pl-VU; Wed, 24 May 2023 05:39:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q1kxa-0001cm-8p for qemu-devel@nongnu.org; Wed, 24 May 2023 05:39:10 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q1kxK-0006yp-Jy for qemu-devel@nongnu.org; Wed, 24 May 2023 05:39:09 -0400 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-30957dd7640so380658f8f.3 for ; Wed, 24 May 2023 02:38:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684921132; x=1687513132; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=L/JwS6FTcZAmFyGBOIMDJAjNiVsKo6s2wZtG1yzHHqw=; b=QM3vZeIe6leYAJm5DeIPrWHTxipcM8aYEAUvaIIDc+sxYZy9UIcF9PixOmpuvNMHNt 2buVQhTnX04izYYSDvGv18R8rKoF26AFBxYbms3gSrD8foSGps3JjHG8vqztbxsMy52p AP+avTn6pYm+fyW+CHVEtOYUPNG2Us2qv8FpPoqc2LxOitxsGEAu6IOwWWBCTB8+KsRg HIEgkLj+0QsLooI5/AsDtzOI/LUxGsqWF1w0IaRool33mOruwE8ZN+hY8N7uvhQb2mHw TE3vaJuqaDXwS5npJD5AYdU/JQ2onKwJRxrkPK+tGqDVIj2Q03Z4s0iOg2yF1rssd8Xn vV5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684921132; x=1687513132; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=L/JwS6FTcZAmFyGBOIMDJAjNiVsKo6s2wZtG1yzHHqw=; b=VCHmfMKI49sjsSl6aP8RjgMPzbS6bWqCUBSKyDTCoaFC5ivgwpK3wJ4RYrGGZmWj9e 3HXPFVZE6oUTdPfu7aNbN/jXOL21ErDISqRsrhhgtrMrEn2X+gXAvdkEGWM6Jvnmi3bP Fe+73IBz+W2k41tRgF8mA2njfKF2LsXantyN0njPd+8VsSjeMoShYlH9d/fZZ8I4g70G g/6qJ5EWrpT8P0VeU20Wcd1nXwoCHan/wsrdpFFWeLQArGLUA3gKpDhWmbRKA8AYLFn0 oT/NahKl19o3FmWf33jGjqFY5WSiVkjZNzP6FqnS5MCzlpLFpWLzu9Bz9bi3pZUIrS23 dmVw== X-Gm-Message-State: AC+VfDwrhmyd8dE8djXu0J1pvnbXBsm2cHUvP7y1dm5fedYUZjuQiovX W1DWex404TmaT5ZKYnWHRIITSbDd+t4k0PPnARImaA== X-Received: by 2002:adf:e60b:0:b0:309:a4e:52d3 with SMTP id p11-20020adfe60b000000b003090a4e52d3mr13323734wrm.5.1684921132727; Wed, 24 May 2023 02:38:52 -0700 (PDT) Received: from localhost.localdomain (fac34-h02-176-184-31-246.dsl.sta.abo.bbox.fr. [176.184.31.246]) by smtp.gmail.com with ESMTPSA id j16-20020adff550000000b0030aa9e4fda3sm1768532wrp.12.2023.05.24.02.38.50 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 24 May 2023 02:38:52 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Fam Zheng , Thomas Huth , Paolo Bonzini , Eric Farman , Peter Xu , Hanna Reitz , Christian Borntraeger , "Michael S. Tsirkin" , Raphael Norwitz , Ilya Leoshkevich , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , Eric Auger , "Gonglei (Arei)" , David Hildenbrand , Stefan Hajnoczi , qemu-s390x@nongnu.org, Cornelia Huck , Halil Pasic , qemu-block@nongnu.org, Kevin Wolf Subject: [PATCH v2 09/10] hw/virtio: Remove unnecessary 'virtio-access.h' header Date: Wed, 24 May 2023 11:37:43 +0200 Message-Id: <20230524093744.88442-10-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230524093744.88442-1-philmd@linaro.org> References: <20230524093744.88442-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=philmd@linaro.org; helo=mail-wr1-x42d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org None of these files use the VirtIO Load/Store API declared by "hw/virtio/virtio-access.h". This header probably crept in via copy/pasting, remove it. Note, "virtio-access.h" is target-specific, so any file including it also become tainted as target-specific. Signed-off-by: Philippe Mathieu-Daudé Acked-by: Richard Henderson Tested-by: Thomas Huth Reviewed-by: Alex Bennée --- hw/block/dataplane/virtio-blk.c | 1 - hw/s390x/virtio-ccw.c | 1 - hw/scsi/vhost-scsi.c | 1 - hw/scsi/vhost-user-scsi.c | 1 - hw/scsi/virtio-scsi-dataplane.c | 1 - hw/virtio/vdpa-dev.c | 1 - hw/virtio/vhost-vdpa.c | 1 - hw/virtio/vhost-vsock-common.c | 1 - hw/virtio/vhost.c | 1 - hw/virtio/virtio-crypto.c | 1 - hw/virtio/virtio-iommu.c | 1 - hw/virtio/virtio-mem.c | 1 - 12 files changed, 12 deletions(-) diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c index af1c24c40c..03ecb51664 100644 --- a/hw/block/dataplane/virtio-blk.c +++ b/hw/block/dataplane/virtio-blk.c @@ -19,7 +19,6 @@ #include "qemu/main-loop.h" #include "qemu/thread.h" #include "qemu/error-report.h" -#include "hw/virtio/virtio-access.h" #include "hw/virtio/virtio-blk.h" #include "virtio-blk.h" #include "block/aio.h" diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c index f44de1a8c1..17c548b84f 100644 --- a/hw/s390x/virtio-ccw.c +++ b/hw/s390x/virtio-ccw.c @@ -22,7 +22,6 @@ #include "qemu/error-report.h" #include "qemu/log.h" #include "qemu/module.h" -#include "hw/virtio/virtio-access.h" #include "hw/virtio/virtio-bus.h" #include "hw/s390x/adapter.h" #include "hw/s390x/s390_flic.h" diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c index 6a0fd0dfb1..443f67daa4 100644 --- a/hw/scsi/vhost-scsi.c +++ b/hw/scsi/vhost-scsi.c @@ -26,7 +26,6 @@ #include "hw/virtio/vhost.h" #include "hw/virtio/virtio-scsi.h" #include "hw/virtio/virtio-bus.h" -#include "hw/virtio/virtio-access.h" #include "hw/fw-path-provider.h" #include "hw/qdev-properties.h" #include "qemu/cutils.h" diff --git a/hw/scsi/vhost-user-scsi.c b/hw/scsi/vhost-user-scsi.c index b7a71a802c..ee99b19e7a 100644 --- a/hw/scsi/vhost-user-scsi.c +++ b/hw/scsi/vhost-user-scsi.c @@ -26,7 +26,6 @@ #include "hw/virtio/vhost-backend.h" #include "hw/virtio/vhost-user-scsi.h" #include "hw/virtio/virtio.h" -#include "hw/virtio/virtio-access.h" #include "chardev/char-fe.h" #include "sysemu/sysemu.h" diff --git a/hw/scsi/virtio-scsi-dataplane.c b/hw/scsi/virtio-scsi-dataplane.c index f3214e1c57..21344c7cfe 100644 --- a/hw/scsi/virtio-scsi-dataplane.c +++ b/hw/scsi/virtio-scsi-dataplane.c @@ -19,7 +19,6 @@ #include "hw/scsi/scsi.h" #include "scsi/constants.h" #include "hw/virtio/virtio-bus.h" -#include "hw/virtio/virtio-access.h" /* Context: QEMU global mutex held */ void virtio_scsi_dataplane_setup(VirtIOSCSI *s, Error **errp) diff --git a/hw/virtio/vdpa-dev.c b/hw/virtio/vdpa-dev.c index 01b41eb0f1..e08e830006 100644 --- a/hw/virtio/vdpa-dev.c +++ b/hw/virtio/vdpa-dev.c @@ -25,7 +25,6 @@ #include "hw/virtio/vhost.h" #include "hw/virtio/virtio.h" #include "hw/virtio/virtio-bus.h" -#include "hw/virtio/virtio-access.h" #include "hw/virtio/vdpa-dev.h" #include "sysemu/sysemu.h" #include "sysemu/runstate.h" diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c index b3094e8a8b..3c575a9a6e 100644 --- a/hw/virtio/vhost-vdpa.c +++ b/hw/virtio/vhost-vdpa.c @@ -26,7 +26,6 @@ #include "cpu.h" #include "trace.h" #include "qapi/error.h" -#include "hw/virtio/virtio-access.h" /* * Return one past the end of the end of section. Be careful with uint64_t diff --git a/hw/virtio/vhost-vsock-common.c b/hw/virtio/vhost-vsock-common.c index e89af9b329..321262f6b3 100644 --- a/hw/virtio/vhost-vsock-common.c +++ b/hw/virtio/vhost-vsock-common.c @@ -12,7 +12,6 @@ #include "standard-headers/linux/virtio_vsock.h" #include "qapi/error.h" #include "hw/virtio/virtio-bus.h" -#include "hw/virtio/virtio-access.h" #include "qemu/error-report.h" #include "hw/qdev-properties.h" #include "hw/virtio/vhost.h" diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index 23da579ce2..7f3c727777 100644 --- a/hw/virtio/vhost.c +++ b/hw/virtio/vhost.c @@ -23,7 +23,6 @@ #include "qemu/log.h" #include "standard-headers/linux/vhost_types.h" #include "hw/virtio/virtio-bus.h" -#include "hw/virtio/virtio-access.h" #include "migration/blocker.h" #include "migration/qemu-file-types.h" #include "sysemu/dma.h" diff --git a/hw/virtio/virtio-crypto.c b/hw/virtio/virtio-crypto.c index c729a1f79e..a6d7e1e8ec 100644 --- a/hw/virtio/virtio-crypto.c +++ b/hw/virtio/virtio-crypto.c @@ -21,7 +21,6 @@ #include "hw/virtio/virtio.h" #include "hw/virtio/virtio-crypto.h" #include "hw/qdev-properties.h" -#include "hw/virtio/virtio-access.h" #include "standard-headers/linux/virtio_ids.h" #include "sysemu/cryptodev-vhost.h" diff --git a/hw/virtio/virtio-iommu.c b/hw/virtio/virtio-iommu.c index 85905a9e3d..1bbad23f4a 100644 --- a/hw/virtio/virtio-iommu.c +++ b/hw/virtio/virtio-iommu.c @@ -32,7 +32,6 @@ #include "standard-headers/linux/virtio_ids.h" #include "hw/virtio/virtio-bus.h" -#include "hw/virtio/virtio-access.h" #include "hw/virtio/virtio-iommu.h" #include "hw/pci/pci_bus.h" #include "hw/pci/pci.h" diff --git a/hw/virtio/virtio-mem.c b/hw/virtio/virtio-mem.c index 74e63bd47a..12ea58d5ad 100644 --- a/hw/virtio/virtio-mem.c +++ b/hw/virtio/virtio-mem.c @@ -20,7 +20,6 @@ #include "sysemu/reset.h" #include "hw/virtio/virtio.h" #include "hw/virtio/virtio-bus.h" -#include "hw/virtio/virtio-access.h" #include "hw/virtio/virtio-mem.h" #include "qapi/error.h" #include "qapi/visitor.h" From patchwork Wed May 24 09:37:44 2023 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: 685321 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp150102wrt; Wed, 24 May 2023 02:39:24 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7/bd7ZSzsGi1WCXPD/5dGVymdX3zJk+O8I7cyjcdWptT4Qt2hMJCj2Y/cG9x5C9mlPsnjL X-Received: by 2002:ad4:5d4e:0:b0:616:49fe:f150 with SMTP id jk14-20020ad45d4e000000b0061649fef150mr28990929qvb.18.1684921164440; Wed, 24 May 2023 02:39:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684921164; cv=none; d=google.com; s=arc-20160816; b=s+iUWaduuusA9Vl7OS85CBB2xJtzp0powuGIOxfUgaQgkmDuWGpILBfK77ZYMxqAyC gn3z5kxo0pZK8079oMY23B61W7D3X8ieb3dSgguBMNfcfl73Y70jphCQmTvH5TlxTnhZ rn+7rvZAnKzZgyo6Z/Xfb22oVm0iNWPtEcDlsM5CWBPnZyMuMoKQgOZ3BhcSOnvE5VuM ygp038S4q/Y2MiIwH25D1pDgoHrA3Vy4v3WuYXgka2ySumFhv6jW1mpmmvrpqnzurzwm qhbsVC1+O+4EnQH0OVycvS9v7/W1Q3ZwwY2xKoSlneEr5PGq1nhJYL/sFUsJ7UwIH13I 1MbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Mq4YpeTTGgX3+hW0ZwEiJf3J4kjmHxbt+ccYiWbLpbg=; b=b6yGYppZOteGv/ZsbObx4P4QBGU2KNo07lKTRLQwwRskyzSN0Uxw9YP4duFvAcCI1m akZTzJ10pF9+7Z92ZbjZvj7LEuNfe22YzaQ4PhMTm98WqFH8ZHkrPYOR0xiRqGzKricT ZP9tN9KqI4mUIN4LoRw2Jwnp+BdZ+OGcSO2c1lexX8nhi52iggytU4fOOMx5DgezSSwc pftOWR30GtnEMUzJUyQeNiSn21vcbv+/j3NpucBAUWChJ5v3EJAzk93gxP4l2c3v6NG5 ILv3+E8Jd2jbILACeWIJXcNf3M6/e246QYfGhlzHM+TRvJvPA2nfLS5HW05lXWl5GEX9 DVoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HyxCj8+K; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 5-20020a056214202500b005f4197efbaasi6569591qvf.529.2023.05.24.02.39.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 May 2023 02:39:24 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HyxCj8+K; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q1kxW-00014N-5f; Wed, 24 May 2023 05:39:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q1kxV-0000yD-2A for qemu-devel@nongnu.org; Wed, 24 May 2023 05:39:05 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q1kxR-0006zu-Sy for qemu-devel@nongnu.org; Wed, 24 May 2023 05:39:04 -0400 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-3095557dd99so532986f8f.1 for ; Wed, 24 May 2023 02:39:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684921140; x=1687513140; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Mq4YpeTTGgX3+hW0ZwEiJf3J4kjmHxbt+ccYiWbLpbg=; b=HyxCj8+KfTT7qH8JyGXM1WCSmjGlPtqr3zhnUarUPcMGKOddeKk/dv4z292dLAegVa IRGMpIhkntvAZ5w5xBS9JKXRhx3fNN8XsLkqkYRGgGSOzM9qTT0tKSYTemY9uHEKigwH aMIawwkKzVc+xKkc/0n5USZC2/vc4LfdVSglSs5QVmMxy2yUCdUbqfr8bEsm4Zs4b1VN TqB1nmATTE9WQPaEXNu8BTNuRre+2qs9jyta/g516tJduLsYsWdUeF1xPZIJ2fQ6bion J3hZlu/7+iRSGtCsdDEJqIr3/2Roi1gS8wykwjlxxM1KAKXE+OjQTsnTE/hTyhlRyJkn /9OQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684921140; x=1687513140; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Mq4YpeTTGgX3+hW0ZwEiJf3J4kjmHxbt+ccYiWbLpbg=; b=PDg5Fm6L1SLLUwM3jxJEBf/FPBP2MArfIq6HfV88isP0fc4H4kA9u8Rs3rdm/wjrTb fkg5ls5ecLqeHAgEBacn7beWCsUIT0SYsr8DGff1tjtbl046uS19A0Y0Ktib7O/nTEzw anz9QY9fqlUyILwfBjZ4QWhPXUeA2FUigLKM8Z+wulzKLdK9WFnUPfgsvQVtxZZ5b3pI ymPZP8ARd4TmgJs+SU1PYm41ipkGaUSiPG2TCnnMTY5EVP9XtDDCY4S6acylWqfT9SX7 CThu+iLzgIZF0kL++bO4jNLcxIzccHh3a/ZRFkEUUQuhJ/hj2f2nUuBcTBhQ0FFSwx9M 5AnA== X-Gm-Message-State: AC+VfDzyJRFbCgPGA+ASNqvXGfruavAgIJXyzcpNWOGiRwrTMrJMFQnx DBvFy7aK/atsKCusM+H3edIh4R0tI4uUgk5iUq7bAA== X-Received: by 2002:a5d:4109:0:b0:309:4ba8:f76e with SMTP id l9-20020a5d4109000000b003094ba8f76emr10834680wrp.26.1684921139882; Wed, 24 May 2023 02:38:59 -0700 (PDT) Received: from localhost.localdomain (fac34-h02-176-184-31-246.dsl.sta.abo.bbox.fr. [176.184.31.246]) by smtp.gmail.com with ESMTPSA id c12-20020adfe70c000000b003078cd719ffsm13824436wrm.95.2023.05.24.02.38.57 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 24 May 2023 02:38:59 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Fam Zheng , Thomas Huth , Paolo Bonzini , Eric Farman , Peter Xu , Hanna Reitz , Christian Borntraeger , "Michael S. Tsirkin" , Raphael Norwitz , Ilya Leoshkevich , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , Eric Auger , "Gonglei (Arei)" , David Hildenbrand , Stefan Hajnoczi , qemu-s390x@nongnu.org, Cornelia Huck , Halil Pasic , qemu-block@nongnu.org, Kevin Wolf Subject: [PATCH v2 10/10] hw/virtio: Build various target-agnostic objects just once Date: Wed, 24 May 2023 11:37:44 +0200 Message-Id: <20230524093744.88442-11-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230524093744.88442-1-philmd@linaro.org> References: <20230524093744.88442-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=philmd@linaro.org; helo=mail-wr1-x436.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The previous commit remove the unnecessary "virtio-access.h" header. These files no longer have target-specific dependency. Move them to the generic 'softmmu_ss' source set. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth --- hw/block/dataplane/meson.build | 2 +- hw/scsi/meson.build | 10 +++++++--- hw/virtio/meson.build | 11 ++++++----- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/hw/block/dataplane/meson.build b/hw/block/dataplane/meson.build index 78d7ac1a11..dec73e7486 100644 --- a/hw/block/dataplane/meson.build +++ b/hw/block/dataplane/meson.build @@ -1,2 +1,2 @@ -specific_ss.add(when: 'CONFIG_VIRTIO_BLK', if_true: files('virtio-blk.c')) +softmmu_ss.add(when: 'CONFIG_VIRTIO_BLK', if_true: files('virtio-blk.c')) specific_ss.add(when: 'CONFIG_XEN_BUS', if_true: files('xen-block.c')) diff --git a/hw/scsi/meson.build b/hw/scsi/meson.build index bde72df19c..4c8fa50783 100644 --- a/hw/scsi/meson.build +++ b/hw/scsi/meson.build @@ -1,5 +1,6 @@ scsi_ss = ss.source_set() specific_scsi_ss = ss.source_set() +virtio_scsi_ss = ss.source_set() specific_virtio_scsi_ss = ss.source_set() scsi_ss.add(files( @@ -15,12 +16,15 @@ scsi_ss.add(when: 'CONFIG_MEGASAS_SCSI_PCI', if_true: files('megasas.c')) scsi_ss.add(when: 'CONFIG_MPTSAS_SCSI_PCI', if_true: files('mptsas.c', 'mptconfig.c', 'mptendian.c')) scsi_ss.add(when: 'CONFIG_VMW_PVSCSI_SCSI_PCI', if_true: files('vmw_pvscsi.c')) -specific_virtio_scsi_ss.add(files('virtio-scsi.c', 'virtio-scsi-dataplane.c')) +virtio_scsi_ss.add(files('virtio-scsi-dataplane.c')) +virtio_scsi_ss.add(when: 'CONFIG_VHOST_SCSI', if_true: files('vhost-scsi.c')) +virtio_scsi_ss.add(when: 'CONFIG_VHOST_USER_SCSI', if_true: files('vhost-user-scsi.c')) + +specific_virtio_scsi_ss.add(files('virtio-scsi.c')) specific_virtio_scsi_ss.add(when: 'CONFIG_VHOST_SCSI_COMMON', if_true: files('vhost-scsi-common.c')) -specific_virtio_scsi_ss.add(when: 'CONFIG_VHOST_SCSI', if_true: files('vhost-scsi.c')) -specific_virtio_scsi_ss.add(when: 'CONFIG_VHOST_USER_SCSI', if_true: files('vhost-user-scsi.c')) specific_scsi_ss.add_all(when: 'CONFIG_VIRTIO_SCSI', if_true: specific_virtio_scsi_ss) +scsi_ss.add_all(when: 'CONFIG_VIRTIO_SCSI', if_true: virtio_scsi_ss) specific_scsi_ss.add(when: 'CONFIG_SPAPR_VSCSI', if_true: files('spapr_vscsi.c')) diff --git a/hw/virtio/meson.build b/hw/virtio/meson.build index 54c90c24fb..16e64e1cf1 100644 --- a/hw/virtio/meson.build +++ b/hw/virtio/meson.build @@ -2,13 +2,18 @@ softmmu_virtio_ss = ss.source_set() softmmu_virtio_ss.add(files('virtio-bus.c')) softmmu_virtio_ss.add(when: 'CONFIG_VIRTIO_PCI', if_true: files('virtio-pci.c')) softmmu_virtio_ss.add(when: 'CONFIG_VIRTIO_MMIO', if_true: files('virtio-mmio.c')) +softmmu_virtio_ss.add(when: 'CONFIG_VIRTIO_CRYPTO', if_true: files('virtio-crypto.c')) +softmmu_virtio_ss.add(when: 'CONFIG_VHOST_VSOCK_COMMON', if_true: files('vhost-vsock-common.c')) +softmmu_virtio_ss.add(when: 'CONFIG_VIRTIO_IOMMU', if_true: files('virtio-iommu.c')) +softmmu_virtio_ss.add(when: 'CONFIG_VHOST_VDPA_DEV', if_true: files('vdpa-dev.c')) specific_virtio_ss = ss.source_set() specific_virtio_ss.add(files('virtio.c')) specific_virtio_ss.add(files('virtio-config-io.c', 'virtio-qmp.c')) if have_vhost - specific_virtio_ss.add(files('vhost.c', 'vhost-backend.c', 'vhost-iova-tree.c')) + softmmu_virtio_ss.add(files('vhost.c')) + specific_virtio_ss.add(files('vhost-backend.c', 'vhost-iova-tree.c')) if have_vhost_user specific_virtio_ss.add(files('vhost-user.c')) endif @@ -20,20 +25,16 @@ else endif specific_virtio_ss.add(when: 'CONFIG_VIRTIO_BALLOON', if_true: files('virtio-balloon.c')) -specific_virtio_ss.add(when: 'CONFIG_VIRTIO_CRYPTO', if_true: files('virtio-crypto.c')) specific_virtio_ss.add(when: 'CONFIG_VHOST_USER_FS', if_true: files('vhost-user-fs.c')) specific_virtio_ss.add(when: 'CONFIG_VIRTIO_PMEM', if_true: files('virtio-pmem.c')) -specific_virtio_ss.add(when: 'CONFIG_VHOST_VSOCK_COMMON', if_true: files('vhost-vsock-common.c')) specific_virtio_ss.add(when: 'CONFIG_VHOST_VSOCK', if_true: files('vhost-vsock.c')) specific_virtio_ss.add(when: 'CONFIG_VHOST_USER_VSOCK', if_true: files('vhost-user-vsock.c')) specific_virtio_ss.add(when: 'CONFIG_VIRTIO_RNG', if_true: files('virtio-rng.c')) -specific_virtio_ss.add(when: 'CONFIG_VIRTIO_IOMMU', if_true: files('virtio-iommu.c')) specific_virtio_ss.add(when: 'CONFIG_VIRTIO_MEM', if_true: files('virtio-mem.c')) specific_virtio_ss.add(when: 'CONFIG_VHOST_USER_I2C', if_true: files('vhost-user-i2c.c')) specific_virtio_ss.add(when: 'CONFIG_VHOST_USER_RNG', if_true: files('vhost-user-rng.c')) specific_virtio_ss.add(when: 'CONFIG_VHOST_USER_GPIO', if_true: files('vhost-user-gpio.c')) specific_virtio_ss.add(when: ['CONFIG_VIRTIO_PCI', 'CONFIG_VHOST_USER_GPIO'], if_true: files('vhost-user-gpio-pci.c')) -specific_virtio_ss.add(when: 'CONFIG_VHOST_VDPA_DEV', if_true: files('vdpa-dev.c')) virtio_pci_ss = ss.source_set() virtio_pci_ss.add(when: 'CONFIG_VHOST_VSOCK', if_true: files('vhost-vsock-pci.c'))