From patchwork Mon Feb 14 18:55:57 2022 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: 12746031 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AF3D3C433EF for ; Mon, 14 Feb 2022 19:14:37 +0000 (UTC) Received: from localhost ([::1]:52280 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nJgo0-0007aR-Ei for qemu-devel@archiver.kernel.org; Mon, 14 Feb 2022 14:14:36 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45522) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJgXY-0002DY-Ag; Mon, 14 Feb 2022 13:57:36 -0500 Received: from [2607:f8b0:4864:20::435] (port=36677 helo=mail-pf1-x435.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nJgXV-0006S6-Tb; Mon, 14 Feb 2022 13:57:36 -0500 Received: by mail-pf1-x435.google.com with SMTP id z16so8926288pfh.3; Mon, 14 Feb 2022 10:57:33 -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=ZU/7/zN41RPTMvo06OtyQweAwSGVUFHci8URSBolro/hfPQiT1o65hY4p+Yq/H/mv4 K9T1011zpimskQfWbosFOBIrpXvNY169Y2i6kI+O4a3EY8skbSQI6cE3SNKomqKqlj1M SUkGbEH9hJ6yG7poQ+osxC4GwRKzZROo2Z+MPuufyNXwbkIzgEPtwnNFhYZmoRhf5w1e kIblDHJ9766RZ3wPjyS7MW0qc0UVRgqrgrmy8GRUQ+QKOZyaN8NvM3v77kBXvTkhfguJ hBstUVD0efmbYLB15+1p1xN2GzOPwxVTiiowDNyW8FR02zuSdN45QhcXPjIgLxxPljfh tDSw== 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=Lm2lQPVA4NtKLCJEEwbrWYkppJrA3wQLEjdvLiptHt4Gvgm14Nw11RDoj5kdfdyBGN 0iBls32si1ij/+6B0luAQRs1XnKxOd38fBx+Ekiuna/CKKnjixGsx7j5CXN9R4y2m2Eh QCNBrxeAdmLDIWie4RwxHhrXnPIIWWdiNs2R9K7IF/XCDJ3U1bq6Hf28VZoTmzaNuwr7 FPYpuUAzbZXplBfSqIE6yTXwnampaNsyAElZJsaMJHHQ4lPzI4w07npHkT5Wae/+Mi7k aLxGXXuxNBMJ5nxEkff28DD4oK2a2bwWTc3GPq68mKk9hTls/aJ8WiBjez+6iVvgTXaE W0XA== X-Gm-Message-State: AOAM5333PSgzuRA89eFJdlRMjLSBlFxhmIcNQrSwp6qOK8cVEcgxouui aHjYjQ22smY8VF91fprSNN5e+TvF6Ik= X-Google-Smtp-Source: ABdhPJzdPjm0wNPApNaPX6Mj06L09J/dg8jX1/+KZJ8JlJ8nr/Hgzzn58hbGyGsWPbQscpHziIqUbA== X-Received: by 2002:aa7:8d83:: with SMTP id i3mr274753pfr.14.1644865051970; Mon, 14 Feb 2022 10:57:31 -0800 (PST) Received: from localhost.localdomain (71.red-83-50-68.dynamicip.rima-tde.net. [83.50.68.71]) by smtp.gmail.com with ESMTPSA id v9sm37690693pfu.60.2022.02.14.10.57.28 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 14 Feb 2022 10:57:31 -0800 (PST) To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Cameron Esfahani , Roman Bolshakov , Thomas Huth , Christian Schoenebeck , =?utf-8?q?Alex_Benn=C3=A9e?= , Gerd Hoffmann , Akihiko Odaki , Will Cohen , Peter Maydell , Li Zhang , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v5 08/16] hvf: Remove deprecated hv_vcpu_flush() calls Date: Mon, 14 Feb 2022 19:55:57 +0100 Message-Id: <20220214185605.28087-9-f4bug@amsat.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220214185605.28087-1-f4bug@amsat.org> References: <20220214185605.28087-1-f4bug@amsat.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::435 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::435; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-pf1-x435.google.com X-Spam_score_int: 0 X-Spam_score: -0.1 X-Spam_bar: / X-Spam_report: (-0.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, PDS_HP_HELO_NORDNS=0.635, 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Reply-to: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Original-From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= via From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= 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: first 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/Frameworks/Hypervisor.framework/Headers/hv.h:364:20: note: 'hv_vcpu_flush' has been explicitly marked deprecated here extern hv_return_t hv_vcpu_flush(hv_vcpuid_t vcpu) ^ Since this call "has no effect", simply remove it ¯\_(ツ)_/¯ 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é --- 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, uint64_t cr0) wvmcs(vcpu, VMCS_GUEST_CR0, cr0 | CR0_NE_MASK | CR0_ET_MASK); hv_vcpu_invalidate_tlb(vcpu); - hv_vcpu_flush(vcpu); } 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, uint64_t cr4) wvmcs(vcpu, VMCS_CR4_MASK, CR4_VMXE_MASK); hv_vcpu_invalidate_tlb(vcpu); - hv_vcpu_flush(vcpu); } 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); 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) hvf_set_segment(cpu_state, &seg, &env->ldt, false); vmx_write_segment_descriptor(cpu_state, &seg, R_LDTR); - - hv_vcpu_flush(cpu_state->hvf->fd); } void hvf_put_msrs(CPUState *cpu_state)