All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] linux-user: update comments to point to cpu_create()
@ 2018-05-15 11:17 Igor Mammedov
  2018-05-15 11:32 ` Laurent Vivier
  0 siblings, 1 reply; 4+ messages in thread
From: Igor Mammedov @ 2018-05-15 11:17 UTC (permalink / raw)
  To: qemu-devel; +Cc: riku.voipio, laurent

cpu_init() was replaced by cpu_create() since 2.12 but comments
weren't updated. So update stale comments now.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
---
 bsd-user/main.c   | 2 +-
 linux-user/main.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/bsd-user/main.c b/bsd-user/main.c
index 283dc6f..a6ef4a7 100644
--- a/bsd-user/main.c
+++ b/bsd-user/main.c
@@ -917,7 +917,7 @@ int main(int argc, char **argv)
     envlist_free(envlist);
 
     /*
-     * Now that page sizes are configured in cpu_init() we can do
+     * Now that page sizes are configured in cpu_create() we can do
      * proper page alignment for guest_base.
      */
     guest_base = HOST_PAGE_ALIGN(guest_base);
diff --git a/linux-user/main.c b/linux-user/main.c
index 3234754..27d0b37 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -693,7 +693,7 @@ int main(int argc, char **argv, char **envp)
     envlist_free(envlist);
 
     /*
-     * Now that page sizes are configured in cpu_init() we can do
+     * Now that page sizes are configured in cpu_create() we can do
      * proper page alignment for guest_base.
      */
     guest_base = HOST_PAGE_ALIGN(guest_base);
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] linux-user: update comments to point to cpu_create()
  2018-05-15 11:17 [Qemu-devel] [PATCH] linux-user: update comments to point to cpu_create() Igor Mammedov
@ 2018-05-15 11:32 ` Laurent Vivier
  2018-05-15 14:22   ` Igor Mammedov
  0 siblings, 1 reply; 4+ messages in thread
From: Laurent Vivier @ 2018-05-15 11:32 UTC (permalink / raw)
  To: Igor Mammedov, qemu-devel; +Cc: riku.voipio

Le 15/05/2018 à 13:17, Igor Mammedov a écrit :
> cpu_init() was replaced by cpu_create() since 2.12 but comments
> weren't updated. So update stale comments now.
> 
> Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> ---
>  bsd-user/main.c   | 2 +-
>  linux-user/main.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/bsd-user/main.c b/bsd-user/main.c
> index 283dc6f..a6ef4a7 100644
> --- a/bsd-user/main.c
> +++ b/bsd-user/main.c
> @@ -917,7 +917,7 @@ int main(int argc, char **argv)
>      envlist_free(envlist);
>  
>      /*
> -     * Now that page sizes are configured in cpu_init() we can do
> +     * Now that page sizes are configured in cpu_create() we can do
>       * proper page alignment for guest_base.
>       */
>      guest_base = HOST_PAGE_ALIGN(guest_base);
> diff --git a/linux-user/main.c b/linux-user/main.c
> index 3234754..27d0b37 100644
> --- a/linux-user/main.c
> +++ b/linux-user/main.c
> @@ -693,7 +693,7 @@ int main(int argc, char **argv, char **envp)
>      envlist_free(envlist);
>  
>      /*
> -     * Now that page sizes are configured in cpu_init() we can do
> +     * Now that page sizes are configured in cpu_create() we can do
>       * proper page alignment for guest_base.
>       */
>      guest_base = HOST_PAGE_ALIGN(guest_base);
> 

I think page size is now configured in tcg_exec_init() since:

  commit 26a5f13b8eb1281d0552fe323e869806f3cefbfb
  Author: bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
  Date:   Wed May 28 12:30:31 2008 +0000

      variable dynamic translation buffer size

Strangely comment has been added after this change by:

  commit 379f6698d73f476de38682b3ff96ecb226728c43
  Author: Paul Brook <paul@codesourcery.com>
  Date:   Fri Jul 17 12:48:08 2009 +0100

    Userspace guest address offsetting


Thanks,
Laurent

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] linux-user: update comments to point to cpu_create()
  2018-05-15 11:32 ` Laurent Vivier
@ 2018-05-15 14:22   ` Igor Mammedov
  2018-05-15 15:28     ` Laurent Vivier
  0 siblings, 1 reply; 4+ messages in thread
From: Igor Mammedov @ 2018-05-15 14:22 UTC (permalink / raw)
  To: Laurent Vivier; +Cc: qemu-devel, riku.voipio

On Tue, 15 May 2018 13:32:33 +0200
Laurent Vivier <laurent@vivier.eu> wrote:

