All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Fix mask of pte index
@ 2013-05-21  3:00 Qiao Nuohan
  2013-05-21  6:16 ` Jesse Larrew
  0 siblings, 1 reply; 8+ messages in thread
From: Qiao Nuohan @ 2013-05-21  3:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: aliguori, Qiao Nuohan

Function walk_pte needs pte index to calculate virtual address. However, pte
index of PAE paging or IA-32e paging is 9 bit, so the mask should be 0x1ff.
---
 target-i386/arch_memory_mapping.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/target-i386/arch_memory_mapping.c b/target-i386/arch_memory_mapping.c
index 844893f..a2eb7e7 100644
--- a/target-i386/arch_memory_mapping.c
+++ b/target-i386/arch_memory_mapping.c
@@ -38,7 +38,7 @@ static void walk_pte(MemoryMappingList *list, hwaddr pte_start_addr,
             continue;
         }
 
-        start_vaddr = start_line_addr | ((i & 0x1fff) << 12);
+        start_vaddr = start_line_addr | ((i & 0x1ff) << 12);
         memory_mapping_list_add_merge_sorted(list, start_paddr,
                                              start_vaddr, 1 << 12);
     }
-- 
1.7.1

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

* Re: [Qemu-devel] [PATCH] Fix mask of pte index
  2013-05-21  3:00 [Qemu-devel] [PATCH] Fix mask of pte index Qiao Nuohan
@ 2013-05-21  6:16 ` Jesse Larrew
  2013-05-21 11:32   ` Andreas Färber
  0 siblings, 1 reply; 8+ messages in thread
From: Jesse Larrew @ 2013-05-21  6:16 UTC (permalink / raw)
  To: Qiao Nuohan; +Cc: aliguori, qemu-devel

On 05/20/2013 10:00 PM, Qiao Nuohan wrote:
> Function walk_pte needs pte index to calculate virtual address. However, pte
> index of PAE paging or IA-32e paging is 9 bit, so the mask should be 0x1ff.
> ---
>  target-i386/arch_memory_mapping.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/target-i386/arch_memory_mapping.c b/target-i386/arch_memory_mapping.c
> index 844893f..a2eb7e7 100644
> --- a/target-i386/arch_memory_mapping.c
> +++ b/target-i386/arch_memory_mapping.c
> @@ -38,7 +38,7 @@ static void walk_pte(MemoryMappingList *list, hwaddr pte_start_addr,
>              continue;
>          }
> 
> -        start_vaddr = start_line_addr | ((i & 0x1fff) << 12);
> +        start_vaddr = start_line_addr | ((i & 0x1ff) << 12);
>          memory_mapping_list_add_merge_sorted(list, start_paddr,
>                                               start_vaddr, 1 << 12);
>      }
> 

Verified that this agrees with the spec for IA-32e/PAE paging. Note that
walk_pte2() is correct; only walk_pte() has the typo.

Reviewed by: Jesse Larrew <jlarrew@linux.vnet.ibm.com>

Jesse Larrew
Software Engineer, KVM Team
IBM Linux Technology Center
Phone: (512) 973-2052 (T/L: 363-2052)
jlarrew@linux.vnet.ibm.com

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

* Re: [Qemu-devel] [PATCH] Fix mask of pte index
  2013-05-21  6:16 ` Jesse Larrew
@ 2013-05-21 11:32   ` Andreas Färber
  2013-05-21 12:05     ` Qiao Nuohan
  0 siblings, 1 reply; 8+ messages in thread
From: Andreas Färber @ 2013-05-21 11:32 UTC (permalink / raw)
  To: Qiao Nuohan; +Cc: aliguori, Jesse Larrew, qemu-devel

Nuohan,

