From patchwork Tue Jul 2 05:01:08 2024 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: 809039 Delivered-To: patch@linaro.org Received: by 2002:adf:a199:0:b0:367:895a:4699 with SMTP id u25csp44252wru; Mon, 1 Jul 2024 22:04:12 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUo7vvDYNz81HKG5jE7AeQWwBRqbn8t4lUAtLba0f+gHmRDzCxW/Vnu/btrUrScpdK9bolJhtHju7emd5jS0Gqq X-Google-Smtp-Source: AGHT+IHN5pZ7e1UyAdbraBrxmiK8SdB6dJEePEbqN5MYCO2zX2gzdL3KvGaWyq/3WthFBh7kBOIZ X-Received: by 2002:a05:620a:881:b0:796:783c:3c29 with SMTP id af79cd13be357-79d7ba14a23mr761671685a.38.1719896652461; Mon, 01 Jul 2024 22:04:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1719896652; cv=none; d=google.com; s=arc-20160816; b=wm5DS+k+ZHq09m0iEC3yq/UZubPQqunNL6jVOJIrF7o0YYkBSYfHkFvbfwKDJtcURc nW9iWFYcnwiQpytIUHLOSvfih7MpkGEYrvtYcqZ88OuojUzYIekg2EHuMzrS8xHZz9Y3 ZsNi/CRz04ofK3vV4U27sAePtvLGlCnD+Qa6NGuao89PGGHljYjNuQq+wFoVK9GP3Kx5 yBP6V5ww6PYSCPF9O2SJfd4d81YHirIgj+tjCoLhTUOcemJBoNs2EVT517Ac1VJEBLWR Wz8fJt+mmCkK0dC+Zzy0ZFcOkvQjH/4hC84PIiWoG1fhZEO+G4+AQ6J25ITIjvn2UUco jrIA== 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=Mkxj1rf41yYS/L7V0n38PLpXQTaW+pjDKubAqykoIKI=; fh=iYRE3RIK6EzWkNtDPLyhm/eNSgPn7kzL0NqhIB5UBZY=; b=S6xbQ6+5q4wYO4NU9nH8EjoZiWjDc6tPD3XeYk/aW9XnI55K18hpTNmSeev17Tjca3 uefMhPqf/3N1JGUOgv77/dQ4sEeFF8fDqGTfDkS9ZrQckA9J+c3yysawwSnR19ASyEFs Lc2TVqXyyBv8nzKlxtAU0zS2gR9uLPlB3652Y4iERRvrDWjSRshe8pSAIclhb6zrsPNd v/OPljRK5EqJbVafMiktpqAoctLa12KfWe0NOL66RhkhfjpbTUDqQseFhWmXkYx10JIG pLBupc6OITih8JEeQV1SShtb5WkR5LXSn82+JpYdM7EsXMl8sWRggkpspgbUuDZFcmfc N/fw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=geV+eAD0; 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 af79cd13be357-79d6934e100si930022085a.745.2024.07.01.22.04.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 01 Jul 2024 22:04:12 -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=geV+eAD0; 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 1sOVfg-00050W-MW; Tue, 02 Jul 2024 01:03: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 1sOVff-0004oV-D8 for qemu-devel@nongnu.org; Tue, 02 Jul 2024 01:03:15 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sOVfZ-0007fi-9N for qemu-devel@nongnu.org; Tue, 02 Jul 2024 01:03:15 -0400 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-42578fe58a6so17745495e9.3 for ; Mon, 01 Jul 2024 22:03:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719896587; x=1720501387; darn=nongnu.org; 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=Mkxj1rf41yYS/L7V0n38PLpXQTaW+pjDKubAqykoIKI=; b=geV+eAD0RLpWBUkU8Evm1ve4vkBOwLy3P7G13J+g0ZX1vZa9sB4bzMVX7lRV6jWg2c 5AQIlJv8sSh5Jxjs94SCaLwo8JYRCVrvoUV4G8Dro3dv7il8xSvf8A0+eDYuh97e1m/Z wCDBLbeAlAM2m99yKmu6amQ2GPiTkcgdvffCK3SKl3OQu942kwE8vJBuPwVShkaE+uYY NMTEXIekPKqA9Z+rcUZ/LG7Iz3odGCxJhjeUdcN3MQpHQeJyu0wNzXUqbUpbxcrYaUiJ 9qsPuSn0oeUJlzjhGwnFFjuzBUKgUGinuz5i1dceU8F5/Y+GNAgcPd4SlkzvAGAT/7xq bydw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719896587; x=1720501387; 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=Mkxj1rf41yYS/L7V0n38PLpXQTaW+pjDKubAqykoIKI=; b=l9e4yVMf92A5/gbOappSxNHVYZKvfS3hvB9wAYcMGU1R71fzaC+jFR+eKp8fY+LFG+ 6jWhP9jM5VnEYHwQbbFrq/NY3JT7jWIwS6W+Qy73iuJcJzI+dSJsC25opxWX3BeSb2a6 IUQESIP7ptCI5D3ZV3IX0oW8ld+Bd1mj+2UB7CSqBUSO09OXg9itDUcVcjcYCnOiYlat W1D5hNrACB2Q9FxIK9vqTacOXlC21s9Mk96BebZ0mjt5oIkskaOUDA24l8hdxOqUURly eeWTWivQJWz7BNxCgTKq+uC/89S942qdxzBvQEXmqypj+d1+oQtC5GBmxDqlkIOJ0A08 +4cg== X-Gm-Message-State: AOJu0Yykoij7fzImrbPMFUtcr5zd5R/NXDypiUGL98iAoEXsrg0EzxzS FwcePNpIwd944MDJlObrPHolIc/uX5lrilylTuV0sCMRt+5k2B2KKz8WwaaFjUBJee+3dwiKpQ0 h X-Received: by 2002:a05:600c:2157:b0:425:5ea7:1f7e with SMTP id 5b1f17b1804b1-4257a034e49mr59240875e9.10.1719896587370; Mon, 01 Jul 2024 22:03:07 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.58]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4256b068d1fsm180045105e9.23.2024.07.01.22.03.05 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 01 Jul 2024 22:03:06 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Akihiko Odaki , Peter Maydell , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PULL 18/22] hvf: Drop ifdef for macOS versions older than 12.0 Date: Tue, 2 Jul 2024 07:01:08 +0200 Message-ID: <20240702050112.35907-19-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240702050112.35907-1-philmd@linaro.org> References: <20240702050112.35907-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=philmd@linaro.org; helo=mail-wm1-x329.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, T_SPF_TEMPERROR=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 From: Akihiko Odaki macOS versions older than 12.0 are no longer supported. docs/about/build-platforms.rst says: > Support for the previous major version will be dropped 2 years after > the new major version is released or when the vendor itself drops > support, whichever comes first. macOS 12.0 was released 2021: https://www.apple.com/newsroom/2021/10/macos-monterey-is-now-available/ Signed-off-by: Akihiko Odaki Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240629-macos-v1-1-6e70a6b700a0@daynix.com> Signed-off-by: Philippe Mathieu-Daudé --- accel/hvf/hvf-all.c | 3 --- target/i386/hvf/hvf.c | 23 +---------------------- 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/accel/hvf/hvf-all.c b/accel/hvf/hvf-all.c index c008dc2f1e..6ca0850b20 100644 --- a/accel/hvf/hvf-all.c +++ b/accel/hvf/hvf-all.c @@ -23,10 +23,7 @@ const char *hvf_return_string(hv_return_t ret) case HV_NO_RESOURCES: return "HV_NO_RESOURCES"; case HV_NO_DEVICE: return "HV_NO_DEVICE"; case HV_UNSUPPORTED: return "HV_UNSUPPORTED"; -#if defined(MAC_OS_VERSION_11_0) && \ - MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_VERSION_11_0 case HV_DENIED: return "HV_DENIED"; -#endif default: return "[unknown hv_return value]"; } } diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c index 2d0eef6cd9..c9c64e2978 100644 --- a/target/i386/hvf/hvf.c +++ b/target/i386/hvf/hvf.c @@ -427,27 +427,6 @@ static void hvf_cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count, } } -static hv_return_t hvf_vcpu_run(hv_vcpuid_t vcpu_id) -{ - /* - * hv_vcpu_run_until is available and recommended from macOS 10.15+, - * HV_DEADLINE_FOREVER from 11.0. Test for availability at runtime and fall - * back to hv_vcpu_run() only where necessary. - */ -#ifndef MAC_OS_VERSION_11_0 - return hv_vcpu_run(vcpu_id); -#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_VERSION_11_0 - return hv_vcpu_run_until(vcpu_id, HV_DEADLINE_FOREVER); -#else /* MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_VERSION_11_0 */ - /* 11.0 SDK or newer, but could be < 11 at runtime */ - if (__builtin_available(macOS 11.0, *)) { - return hv_vcpu_run_until(vcpu_id, HV_DEADLINE_FOREVER); - } else { - return hv_vcpu_run(vcpu_id); - } -#endif -} - int hvf_vcpu_exec(CPUState *cpu) { X86CPU *x86_cpu = X86_CPU(cpu); @@ -476,7 +455,7 @@ int hvf_vcpu_exec(CPUState *cpu) return EXCP_HLT; } - hv_return_t r = hvf_vcpu_run(cpu->accel->fd); + hv_return_t r = hv_vcpu_run_until(cpu->accel->fd, HV_DEADLINE_FOREVER); assert_hvf_ok(r); /* handle VMEXIT */