qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: "Claudio Fontana" <cfontana@suse.de>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Roman Bolshakov" <r.bolshakov@yadro.com>
Cc: Laurent Vivier <lvivier@redhat.com>,
	Thomas Huth <thuth@redhat.com>,
	Eduardo Habkost <ehabkost@redhat.com>,
	Pavel Dovgalyuk <dovgaluk@ispras.ru>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	qemu-devel@nongnu.org, Markus Armbruster <armbru@redhat.com>,
	Colin Xu <colin.xu@intel.com>,
	Wenchao Wang <wenchao.wang@intel.com>,
	haxm-team@intel.com, Sunil Muthuswamy <sunilmut@microsoft.com>,
	Richard Henderson <rth@twiddle.net>
Subject: Re: [RFC v4 03/14] cpus: extract out TCG-specific code to accel/tcg
Date: Wed, 12 Aug 2020 18:06:44 +0200	[thread overview]
Message-ID: <2cff5acb-467d-cd5e-bed5-8efecd74b335@redhat.com> (raw)
In-Reply-To: <20200811210326.4425-4-cfontana@suse.de>

On 8/11/20 11:03 PM, Claudio Fontana wrote:
> TCG is the first accelerator to register a "CpusAccel" interface
> on initialization, providing functions for starting a vcpu,
> kicking a vcpu, sychronizing state and getting virtual clock
> and ticks.
> 
> Signed-off-by: Claudio Fontana <cfontana@suse.de>
> ---
>  accel/tcg/Makefile.objs |   1 +
>  accel/tcg/tcg-all.c     |  12 +-
>  accel/tcg/tcg-cpus.c    | 541 ++++++++++++++++++++++++++++++++++++++++++++++++
>  accel/tcg/tcg-cpus.h    |  17 ++
>  softmmu/cpus.c          | 498 +-------------------------------------------
>  5 files changed, 568 insertions(+), 501 deletions(-)
>  create mode 100644 accel/tcg/tcg-cpus.c
>  create mode 100644 accel/tcg/tcg-cpus.h
[...]
>  /***********************************************************/
>  void hw_error(const char *fmt, ...)
>  {
> @@ -328,9 +247,7 @@ int64_t cpus_get_virtual_clock(void)
>      if (cpus_accel && cpus_accel->get_virtual_clock) {
>          return cpus_accel->get_virtual_clock();
>      }
> -    if (icount_enabled()) {
> -        return icount_get();
> -    } else if (qtest_enabled()) { /* for qtest_clock_warp */
> +    if (qtest_enabled()) { /* for qtest_clock_warp */
>          return qtest_get_virtual_clock();
>      }
>      return cpu_get_clock();
> @@ -338,7 +255,7 @@ int64_t cpus_get_virtual_clock(void)
>  
>  /*
>   * return the time elapsed in VM between vm_start and vm_stop.  Unless
> - * icount is active, cpu_get_ticks() uses units of the host CPU cycle
> + * icount is active, cpus_get_elapsed_ticks() uses units of the host CPU cycle

This change belongs to the previous patch, otherwise:
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>

>   * counter.
>   */
>  int64_t cpus_get_elapsed_ticks(void)
> @@ -346,9 +263,6 @@ int64_t cpus_get_elapsed_ticks(void)
>      if (cpus_accel && cpus_accel->get_elapsed_ticks) {
>          return cpus_accel->get_elapsed_ticks();
>      }
> -    if (icount_enabled()) {
> -        return icount_get();
> -    }
>      return cpu_get_ticks();
>  }
>  
> @@ -482,10 +396,6 @@ static void qemu_kvm_destroy_vcpu(CPUState *cpu)
>      }
>  }
>  
> -static void qemu_tcg_destroy_vcpu(CPUState *cpu)
> -{
> -}
> -
>  static void qemu_cpu_stop(CPUState *cpu, bool exit)
>  {
>      g_assert(qemu_cpu_is_self(cpu));
> @@ -506,22 +416,6 @@ void qemu_wait_io_event_common(CPUState *cpu)
>      process_queued_cpu_work(cpu);
>  }



  reply	other threads:[~2020-08-12 16:07 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-11 21:03 [RFC v4 00/14] QEMU cpus.c refactoring part2 Claudio Fontana
2020-08-11 21:03 ` [RFC v4 01/14] cpu-timers, icount: new modules Claudio Fontana
2020-08-11 21:03 ` [RFC v4 02/14] cpus: prepare new CpusAccel cpu accelerator interface Claudio Fontana
2020-08-11 21:03 ` [RFC v4 03/14] cpus: extract out TCG-specific code to accel/tcg Claudio Fontana
2020-08-12 16:06   ` Philippe Mathieu-Daudé [this message]
2020-08-11 21:03 ` [RFC v4 04/14] cpus: extract out qtest-specific code to accel/qtest Claudio Fontana
2020-08-11 21:03 ` [RFC v4 05/14] cpus: extract out kvm-specific code to accel/kvm Claudio Fontana
2020-08-12 16:10   ` Philippe Mathieu-Daudé
2020-08-11 21:03 ` [RFC v4 06/14] cpus: extract out hax-specific code to target/i386/ Claudio Fontana
2020-08-11 21:03 ` [RFC v4 07/14] cpus: extract out whpx-specific " Claudio Fontana
2020-08-11 21:03 ` [RFC v4 08/14] cpus: extract out hvf-specific code to target/i386/hvf/ Claudio Fontana
2020-08-11 21:03 ` [RFC v4 09/14] cpus: cleanup now unneeded includes Claudio Fontana
2020-08-11 21:03 ` [RFC v4 10/14] cpus: add handle_interrupt to the CpusAccel interface Claudio Fontana
2020-08-11 21:03 ` [RFC v4 11/14] hvf: remove hvf specific functions from global includes Claudio Fontana
2020-08-12 14:49   ` Claudio Fontana
2020-08-12 16:12     ` Philippe Mathieu-Daudé
2020-08-11 21:03 ` [RFC v4 12/14] whpx: remove whpx " Claudio Fontana
2020-08-11 21:03 ` [RFC v4 13/14] hax: remove hax " Claudio Fontana
2020-08-11 21:03 ` [RFC v4 14/14] kvm: remove kvm " Claudio Fontana

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=2cff5acb-467d-cd5e-bed5-8efecd74b335@redhat.com \
    --to=philmd@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=armbru@redhat.com \
    --cc=cfontana@suse.de \
    --cc=colin.xu@intel.com \
    --cc=dovgaluk@ispras.ru \
    --cc=ehabkost@redhat.com \
    --cc=haxm-team@intel.com \
    --cc=lvivier@redhat.com \
    --cc=mtosatti@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=r.bolshakov@yadro.com \
    --cc=rth@twiddle.net \
    --cc=sunilmut@microsoft.com \
    --cc=thuth@redhat.com \
    --cc=wenchao.wang@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).