Am 21.05.2013 08:16, schrieb Jesse Larrew:
> On 05/20/2013 10:00 PM, Qiao Nuohan wrote:
>> Function walk_pte needs pte index to calculate virtual address. However, pte
>> index of PAE paging or IA-32e paging is 9 bit, so the mask should be 0x1ff.
>> ---
>>  target-i386/arch_memory_mapping.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/target-i386/arch_memory_mapping.c b/target-i386/arch_memory_mapping.c
>> index 844893f..a2eb7e7 100644
>> --- a/target-i386/arch_memory_mapping.c
>> +++ b/target-i386/arch_memory_mapping.c
>> @@ -38,7 +38,7 @@ static void walk_pte(MemoryMappingList *list, hwaddr pte_start_addr,
>>              continue;
>>          }
>>
>> -        start_vaddr = start_line_addr | ((i & 0x1fff) << 12);
>> +        start_vaddr = start_line_addr | ((i & 0x1ff) << 12);
>>          memory_mapping_list_add_merge_sorted(list, start_paddr,
>>                                               start_vaddr, 1 << 12);
>>      }
>>
> 
> Verified that this agrees with the spec for IA-32e/PAE paging. Note that
> walk_pte2() is correct; only walk_pte() has the typo.
> 
> Reviewed by: Jesse Larrew <jlarrew@linux.vnet.ibm.com>

This patch is missing a Signed-off-by!

If you can reply with one, I'd fix up the subject for you (it should
indicate where you are fixing it) and queue it together with my CPU'ish
memory_mapping refactorings, if no one objects.

Regards,
Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

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

* Re: [Qemu-devel] [PATCH] Fix mask of pte index
  2013-05-21 11:32   ` Andreas Färber
@ 2013-05-21 12:05     ` Qiao Nuohan
  2013-05-21 16:53       ` Andreas Färber
  0 siblings, 1 reply; 8+ messages in thread
From: Qiao Nuohan @ 2013-05-21 12:05 UTC (permalink / raw)
  To: Andreas Färber; +Cc: aliguori, Jesse Larrew, qemu-devel

On 05/21/2013 07:32 PM, Andreas Färber wrote:
> This patch is missing a Signed-off-by!

Ha! I forgot it.

>
> If you can reply with one, I'd fix up the subject for you (it should
> indicate where you are fixing it) and queue it together with my CPU'ish
> memory_mapping refactorings, if no one objects.

Well, I have got no reason to object. And thanks.


-- 
Regards
Qiao Nuohan

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

* Re: [Qemu-devel] [PATCH] Fix mask of pte index
  2013-05-21 12:05     ` Qiao Nuohan
@ 2013-05-21 16:53       ` Andreas Färber
  2013-05-22  1:21         ` Qiao Nuohan
  0 siblings, 1 reply; 8+ messages in thread
From: Andreas Färber @ 2013-05-21 16:53 UTC (permalink / raw)
  To: Qiao Nuohan; +Cc: aliguori, Jesse Larrew, qemu-devel

Am 21.05.2013 14:05, schrieb Qiao Nuohan:
> On 05/21/2013 07:32 PM, Andreas Färber wrote:
>> This patch is missing a Signed-off-by!
> 
> Ha! I forgot it.
> 
>>
>> If you can reply with one, I'd fix up the subject for you (it should
>> indicate where you are fixing it) and queue it together with my CPU'ish
>> memory_mapping refactorings, if no one objects.
> 
> Well, I have got no reason to object. And thanks.

Still no Signed-off-by line in your reply nor a resend on the list, so I
can't do anything yet - did you forget? Or do you intend to send a v2?

Regards,
Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

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

* Re: [Qemu-devel] [PATCH] Fix mask of pte index
  2013-05-21 16:53       ` Andreas Färber
@ 2013-05-22  1:21         ` Qiao Nuohan
  2013-05-22  1:25           ` Qiao Nuohan
  0 siblings, 1 reply; 8+ messages in thread
From: Qiao Nuohan @ 2013-05-22  1:21 UTC (permalink / raw)
  To: Andreas Färber; +Cc: aliguori, Jesse Larrew, qemu-devel

Function walk_pte needs pte index to calculate virtual address. However, pte
index of PAE paging or IA-32e paging is 9 bit, so the mask should be 0x1ff.

Signed-off-by: Qiao Nuohan <qiaonuohan@cn.fujitsu.com>
---
  target-i386/arch_memory_mapping.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/target-i386/arch_memory_mapping.c 
b/target-i386/arch_memory_mapping.c
index 844893f..a2eb7e7 100644
--- a/target-i386/arch_memory_mapping.c
+++ b/target-i386/arch_memory_mapping.c
@@ -38,7 +38,7 @@ static void walk_pte(MemoryMappingList *list, hwaddr 
pte_start_addr,
              continue;
          }

-        start_vaddr = start_line_addr | ((i & 0x1fff) << 12);
+        start_vaddr = start_line_addr | ((i & 0x1ff) << 12);
          memory_mapping_list_add_merge_sorted(list, start_paddr,
                                               start_vaddr, 1 << 12);
      }
-- 
1.7.1

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

* Re: [Qemu-devel] [PATCH] Fix mask of pte index
  2013-05-22  1:21         ` Qiao Nuohan
