[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] linux-user: update comments to point to cpu_cre
From: |
Laurent Vivier |
Subject: |
Re: [Qemu-devel] [PATCH] linux-user: update comments to point to cpu_create() |
Date: |
Tue, 15 May 2018 17:28:46 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 |
Le 15/05/2018 à 16:22, Igor Mammedov a écrit :
> On Tue, 15 May 2018 13:32:33 +0200
> Laurent Vivier <address@hidden> 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 <address@hidden>
>>> ---
>>> 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