From nobody Tue Feb 10 03:40:27 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1644597719; cv=none; d=zohomail.com; s=zohoarc; b=mhBf8rUJ+36I9BgwlHhTAUKRgNdu9l7NhxOLzLRfVH3lTQjsLWBQjDQavng6SJhQ3Re2p/yGvhKIMzIKNFRkUgb32Tg+LHOjTpPCnLQe+8cm8sC/Z+PfpzxghF8ET7uarFg6h8yn6xa8e/uSpE+5xqDnKHlpTEq9Vjjv45M5Svs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1644597719; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=d7T27EMFPVzp3B0TQwoZYMCEX+PxVB/NfGOmyTZ7TJw=; b=MekI1v0VyMZ9v+cUBaoAxgAfKF4duNJf7uOzPP0ZpCq0/VuS0602q5hGI4ssSrG/Lw5zDRU8RTBc9V2LqBA/zWhU/ctM6lD1B7igfpI8cfnfvDvXk3ueRHV/eemdS9OmX9Qi7dVX02CrpIHGIuS4bQhPi955dlAYG5t8S87E7os= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1644597719297420.5744472349188; Fri, 11 Feb 2022 08:41:59 -0800 (PST) Received: from localhost ([::1]:49498 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nIYze-0000Yf-2D for importer@patchew.org; Fri, 11 Feb 2022 11:41:58 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55076) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nIYu3-0000SI-Oc for qemu-devel@nongnu.org; Fri, 11 Feb 2022 11:36:16 -0500 Received: from [2607:f8b0:4864:20::429] (port=39617 helo=mail-pf1-x429.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nIYtz-0002JH-Aw for qemu-devel@nongnu.org; Fri, 11 Feb 2022 11:36:10 -0500 Received: by mail-pf1-x429.google.com with SMTP id r19so17203767pfh.6 for ; Fri, 11 Feb 2022 08:35:59 -0800 (PST) Received: from localhost.localdomain (154.red-83-50-83.dynamicip.rima-tde.net. [83.50.83.154]) by smtp.gmail.com with ESMTPSA id me18sm2983705pjb.39.2022.02.11.08.35.54 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 11 Feb 2022 08:35:57 -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=d7T27EMFPVzp3B0TQwoZYMCEX+PxVB/NfGOmyTZ7TJw=; b=Gah2APfQ4kdoT75MIsAyYjw8P9SCl0rbwwJdBes1ARo1wJ1L0aRHvYzZDQ0Bch0lTC ygH2d6W98gR6pV5sSU/fEAhHd0KRaQ/ozf26ThBtOHUxo3HPhuEVMDBNWGSfoUG5WQjh 0Yx9A++wTrOUt2FV2+zXcV9/B4rznmjt9y21zomIt9rQOGpedHZueDrVL9PG7ruIjZIk NTq3l6jwRkT9UaZSfntdSoruWe4oklapnMa+iiCMIMGYWSSj9s8DXpMNYxkFWweSkkS7 II2RLu8rE2HN4IvK93kdllkd2we6CwVc14aTpKbW2smke2j7sjiNi2NE8igWt1FknPrm pAEg== 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=d7T27EMFPVzp3B0TQwoZYMCEX+PxVB/NfGOmyTZ7TJw=; b=CE5YWDFL5LtGhS2JHD5mIFXS2fbMQy7a6UHUo67GWm18Ekp3pU3AbASzuLlL2zmxcT G8pmvmlpg+Ahe0dGsW9LBkOCuPshtrs/cuA4Vi2EHqrmQeOPcsqSjQoigmjEpJOnOQVt 7V9lKlnqb3qNXjx9FPr/DphJcHLpTD91csmnJ0KqPuJNmZYKZ5HjVsdBvTk0KLPQRbbB ivlpUlSET1bbpxYUxBolCTDUGzn9dctivmSy+vEm5gmDKENoPpixr+6td9S9AfX34mXy L/kHCsKVXZFZUHRcq7ayzAGyOsmJEvONf0LoURf/RHtja7WDHiNyQ2eoYG+OVS20m661 CsYA== X-Gm-Message-State: AOAM531kj/RKiOmXnnW4cobDzHQfa4nkimZJahCwpRnvFi5pFH4pdBgY wuvwLeLybIiNw5ikeTNqqrmZM12X084= X-Google-Smtp-Source: ABdhPJwVV8XiVQlxGHoi8q/BqVMCKhr0Spzc30ocuZ3CyAAQKSqtrVHChsb176zn0nQrNfi/QitWeQ== X-Received: by 2002:a63:1ca:: with SMTP id 193mr2050069pgb.20.1644597358017; Fri, 11 Feb 2022 08:35:58 -0800 (PST) To: qemu-devel@nongnu.org Cc: Cameron Esfahani , Peter Maydell , Will Cohen , Akihiko Odaki , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Christian Schoenebeck , Roman Bolshakov , Li Zhang , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v4 08/13] hvf: Remove deprecated hv_vcpu_flush() calls Date: Fri, 11 Feb 2022 17:34:29 +0100 Message-Id: <20220211163434.58423-9-f4bug@amsat.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220211163434.58423-1-f4bug@amsat.org> References: <20220211163434.58423-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::429 (failed) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::429; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-pf1-x429.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Reply-to: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= via X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1644597720069100001 When building on macOS 11 [*], 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 [*] Also 10.15 (Catalina): https://lore.kernel.org/qemu-devel/Yd3DmSqZ1SiJwd7P@roolebo.dev/ Reviewed-by: Roman Bolshakov Tested-by: Roman Bolshakov 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 29b7deed3c..573ddc33c0 100644 --- a/target/i386/hvf/vmx.h +++ b/target/i386/hvf/vmx.h @@ -160,7 +160,6 @@ static inline void macvm_set_cr0(hv_vcpuid_t vcpu, uint= 64_t cr0) wvmcs(vcpu, VMCS_GUEST_CR0, cr0 | CR0_NE_MASK | CR0_ET_MASK); =20 hv_vcpu_invalidate_tlb(vcpu); - hv_vcpu_flush(vcpu); } =20 static inline void macvm_set_cr4(hv_vcpuid_t vcpu, uint64_t cr4) @@ -172,7 +171,6 @@ static inline void macvm_set_cr4(hv_vcpuid_t vcpu, uint= 64_t cr4) wvmcs(vcpu, VMCS_CR4_MASK, CR4_VMXE_MASK); =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 e1301599e9..d24daf6a41 100644 --- a/target/i386/hvf/x86_task.c +++ b/target/i386/hvf/x86_task.c @@ -182,5 +182,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 cff59f3144..a338c207b7 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.34.1