All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roman Bolshakov <roman@roolebo.dev>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	"Thomas Huth" <thuth@redhat.com>,
	"Daniel P . Berrangé" <berrange@redhat.com>,
	"Christian Schoenebeck" <qemu_oss@crudebyte.com>,
	qemu-devel@nongnu.org, "Cameron Esfahani" <dirty@apple.com>,
	"Roman Bolshakov" <r.bolshakov@yadro.com>,
	"Alexander Graf" <agraf@csgraf.de>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Akihiko Odaki" <akihiko.odaki@gmail.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Wainer dos Santos Moschetta" <wainersm@redhat.com>
Subject: Re: [RFC PATCH v3 4/7] hvf: Remove deprecated hv_vcpu_flush() calls
Date: Tue, 11 Jan 2022 20:51:21 +0300	[thread overview]
Message-ID: <Yd3DmSqZ1SiJwd7P@roolebo.dev> (raw)
In-Reply-To: <20220110131001.614319-5-f4bug@amsat.org>

On Mon, Jan 10, 2022 at 02:09:58PM +0100, Philippe Mathieu-Daudé wrote:
> 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: first deprecated in macOS 11.0 - This API has no effect and always returns HV_UNSUPPORTED [-Werror,-Wdeprecated-declarations]
>       hv_vcpu_flush(vcpu);
>       ^

This seems to be true even for older macOS (e.g. Catalina).

>   /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
> 

Reviewed-by: Roman Bolshakov <roman@roolebo.dev>
Tested-by: Roman Bolshakov <roman@roolebo.dev>

Thanks,
Roman

> 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 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, uint64_t cr0)
>      wvmcs(vcpu, VMCS_GUEST_CR0, cr0 | CR0_NE | CR0_ET);
>  
>      hv_vcpu_invalidate_tlb(vcpu);
> -    hv_vcpu_flush(vcpu);
>  }
>  
>  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, uint64_t cr4)
>      wvmcs(vcpu, VMCS_CR4_MASK, CR4_VMXE);
>  
>      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 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);
>  
>      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)
>  
>      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.33.1


  reply	other threads:[~2022-01-11 17:52 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-10 13:09 [RFC PATCH v3 0/7] host: Support macOS 12 Philippe Mathieu-Daudé
2022-01-10 13:09 ` [RFC PATCH v3 1/7] configure: Allow passing extra Objective C compiler flags Philippe Mathieu-Daudé
2022-01-11 17:16   ` Roman Bolshakov
2022-01-12 13:46     ` Philippe Mathieu-Daudé
2022-01-12 14:09       ` Philippe Mathieu-Daudé
2022-01-12 14:47         ` Philippe Mathieu-Daudé
2022-01-10 13:09 ` [RFC PATCH v3 2/7] ui/cocoa: Remove allowedFileTypes restriction in SavePanel Philippe Mathieu-Daudé
2022-01-10 19:43   ` Roman Bolshakov
2022-01-10 13:09 ` [RFC PATCH v3 3/7] hvf: Make hvf_get_segments() / hvf_put_segments() local Philippe Mathieu-Daudé
2022-01-11 16:09   ` Roman Bolshakov
2022-01-10 13:09 ` [RFC PATCH v3 4/7] hvf: Remove deprecated hv_vcpu_flush() calls Philippe Mathieu-Daudé
2022-01-11 17:51   ` Roman Bolshakov [this message]
2022-01-10 13:09 ` [RFC PATCH v3 5/7] audio/coreaudio: Remove a deprecation warning on macOS 12 Philippe Mathieu-Daudé
2022-01-10 13:20   ` Philippe Mathieu-Daudé
2022-01-10 13:43     ` Christian Schoenebeck
2022-01-11 18:36   ` Roman Bolshakov
2022-01-12  6:57   ` Roman Bolshakov
2022-01-10 13:10 ` [RFC PATCH v3 6/7] block/file-posix: " Philippe Mathieu-Daudé
2022-01-10 18:28   ` Akihiko Odaki
2022-01-10 13:10 ` [RFC PATCH v3 7/7] gitlab-ci: Support macOS 12 via cirrus-run Philippe Mathieu-Daudé
2022-01-13  7:39   ` Thomas Huth
2022-01-13 11:41     ` Philippe Mathieu-Daudé
2022-01-18  9:34       ` Thomas Huth
2022-01-10 18:06 ` [RFC PATCH v3 0/7] host: Support macOS 12 Roman Bolshakov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Yd3DmSqZ1SiJwd7P@roolebo.dev \
    --to=roman@roolebo.dev \
    --cc=agraf@csgraf.de \
    --cc=akihiko.odaki@gmail.com \
    --cc=alex.bennee@linaro.org \
    --cc=berrange@redhat.com \
    --cc=dirty@apple.com \
    --cc=f4bug@amsat.org \
    --cc=kraxel@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu_oss@crudebyte.com \
    --cc=r.bolshakov@yadro.com \
    --cc=thuth@redhat.com \
    --cc=wainersm@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.