[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v5 08/16] hvf: Remove deprecated hv_vcpu_flush() calls
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v5 08/16] hvf: Remove deprecated hv_vcpu_flush() calls |
Date: |
Mon, 14 Feb 2022 19:55:57 +0100 |
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 <r.bolshakov@yadro.com>
Tested-by: Roman Bolshakov <r.bolshakov@yadro.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
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)
--
2.34.1
- [PATCH v5 01/16] MAINTAINERS: Add Akihiko Odaki to macOS-relateds, (continued)
- [PATCH v5 01/16] MAINTAINERS: Add Akihiko Odaki to macOS-relateds, Philippe Mathieu-Daudé, 2022/02/14
- [PATCH v5 02/16] configure: Allow passing extra Objective C compiler flags, Philippe Mathieu-Daudé, 2022/02/14
- [PATCH v5 03/16] tests/fp/berkeley-testfloat-3: Ignore ignored #pragma directives, Philippe Mathieu-Daudé, 2022/02/14
- [PATCH v5 04/16] hvf: Use standard CR0 and CR4 register definitions, Philippe Mathieu-Daudé, 2022/02/14
- [PATCH v5 05/16] hvf: Fix OOB write in RDTSCP instruction decode, Philippe Mathieu-Daudé, 2022/02/14
- [PATCH v5 06/16] hvf: Enable RDTSCP support, Philippe Mathieu-Daudé, 2022/02/14
- [PATCH v5 07/16] hvf: Make hvf_get_segments() / hvf_put_segments() local, Philippe Mathieu-Daudé, 2022/02/14
- [PATCH v5 08/16] hvf: Remove deprecated hv_vcpu_flush() calls,
Philippe Mathieu-Daudé <=
- [PATCH v5 09/16] block/file-posix: Remove a deprecation warning on macOS 12, Philippe Mathieu-Daudé, 2022/02/14
- [PATCH v5 10/16] audio/coreaudio: Remove a deprecation warning on macOS 12, Philippe Mathieu-Daudé, 2022/02/14
- [PATCH v5 11/16] audio/dbus: Fix building with modules on macOS, Philippe Mathieu-Daudé, 2022/02/14
- [PATCH v5 12/16] ui/cocoa: Remove allowedFileTypes restriction in SavePanel, Philippe Mathieu-Daudé, 2022/02/14
- [PATCH v5 13/16] ui/cocoa: Add Services menu, Philippe Mathieu-Daudé, 2022/02/14
- [PATCH v5 14/16] ui/cocoa: Do not alert even without block devices, Philippe Mathieu-Daudé, 2022/02/14
- [PATCH v5 15/16] lcitool: refresh, Philippe Mathieu-Daudé, 2022/02/14