From patchwork Tue May 23 16:35:50 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: 684999 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1824483wrt; Tue, 23 May 2023 09:36:58 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6J01U/zusDtw11QGqkTiTVJzdY9yxqmoB2E45xlR3tEpIk6KDTS7r6SckDeV1hI3UkbBBv X-Received: by 2002:ac8:5b8e:0:b0:3f6:a210:1fd2 with SMTP id a14-20020ac85b8e000000b003f6a2101fd2mr16418107qta.68.1684859818511; Tue, 23 May 2023 09:36:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684859818; cv=none; d=google.com; s=arc-20160816; b=D/v9lR5z4L/aWajq3p/5zDe95Jx/MRwrB+bU3zQPIlQ2p+hAx0mE6hpccmB8K5oOpd sotzQCqgiB2QzXBKNxmcYNVHP6yTXAhXnQosIeANouut88zDOMY5dx72bsE76ZeGiz3f ePGdMyuF628ceYO4QAIcEQXtlCScy/JCPW3UQvLdn2Q2cPkK0ELufhIPTOo26GuvvwFx hYAJNXz8D85YbiKOTw5c2wr6MG0N15eo73ZtEUXeXOTrgOdRm+v4pwIuvGAEZMxn/4cJ rViOdbXb1YeFZEl4H33lZiE+3that4YQRTxy+UGbgHRHluQ5iDz+/T77KIVg2ymuQxtV WpVA== 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=2/nlgPLhLbIsykS3dfTZmYeBfdaG3SqKteCE5YtDUbs=; b=qUiHaH/s38NXc6AK5wEaQYF2AIt4Ow3GAIhkzO8Kgf4+o/OlAj9OdfQDq3PylRG+KZ UGW+fKTGgXsv2/pmQoPXSPTr3y/lcIo22nnQKZhSON7rWZwI33SrkXFVq6W5pHeWWyw+ spetwEdn2yhpC4KaLNHKF389Ap15g7qjQSGEHXarVx5ZcMHgau4d8zNz6U7q0EWvOFXD 67KAjFRR2bgA9+Wvw1hRa9/2tQ13ZoYG55kmma+gOgSu54EQQOFDLitEA9P0/uPXXnYV 7QMwKKXv6w9PpJzkDDTWC9DLX1b0VkflHkkfCQA9kHIdbyBxTheMAw/LG8xduukSrb6M 8sXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=E3OiAtLc; 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 h1-20020ac85841000000b003f6a8c3198csi4310843qth.200.2023.05.23.09.36.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 23 May 2023 09:36:58 -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=E3OiAtLc; 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 1q1Uzg-0008Up-6V; Tue, 23 May 2023 12:36:16 -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 1q1Uze-0008Tt-B9 for qemu-devel@nongnu.org; Tue, 23 May 2023 12:36:14 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q1Uzc-0001a3-8G for qemu-devel@nongnu.org; Tue, 23 May 2023 12:36:14 -0400 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-3f6094cb26eso458185e9.2 for ; Tue, 23 May 2023 09:36:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684859770; x=1687451770; 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=2/nlgPLhLbIsykS3dfTZmYeBfdaG3SqKteCE5YtDUbs=; b=E3OiAtLcYCc+oNau0yNrzuqvE6y6mHF+NR0VFAMvcS06mzBM5ltNJ9usCYHgJ5HrsG v/S4B4pQTFG9refhWhSy2P1wHvbQ2xHbVepIkqlQjnleX1LQCwavJMWy6BF9NpBlXk9u 9b+swkqFc/mG6pdrgKeutw+kmWKFiG8mSpINufCZsEjpDQXDZAnAlgan6aQaRFexttF5 Nb5ByQ1YlBeB6PCW7cZfkXynAQbi5G2d5FZG25BSlFIboJ+4KlyABGvCy6ZFhgHpJBlu 2+r/FPPMOuLJzxY7qa9fPaclZYC90X/vEwxzBdcF7FtNwJ+NrUYuWxXmFJhvuh1vhNWY rEng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684859770; x=1687451770; 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=2/nlgPLhLbIsykS3dfTZmYeBfdaG3SqKteCE5YtDUbs=; b=NWJlpxgGTplqGrvlnCsAcbd4VwtsxXBBpQQXHmxu6mTRDjmhVU3CAIuxH5ePtW7Wq6 O2x+ezCWwVP+ScwwE9OzQgF4t/Llnm5JmXFtAdeYycDCwbJx5jcco9Ab5tzWNQNGZYjH M9SmL4wJP/0Wq+N5o3rocKUXqDulkvVZvnVV7bPkhbl0lKazGMRH1+69r4NgJZ0Hc8yc NYNfcHwVTsCfXplfM0uo8dxil65a38w5avOsniwYRsWMu/zH7MQ5rPa2iZX+7r4ONFQV gUWrEUs3nHCBuMFco12CfkREHf98cFQRXe57hvUi8cm+VfMLpHdK5el5IH3Oh/ySRG+e w41Q== X-Gm-Message-State: AC+VfDx7is1vMsP6uucPMn1c84oq0eLTryalNt+Ay/bc3ufW5r3Hk/K4 OBse6kGb91X+6E+TIqcJqn6+Mw1LSaMf5aiInuk= X-Received: by 2002:a5d:50d2:0:b0:2cf:e517:c138 with SMTP id f18-20020a5d50d2000000b002cfe517c138mr9579070wrt.66.1684859770636; Tue, 23 May 2023 09:36:10 -0700 (PDT) Received: from localhost.localdomain (vil69-h02-176-184-48-94.dsl.sta.abo.bbox.fr. [176.184.48.94]) by smtp.gmail.com with ESMTPSA id w6-20020a5d6086000000b003064600cff9sm11600325wrt.38.2023.05.23.09.36.08 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 23 May 2023 09:36:10 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Raphael Norwitz , Peter Xu , Halil Pasic , Thomas Huth , "Gonglei (Arei)" , David Hildenbrand , Christian Borntraeger , Paolo Bonzini , "Michael S. Tsirkin" , Kevin Wolf , qemu-block@nongnu.org, Eric Farman , Fam Zheng , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , Stefan Hajnoczi , Hanna Reitz , Cornelia Huck , Eric Auger , Ilya Leoshkevich , qemu-s390x@nongnu.org Subject: [PATCH 01/11] softmmu: Introduce qemu_target_page_mask/qemu_target_page_align helpers Date: Tue, 23 May 2023 18:35:50 +0200 Message-Id: <20230523163600.83391-2-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230523163600.83391-1-philmd@linaro.org> References: <20230523163600.83391-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=philmd@linaro.org; helo=mail-wm1-x32b.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 and TARGET_PAGE_ALIGN are poisoned in target-agnostic code, introduce the qemu_target_page_mask() and qemu_target_page_align() helpers to get these values from target-agnostic code at runtime. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- include/exec/target_page.h | 2 ++ softmmu/physmem.c | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/include/exec/target_page.h b/include/exec/target_page.h index bbf37aea17..660416920b 100644 --- a/include/exec/target_page.h +++ b/include/exec/target_page.h @@ -15,6 +15,8 @@ #define EXEC_TARGET_PAGE_H size_t qemu_target_page_size(void); +unsigned qemu_target_page_mask(void); +uint64_t qemu_target_page_align(uint64_t value); int qemu_target_page_bits(void); int qemu_target_page_bits_min(void); diff --git a/softmmu/physmem.c b/softmmu/physmem.c index efaed36773..14fcba4fb2 100644 --- a/softmmu/physmem.c +++ b/softmmu/physmem.c @@ -3347,6 +3347,16 @@ size_t qemu_target_page_size(void) return TARGET_PAGE_SIZE; } +unsigned qemu_target_page_mask(void) +{ + return TARGET_PAGE_MASK; +} + +uint64_t qemu_target_page_align(uint64_t value) +{ + return TARGET_PAGE_ALIGN(value); +} + int qemu_target_page_bits(void) { return TARGET_PAGE_BITS; From patchwork Tue May 23 16:35:51 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: 685007 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1825118wrt; Tue, 23 May 2023 09:38:15 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4FSvm5OP9gP78LvIeVqUl7vjrd3NxsCSuBkIQW1yil2w+/M85jToBxiD5WTF5EFLxlK3XX X-Received: by 2002:a05:622a:134b:b0:3f4:f80b:8ded with SMTP id w11-20020a05622a134b00b003f4f80b8dedmr23348499qtk.50.1684859895046; Tue, 23 May 2023 09:38:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684859895; cv=none; d=google.com; s=arc-20160816; b=oIkMsm4L8zIQc/UqixD5LSAsssCHT47auVgMiNJcB4Hl4DhZaeSn+p8RKx67JSWNOP jR5Lpr8VfYP82z/rpx4ncq+/4pIpQF25b8HEKBrpt74o1/uEX+HPYNMRbfo5ScDdEZ2O 0KPRg7Olqu7IvwrR2wb6UPja1lXVJzjeZHosE2qXQUniubtirr4intfFt3+HtJJ2yg8b TuCZwYcH7dq1Gu/snmt1JQIdpui+LgUS7PO5bJsZgo8puc319n9qR3CEmT6qN2L5BAqL 8dkbr7kruaLHtEAUvRII+94GcEfOy39jPOwAFz/ydUDZQCM5a2vbD3W9B3S7IkJ6wWAn /34A== 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=9Gn+HBFJ064NVzM7YmEXvqcvjJjkdoC6PwfC7PPhyMY=; b=pvjcdAKNCsFrodGx3Lv8VQ5WOZfmJQSwhVPhl4AALBGqvBiDBC1FhuNIbHSI71yUXR W+wj02dceDww3MewO2y8aoqCCkNtTN5V+H0bYK+ezlXEwC1W818WM61ZwQLBEAfBZLc6 nO+SqsMu8Tt89eoueAq2XeSdO8fA5B631XLPITKtCGuxcXl3ZOUlC2oxKTDFDmgwN+ce LoHi64KwT4kUxtXeQJEt5gHbrdGzc5FJjOXbNGBdic6W7k6CtLLWJP7oLPuTacN5jFoH g7RNPnONAeN52g7eSYDJhcqhFrrqyIIeOUByg1Qmrjwu3RyZDzhXtcHEW+x3H4RfX8Nc 7G7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SSqzoM0Q; 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 d8-20020a05622a05c800b003ef0551af53si5430585qtb.219.2023.05.23.09.38.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 23 May 2023 09:38:15 -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=SSqzoM0Q; 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 1q1Uzv-0000fR-9D; Tue, 23 May 2023 12:36: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 1q1Uzs-0000T6-Ri for qemu-devel@nongnu.org; Tue, 23 May 2023 12:36:29 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q1Uzk-0001bZ-H4 for qemu-devel@nongnu.org; Tue, 23 May 2023 12:36:26 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-3f6077660c6so792025e9.0 for ; Tue, 23 May 2023 09:36:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684859777; x=1687451777; 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=9Gn+HBFJ064NVzM7YmEXvqcvjJjkdoC6PwfC7PPhyMY=; b=SSqzoM0Q/DaDxV78ankhptGCeuezA4AZlLMlhIpKL0OlSZ5n+k8djkali1bO5Nt8rk uqZiG9gXa6mpA7KTCxflsp4VF+tFbojRkhycldXEU0gCrnigaqRNkPqBGW8xbVgw/UwP EC7FwUUgdm4INPzQLoNSb52uM1v3pn900OztBmLnaSd/URgSCVVfYknMld5UEUzBFfBS bo3VZPiJ3wRGyxD+I764aN+5nTkimi6Wf0+x+qS+yHkYIrDYJR4U8VMW5Dhwwo6I4rrb 3E6fdoBH9FzvNgznYby/K2aOWwAZ9Wd8cpTpYJTAJHZoo/MQ657ykBpwsmBLK0UCd39S hG+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684859777; x=1687451777; 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=9Gn+HBFJ064NVzM7YmEXvqcvjJjkdoC6PwfC7PPhyMY=; b=lcN/HGYwzpq1wIMfj8OGjfRDDnSstM4yqn6/JT5nCsZ0XPraJ9c438ijDgXc44HPAR j58scE+2/xwjsH1BKeoBPt2Cwr4PYxShEyMO4HFTI0y4Lo4KVLIOgqR3w1NcRhndAYY0 VQXFG0RVW42UXT1SfEzPbkm+4uuL3KJUxzRwojqFUmueMIGHJB/8YklE6OSq66oJX0ys cgOtOkiYhQ/A7aG4O+CNPOARrBTZzYb2A66i8g93Q3jGG8TQ9dz8x1uuvc6MGecmw8V6 3vs1hKMZr88FHybOa6gzcxWuuIw8ORkMoIZCHD+ONPsVyySGVgbvEtvO1H5WvQItpim8 D3mQ== X-Gm-Message-State: AC+VfDxQVVuDB/GS0CWqH3DNPS1ha5VmVLmIHUdfHwsbaTjmy83aPLiN XRRJNKKbFehnXHGmidT/a1nOK6vzKf19lObQd7g= X-Received: by 2002:a7b:cd01:0:b0:3f4:2327:53c2 with SMTP id f1-20020a7bcd01000000b003f4232753c2mr11349659wmj.19.1684859777178; Tue, 23 May 2023 09:36:17 -0700 (PDT) Received: from localhost.localdomain (vil69-h02-176-184-48-94.dsl.sta.abo.bbox.fr. [176.184.48.94]) by smtp.gmail.com with ESMTPSA id v16-20020a1cf710000000b003f4fe09aa43sm15572466wmh.8.2023.05.23.09.36.14 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 23 May 2023 09:36:16 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Raphael Norwitz , Peter Xu , Halil Pasic , Thomas Huth , "Gonglei (Arei)" , David Hildenbrand , Christian Borntraeger , Paolo Bonzini , "Michael S. Tsirkin" , Kevin Wolf , qemu-block@nongnu.org, Eric Farman , Fam Zheng , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , Stefan Hajnoczi , Hanna Reitz , Cornelia Huck , Eric Auger , Ilya Leoshkevich , qemu-s390x@nongnu.org Subject: [PATCH 02/11] hw/scsi: Introduce VHOST_SCSI_COMMON symbol in Kconfig Date: Tue, 23 May 2023 18:35:51 +0200 Message-Id: <20230523163600.83391-3-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230523163600.83391-1-philmd@linaro.org> References: <20230523163600.83391-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=philmd@linaro.org; helo=mail-wm1-x335.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_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_HELO_TEMPERROR=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-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 --- 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 Tue May 23 16:35:52 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: 685009 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1825174wrt; Tue, 23 May 2023 09:38:19 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7YH5vKyPJL3d3PbKmNumgnx3gkXvq0OyC+apDqjfTVVn8tI94KV8Wyih4l0+VPbKs9caaZ X-Received: by 2002:ac8:588a:0:b0:3f5:2995:f6c8 with SMTP id t10-20020ac8588a000000b003f52995f6c8mr24443443qta.60.1684859899093; Tue, 23 May 2023 09:38:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684859899; cv=none; d=google.com; s=arc-20160816; b=uZrriL7XGyqfpNyJhRciQdiQ3aY88yh4pYMZUEr78xMtHNjwh8NxMzP2iD39/sBjnu uRU7YIEeMX4KAtDET9fz+5RzTlvb9WU/GaeHO7YdpKvb7KV+aUDLIpNRHfoF1kNaaxFs pYSQWw5hrPF3zoA437mXDUCtRORUPtdAL248NlzG0eUyPO93AS+YOFFqA7qkNNe17/HQ pKyUVaqHNrA4d8SN0yCdzdl54gRxA79L+y6hQzcmIjqe8XJI/XhYiSFqdfzCVFbWCFz8 FgWXVlsPyp/FlW/tw02C4ws6aASiU8iu6K0JuXsBI+me3xBapiZX78UdOk49VZgFspoI HzVA== 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=yhObE3lO9NW7n22ou/6MvOVRIrPs/DPwiwLTQULI9M4=; b=EJEAnJ3BCQ4mUBJdraq0QLY61+83Yo5vyPTNGBGINhviZebIv8JrQjhVP7iA04MJP9 72RHDmxfk4f+gM0xGruWXZw8fUns9I5QPzxGzK6s//TdQ290jrfba2ULkUKNta1tO2IR nA9XFPVsR0/bjXoyLg3x2hLNFDHKvbTmgtVGxuLZ+j0T4VgIqi78sC5kznn3honBQv3U ydu0LDM4RDDRGIroF4CH/9hBGtKSxdO0dpjKorQsQ0yihHRG+3v9eYzp4jzPRKiYuCOF q2LrSmqH1MJCRu9Z44St5jJuFqzBOPMSv+XdG7SmRKRvFkbcnK2mHDM0KoolD/wBhge+ Hg/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=W3Hwxp3S; 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 s32-20020a05622a1aa000b003f3941c3cb7si5363721qtc.246.2023.05.23.09.38.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 23 May 2023 09:38:19 -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=W3Hwxp3S; 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 1q1V02-0000zh-01; Tue, 23 May 2023 12:36:38 -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 1q1V00-0000z1-Te for qemu-devel@nongnu.org; Tue, 23 May 2023 12:36:36 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q1Uzp-0001ct-QY for qemu-devel@nongnu.org; Tue, 23 May 2023 12:36:36 -0400 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-3090d3e9c92so7578246f8f.2 for ; Tue, 23 May 2023 09:36:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684859784; x=1687451784; 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=yhObE3lO9NW7n22ou/6MvOVRIrPs/DPwiwLTQULI9M4=; b=W3Hwxp3S/l+jWxTCqJu/rKV65EhkJH+fbFCdLCDpwR2zyZWgke+JXkQdtFbWH0NkhI XhQXolyll7VhQQlDJtX+XBHKwI2HOicNPQHAfZrKiNamOK/3rwyXRukivBytBrH/U86o r0SstjElRjaQte7kSvCGvqaxXmP99aPO+LYbDoP1+DdsRKbb1f398ac7SMUKXpQECPu8 AwttZaCoHcPB/I+mRgez+YynqozocifqUNeab1u7XIZDA8uocj4u7A/l7riiiStRjU5r VoZjRaRvYO3F9Z+rlW7hPhuncMrY9Ywsa84tlXwG1mrNCbHerhaJ6XWIx8EgZD28q2gj UTag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684859784; x=1687451784; 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=yhObE3lO9NW7n22ou/6MvOVRIrPs/DPwiwLTQULI9M4=; b=j4u+YhISabpvY9RXoUprNuCEkaokGPPMamwpykBNT9aQdCrATlOtfDWT06typac1Mm 9BkbmrCs0QFCz9OvFZ0ejFiXe/6D01iOxMCD/h8CpdblSEBA+8RJPze+9X6wu6F3EyQA CHXj5S2oT4wIEpNHwZksxUcY3jwXDJEZeuN/U6j/VQQYR+2mQeUsdj87knOYe6SuNWAn Qxdli1J5onP2KdjTmZwTN5q/o8a+I4NHfuHy1sl6iQXi5YaZbEl2G0Vnc6Taz3GQDEth zQGywWxcFB9hBr5NZy4GwA3NLiJuAoxzc9GNsEptVSaNPLw/5ry0l0t0syRZyBTp5p/g jc4g== X-Gm-Message-State: AC+VfDxT/cZcieYF+ygBczyn+/1Lzw70Fw98pcCLDYHLvEhTQk3uPqgy kPSIkmQ2qgAkh8sVAYJgbpFdfj/yKm3ynB2M4Oc= X-Received: by 2002:adf:f711:0:b0:306:35d2:c33a with SMTP id r17-20020adff711000000b0030635d2c33amr11309900wrp.50.1684859783945; Tue, 23 May 2023 09:36:23 -0700 (PDT) Received: from localhost.localdomain (vil69-h02-176-184-48-94.dsl.sta.abo.bbox.fr. [176.184.48.94]) by smtp.gmail.com with ESMTPSA id d6-20020a5d6446000000b00307a83ea722sm11642193wrw.58.2023.05.23.09.36.21 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 23 May 2023 09:36:23 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Raphael Norwitz , Peter Xu , Halil Pasic , Thomas Huth , "Gonglei (Arei)" , David Hildenbrand , Christian Borntraeger , Paolo Bonzini , "Michael S. Tsirkin" , Kevin Wolf , qemu-block@nongnu.org, Eric Farman , Fam Zheng , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , Stefan Hajnoczi , Hanna Reitz , Cornelia Huck , Eric Auger , Ilya Leoshkevich , qemu-s390x@nongnu.org Subject: [PATCH 03/11] hw/scsi: Rearrange meson.build Date: Tue, 23 May 2023 18:35:52 +0200 Message-Id: <20230523163600.83391-4-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230523163600.83391-1-philmd@linaro.org> References: <20230523163600.83391-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=philmd@linaro.org; helo=mail-wr1-x42e.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 We will modify this file shortly. Re-arrange it slightly first, declaring source sets first. No logical change. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- hw/scsi/meson.build | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/hw/scsi/meson.build b/hw/scsi/meson.build index fa9198e69f..f3206a4756 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,13 @@ 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(when: 'CONFIG_SPAPR_VSCSI', if_true: files('spapr_vscsi.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 Tue May 23 16:35:53 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: 685008 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1825155wrt; Tue, 23 May 2023 09:38:17 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6dyRtgHQv5ntWo44RKkC5ligiId/EyS6iiXnIUvMsIRVwbeLQi+2RBE/hnAMFoks1QOUOm X-Received: by 2002:a37:64ce:0:b0:75b:23a1:8332 with SMTP id y197-20020a3764ce000000b0075b23a18332mr4514740qkb.45.1684859897582; Tue, 23 May 2023 09:38:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684859897; cv=none; d=google.com; s=arc-20160816; b=AI3DB44Omm7FS/B8dzJ7goSOGwngPg5dFBxBFD3WbQHfZdS+62SX6Qwxn4acR/laDV AgWyQsBjyhLNnddEjTAo/o0+ZT1NQQfRJIFESqCqCKEy5i767b7IjKmIdzYbC4tK/bXB oKhhkKnLpp0qEY+ZcLLe/t/TTOzc0UW23cblNFDktttwiu+4DR/TnD/SUwiHGrUYfbam ZvxqspRzRMXLO5Nhs7pT5FZ1Z2cKOisGuO+hDsJhZO4gCj64RMbZYW/wUfSYFm3/zxHY IX/doF5rztS2dX9K6ActusRTorfYl7XeS66rheUSt8dn0bqQyXL6w690FCsMGgxvuj9E dnrA== 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=V17lx77UXSYFaYQzaR+9S0XVX2qSAU+sO6hL7F9uBv4=; b=t09mT5qJCjlZXLZRCnTAoHNu5myhDBzovzGk6xLq3H2jLtvQYISojg1nHrgOwgGUx3 DZupM/oP0o0gXqT+BWFGLCDAdPZ+4psoyJ0CIoB9aNPHgXKT8iNlrRqXOUWJqLaGsxsV 1j+3QZABjJ6xJkCRt9c3klbrHG2KtiZry4uC+G/SF9o9XauZrxb7UShORDlWKFecR+cU MbTQYxw61qv57kB84EvuOXc+uOtvQZsSs7sKxP9LTkk3ZySOpL4vfLEIt0EavH4SNPOm vd+lUZqcu4rRJVt41HU9SPxjapMzpu7v6Xo+rS/qIkdK5NOIyRg2/djQtcCtVi9dMBwK gDiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EfX64QvL; 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 h1-20020a05620a10a100b0075b18d24e9esi2652000qkk.428.2023.05.23.09.38.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 23 May 2023 09:38: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=EfX64QvL; 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 1q1V02-00012N-MQ; Tue, 23 May 2023 12:36:38 -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 1q1V01-0000zD-9P for qemu-devel@nongnu.org; Tue, 23 May 2023 12:36:37 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q1Uzw-0001eG-1N for qemu-devel@nongnu.org; Tue, 23 May 2023 12:36:37 -0400 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-30a892c45c4so2171409f8f.3 for ; Tue, 23 May 2023 09:36:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684859790; x=1687451790; 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=V17lx77UXSYFaYQzaR+9S0XVX2qSAU+sO6hL7F9uBv4=; b=EfX64QvLK+EPw0S1IzOzzPtp1ebd7yJoOoLWs/iGkLh/xspE80UXCFujsm+SZoWlD+ OQWjviOaDVOKHZmmgKAbGEZNizx18K+yvpfoRTHKeP5wtK0OdLfrnCxqTVsvO04nVYyk wvF9LAu2+m2BzhbKvXpWhNOup8YyUiuoiWLNYSU+aH2zN2uOJ0rwZM2MBr+cvAILlSJn JSHhoAp+APcAwSe9kcxxAMrf9leI2YLB1XtYqDolkzTlw94B9Cj2tmyXTyGiRk+maimT GjG3u2a/D1hPvJUwH/BBarx+HhGdXJdbfyTgEG8F3tQ9ZIKBGGaLiUFYWnk5kqFBt1aN 4oCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684859790; x=1687451790; 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=V17lx77UXSYFaYQzaR+9S0XVX2qSAU+sO6hL7F9uBv4=; b=hMfpUcb8C3Q7ukLfYlsCsH/XsoPYjJkRaQd5lr/vpX+eAxJWe0kYzdPKzxb+LTby6J wZs09dub7n2lm1gPP4+lMxleQuJfCQO9GA56R/j0VBw5ZANeXEoxqm7JD8OjrwBpwLN1 CuHD1BqbYUj9i/lcYLtXagjbC+QSCVnptTmjlfWYBrKTeUquwAOd4eOyg0GjPHFpLO9o Len7LCrJyBfKCoAEBy8vQ/WdSAZlFLR9NpM7XyPrnDRyHgnJRlJVKRnHzdYWnbxZPs99 YoA75kd+WQZzRTBwocp4sCpqLVpBMUlzRKndCHMRnmpdnoZdqBTgqBFawatJlUwMt7kL 9nAg== X-Gm-Message-State: AC+VfDy0eMdH8/brpCnSZKCckjdjfVE/UkoDaw1yqvIE6q0KauxQMpXP VtIKN4iMy/AdUuWQ/cSQmWE47An8GXKyKzeGmHo= X-Received: by 2002:adf:fa88:0:b0:2f8:e190:e719 with SMTP id h8-20020adffa88000000b002f8e190e719mr10839096wrr.65.1684859790372; Tue, 23 May 2023 09:36:30 -0700 (PDT) Received: from localhost.localdomain (vil69-h02-176-184-48-94.dsl.sta.abo.bbox.fr. [176.184.48.94]) by smtp.gmail.com with ESMTPSA id i7-20020a5d55c7000000b003079ed1f0a0sm11679598wrw.44.2023.05.23.09.36.28 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 23 May 2023 09:36:30 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Raphael Norwitz , Peter Xu , Halil Pasic , Thomas Huth , "Gonglei (Arei)" , David Hildenbrand , Christian Borntraeger , Paolo Bonzini , "Michael S. Tsirkin" , Kevin Wolf , qemu-block@nongnu.org, Eric Farman , Fam Zheng , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , Stefan Hajnoczi , Hanna Reitz , Cornelia Huck , Eric Auger , Ilya Leoshkevich , qemu-s390x@nongnu.org Subject: [PATCH 04/11] hw/scsi: Rename target-specific source set as 'specific_virtio_scsi_ss' Date: Tue, 23 May 2023 18:35:53 +0200 Message-Id: <20230523163600.83391-5-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230523163600.83391-1-philmd@linaro.org> References: <20230523163600.83391-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=philmd@linaro.org; helo=mail-wr1-x42e.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 --- hw/scsi/meson.build | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/hw/scsi/meson.build b/hw/scsi/meson.build index f3206a4756..d88f7450e8 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,13 @@ 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(when: 'CONFIG_SPAPR_VSCSI', if_true: files('spapr_vscsi.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) 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 Tue May 23 16:35:54 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: 685001 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1824544wrt; Tue, 23 May 2023 09:37:05 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7wmWyQsANZaK+Uk1ldwM8By5HTdtkGWE5CjHQ8U6WZk3HhsaJWYzqfXbAamHqziHTjOR/V X-Received: by 2002:ac8:5b04:0:b0:3f6:aaad:2b60 with SMTP id m4-20020ac85b04000000b003f6aaad2b60mr13135859qtw.7.1684859825684; Tue, 23 May 2023 09:37:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684859825; cv=none; d=google.com; s=arc-20160816; b=nbeJlM3B2WthCEiaBFxNUu74noVCfvnKQmV+jDNIKy++7ozr+0y7CEz0nzMyBjArvG tyOsdRvyAkU+4iqMf8klUYGyUtJTXjZxVd6ge9udk0MhNA5UfTQZXmCuVoUZ1jPgb1bq AsNV+lfP3zzBh2/Nyydxt5yaCgKOqcVwvkZrdaK/yTupQznBVJxhKl8iI2saPPCF44f3 JFqiUWU7xsl21cMVNyQGdRV5T3JilIWt6iHu2mpR1mTw3bPDnpigX+PI9yg+qRuJxBsd ogX9x9A8os9Zwh8E+0ccZZYkrVkhcAiqCj6Dy66W6oKAriyxaCF16/LQXKPnrfZJwkpw OTKA== 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=vD4+39IhI5L7fmlbuqqsRg2B+vzAyPbhgTWPowgv4yc=; b=LGxXZxi6xjeDrMgacmid3Phvhsw29P1aiKyv+RLFml0qO1TbzTmQxdAmxfWAWs90x7 pQj5Ai/wZrCqixDA7+db1cF183JkvGnV66t2W1nvt6HPo8Kpd2H21VX3A5XvNWh8Sgu5 mzr+c/dB+EEVCiijoJwu7y1a1H87vaDGeqmzPngMlI/7ONUpMi+FrMIFn/CiHT62Ltoa ahGlRHzL+v3OY+VE1MLxdGoQhgTO4w7lB9B2poqBA5WgK8AiLga4SsZExzCtIhWNrexo T4MtATni5nyTaX6qvOvLHTYFGZl2qegA82WyyjUZsXrfyYalVXAaubZutp9xafrG9122 jQlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ojz82F+J; 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 e4-20020a05622a110400b003eef480cdabsi5215200qty.725.2023.05.23.09.37.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 23 May 2023 09:37:05 -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=Ojz82F+J; 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 1q1V05-00018S-9h; Tue, 23 May 2023 12:36:41 -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 1q1V04-00014O-C7 for qemu-devel@nongnu.org; Tue, 23 May 2023 12:36:40 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q1V02-0001gD-Hg for qemu-devel@nongnu.org; Tue, 23 May 2023 12:36:40 -0400 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-3f60804faf4so380945e9.3 for ; Tue, 23 May 2023 09:36:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684859797; x=1687451797; 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=vD4+39IhI5L7fmlbuqqsRg2B+vzAyPbhgTWPowgv4yc=; b=Ojz82F+JNrxoV+CzEb+nwtiSKvljJ//B4KwVou3r6rIzJs8je/ypEO6TCIopcIxDsv /H4q5I5qaYbgJksmbiT/hBh3xexKJYIBMDzRMNvlTSZ08Cd/AuFTw7CzBBNvnvZ0cfwH I4FGDgGXadNbxfOC1UDGyOLbCpLTBrz+8ZnNMW0ZMBZNe1SVTDJ+B16DbBzpNOzinyoO RQzn04fJqVYh/lzME5cTPriUVN31d/EkBQ6MqcfXdX2WB8AeszaTsrB+2xGHijqjMEKB mygyLPwbThLAhtxuvp7IbQcQOupiWQbLPZo4DYWqhq6nOOUKb5SIolgf5OX3gFCZaw7j waQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684859797; x=1687451797; 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=vD4+39IhI5L7fmlbuqqsRg2B+vzAyPbhgTWPowgv4yc=; b=hjJgZUOdWHgQBie+JumyNB7BkI43hW7pvsUnO+ZdZy338acSWawjFg1iCwkwp2NFnM 2bsM5dfiMRu1+ikSfF70BR7i5KfMVRhnQ5atSGQj6g9Vd1FGc3I16Kh/aOe4yKqy0LQ2 mmlPTpvspdWK20YD+EypC2VYFrndKOfesXWMNMw24RY0WAlZHra3JbFw244CkA5VH2Dw gcNqjjZ9IEwU4GbfHhRcq5R4t0gY+ibvJ4OticHD7XJ2x9C4MJcMFSnOENqlS95Ny7EW yJBZcDBoWsysv00jGW4DZ2nk5jVgBDkxcIxB3cTMuo05bn9EUMlpNPhkFX6sQjV1/fmL wyFA== X-Gm-Message-State: AC+VfDyFZ938FJYIUAunkfafLYHTBFfzQGPuFX33RMYcnJUlVgB8Qvks FyjNNAsHk6Qlf6a+kOfOIvTnEl/KtJvfxKAzFfc= X-Received: by 2002:a7b:cc15:0:b0:3f4:2452:966a with SMTP id f21-20020a7bcc15000000b003f42452966amr10252942wmh.27.1684859796704; Tue, 23 May 2023 09:36:36 -0700 (PDT) Received: from localhost.localdomain (vil69-h02-176-184-48-94.dsl.sta.abo.bbox.fr. [176.184.48.94]) by smtp.gmail.com with ESMTPSA id 22-20020a05600c231600b003f421979398sm15300258wmo.26.2023.05.23.09.36.34 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 23 May 2023 09:36:36 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Raphael Norwitz , Peter Xu , Halil Pasic , Thomas Huth , "Gonglei (Arei)" , David Hildenbrand , Christian Borntraeger , Paolo Bonzini , "Michael S. Tsirkin" , Kevin Wolf , qemu-block@nongnu.org, Eric Farman , Fam Zheng , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , Stefan Hajnoczi , Hanna Reitz , Cornelia Huck , Eric Auger , Ilya Leoshkevich , qemu-s390x@nongnu.org Subject: [PATCH 05/11] hw/virtio: Introduce VHOST_VSOCK_COMMON symbol in Kconfig Date: Tue, 23 May 2023 18:35:54 +0200 Message-Id: <20230523163600.83391-6-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230523163600.83391-1-philmd@linaro.org> References: <20230523163600.83391-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=philmd@linaro.org; helo=mail-wm1-x336.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 --- 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 Tue May 23 16:35:55 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: 685006 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1824879wrt; Tue, 23 May 2023 09:37:45 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4VQ+/pLGsfSSuS3Fzcgc4CC/NPyJkWjBXwYy2Giw78SO057QfbnAdqFrOR6PwKIdBOQlbc X-Received: by 2002:a05:620a:2b88:b0:75b:23a1:8352 with SMTP id dz8-20020a05620a2b8800b0075b23a18352mr5279311qkb.77.1684859864843; Tue, 23 May 2023 09:37:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684859864; cv=none; d=google.com; s=arc-20160816; b=cnVQnEj+B5j5Jx077u+ty9my7iTrn1wR6bdl84xeDfZZ0m7zCEcBmr0VM8R1xnUTVG TJ5JDcs0F1aDAPh2EhPUTxL6y2jalq3D+551XkS3U7wFoL+BtxaSMSKYEXy50aTGLFon FmvSrz9+bUu4EEz4SoFsq0zhgr4Tr/wVRbiRWDxeNW1rDvQHM+leJfZ1BRbS8Sgco2GP RmdeR/ohPttjKVIYz5uN/uZTxQck/aktS8mLeI/CvHie2OWb6NCKRpOQeHM/OlYUTJux oS6D4OBAwGQojnFhJVw7EBnBcNI/HW0oeaiHpkkr5WuFz/Dv/tOkOr/1Ro6izASPrHLc ABeQ== 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=LoKzYtGI7sysobWsyNZRR7hMSKUoHQ2fOYULMUN/GtU=; b=VqKbut615ZyZnZxmk18PiR4wyKm0p8ngdhGfuuJRv6KBDP24deb1+SFIPJBQe3fhnQ cvSxrloGMB8J1rKgXaoLjnUiDb3OAjlQKBuyHEvv1bd15oLwzfm8lqNQ1JIOkN9uwYSB 93Qny0b4EeBq6n8K+Ej9GtpN2S6rkWasX80bs1riwhW+0xyO4prh0VqWmma5dlcJ0T+8 v2qexLZm54zN9GVd5aBIi+iBO1JOTxLZARtqfWljYilYCFDfG1vB+aCv2HjgPTL6M2bv f51KcLkNTqCaUBJoQ8B1RRjYQhxLj0lqfAjN4QX8RG1IZlLyNc3ErEghbyWzsenzl0gZ AShQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Zkyz29ag; 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 x3-20020a05620a14a300b0074e0ba0853esi5123268qkj.533.2023.05.23.09.37.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 23 May 2023 09:37:44 -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=Zkyz29ag; 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 1q1V0C-0001Go-HD; Tue, 23 May 2023 12:36:48 -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 1q1V0B-0001FP-FB for qemu-devel@nongnu.org; Tue, 23 May 2023 12:36:47 -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 1q1V08-0001hY-Uo for qemu-devel@nongnu.org; Tue, 23 May 2023 12:36:47 -0400 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-3093a7b71fbso7347429f8f.2 for ; Tue, 23 May 2023 09:36:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684859803; x=1687451803; 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=LoKzYtGI7sysobWsyNZRR7hMSKUoHQ2fOYULMUN/GtU=; b=Zkyz29agILkhhtATpLyavCWN++d8QSZ0S8hpJ+v6wRNoFZkJii6sgLOmOT6P0XLxq/ PV+6XEyfA/zye3EMNCINhojrAEfM6lrhO26Njk0kk5/u8U7Z5YcWRgiI5AfpgTYfGww7 5PrcUf2a93B7yDEJv7ImBBtpFbWV8lTI0vyC89UCl0XeulYJUo3TCTYAT++VFRCFvr4z lk5fv3ujXLad3EFnrz8KH2usqfhVFjDOos7UfyaGdREVwkl/NPX+7GaEv5sH8gE6lv3l a9hRyfCEY49xJl/0VZVKw53l3eMKib6w4CESGI6tCTH0LREb0luC66iaY0lx5CpeHkDw lsSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684859803; x=1687451803; 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=LoKzYtGI7sysobWsyNZRR7hMSKUoHQ2fOYULMUN/GtU=; b=N7rF93R8XMWgVGQpXqqJeuD105sE4XRHH1pCIzM7UAZBwp7g6di6beOEJu/1Gv3Pj1 hXRlpaYbDXnHaC2Iaudi6WpgfPN1AWJejdDdWriqVaQ4iG8u3F7IIG0lOe+0uq4YJuHK O3hzvERTzfCZymtbNkzZu/psLwRz65TM4DOoBSHvY1fNjqkklY9BMwqYcwftLT5TRp1s tCoUoQ+Z7oS+KdDiqpfj1BHfcOHrFnmMHXQlkXNDH1NDCzg0ChLzsgaq/bBD2D7TVRnV gFL49umCCK2FhUHE95LbyyJHgOvyDJmoFgMfL4FxeNlTp7bNb0N+5gGaF++d6kLLsEG9 kiOg== X-Gm-Message-State: AC+VfDzZqcHd/sw86Ow9cbu9CHtVfwBo9u1DD/nGfSM02KlF1dYvqpCV cWvDNCAF23n4wFuSwU7+TLgPLE/FJ18zTMviDyY= X-Received: by 2002:adf:e945:0:b0:309:3a83:cf43 with SMTP id m5-20020adfe945000000b003093a83cf43mr10284626wrn.27.1684859803286; Tue, 23 May 2023 09:36:43 -0700 (PDT) Received: from localhost.localdomain (vil69-h02-176-184-48-94.dsl.sta.abo.bbox.fr. [176.184.48.94]) by smtp.gmail.com with ESMTPSA id g9-20020adffc89000000b002e5ff05765esm11616459wrr.73.2023.05.23.09.36.41 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 23 May 2023 09:36:42 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Raphael Norwitz , Peter Xu , Halil Pasic , Thomas Huth , "Gonglei (Arei)" , David Hildenbrand , Christian Borntraeger , Paolo Bonzini , "Michael S. Tsirkin" , Kevin Wolf , qemu-block@nongnu.org, Eric Farman , Fam Zheng , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , Stefan Hajnoczi , Hanna Reitz , Cornelia Huck , Eric Auger , Ilya Leoshkevich , qemu-s390x@nongnu.org Subject: [PATCH 06/11] hw/virtio/virtio-mem: Use qemu_ram_get_fd() helper Date: Tue, 23 May 2023 18:35:55 +0200 Message-Id: <20230523163600.83391-7-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230523163600.83391-1-philmd@linaro.org> References: <20230523163600.83391-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, 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 --- 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 Tue May 23 16:35:56 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: 685002 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1824597wrt; Tue, 23 May 2023 09:37:12 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7Nt7iYYPHkM2CUQuM6GKwEcySVwBccozm8ppoR0Cefx5FiQUWmMfQlCyMHNLfLmVagFdhA X-Received: by 2002:a05:622a:1a2a:b0:3f6:b5b3:b7c0 with SMTP id f42-20020a05622a1a2a00b003f6b5b3b7c0mr6307052qtb.37.1684859831833; Tue, 23 May 2023 09:37:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684859831; cv=none; d=google.com; s=arc-20160816; b=LWgzjPCa47yEMwU/0PjBwm3i4tEyqSwILlxloXodngZcDPzDK+XwZQo8FWnZ+OaLB9 4rjnJgYM5DPB9JTvVlqdDXjW+ay5Cl0wqRqOzkLZHWl6k2nSJbDa+fCkaP8Z8q4OWWDg SlNAPkDksFQCHg5PlXd50bpB7fJeN1oVliOfHOcVrLXTFpGjB3iHCRe5CGZZNc6WzyKp j+ZQ6THI4M7jWFBx+upDk7b9cZSbrcoZw9E/bWCUePrv4UrVsXEa9zNYpLjTOlgXwCWO gF2JtVXNCxRyrHS4Lt2vGqGISzcSD2SyHCbHxqEJfvGwtbolc2TTuhJAOa9UgwxYkbaG UoeQ== 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=ARGSsskAzbNf6Eoe5vnNjy3BZ9ekI/e2OhJrhhOQCeI=; b=0gzSc2OIqj4VCEW51q6Z7PTB+OV7tpY7j4quREXztTpK1Mwt77dsrHDqLA/38df4jb YzKZwnQqVGgLD+7D4jULzI/9ly0hpPjuDL9sWzepBWJiZ634oz47ubD9majRUlDr4VPv b5gtUgIrmwBwL6YXla2pGHUtHQ9JGWKspA8OcHxSTsU+QSD+9GhKQw9GFUrEZqXsiPs7 tVtKzAJa9BRkcT9lE+9gQujc7ZUhGfXARqQX7q9+IBMjGuxKvmxBeBrgK9ho6Tiwy6+p Il7fMVAkuO1b/ekGHgQXbr3+NU7mN1JMh3vP8ZOEWf4Qciw+Tlu2ZNrN2JhlpMrp20+V /c4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UhsLXZuE; 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 g3-20020ac85803000000b003f0acbd8917si5400857qtg.469.2023.05.23.09.37.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 23 May 2023 09:37:11 -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=UhsLXZuE; 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 1q1V0L-0001Rh-Cs; Tue, 23 May 2023 12:36:57 -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 1q1V0G-0001LC-7B for qemu-devel@nongnu.org; Tue, 23 May 2023 12:36:52 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q1V0E-0001eA-Hc for qemu-devel@nongnu.org; Tue, 23 May 2023 12:36:51 -0400 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-307d20548adso4948353f8f.0 for ; Tue, 23 May 2023 09:36:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684859809; x=1687451809; 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=ARGSsskAzbNf6Eoe5vnNjy3BZ9ekI/e2OhJrhhOQCeI=; b=UhsLXZuE4j95CJXfokwF8F2rVR1tcR5g0HdMI34XZC56sgm4X2HyVdQAXKgNW6S11i pBk42U62Gu9lH1xaUGg9mwkYpfQ6xJ1/H23/HnmydvaLW0WrjjXxQUSp0AmlCNwj/lB3 c4nmI1Q2722C6BJVhS3F9tPwjkotosbttkymZqVxzDA8hk6kQMA1kX+OYPvVZFq/V9lI oQkfqwmNAwvCEr6UNyY6CHFbVSJmwez3UfRB3uzRZXH3sz3FV9peqDS3kljp0ePOyz33 zSPN0xT1t0xQU2jQCMCygvQh2tAQPSYKWRCNoR8hcetyCsZ5MKJOzyVCrIw7GeUyr1KM RVDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684859809; x=1687451809; 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=ARGSsskAzbNf6Eoe5vnNjy3BZ9ekI/e2OhJrhhOQCeI=; b=T3d0Se2+r51NkvEsZ/ohI4guWZO04wG5Uxyn9FzTSgaoSpmMg8nGMqWh3jYDJlX9Nr 5sv5zJ06ZM6GE3KXb2lUJ6HVepoaWMKhPd5Qh6n5XDLnGCb8CPjWUt9Fhp54OOW7yAIp 8ZytzsQ/UKEkuweZEii9cv+N3cCpuAp01vjZwH/tqZI0T12HNAeBw1FMryoAtce2tfR1 Gdi4j6YYTo8WiOAoPyCBxUpJv9Hiex9Ng+YUtbVMNGBUmLosknAwhBGEIR/By2LsTPPy OG/9ox9M+LqNh8O2YthSce+rTbvTpd2xrlb/yJfgs++rSPDgOgJnTSPcqTTzaEuF1seU +hvA== X-Gm-Message-State: AC+VfDxi4zRzOXC6SSISkADFjrlo2mndJ3wdB2TieBHnsPOB/tDYLdpv F2w6EDAwEeb2tap7PClPcs6MGKGYd61NY1Vadtg= X-Received: by 2002:a5d:5392:0:b0:309:4ba8:86a0 with SMTP id d18-20020a5d5392000000b003094ba886a0mr10909440wrv.17.1684859809520; Tue, 23 May 2023 09:36:49 -0700 (PDT) Received: from localhost.localdomain (vil69-h02-176-184-48-94.dsl.sta.abo.bbox.fr. [176.184.48.94]) by smtp.gmail.com with ESMTPSA id i11-20020a05600c290b00b003f605814850sm6373445wmd.37.2023.05.23.09.36.47 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 23 May 2023 09:36:49 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Raphael Norwitz , Peter Xu , Halil Pasic , Thomas Huth , "Gonglei (Arei)" , David Hildenbrand , Christian Borntraeger , Paolo Bonzini , "Michael S. Tsirkin" , Kevin Wolf , qemu-block@nongnu.org, Eric Farman , Fam Zheng , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , Stefan Hajnoczi , Hanna Reitz , Cornelia Huck , Eric Auger , Ilya Leoshkevich , qemu-s390x@nongnu.org Subject: [PATCH 07/11] hw/virtio/vhost-vsock: Include missing 'virtio/virtio-bus.h' header Date: Tue, 23 May 2023 18:35:56 +0200 Message-Id: <20230523163600.83391-8-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230523163600.83391-1-philmd@linaro.org> References: <20230523163600.83391-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=philmd@linaro.org; helo=mail-wr1-x433.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, explicit 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 Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth --- 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 Tue May 23 16:35:57 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: 685005 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1824817wrt; Tue, 23 May 2023 09:37:36 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4bI1HrN6IKcSRuHfCRjp+/+ke9lijLcmjFdQq/d8GbVHh8YHUUIOnAPqGvVpthwDCnyAPI X-Received: by 2002:ad4:5ecc:0:b0:623:7707:5650 with SMTP id jm12-20020ad45ecc000000b0062377075650mr23633732qvb.15.1684859856721; Tue, 23 May 2023 09:37:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684859856; cv=none; d=google.com; s=arc-20160816; b=kDADZcaNn1TeFSEBPdWimUyn2N5Qci04BtncvZ/MNyYpqtRtHEDRf4LuOe0hDMiFBF mwW/5yXDXuQfloGXmcN9hIxok3nfLJ27GlJh+MO12ZU62eqxaP7xUakyGFHCxMR+mnBi V8DlejE86I2925TNNKQuLEmwKyO/31q6Bkox3NZvcAJEXzrQCbYZK+lCXvFr2Kbv2AUu npE3N5nAQA374i69w792o0WktWXizxr8XZ0xBJZtyCE4Q0Kc7Aq1XJwr2uidCPhHcsQ0 svvIwplkgOlb8bvEj00la8BQPGvDu8dKQnZUPHpEPJ7nZEtpBHUfAGrDKfLt2CYQVDDH 5gxg== 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=luIo+lkzsxjF6N0yYuJHc36ZlG6WILVPK31glw0xKRo=; b=w9Ff81XLG4MXZ9mATR1TqerdrPwCxXa6ZiSiUuTPAEHNKrneMwpHpp4efLx4azaR5i ZSpy7IYYBFo+U3JJNDsS/3EgRvRtXegYBSq8Y46wQrmSW4PecWUpB1bOiFWK0E29sKYV L9QcNh1Hg0h4akqpmlUzZUD5BKpRLgC8XXbl2UJDRGYsgEGpJ4E2y5sKEHU7OaTd0gyb TYrunfUc/3TEQcS2Fxkpa9WrmcQ56lmvdQQytVUoMCaVZjvxxQsp4GgjiLvLDakIYruK SOENUvbwqbcIZOmLAcfj1ty4dJy+3i6xIinVJvwB6gmnFBvk+aL5PrkQ6d580FOy5DOZ JUEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tE2UUXBm; 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 w11-20020a05620a148b00b007593e9526a8si4993855qkj.162.2023.05.23.09.37.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 23 May 2023 09:37:36 -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=tE2UUXBm; 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 1q1V0U-000285-N8; Tue, 23 May 2023 12:37: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 1q1V0O-0001um-D8 for qemu-devel@nongnu.org; Tue, 23 May 2023 12:37:01 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q1V0L-0001lQ-HA for qemu-devel@nongnu.org; Tue, 23 May 2023 12:36:59 -0400 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-3f608ba2e06so677465e9.1 for ; Tue, 23 May 2023 09:36:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684859816; x=1687451816; 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=luIo+lkzsxjF6N0yYuJHc36ZlG6WILVPK31glw0xKRo=; b=tE2UUXBm33oIEe0XEpblnEM7JzqV9XCjQZzyhAePMlEpUCE8g0uZ4fX7XKqdfJjMeu ap8q0QFIm028KDEAiIJ0UuEochkCJEqulDwrgB0C3icbbcGFjDW3OU3mbc6dzrZF5skZ 3SApBPNYaw74iz5ByolZFX2/7HnpvNBDv1O7Q4iTULtVNlrTRuIQuTOe+VDijtfOtlZQ SzQTjQC81vME0XSgkFBEVjjkjBef1OztSdfu56R7FQU8CcTN+RjiHxRQ4lPGYXh6lny0 ANfd+uxmwohIsuePF8koaVsMIEgjYe9FymbzOaw7eZXAfAz5rIY40P1DXzLON3KLVt9o ufgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684859816; x=1687451816; 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=luIo+lkzsxjF6N0yYuJHc36ZlG6WILVPK31glw0xKRo=; b=MwvtPwztUC4vqZ6/Gqif/bIDSJOfO9081Ae8s/exwRigiPblC2pWqoGQ1sEvcC3Ig5 SHJmjIV8IPhtgKBIx1DArqpVm3RsprgBbn9R2HafzlgkpUfc+IvTxAZfRvkp1zZwVyhx WJho56pvaqFGCDeP/QVDQDSl78lpRIyNxK78yO7UXXFCVN4eSwwUuMkrkCQx3GnVOteY DtnndDk+LizA3BwfKTqyom5wrbWWrRSTHxOl/0bq6rwzxFbmxleJuShaGelOqj5zYUAP g0GN2Ou0venKyPGaO4pqhrWYvjYbQV75v3ZkB6c6HJmKXjEr4Vvt5XPnyAkol2jikkXk oEVQ== X-Gm-Message-State: AC+VfDwXGTBcxwtKtye+HwZ9uC+UbnSOPBaBhA5WXg3H/+WFuqGlhw8j GJ8/0eMTS0VL1qbC9GaTFDeK7k+VAkCHehl9nTE= X-Received: by 2002:a1c:6a04:0:b0:3f6:c8c:7048 with SMTP id f4-20020a1c6a04000000b003f60c8c7048mr2002074wmc.20.1684859816021; Tue, 23 May 2023 09:36:56 -0700 (PDT) Received: from localhost.localdomain (vil69-h02-176-184-48-94.dsl.sta.abo.bbox.fr. [176.184.48.94]) by smtp.gmail.com with ESMTPSA id t20-20020a1c7714000000b003f606869603sm5993391wmi.6.2023.05.23.09.36.53 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 23 May 2023 09:36:55 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Raphael Norwitz , Peter Xu , Halil Pasic , Thomas Huth , "Gonglei (Arei)" , David Hildenbrand , Christian Borntraeger , Paolo Bonzini , "Michael S. Tsirkin" , Kevin Wolf , qemu-block@nongnu.org, Eric Farman , Fam Zheng , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , Stefan Hajnoczi , Hanna Reitz , Cornelia Huck , Eric Auger , Ilya Leoshkevich , qemu-s390x@nongnu.org Subject: [PATCH 08/11] hw/virtio/virtio-iommu: Use target-agnostic qemu_target_page_mask() Date: Tue, 23 May 2023 18:35:57 +0200 Message-Id: <20230523163600.83391-9-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230523163600.83391-1-philmd@linaro.org> References: <20230523163600.83391-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=philmd@linaro.org; helo=mail-wm1-x32b.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: Thomas Huth Reviewed-by: Eric Auger --- 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 Tue May 23 16:35:58 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: 685003 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1824800wrt; Tue, 23 May 2023 09:37:35 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ74/UpBOW3UxPEQhe7EX69Rs/XmfxbRZCcPK7oP9ABS78ihTxB3I2MGhGCTS+8jmOunHPwC X-Received: by 2002:a05:6214:27cb:b0:5ef:6839:9775 with SMTP id ge11-20020a05621427cb00b005ef68399775mr19247925qvb.49.1684859855283; Tue, 23 May 2023 09:37:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684859855; cv=none; d=google.com; s=arc-20160816; b=ncDD1hJQcNAuy1YGP3GvVbseYQ0AwhHRkXxw1dZKY/vKCiJvbjhTBVdF1INVDX8f4P HJhRyqa8SLIR8stJuMw2EExXSzTr+eGMFEXgONXVK6d8csCVUCQvF/mshkhbMTgcMZJT 4Hhu7S6fcZPeZ+pUU1SmGblxIgsFQ9TsTpe94u5SUFnzh9hequO+b7qz8dB9bcU3gWXi DtIWjuO0MW5naKC5mzHY1DkcGB3nLhl3A9RPnZOS/PT1ByrOGxIa/sqKnjNZ6byU4io4 Uo7l9j8+x+vLBYshK69ZzfodzSat2pK+v2km3SfeOVIIeYCnC4UsEg+0dflPiw20TVCP 7R7g== 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=0T7+I7Nt03mZOG+eb8PyXOgF6bp5b6vfbKpMq74pjVQ=; b=vEzQ275qMlMdNnZaeWho9+up+fStg/7ueniyWVU+1GKvLFyOGwDS/+vFGaJOktLj0F XsAS2wPOe3zR2EPBIS3v3Tv3GafYYAVBgrLjsEcCMRa23ErMZZl7TfhbkHflpH6U2LBq xjkBvUyz9UHvn4FzOwBYJe5UvrifEEGd60dn2Qzli+6UzyTjDFjDNYuT+ihQ5uzedGbO xvz1CHHm4/oRvh1LUEVduiIeMfGtD2ymCJr1R0/uMFYj3jJCkAGD7vmfCX6FVm0hCT2d HKFnBVbIHaX2i7+y6KmfpvW84Oi0MvMxuiE6xgvT8l1NG/IAt9aIS3jPEbcApue8+szj Ja+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="mW/EtuZv"; 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 w10-20020a05622a134a00b003f0a2ea8f7bsi5695801qtk.304.2023.05.23.09.37.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 23 May 2023 09:37: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="mW/EtuZv"; 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 1q1V0Y-0002xA-B3; Tue, 23 May 2023 12:37:10 -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 1q1V0W-0002Tv-2R for qemu-devel@nongnu.org; Tue, 23 May 2023 12:37:08 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q1V0S-0001ms-O5 for qemu-devel@nongnu.org; Tue, 23 May 2023 12:37:07 -0400 Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-30644c18072so4944271f8f.2 for ; Tue, 23 May 2023 09:37:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684859822; x=1687451822; 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=0T7+I7Nt03mZOG+eb8PyXOgF6bp5b6vfbKpMq74pjVQ=; b=mW/EtuZv4W6001tLtSX2WPjW8IAYKZazArxGHYy77DxAqvlEl07mxiNsTk9zVEBtQk yDPEdjHJoM4K5LcGpAnYYKUR6qavOWv3BfbfSCX102hdMOSs6iBdG/lVlQ3aQK9TDJjS UbMNoKUoHIVZW8js86ez3cbOYU9jtEmp3coUG5WQHmkdoq3TcwxQBaq7k5XgsyrfNntM apTEF105NCkpZJpMbQIdssoQ3V2e3NUTFNHnKwrUB3r2E8Zq6sWi0XxOraL7GtwJA/n2 PlSluFqIBymXo8xbffrwvMeluL0flFJwd1aUVbeEeyCpteCT+DKBcIknicUTkHBpiDbN Rg1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684859822; x=1687451822; 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=0T7+I7Nt03mZOG+eb8PyXOgF6bp5b6vfbKpMq74pjVQ=; b=OeQ66s7qLPzAQvnEs9CFDPHSxVRJeQkRuSJMI5f/FPxViRmCcEVsZ+NZho8WgLiGUf KudldMUh90MS0i7xdYY6XOz1lCInI6nxo8DjNe1zolq8YvReDxjmh5VrvMfHzvJbOHOo DglcKcWIL2VkSKzLW1csgBgAF4VgL5TskAiA0Qmu80MnIr0MzBmaaJ7h4K/aB3EWomlc ZupPwRFpzQOcRItAzJe1FFGRJFnGLeXCsDjtIFj456bcatX6EhssEw1KAeBkSDe7Rr/D p7Jr1lTPQaOiH6K2zWDM+/90uzox1RzM9/NESSdIEVvOrPQctW+moja9Gx0eKpDrNvx4 h2+Q== X-Gm-Message-State: AC+VfDyGllSKAWcz8Sbv9bSYq+VuiUcCiJVDwjmF+fSa53h9WQKGjoB4 9rTbEYQgSw3QboYEeg+0WoYihM92y4PajbYoRIQ= X-Received: by 2002:a5d:40c4:0:b0:309:43a2:8e9f with SMTP id b4-20020a5d40c4000000b0030943a28e9fmr10539092wrq.27.1684859822796; Tue, 23 May 2023 09:37:02 -0700 (PDT) Received: from localhost.localdomain (vil69-h02-176-184-48-94.dsl.sta.abo.bbox.fr. [176.184.48.94]) by smtp.gmail.com with ESMTPSA id f12-20020a5d58ec000000b00309257ad16csm11648022wrd.29.2023.05.23.09.37.00 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 23 May 2023 09:37:02 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Raphael Norwitz , Peter Xu , Halil Pasic , Thomas Huth , "Gonglei (Arei)" , David Hildenbrand , Christian Borntraeger , Paolo Bonzini , "Michael S. Tsirkin" , Kevin Wolf , qemu-block@nongnu.org, Eric Farman , Fam Zheng , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , Stefan Hajnoczi , Hanna Reitz , Cornelia Huck , Eric Auger , Ilya Leoshkevich , qemu-s390x@nongnu.org Subject: [PATCH 09/11] hw/virtio: Remove unnecessary 'virtio-access.h' header Date: Tue, 23 May 2023 18:35:58 +0200 Message-Id: <20230523163600.83391-10-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230523163600.83391-1-philmd@linaro.org> References: <20230523163600.83391-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=philmd@linaro.org; helo=mail-wr1-x42c.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 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 --- 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 Tue May 23 16:35:59 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: 685010 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1825202wrt; Tue, 23 May 2023 09:38:22 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5ftU9thZ9lZfYeX6ZsdvOWWc4nPNALkIk1sjLFI+OnX7mC2b5VGXOo7bXIA4TGFTekn6Hr X-Received: by 2002:a05:622a:1654:b0:3f3:8b74:dee1 with SMTP id y20-20020a05622a165400b003f38b74dee1mr22870304qtj.43.1684859901267; Tue, 23 May 2023 09:38:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684859901; cv=none; d=google.com; s=arc-20160816; b=HTXIDMTfa/aEw1RiUcyjJi9P91W5I1EhopDrQSirWgyetXgCmGK48o4jTfzolQXluX SGHq5neOcgC5QUG5G8UawoHjD1mgwNIgomU6KD1vqKII2uhOkNvvP4iXu5sC+K2/KoSS i/WrgLd/8knYWbiSXghfauauvgTwgFelbybSoy+Z+o9YHrvKY2KbMvsRJa2LHYBTbQuD yAl6nIPCPCVdGzeV2337SWwhupOjrMfQ+T11X9PtkcdXbeXLewaSDeL/C/VwNTozapSM bZrBkGZGlA8GCbG1ULkmzdqR+Pr+j0XL8dJ88pYat2nTxdzF6ht/vIMEXiEVfTRuDsQC qHmg== 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=jOy+bpjsejzgIsMY1OLxW7QAM00Xe6+x59PGJ+hgH1E=; b=gEZhKadKE+nJz3ZEcBcdyS6E3BHf2hPkLTwagDSP7wq8GlMOIZzpZ8yRgIfHMTKtV/ n/DiO8U3WT8XfvIPpLx4SSZeS+r0rPqcfjQoks8Pcb5CPurF+TG+r72exYW34djMALSb Gsf7k8ZmYNRYa+BXIIulO78UOjDOccQcHeQjDcE1ONkg6CM/iZo9UDiJyvvQzh3swc2S TtompMy1UDax3idqg15Q78IlE9LFEOpSK20V+Jm5MM5Bj4fLAy70IEzcnv6QgJFFzgas oFk2fnnTclvOpcFiUZxyfXEWJb0huYYkaCu0ld6gwNpSVuKwnZklzGgxpI86ZPLALjTv vj1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zV1yNfES; 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 15-20020ac8570f000000b003e6321d9045si5442078qtw.465.2023.05.23.09.38.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 23 May 2023 09:38:21 -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=zV1yNfES; 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 1q1V0d-0003bz-Tw; Tue, 23 May 2023 12:37: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 1q1V0c-0003Ye-CI for qemu-devel@nongnu.org; Tue, 23 May 2023 12:37:14 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q1V0a-0001ns-0S for qemu-devel@nongnu.org; Tue, 23 May 2023 12:37:14 -0400 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-3f603d4bc5bso423745e9.3 for ; Tue, 23 May 2023 09:37:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684859829; x=1687451829; 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=jOy+bpjsejzgIsMY1OLxW7QAM00Xe6+x59PGJ+hgH1E=; b=zV1yNfESHvrbx1agacksVxD2eLAG/q/hcFrusyvAxnJeBaJD2nmfjFfx3Lb998fZNT fKIwI0tPG9ziotHJnpDT/pNCpv1e6PycHAOPhBO6ftGMm9PrG9IyQNES8cU6CMN/FGKm 4Kd43uib7dcdXQIUA4SSbYuNaII+XNbbIuD2kkUY9PlXBWQdNdx3o6nPX8Uie1LNsdIh EQAiu4q3nNKCzOx16GW8CCw9etZeuovr5U0DupzNTLMvfQl7fNB51RKvRMR01V2Gztko aqEHIl4wOg6H5qXmDMyu/geWNWtbZfmz76wwIgk2n/cFuzGYX/1fWUrQ+9+8SbGL02zB jFzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684859829; x=1687451829; 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=jOy+bpjsejzgIsMY1OLxW7QAM00Xe6+x59PGJ+hgH1E=; b=V5sYQ9GtqGf5aTe+nkYEkWcXcnGgSaIHdVGre3FgFK/Gla7SD1uLB456XzoUN6Hjz8 xF8xRbPYrirU+WX6J5G6JiJ3zWpQpQv0nVaV5Ho7dVZSSWujWXHtXGxOYyeAAulFCEFc hwXH66oNmJIn4/LZZcPdDBM35Ed3LSHtxvxtXf+09HrT53MrBxWtKYRTggw5CW8ZoN3y psIa+j5/HUBRLOXpjF7GiSG2TNfWci1rM7WeWpgUNnrOzkxYLZnFA13OneDzxGGNJTI9 qKpD7EKhlMABxz19NLH4gHQ3bkdSrdA/3uV4t4gD0vmcCP0TjmMMMeLWDKchNY/Az16f PCxQ== X-Gm-Message-State: AC+VfDzhN9JblPYjSyjhXYvqgJDAYuavaVIUn+RzXCsqZQymHe5h2+gl k6T+oYk3sIxAUgWO0eIf6F+qGqy2smsW0n605Rc= X-Received: by 2002:a05:600c:245:b0:3f6:7d2:9859 with SMTP id 5-20020a05600c024500b003f607d29859mr4117636wmj.6.1684859829155; Tue, 23 May 2023 09:37:09 -0700 (PDT) Received: from localhost.localdomain (vil69-h02-176-184-48-94.dsl.sta.abo.bbox.fr. [176.184.48.94]) by smtp.gmail.com with ESMTPSA id f8-20020a1c6a08000000b003f606c4ad33sm5816462wmc.32.2023.05.23.09.37.07 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 23 May 2023 09:37:08 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Raphael Norwitz , Peter Xu , Halil Pasic , Thomas Huth , "Gonglei (Arei)" , David Hildenbrand , Christian Borntraeger , Paolo Bonzini , "Michael S. Tsirkin" , Kevin Wolf , qemu-block@nongnu.org, Eric Farman , Fam Zheng , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , Stefan Hajnoczi , Hanna Reitz , Cornelia Huck , Eric Auger , Ilya Leoshkevich , qemu-s390x@nongnu.org Subject: [PATCH 10/11] hw/virtio: Build various target-agnostic objects just once Date: Tue, 23 May 2023 18:35:59 +0200 Message-Id: <20230523163600.83391-11-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230523163600.83391-1-philmd@linaro.org> References: <20230523163600.83391-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=philmd@linaro.org; helo=mail-wm1-x333.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 d88f7450e8..12a1ca644f 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,13 +16,16 @@ 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(when: 'CONFIG_SPAPR_VSCSI', if_true: files('spapr_vscsi.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) softmmu_ss.add_all(when: 'CONFIG_SCSI', if_true: scsi_ss) specific_ss.add_all(when: 'CONFIG_SCSI', if_true: specific_scsi_ss) 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')) From patchwork Tue May 23 16:36:00 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: 685004 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1824805wrt; Tue, 23 May 2023 09:37:36 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4XOICjNBn3rdMNVpcXT93gUwb8wX+gEf5F72X9QGmyOPlSwOileYGRHgjB2OG8oIMkkAlE X-Received: by 2002:a05:6214:d8a:b0:625:7802:f382 with SMTP id e10-20020a0562140d8a00b006257802f382mr9323091qve.50.1684859855794; Tue, 23 May 2023 09:37:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684859855; cv=none; d=google.com; s=arc-20160816; b=GiT78+wZqi+s4Wi/5RXr5k/9kMc0KiJGG3mNAgWRaL3AkQcUUzzDyCKqoKkKm6A/J3 5hKNHuulw9dQx9pIccpblB8I8MYD2gM/s6+q5dW7uhZzm9BXpGrmDBQp1KVKavYkzqOw j/RmeZaO/4fpUvw0RI8CBSwiCHYRXNbpEMjIuV84AAfkztiYJFMDFK3VcZVw7/ZGY7ra BrwtS2H9ZUGEB2cZKhkOm8vMJ8PM19EhSu0CLRANIRk+zKBYuaaYP6jBDgaUXZ4AkH+R 9uoXXXrUMyBbjzfbBs2Rf4cqtiXtCIpRTpwJBtL45Wv+3IRbHBvRN6r4pP9pxHSfPl5I T1BA== 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=nVars2hcHXmfzOaUijNnjb/uP3QrA6j+f0+XOdMOWuA=; b=FuxowhKitkT5reAbctlR7AZoYrPBbt0DrFSN3hf2vpMD4lUVeqxStv1s38rIZwxM5W e4ZAehY45B0y4yq7ydPdWZSH4nSLx+5AKTmn6g2+813x0U22Uz1zHR1z+Yzqx9U/ewyz ouIYvcHqo1R3Xr0875UTGZ2YrAdwc/rqAoPVfY/R9d/Z02igyJFnMmCSdGlI5fS2A1lp 2GlUEgp/3nr20PWsXzeFToFKF9An1Hd8CKxVxrpH2HwAnWB6FNH/XG6DLLUvu0+TRGWy z0dcw2AY/VjiKROjt1O4+UEPslRDEzGqRYBbeaJwuOHtPmtzozq19RzFVCz5AD570kqU 8qPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pIB+0FQc; 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 gc9-20020a056214230900b005e869240425si5356209qvb.300.2023.05.23.09.37.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 23 May 2023 09:37: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=pIB+0FQc; 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 1q1V0i-0003s4-UC; Tue, 23 May 2023 12:37:20 -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 1q1V0h-0003nO-4P for qemu-devel@nongnu.org; Tue, 23 May 2023 12:37:19 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q1V0f-0001p4-CK for qemu-devel@nongnu.org; Tue, 23 May 2023 12:37:18 -0400 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-3063433fa66so4845396f8f.3 for ; Tue, 23 May 2023 09:37:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684859835; x=1687451835; 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=nVars2hcHXmfzOaUijNnjb/uP3QrA6j+f0+XOdMOWuA=; b=pIB+0FQclVihJoQQAR3rBWyPzHTIIQts36rTOrBW/T1AEVAk6ZfQq9LyMnJIGZKw2H uPmZAd7KHcbCyPEzSTnrwOuJDoorql8y+LMxEErZY6AGBZHFFaokV7rc02BBpX3m5+MC rTDVBB4SQS50eKcYozU0PZaDJ1Fy/ecVWsj5Lu/FTP4lkOdKM2J+Kj27vVgoK0z6jOSp 3Xhmh+Uw3zpw/61KcNaEE+s5TnxgnXWZ15MRUlfewF1HBuRuySCzCIpA42PcEBG9nKvu CFASc5BXp8DTGq6QEPEVmgBXgvFJl4bDKzyTzDwm4+yKKFlenP9zmG0z/Jlv2AJSo0IB 8z3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684859835; x=1687451835; 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=nVars2hcHXmfzOaUijNnjb/uP3QrA6j+f0+XOdMOWuA=; b=DMK7YI8SutmK/tzPM8IZXNjwMKAk8ecmSZYroJvOPh/Z9o5io8CIhFVGWfeWo1Jj6g bwVnYnJcOr3+5t+N2KVjLzGGxRs5APz0troObXlXx42/woscx0LFgaHedpx9qL1U/keD 9aA5jG7Kp5PjfaDrtWud8ZtowEmiqAkMpbUa/fKw1l4p2DtxdfyBAgXfpW1Y5wEbYtvi OMuqgLO7RH4On2LnsHKAHMddoejMekESQQc4XQJuBoBpilbuL8Pcb0rvJZ9W939wu2XM 4RC/QZrprbsEayXezcoyi5t+cWc+i5+0qnieJ7qkRc/TI3BUvuOmD90Z1ZlajWZMKkoO Id6A== X-Gm-Message-State: AC+VfDxGvhKkWKAmnD5drCGmXcNLVrBJEnLq4NQI7kM/nzXXxy6MdYnk iKXngpfQr9lODJoTsV1h4VpRa/NGrpHneSPM+1Q= X-Received: by 2002:a5d:6a09:0:b0:309:48b9:977b with SMTP id m9-20020a5d6a09000000b0030948b9977bmr9886121wru.22.1684859835749; Tue, 23 May 2023 09:37:15 -0700 (PDT) Received: from localhost.localdomain (vil69-h02-176-184-48-94.dsl.sta.abo.bbox.fr. [176.184.48.94]) by smtp.gmail.com with ESMTPSA id f18-20020adfdb52000000b00307d20546e6sm11831219wrj.27.2023.05.23.09.37.13 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 23 May 2023 09:37:15 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Raphael Norwitz , Peter Xu , Halil Pasic , Thomas Huth , "Gonglei (Arei)" , David Hildenbrand , Christian Borntraeger , Paolo Bonzini , "Michael S. Tsirkin" , Kevin Wolf , qemu-block@nongnu.org, Eric Farman , Fam Zheng , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , Stefan Hajnoczi , Hanna Reitz , Cornelia Huck , Eric Auger , Ilya Leoshkevich , qemu-s390x@nongnu.org Subject: [RFC PATCH 11/11] hw/virtio: Make vhost-vdpa.c target-agnostic to build it once Date: Tue, 23 May 2023 18:36:00 +0200 Message-Id: <20230523163600.83391-12-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230523163600.83391-1-philmd@linaro.org> References: <20230523163600.83391-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=philmd@linaro.org; helo=mail-wr1-x42e.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 Replace TARGET_PAGE_MASK -> qemu_target_page_mask() and TARGET_PAGE_ALIGN() -> qemu_target_page_align() so we don't need the target-specific "cpu.h" header. These macros are used in the MemoryListener add/del handlers (vhost_vdpa_listener_skipped_section is only called by vhost_vdpa_listener_region_add) which are not hot-path. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- hw/virtio/vhost-vdpa.c | 16 ++++++++-------- hw/virtio/meson.build | 3 ++- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c index 3c575a9a6e..a51497aaf1 100644 --- a/hw/virtio/vhost-vdpa.c +++ b/hw/virtio/vhost-vdpa.c @@ -14,6 +14,7 @@ #include #include #include +#include "exec/target_page.h" #include "hw/virtio/vhost.h" #include "hw/virtio/vhost-backend.h" #include "hw/virtio/virtio-net.h" @@ -23,7 +24,6 @@ #include "migration/blocker.h" #include "qemu/cutils.h" #include "qemu/main-loop.h" -#include "cpu.h" #include "trace.h" #include "qapi/error.h" @@ -35,7 +35,7 @@ static Int128 vhost_vdpa_section_end(const MemoryRegionSection *section) { Int128 llend = int128_make64(section->offset_within_address_space); llend = int128_add(llend, section->size); - llend = int128_and(llend, int128_exts64(TARGET_PAGE_MASK)); + llend = int128_and(llend, int128_exts64(qemu_target_page_mask())); return llend; } @@ -321,13 +321,13 @@ static void vhost_vdpa_listener_region_add(MemoryListener *listener, return; } - if (unlikely((section->offset_within_address_space & ~TARGET_PAGE_MASK) != - (section->offset_within_region & ~TARGET_PAGE_MASK))) { + if (unlikely((section->offset_within_address_space & ~qemu_target_page_mask()) != + (section->offset_within_region & ~qemu_target_page_mask()))) { error_report("%s received unaligned region", __func__); return; } - iova = TARGET_PAGE_ALIGN(section->offset_within_address_space); + iova = qemu_target_page_align(section->offset_within_address_space); llend = vhost_vdpa_section_end(section); if (int128_ge(int128_make64(iova), llend)) { return; @@ -403,13 +403,13 @@ static void vhost_vdpa_listener_region_del(MemoryListener *listener, vhost_vdpa_iommu_region_del(listener, section); } - if (unlikely((section->offset_within_address_space & ~TARGET_PAGE_MASK) != - (section->offset_within_region & ~TARGET_PAGE_MASK))) { + if (unlikely((section->offset_within_address_space & ~qemu_target_page_mask()) != + (section->offset_within_region & ~qemu_target_page_mask()))) { error_report("%s received unaligned region", __func__); return; } - iova = TARGET_PAGE_ALIGN(section->offset_within_address_space); + iova = qemu_target_page_align(section->offset_within_address_space); llend = vhost_vdpa_section_end(section); trace_vhost_vdpa_listener_region_del(v, iova, diff --git a/hw/virtio/meson.build b/hw/virtio/meson.build index 16e64e1cf1..c29be98ab0 100644 --- a/hw/virtio/meson.build +++ b/hw/virtio/meson.build @@ -18,7 +18,8 @@ if have_vhost specific_virtio_ss.add(files('vhost-user.c')) endif if have_vhost_vdpa - specific_virtio_ss.add(files('vhost-vdpa.c', 'vhost-shadow-virtqueue.c')) + softmmu_virtio_ss.add(files('vhost-vdpa.c')) + specific_virtio_ss.add(files('vhost-shadow-virtqueue.c')) endif else softmmu_virtio_ss.add(files('vhost-stub.c'))