From nobody Mon Feb 9 18:43:58 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.128.46 as permitted sender) client-ip=209.85.128.46; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-f46.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.46 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com; dmarc=fail(p=none dis=none) header.from=amsat.org ARC-Seal: i=1; a=rsa-sha256; t=1641748016; cv=none; d=zohomail.com; s=zohoarc; b=U2naRexF5ey5yyRbep5r/G13y/ldHDPK05TjUFLDVhMn613j2RWWSNXt1NiH+4qISw+drcH1cPjc1QWsi/4RBjhACH46aApgRNQvhma3yM8VOVYjTFPwvMg0N1w2w5N3Km+VmydpDhbRmyFC1cuhCfi264WWtRbqAW4qUb6Txow= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1641748016; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=iN7rmJCyt/9XOylIukKsQBez3yTqjDEoUhXX6uhz6nk=; b=O9QWdfR55wyTRznD0TiQQARz7No6Ze7udYXW0dqKJlxaycqwhYORCVVtz7rXm/HUByODIf92fJI+UEcGBKtN///j3XPHbR8XCk0wEULnhAjjJOmouisVN2F197EdautXFlTIa4ivkMs42Lo5PqIw6sRSUmX8kSxLPpjxbHGFLb0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.46 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com; dmarc=fail header.from= (p=none dis=none) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by mx.zohomail.com with SMTPS id 1641748015984255.35803549470154; Sun, 9 Jan 2022 09:06:55 -0800 (PST) Received: by mail-wm1-f46.google.com with SMTP id l12-20020a7bc34c000000b003467c58cbdfso7909532wmj.2 for ; Sun, 09 Jan 2022 09:06:55 -0800 (PST) Return-Path: Return-Path: Received: from nuc.. (83.red-83-50-87.dynamicip.rima-tde.net. [83.50.87.83]) by smtp.gmail.com with ESMTPSA id e13sm4599960wmq.10.2022.01.09.09.06.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Jan 2022 09:06:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=iN7rmJCyt/9XOylIukKsQBez3yTqjDEoUhXX6uhz6nk=; b=Di1keJS+l27M8x/2G1Ma02PH3svXk6aZYshOdEgw8pO5f8c6P5TS+m4zTmRBT6wHT1 HpAFYord7URVOLUT6qOWTEoG5jnilJEpFrFu1ddd8HlDr7iviK1ZEahau0btNWYq5pGZ W3T1zITmOcl1OcMU9dtKFn5hYIjEZx6dyBA/FOnW4N00bw8dF9h0bF9KHTMA5YaEmNiV 6YMq41dytMsZIjQxFZddMOMaJopuJoyb7Sc+Bk2y8T4N15c6j2ms6FISYbUcXk0KGMx6 3JIfKBpsS6q3SnPQWOunnv+sV1nZJer91sONHd/1OJ06ICZG9rbySxialH8s9a0GDbl6 QdPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=iN7rmJCyt/9XOylIukKsQBez3yTqjDEoUhXX6uhz6nk=; b=YW5nxmfeW+Zm0/XFoXYnM4sxoTJubV7TmgYuHLVAgiWz7aCUnEixlCfXnGSi7Kx9qV BehvocdaFd4FWwCmktyK35KrvO5tztVyQD7c250KzXsHPFPvbln9/RQ8KOKyt5L3WVOW SyHH5p9IVt65XH11Sbc7HQwblyWKJI0+ao5xsgWp9FQ43u5XFSywkObZF39nJnm1/zys 3oMLV2Jy2skTZ+VxAXsRWHXtxMII3yOlzE0EP1a5nJhhJx3DmeJjQoulE1L2yWALrlHf aJGmlpZ0JdHMM6ibWkjWqYtJaqRa5xfbE2wCmmeidTaWdoqeqMQXhW+EMLGQU5MYXg5Q izTA== X-Gm-Message-State: AOAM531+t0KoxYBlGulRWolc+YtixNcaI+2HUpRUmDfs4g8U6nzIDrii +2zD7L73qZ8QvsXrXax+WtY= X-Google-Smtp-Source: ABdhPJw3MuOwK9vZxcFIlXVLvNPrCLICTpof4A+kTv79iWz4xF4v2k3c2I+pMcccXWkH1cveYVfkQA== X-Received: by 2002:a1c:44d7:: with SMTP id r206mr12130113wma.79.1641748014215; Sun, 09 Jan 2022 09:06:54 -0800 (PST) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Cameron Esfahani , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Christian Schoenebeck , qemu-block@nongnu.org, Alexander Graf , Roman Bolshakov , Gerd Hoffmann , Akihiko Odaki , =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [RFC PATCH v2 5/6] hvf: Remove deprecated hv_vcpu_flush() calls Date: Sun, 9 Jan 2022 18:06:11 +0100 Message-Id: <20220109170612.574104-6-f4bug@amsat.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20220109170612.574104-1-f4bug@amsat.org> References: <20220109170612.574104-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1641748017839100001 When building on macOS 12, we get: In file included from ../target/i386/hvf/hvf.c:59: ../target/i386/hvf/vmx.h:174:5: error: 'hv_vcpu_flush' is deprecated: fir= st deprecated in macOS 11.0 - This API has no effect and always returns HV_= UNSUPPORTED [-Werror,-Wdeprecated-declarations] hv_vcpu_flush(vcpu); ^ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Framew= orks/Hypervisor.framework/Headers/hv.h:364:20: note: 'hv_vcpu_flush' has be= en explicitly marked deprecated here extern hv_return_t hv_vcpu_flush(hv_vcpuid_t vcpu) ^ Since this call "has no effect", simply remove it =C2=AF\_(=E3=83=84)_/=C2= =AF Not very useful deprecation doc: https://developer.apple.com/documentation/hypervisor/1441386-hv_vcpu_flush Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/i386/hvf/vmx.h | 2 -- target/i386/hvf/x86_task.c | 1 - target/i386/hvf/x86hvf.c | 2 -- 3 files changed, 5 deletions(-) diff --git a/target/i386/hvf/vmx.h b/target/i386/hvf/vmx.h index 6df87116f62..094fb9b9dc9 100644 --- a/target/i386/hvf/vmx.h +++ b/target/i386/hvf/vmx.h @@ -159,7 +159,6 @@ static inline void macvm_set_cr0(hv_vcpuid_t vcpu, uint= 64_t cr0) wvmcs(vcpu, VMCS_GUEST_CR0, cr0 | CR0_NE | CR0_ET); =20 hv_vcpu_invalidate_tlb(vcpu); - hv_vcpu_flush(vcpu); } =20 static inline void macvm_set_cr4(hv_vcpuid_t vcpu, uint64_t cr4) @@ -171,7 +170,6 @@ static inline void macvm_set_cr4(hv_vcpuid_t vcpu, uint= 64_t cr4) wvmcs(vcpu, VMCS_CR4_MASK, CR4_VMXE); =20 hv_vcpu_invalidate_tlb(vcpu); - hv_vcpu_flush(vcpu); } =20 static inline void macvm_set_rip(CPUState *cpu, uint64_t rip) diff --git a/target/i386/hvf/x86_task.c b/target/i386/hvf/x86_task.c index 422156128b7..c8dc3d48fa8 100644 --- a/target/i386/hvf/x86_task.c +++ b/target/i386/hvf/x86_task.c @@ -181,5 +181,4 @@ void vmx_handle_task_switch(CPUState *cpu, x68_segment_= selector tss_sel, int rea store_regs(cpu); =20 hv_vcpu_invalidate_tlb(cpu->hvf->fd); - hv_vcpu_flush(cpu->hvf->fd); } diff --git a/target/i386/hvf/x86hvf.c b/target/i386/hvf/x86hvf.c index 907f09f1b43..bec9fc58146 100644 --- a/target/i386/hvf/x86hvf.c +++ b/target/i386/hvf/x86hvf.c @@ -125,8 +125,6 @@ static void hvf_put_segments(CPUState *cpu_state) =20 hvf_set_segment(cpu_state, &seg, &env->ldt, false); vmx_write_segment_descriptor(cpu_state, &seg, R_LDTR); - =20 - hv_vcpu_flush(cpu_state->hvf->fd); } =20 void hvf_put_msrs(CPUState *cpu_state) --=20 2.33.1