[Qemu-devel] [PATCH v1 2/6] target/s390x: fix pgm irq ilen in translate_pages()

David Hildenbrand posted 6 patches 8 years, 3 months ago
[Qemu-devel] [PATCH v1 2/6] target/s390x: fix pgm irq ilen in translate_pages()
Posted by David Hildenbrand 8 years, 3 months ago
0 is certainly wrong. Let's use ILEN_AUTO.

Signed-off-by: David Hildenbrand <david@redhat.com>
---
 target/s390x/mmu_helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/s390x/mmu_helper.c b/target/s390x/mmu_helper.c
index a873dc4..1ad0158 100644
--- a/target/s390x/mmu_helper.c
+++ b/target/s390x/mmu_helper.c
@@ -440,7 +440,7 @@ static int translate_pages(S390CPU *cpu, vaddr addr, int nr_pages,
         }
         if (!address_space_access_valid(&address_space_memory, pages[i],
                                         TARGET_PAGE_SIZE, is_write)) {
-            program_interrupt(env, PGM_ADDRESSING, 0);
+            program_interrupt(env, PGM_ADDRESSING, ILEN_AUTO);
             return -EFAULT;
         }
         addr += TARGET_PAGE_SIZE;
-- 
2.9.4


Re: [Qemu-devel] [PATCH v1 2/6] target/s390x: fix pgm irq ilen in translate_pages()
Posted by Thomas Huth 8 years, 3 months ago
On 21.07.2017 14:56, David Hildenbrand wrote:
> 0 is certainly wrong. Let's use ILEN_AUTO.
> 
> Signed-off-by: David Hildenbrand <david@redhat.com>
> ---
>  target/s390x/mmu_helper.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/target/s390x/mmu_helper.c b/target/s390x/mmu_helper.c
> index a873dc4..1ad0158 100644
> --- a/target/s390x/mmu_helper.c
> +++ b/target/s390x/mmu_helper.c
> @@ -440,7 +440,7 @@ static int translate_pages(S390CPU *cpu, vaddr addr, int nr_pages,
>          }
>          if (!address_space_access_valid(&address_space_memory, pages[i],
>                                          TARGET_PAGE_SIZE, is_write)) {
> -            program_interrupt(env, PGM_ADDRESSING, 0);
> +            program_interrupt(env, PGM_ADDRESSING, ILEN_AUTO);
>              return -EFAULT;
>          }
>          addr += TARGET_PAGE_SIZE;
> 

That makes more sense, indeed.

Reviewed-by: Thomas Huth <thuth@redhat.com>

Re: [Qemu-devel] [PATCH v1 2/6] target/s390x: fix pgm irq ilen in translate_pages()
Posted by Cornelia Huck 8 years, 3 months ago
On Fri, 21 Jul 2017 14:56:05 +0200
David Hildenbrand <david@redhat.com> wrote:

> 0 is certainly wrong. Let's use ILEN_AUTO.
> 
> Signed-off-by: David Hildenbrand <david@redhat.com>
> ---
>  target/s390x/mmu_helper.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/target/s390x/mmu_helper.c b/target/s390x/mmu_helper.c
> index a873dc4..1ad0158 100644
> --- a/target/s390x/mmu_helper.c
> +++ b/target/s390x/mmu_helper.c
> @@ -440,7 +440,7 @@ static int translate_pages(S390CPU *cpu, vaddr addr, int nr_pages,
>          }
>          if (!address_space_access_valid(&address_space_memory, pages[i],
>                                          TARGET_PAGE_SIZE, is_write)) {
> -            program_interrupt(env, PGM_ADDRESSING, 0);
> +            program_interrupt(env, PGM_ADDRESSING, ILEN_AUTO);
>              return -EFAULT;
>          }
>          addr += TARGET_PAGE_SIZE;

Thanks, applied.