From patchwork Sun Mar 6 23:17:36 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: 1601786 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=g1bKIail; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4KBczn4RFGz9sGF for ; Mon, 7 Mar 2022 10:21:39 +1100 (AEDT) Received: from localhost ([::1]:42172 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nR0C0-0004Jj-Tk for incoming@patchwork.ozlabs.org; Sun, 06 Mar 2022 18:21:36 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49330) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nR08v-0006av-RD; Sun, 06 Mar 2022 18:18:27 -0500 Received: from [2a00:1450:4864:20::433] (port=41950 helo=mail-wr1-x433.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nR08u-0007MK-Av; Sun, 06 Mar 2022 18:18:25 -0500 Received: by mail-wr1-x433.google.com with SMTP id i8so20637604wrr.8; Sun, 06 Mar 2022 15:18:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RcstpUhbUgnI9fuTcLWWtxfVGC/x5MLDlmMnW6NP8eM=; b=g1bKIailuqLbe6D/eWA98fYHCMGuAYc/LjwxBJnrRtbHMKM7zim5SuLTkDcD2/yjR2 6MZRZ9qEqZrVXCrOze64aCmnAaDgvkAjOuK0XAS7KWOckOjztBBb+Z3gK+NjYZhykZTO I2lyn2ZxXVTshkarkrV89JiCEtduManbVgotKb2kR0JgmzFSYwKG5Zev/nDtmD7+vVQ0 INpTPwjNAB6V+D2TSQuqm/JG2xo5MBy0LLf/WoyEvRB/neRjUvfJoKbg3XAg3xM+puti fIPEN8O8GIkoC0pYKX0+nQCJzRfV6vFbSsnzWmATPePSRGBrUXYJON2pEoPg3fCPgI9y cE4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RcstpUhbUgnI9fuTcLWWtxfVGC/x5MLDlmMnW6NP8eM=; b=5tY/riGT1pUqtxzT7XgoXQbPepzULzpgM32vofOtNWUPMOK7i13NjE8qZk6aaXxBlH 9nCxxCvvzVV52Q251P4qp7QH+ahnQDN3dNx5wAglaS94YegJRIg/WW4C14rGOMv0lwGn p4DP5VYwaRegNZqDV7lEzcdb5W9FfkXQt4CyGLbrEAihoUZJm1rcjB35J7/H7TwFJM2u CdFlj0MHKMAmagbx4Uizn1gc66YCm0T9cWRvZgh0Cnmq454nUK47UDsU9A6EtN0X/o57 seo48dHscGSUcwRBHuz5ig2Cmo4cy8bRTCXFWrhWZXn78ZEjJHVBE40syIBbt3ruEHLs PWBg== X-Gm-Message-State: AOAM532w5ZaTqNMR4lOREmzgv0K5FV3h935WjLVrXEeiQLoxqeX/3Q6M oaictKe4Un9N3Bxb28+NgBIIP84j04Y= X-Google-Smtp-Source: ABdhPJywy3lQ96uXdW0ZdybHLqYpb6lyyFk430+e6Z7WJ9zlsNBLaHCj5Bb8F+fIN4ZhKX/O2dZbOw== X-Received: by 2002:a5d:4dc5:0:b0:1f0:73e4:2cd9 with SMTP id f5-20020a5d4dc5000000b001f073e42cd9mr6180089wru.212.1646608702322; Sun, 06 Mar 2022 15:18:22 -0800 (PST) Received: from localhost.localdomain ([185.126.107.38]) by smtp.gmail.com with ESMTPSA id e20-20020adfa454000000b001f01a14dce8sm9739269wra.97.2022.03.06.15.18.21 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 06 Mar 2022 15:18:21 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v7 05/22] hvf: Remove deprecated hv_vcpu_flush() calls Date: Mon, 7 Mar 2022 00:17:36 +0100 Message-Id: <20220306231753.50277-6-philippe.mathieu.daude@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220306231753.50277-1-philippe.mathieu.daude@gmail.com> References: <20220306231753.50277-1-philippe.mathieu.daude@gmail.com> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::433 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x433.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_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.659, 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: , Cc: Peter Maydell , Thomas Huth , qemu-block@nongnu.org, Christian Schoenebeck , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Cameron Esfahani , Roman Bolshakov , Will Cohen , Gerd Hoffmann , Akihiko Odaki , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé 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 907f09f1b4..bec9fc5814 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)