qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Claudio Fontana <cfontana@suse.de>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Roman Bolshakov <r.bolshakov@yadro.com>,
	qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [PATCH-for-5.1 v3 1/2] exec: Restrict icount to softmmu
Date: Wed, 5 Aug 2020 12:45:47 +0200	[thread overview]
Message-ID: <47f3773f-93b8-51a5-7927-9830d60c3ee1@redhat.com> (raw)
In-Reply-To: <f29544ab-d583-d6ed-48da-aa49c05ab966@suse.de>

On 8/5/20 12:12 PM, Claudio Fontana wrote:
> Hi Philippe,
> 
> could you take a look if this series already addresses the issue?
> 
> https://lists.gnu.org/archive/html/qemu-devel/2020-08/msg00067.html

I had tagged this series as "after-release" review and hadn't looked
at it yet :)

> 
> Everything icount related is already moved to softmmu and made TCG only.

Good. I was looking for a surgical change for 5.1, but I think it is too
late to have the WHPX CI running now (Thomas?). So we'll probably ignore
my surgical series and proceed with yours when 5.2 development window
opens.

> 
> I will post a new version of the series today with a couple changes;
> 
> the series could then be ready if HVF is already ready with its synchronize_state implementation? Otherwise we'd have to hold back the HVF patch.
> 
> Thanks!
> 
> Claudio
> 
> 
> On 8/5/20 12:01 PM, Philippe Mathieu-Daudé wrote:
>> 'icount' feature is only meaningful when using softmmu.
>> Move it out of the globally used exec.c, and define it as
>> 'false' in user-mode emulation.
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> ---
>>  include/sysemu/cpus.h | 4 ++++
>>  exec.c                | 4 ----
>>  softmmu/cpus.c        | 7 +++++++
>>  3 files changed, 11 insertions(+), 4 deletions(-)
>>
>> diff --git a/include/sysemu/cpus.h b/include/sysemu/cpus.h
>> index 3c1da6a018..d8442aa9f0 100644
>> --- a/include/sysemu/cpus.h
>> +++ b/include/sysemu/cpus.h
>> @@ -11,9 +11,13 @@ void pause_all_vcpus(void);
>>  void cpu_stop_current(void);
>>  void cpu_ticks_init(void);
>>  
>> +#if !defined(CONFIG_USER_ONLY)
>>  void configure_icount(QemuOpts *opts, Error **errp);
>>  extern int use_icount;
>>  extern int icount_align_option;
>> +#else
>> +#define use_icount false
>> +#endif
>>  
>>  /* drift information for info jit command */
>>  extern int64_t max_delay;
>> diff --git a/exec.c b/exec.c
>> index 6f381f98e2..a89ffa93c1 100644
>> --- a/exec.c
>> +++ b/exec.c
>> @@ -102,10 +102,6 @@ uintptr_t qemu_host_page_size;
>>  intptr_t qemu_host_page_mask;
>>  
>>  #if !defined(CONFIG_USER_ONLY)
>> -/* 0 = Do not count executed instructions.
>> -   1 = Precise instruction counting.
>> -   2 = Adaptive rate instruction counting.  */
>> -int use_icount;
>>  
>>  typedef struct PhysPageEntry PhysPageEntry;
>>  
>> diff --git a/softmmu/cpus.c b/softmmu/cpus.c
>> index a802e899ab..a4772034c0 100644
>> --- a/softmmu/cpus.c
>> +++ b/softmmu/cpus.c
>> @@ -81,6 +81,13 @@
>>  
>>  #endif /* CONFIG_LINUX */
>>  
>> +/*
>> + * 0 = Do not count executed instructions.
>> + * 1 = Precise instruction counting.
>> + * 2 = Adaptive rate instruction counting.
>> + */
>> +int use_icount;
>> +
>>  static QemuMutex qemu_global_mutex;
>>  
>>  int64_t max_delay;
>>
> 



  reply	other threads:[~2020-08-05 10:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-05 10:01 [PATCH-for-5.1 v3 0/2] stubs: Fix notify-event stub linkage error on MinGW Philippe Mathieu-Daudé
2020-08-05 10:01 ` [PATCH-for-5.1 v3 1/2] exec: Restrict icount to softmmu Philippe Mathieu-Daudé
2020-08-05 10:12   ` Claudio Fontana
2020-08-05 10:45     ` Philippe Mathieu-Daudé [this message]
2020-08-05 16:08   ` Richard Henderson
2020-08-05 10:01 ` [PATCH-for-5.1 v3 2/2] stubs: Remove qemu_notify_event() Philippe Mathieu-Daudé
2020-08-05 11:47 ` [PATCH-for-5.1 v3 0/2] stubs: Fix notify-event stub linkage error on MinGW Thomas Huth

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=47f3773f-93b8-51a5-7927-9830d60c3ee1@redhat.com \
    --to=philmd@redhat.com \
    --cc=cfontana@suse.de \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=r.bolshakov@yadro.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).