From nobody Sat Feb 7 05:26:01 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.128.43 as permitted sender) client-ip=209.85.128.43; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-f43.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.43 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=1641820225; cv=none; d=zohomail.com; s=zohoarc; b=FJ/TiVHPS93mRJuRM8r4wUUBclCW6P7/LskQM9grTsnBGrbaZ0mFlYqgGgQ0OV9GsIIpNyuAo+/PvVVYn1hqwqYxouxdVOKXAIztYqH15T4D3yIzbdM9JtkbKJWQdLnQxBipbjVZPaJO6fqdBb18FgSKr/oNGeJu8q/TMl0ubsI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1641820225; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=iN7rmJCyt/9XOylIukKsQBez3yTqjDEoUhXX6uhz6nk=; b=elYYAPYvQ16b65tQ/tMefI3xjZXZ8KAkrb/ENuNIV2G76/jYA4L5eGJVyOwVeUktcvqrdVtXK8y+h3/je47y+FmeReJD56c2X0We2dGqUkTm0g6Z8gdmTawyY20NuZqbBQ1PaajLKHx1N3nreiBvZreCM0PAdsQJJyBOqMSB2a0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.43 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com; dmarc=fail header.from= (p=none dis=none) Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by mx.zohomail.com with SMTPS id 1641820225454429.0643223189785; Mon, 10 Jan 2022 05:10:25 -0800 (PST) Received: by mail-wm1-f43.google.com with SMTP id c126-20020a1c9a84000000b00346f9ebee43so7180949wme.4 for ; Mon, 10 Jan 2022 05:10:24 -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 o15sm6930798wro.70.2022.01.10.05.10.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jan 2022 05:10:23 -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=lff4p114YEVct2vn7c/af0gN+4CpPp4U/Yph4r2HMbiUnSsnx/JatYA8sqJZ6WtIJE tNRhINXYCFMBPKDia2c4VvEgfggRASktfqbG5fxYTLlVaLZJOnbqayzny+zZFNunPpv7 uP5OR3u/YvUh5L3v6TF2DNUMIludloS2aa09nTITdHrn86oi+dNw5+IBC3HbdT9ZwQNW cS6rD4iJKvK7cEPauMSR+x4LkOZqbQ0RJe9Wd014TszGPvrmb5ZEigi4KqlUSYEaU8ST c1wYtewZm6FU8QYx5Sak5PuBGdfv9JcIOEDLwnp9ntuI+PcirIDHAUmw2eWZjyJ5hPzr hNEA== 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=psOZ3b4OOo4PGH3oGJlUKW2hhxmKL/cIB+Nsll3BIZxbNRZjJLjFHfmcJnONEHYiKy j7X+PNE/FiAdWIfm0vJteaqapytbohc7idxeZoR4V13m+wwR4pd2BJh1JmvzWNgTRziz /D5tRQSqXAuV1DkP68Oul55m6K7NNP3MxAVGvnvU56ZujyMbhTvGmT5tPcqrrLhp3D7k z6imb7mZowY9MCm5VwvFdhdlCGDZgPJYFhFaSQdAQnuolWx+Us1bjRDseVJVQJVZppve 8sC/+CpFr/yph8ZTzNW2irBW3XbVfF499t8mdOxHr6Eka1zLJdYzF/ZWqnDHKcsCuAp4 aQrg== X-Gm-Message-State: AOAM533Z1JKA3tuSGiaeuDDFwJBdva5Gr3hOQq9bchtMhsBh3BpYiN2d rO7f+Ut5R63x2mJUZviYHGQ= X-Google-Smtp-Source: ABdhPJwWVS3okc2AzQo3F2ukXhTa0R+QCTHvcFj/kq4eYgjBstvycGMOzovO8m0vFo9iX2aPb/N3dg== X-Received: by 2002:a05:600c:6009:: with SMTP id az9mr21993042wmb.32.1641820223655; Mon, 10 Jan 2022 05:10:23 -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: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Alexander Graf , Christian Schoenebeck , Cameron Esfahani , Roman Bolshakov , Gerd Hoffmann , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Wainer dos Santos Moschetta , Peter Maydell , Akihiko Odaki , Thomas Huth Subject: [RFC PATCH v3 4/7] hvf: Remove deprecated hv_vcpu_flush() calls Date: Mon, 10 Jan 2022 14:09:58 +0100 Message-Id: <20220110131001.614319-5-f4bug@amsat.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20220110131001.614319-1-f4bug@amsat.org> References: <20220110131001.614319-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: 1641820225997100001 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 Reviewed-by: Roman Bolshakov Tested-by: Roman Bolshakov --- 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