@ 2013-05-22  1:25           ` Qiao Nuohan
  2013-05-22 12:48             ` Andreas Färber
  0 siblings, 1 reply; 8+ messages in thread
From: Qiao Nuohan @ 2013-05-22  1:25 UTC (permalink / raw)
  To: Andreas Färber; +Cc: aliguori, Jesse Larrew, qemu-devel

On 05/22/2013 09:21 AM, Qiao Nuohan wrote:
> Function walk_pte needs pte index to calculate virtual address. However,
> pte
> index of PAE paging or IA-32e paging is 9 bit, so the mask should be 0x1ff.
>
> Signed-off-by: Qiao Nuohan <qiaonuohan@cn.fujitsu.com>

Reviewed by: Jesse Larrew <jlarrew@linux.vnet.ibm.com>

> ---
> target-i386/arch_memory_mapping.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/target-i386/arch_memory_mapping.c
> b/target-i386/arch_memory_mapping.c
> index 844893f..a2eb7e7 100644
> --- a/target-i386/arch_memory_mapping.c
> +++ b/target-i386/arch_memory_mapping.c
> @@ -38,7 +38,7 @@ static void walk_pte(MemoryMappingList *list, hwaddr
> pte_start_addr,
> continue;
> }
>
> - start_vaddr = start_line_addr | ((i & 0x1fff) << 12);
> + start_vaddr = start_line_addr | ((i & 0x1ff) << 12);
> memory_mapping_list_add_merge_sorted(list, start_paddr,
> start_vaddr, 1 << 12);
> }

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

* Re: [Qemu-devel] [PATCH] Fix mask of pte index
  2013-05-22  1:25           ` Qiao Nuohan
@ 2013-05-22 12:48             ` Andreas Färber
  0 siblings, 0 replies; 8+ messages in thread
From: Andreas Färber @ 2013-05-22 12:48 UTC (permalink / raw)
  To: Qiao Nuohan; +Cc: aliguori, Jesse Larrew, qemu-devel

Am 22.05.2013 03:25, schrieb Qiao Nuohan:
> On 05/22/2013 09:21 AM, Qiao Nuohan wrote:
>> Function walk_pte needs pte index to calculate virtual address. However,
>> pte
>> index of PAE paging or IA-32e paging is 9 bit, so the mask should be
>> 0x1ff.
>>
>> Signed-off-by: Qiao Nuohan <qiaonuohan@cn.fujitsu.com>
> 
> Reviewed by: Jesse Larrew <jlarrew@linux.vnet.ibm.com>

Thanks, applied to qom-cpu (with change to subject):
https://github.com/afaerber/qemu-cpu/commits/qom-cpu

Note that this patch did not apply, but the original one did.

Regards,
Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

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

end of thread, other threads:[~2013-05-22 12:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-21  3:00 [Qemu-devel] [PATCH] Fix mask of pte index Qiao Nuohan
2013-05-21  6:16 ` Jesse Larrew
2013-05-21 11:32   ` Andreas Färber
2013-05-21 12:05     ` Qiao Nuohan
2013-05-21 16:53       ` Andreas Färber
2013-05-22  1:21         ` Qiao Nuohan
2013-05-22  1:25           ` Qiao Nuohan
2013-05-22 12:48             ` Andreas Färber

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.