From patchwork Sat Jun 24 14:22:11 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: 695708 Delivered-To: patch@linaro.org Received: by 2002:adf:e885:0:0:0:0:0 with SMTP id d5csp2435887wrm; Sat, 24 Jun 2023 07:23:03 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7fpiTuRX1Q1brxuM6mvAhSbA/EMjSC7SxFppLGnsa7hGQ/BNPi6aTEpuikwDV+A5PoVIYe X-Received: by 2002:a05:622a:151:b0:3ff:1fce:e9b9 with SMTP id v17-20020a05622a015100b003ff1fcee9b9mr18693082qtw.4.1687616583394; Sat, 24 Jun 2023 07:23:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687616583; cv=none; d=google.com; s=arc-20160816; b=B1eHGWmgo+SaGUA2VWicSYm5OvERJGCFyS5n1HwHk1h/MyxRsdehy612tlnG4hHuOZ JgmW7dGfvflY86FdUWjrTfvQcLn0MfO2v6SoEoTLG+VgXtoQQqvfBLBiLDclJrRMWIiW ZZ0cbXbqbzX5xSnqBmFzjTIXgFezXIBBjz06j/25ZNZi69NEgMMBSdLkS6MGFPorvp/h F8TXR8Q80kOt1tyEjYHB5ULv9qT4LyD83k7wOhcbP8XqmTRwohckiaDlZfZHQ5emY80N /c2Kd/wNxzv7m9KU4xwUMSC5DlU9iKOdhLZMUanxUIPlskQJxh4ujl40nJI9S7vn4UB5 SAOQ== 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=K7EMtxFF9Wpxu9VU5qA4LydL//qFFaOHuvM5w/0z3TE=; fh=EVGecUrE39++e37FI11GDT4EvpQZRM7BkCvq/Z7y/cA=; b=HgJSvxjitCZBEiBLN0i0n4CEaUmPT4QbI1leIOXaT1/P5+irhNfOXTqiAhDl2yI6uK 4bLGVvnkkUqNGh77PbhLLyINI4tOO3ALJkwzO8WuQVcKt/BMwzhs+EinTIHCjTm9KRG/ hlw4xOzlELDEoHSIA1wyhKt8ivIdfaeVqL1m0OqrKElpMkicfLsk+HohiksvAkv+ztMQ 5geRJJ6j/bgTh2iQD3BFIYC3eWuEbyrbKuZCqy94s3oF4yiqeSSSAj55EMFODUqa/ckq 0jvoNw1knvfHHvnHRVg3LVUFgHsDK82JXmzLXawwjvbVBkXZ7Tgc+SuFAaXrJpo22oHa DAZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HTc22k8D; 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 k15-20020a05622a03cf00b003f9cbffd5c9si489936qtx.540.2023.06.24.07.23.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 24 Jun 2023 07:23:03 -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=HTc22k8D; 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 1qD49t-00020V-3w; Sat, 24 Jun 2023 10:22:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qD49r-00020M-GL for qemu-devel@nongnu.org; Sat, 24 Jun 2023 10:22:35 -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 1qD49p-0007D9-SO for qemu-devel@nongnu.org; Sat, 24 Jun 2023 10:22:35 -0400 Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-31272fcedf6so1498139f8f.2 for ; Sat, 24 Jun 2023 07:22:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687616552; x=1690208552; 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=K7EMtxFF9Wpxu9VU5qA4LydL//qFFaOHuvM5w/0z3TE=; b=HTc22k8Dy9heu4HAjuh+ZE0w6E4r8l1lO6BG98vvIH9vSyjzTiagteRGqR7P5wigQw yLWnsu6Nol6XFAP1UcIWeMq/EJMYqP0fXB0HXWgpt+u5KgmsfTVIW4HitvQoIVcBJ7Vy jAGbECvkrikgNXyDSs6y3QLGagM0zi93DoGHtOuAwobPg8Jd78uch/ddaHZTTimLcdyI 6JxvITVSwK7Vd59V5KyOkdxAjrzM/gDh0dr+xFWddQBpzaP5DOmZ5+cW3eSRhAUCMjid i5dg5vczrHshQlZQSa0tgUiRfCWDQBxMzoIhwTkgYeBm91hrUqfvZxCC6o4m8vbrF8Cn cEPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687616552; x=1690208552; 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=K7EMtxFF9Wpxu9VU5qA4LydL//qFFaOHuvM5w/0z3TE=; b=ZSbD1btHi08EFYlamt56fNR6o2w9wOehPA9787fy5itS8957TNwvLhn74JLxBBs9tE P7Z/7kUXIo0NFqFsAmUtmB0FhV4YsJXwDHexpOhev2l3PYb7PD4BPqVTaze8hVoPGhwu VCwkxKDYth7+J1TKdodvBsulTQ0ERAGQa0AEDb9zzXDlqj1S/j+8oOexdThaqNxvT/WV WiM5aivVaxAR5O6xEiCsDwkDjLatYBPax2MzKI4B7fqA193pZtTA5TGckqG5/+a/Urxn E7v38UBvCpCiHwFFzK8wMrnEnEUCHe0Pax6rp2pjCESUgzWwb32XZ96sawj/WR8OuU0c aQCQ== X-Gm-Message-State: AC+VfDz9PFxYmumADpALwR4yzeKyiZbHKgjITegMwkBdj2m5TC9cus7y HUDmDoxMO6JJNZT9FqOeSdwAiHsVIJbw3gcqjNxjng== X-Received: by 2002:a05:6000:184:b0:309:1532:8287 with SMTP id p4-20020a056000018400b0030915328287mr5342847wrx.19.1687616552185; Sat, 24 Jun 2023 07:22:32 -0700 (PDT) Received: from m1x-phil.lan ([176.187.217.150]) by smtp.gmail.com with ESMTPSA id w7-20020a5d4047000000b003063772a55bsm2225964wrp.61.2023.06.24.07.22.30 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 24 Jun 2023 07:22:31 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Sunil Muthuswamy , =?utf-8?q?Philippe_Mathieu-Da?= =?utf-8?q?ud=C3=A9?= , Paolo Bonzini , Thomas Huth , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Wainer dos Santos Moschetta , =?utf-8?q?Marc-Andr?= =?utf-8?q?=C3=A9_Lureau?= , =?utf-8?q?Alex_Ben?= =?utf-8?q?n=C3=A9e?= , Beraldo Leal Subject: [PATCH 2/2] accel: Re-enable WHPX cross-build on case sensitive filesystems Date: Sat, 24 Jun 2023 16:22:11 +0200 Message-Id: <20230624142211.8888-3-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230624142211.8888-1-philmd@linaro.org> References: <20230624142211.8888-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=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 Since MinGW commit 395dcfdea ("rename hyper-v headers and def files to lower case") [*], WinHvPlatform.h and WinHvEmulation.h got respectively renamed as winhvplatform.h / winhvemulation.h. The mingw64-headers package included in the Fedora version we use for CI does include this commit; and meson fails to detect these present-but-renamed headers while cross-building (on case-sensitive filesystems). Use the renamed header in order to detect and successfully cross-build with the WHPX accelerator. Note, on Windows hosts, the libraries are still named as WinHvPlatform.dll and WinHvEmulation.dll, so we don't bother renaming the definitions used by load_whp_dispatch_fns() in target/i386/whpx/whpx-all.c. [*] https://sourceforge.net/p/mingw-w64/mingw-w64/ci/395dcfdea Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé --- meson.build | 4 ++-- target/i386/whpx/whpx-internal.h | 4 ++-- target/i386/whpx/whpx-all.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index 6ef78ea278..fc3c14a810 100644 --- a/meson.build +++ b/meson.build @@ -661,8 +661,8 @@ endif if get_option('whpx').allowed() and targetos == 'windows' if get_option('whpx').enabled() and host_machine.cpu() != 'x86_64' error('WHPX requires 64-bit host') - elif cc.has_header('WinHvPlatform.h', required: get_option('whpx')) and \ - cc.has_header('WinHvEmulation.h', required: get_option('whpx')) + elif cc.has_header('winhvplatform.h', required: get_option('whpx')) and \ + cc.has_header('winhvemulation.h', required: get_option('whpx')) accelerators += 'CONFIG_WHPX' endif endif diff --git a/target/i386/whpx/whpx-internal.h b/target/i386/whpx/whpx-internal.h index 06429d8ccd..6633e9c4ca 100644 --- a/target/i386/whpx/whpx-internal.h +++ b/target/i386/whpx/whpx-internal.h @@ -2,8 +2,8 @@ #define TARGET_I386_WHPX_INTERNAL_H #include -#include -#include +#include +#include typedef enum WhpxBreakpointState { WHPX_BP_CLEARED = 0, diff --git a/target/i386/whpx/whpx-all.c b/target/i386/whpx/whpx-all.c index 0903327ac5..9ee04ee650 100644 --- a/target/i386/whpx/whpx-all.c +++ b/target/i386/whpx/whpx-all.c @@ -31,8 +31,8 @@ #include "whpx-internal.h" #include "whpx-accel-ops.h" -#include -#include +#include +#include #define HYPERV_APIC_BUS_FREQUENCY (200000000ULL)