> Le 15/05/2018 à 13:17, Igor Mammedov a écrit :
> > cpu_init() was replaced by cpu_create() since 2.12 but comments
> > weren't updated. So update stale comments now.
> > 
> > Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> > ---
> >  bsd-user/main.c   | 2 +-
> >  linux-user/main.c | 2 +-
> >  2 files changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/bsd-user/main.c b/bsd-user/main.c
> > index 283dc6f..a6ef4a7 100644
> > --- a/bsd-user/main.c
> > +++ b/bsd-user/main.c
> > @@ -917,7 +917,7 @@ int main(int argc, char **argv)
> >      envlist_free(envlist);
> >  
> >      /*
> > -     * Now that page sizes are configured in cpu_init() we can do
> > +     * Now that page sizes are configured in cpu_create() we can do
> >       * proper page alignment for guest_base.
> >       */
> >      guest_base = HOST_PAGE_ALIGN(guest_base);
> > diff --git a/linux-user/main.c b/linux-user/main.c
> > index 3234754..27d0b37 100644
> > --- a/linux-user/main.c
> > +++ b/linux-user/main.c
> > @@ -693,7 +693,7 @@ int main(int argc, char **argv, char **envp)
> >      envlist_free(envlist);
> >  
> >      /*
> > -     * Now that page sizes are configured in cpu_init() we can do
> > +     * Now that page sizes are configured in cpu_create() we can do
> >       * proper page alignment for guest_base.
> >       */
> >      guest_base = HOST_PAGE_ALIGN(guest_base);
> >   
> 
> I think page size is now configured in tcg_exec_init() since:
Should we drop this comments altogether?

> 
>   commit 26a5f13b8eb1281d0552fe323e869806f3cefbfb
>   Author: bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
>   Date:   Wed May 28 12:30:31 2008 +0000
> 
>       variable dynamic translation buffer size
> 
> Strangely comment has been added after this change by:
> 
>   commit 379f6698d73f476de38682b3ff96ecb226728c43
>   Author: Paul Brook <paul@codesourcery.com>
>   Date:   Fri Jul 17 12:48:08 2009 +0100
> 
>     Userspace guest address offsetting
> 
> 
> Thanks,
> Laurent

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] linux-user: update comments to point to cpu_create()
  2018-05-15 14:22   ` Igor Mammedov
@ 2018-05-15 15:28     ` Laurent Vivier
  0 siblings, 0 replies; 4+ messages in thread
From: Laurent Vivier @ 2018-05-15 15:28 UTC (permalink / raw)
  To: Igor Mammedov; +Cc: qemu-devel, riku.voipio

Le 15/05/2018 à 16:22, Igor Mammedov a écrit :
> On Tue, 15 May 2018 13:32:33 +0200
> Laurent Vivier <laurent@vivier.eu> wrote:
> 
>> Le 15/05/2018 à 13:17, Igor Mammedov a écrit :
>>> cpu_init() was replaced by cpu_create() since 2.12 but comments
>>> weren't updated. So update stale comments now.
>>>
>>> Signed-off-by: Igor Mammedov <imammedo@redhat.com>
>>> ---
>>>  bsd-user/main.c   | 2 +-
>>>  linux-user/main.c | 2 +-
>>>  2 files changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/bsd-user/main.c b/bsd-user/main.c
>>> index 283dc6f..a6ef4a7 100644
>>> --- a/bsd-user/main.c
>>> +++ b/bsd-user/main.c
>>> @@ -917,7 +917,7 @@ int main(int argc, char **argv)
>>>      envlist_free(envlist);
>>>  
>>>      /*
>>> -     * Now that page sizes are configured in cpu_init() we can do
>>> +     * Now that page sizes are configured in cpu_create() we can do
>>>       * proper page alignment for guest_base.
>>>       */
>>>      guest_base = HOST_PAGE_ALIGN(guest_base);
>>> diff --git a/linux-user/main.c b/linux-user/main.c
>>> index 3234754..27d0b37 100644
>>> --- a/linux-user/main.c
>>> +++ b/linux-user/main.c
>>> @@ -693,7 +693,7 @@ int main(int argc, char **argv, char **envp)
>>>      envlist_free(envlist);
>>>  
>>>      /*
>>> -     * Now that page sizes are configured in cpu_init() we can do
>>> +     * Now that page sizes are configured in cpu_create() we can do
>>>       * proper page alignment for guest_base.
>>>       */
>>>      guest_base = HOST_PAGE_ALIGN(guest_base);
>>>   
>>
>> I think page size is now configured in tcg_exec_init() since:
> Should we drop this comments altogether?

No, I think you can update your patch with:

-     * Now that page sizes are configured in cpu_init() we can do
+     * Now that page sizes are configured in tcg_exec_init() we can do

Even if it's not related anymore with cpu_create()...

but you should also update the comment between tcg_exec_init() and
cpu_create() and move it before tcg_exec_init().

I think it's good to know we can't use HOST_PAGE_ALIGN() before
qemu_host_page_size is set in tcg_exec_init().

Thanks,
Laurent

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-05-15 15:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-15 11:17 [Qemu-devel] [PATCH] linux-user: update comments to point to cpu_create() Igor Mammedov
2018-05-15 11:32 ` Laurent Vivier
2018-05-15 14:22   ` Igor Mammedov
2018-05-15 15:28     ` Laurent Vivier

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.