All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 0/2] Correction of the TLB handling of the OpenRISC target
@ 2013-10-03  8:41 Jia Liu
  2013-10-03  8:41 ` [Qemu-devel] [PULL 1/2] target-openrisc: Correct handling of page faults Jia Liu
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Jia Liu @ 2013-10-03  8:41 UTC (permalink / raw)
  To: qemu-devel; +Cc: sebastian, aliguori, stefan.kristiansson

Hi Anthony,

This is my OpenRISC patch queue. It originally come from Sebastian Macke,
split by me, and I used some comment come from Stefan Kristiansson.

Please pull.

This patch set correct two problems. The first one corrects one obvious
bug concerning the handling of page faults while reading from a page.
The second part removes a non-conforming behavior for the first page of
the memory.

Sebastian have tested this patch with the newest Linux kernel and compared
the output with or1ksim.


The following changes since commit a684f3cf9b9b9c3cb82be87aafc463de8974610c:

  Merge remote-tracking branch 'kraxel/seabios-1.7.3.2' into staging (2013-09-30 17:15:27 -0500)

are available in the git repository at:


  git://github.com/J-Liu/qemu.git or32

for you to fetch changes up to 6ef8263ead779e1eecfaf1e0388f4c3941ea7ec3:

  target-openrisc: Removes a non-conforming behavior for the first page of the memory (2013-10-03 16:24:44 +0800)

----------------------------------------------------------------
Sebastian Macke (2):
      target-openrisc: Correct handling of page faults.
      target-openrisc: Removes a non-conforming behavior for the first page of the memory

 target-openrisc/mmu.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

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

* [Qemu-devel] [PULL 1/2] target-openrisc: Correct handling of page faults.
  2013-10-03  8:41 [Qemu-devel] [PULL 0/2] Correction of the TLB handling of the OpenRISC target Jia Liu
@ 2013-10-03  8:41 ` Jia Liu
  2013-10-03  8:41 ` [Qemu-devel] [PULL 2/2] target-openrisc: Removes a non-conforming behavior for the first page of the memory Jia Liu
  2013-10-03  9:00 ` [Qemu-devel] [PULL 0/2] Correction of the TLB handling of the OpenRISC target Peter Maydell
  2 siblings, 0 replies; 6+ messages in thread
From: Jia Liu @ 2013-10-03  8:41 UTC (permalink / raw)
  To: qemu-devel; +Cc: sebastian, aliguori, stefan.kristiansson

From: Sebastian Macke <sebastian@macke.de>

The result of (rw & 0) is always zero and therefore a logic false.
The whole comparison will therefore never be executed, it is a obvious bug,
we should use !(rw & 1) here.

Signed-off-by: Sebastian Macke <sebastian@macke.de>
Reviewed-by: Jia Liu <proljc@gmail.com>
---
 target-openrisc/mmu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target-openrisc/mmu.c b/target-openrisc/mmu.c
index 57f5616..323a173 100644
--- a/target-openrisc/mmu.c
+++ b/target-openrisc/mmu.c
@@ -102,7 +102,7 @@ int cpu_openrisc_get_phys_data(OpenRISCCPU *cpu,
         }
     }
 
-    if ((rw & 0) && ((right & PAGE_READ) == 0)) {
+    if (!(rw & 1) && ((right & PAGE_READ) == 0)) {
         return TLBRET_BADADDR;
     }
     if ((rw & 1) && ((right & PAGE_WRITE) == 0)) {
-- 
1.7.12.4 (Apple Git-37)

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

* [Qemu-devel] [PULL 2/2] target-openrisc: Removes a non-conforming behavior for the first page of the memory
  2013-10-03  8:41 [Qemu-devel] [PULL 0/2] Correction of the TLB handling of the OpenRISC target Jia Liu
  2013-10-03  8:41 ` [Qemu-devel] [PULL 1/2] target-openrisc: Correct handling of page faults Jia Liu
@ 2013-10-03  8:41 ` Jia Liu
  2013-10-03  9:00 ` [Qemu-devel] [PULL 0/2] Correction of the TLB handling of the OpenRISC target Peter Maydell
  2 siblings, 0 replies; 6+ messages in thread
From: Jia Liu @ 2013-10-03  8:41 UTC (permalink / raw)
  To: qemu-devel; +Cc: sebastian, aliguori, stefan.kristiansson

From: Sebastian Macke <sebastian@macke.de>

Where *software* leaves 0x0000 - 0x2000 unmapped, the hardware should
still allow for this area to be mapped.

Signed-off-by: Sebastian Macke <sebastian@macke.de>
Signed-off-by: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
Reviewed-by: Jia Liu <proljc@gmail.com>
---
 target-openrisc/mmu.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/target-openrisc/mmu.c b/target-openrisc/mmu.c
index 323a173..22d7cbe 100644
--- a/target-openrisc/mmu.c
+++ b/target-openrisc/mmu.c
@@ -122,13 +122,6 @@ static int cpu_openrisc_get_phys_addr(OpenRISCCPU *cpu,
 {
     int ret = TLBRET_MATCH;
 
-    /* [0x0000--0x2000]: unmapped */
-    if (address < 0x2000 && (cpu->env.sr & SR_SM)) {
-        *physical = address;
-        *prot = PAGE_READ | PAGE_WRITE;
-        return ret;
-    }
-
     if (rw == 2) {    /* ITLB */
        *physical = 0;
         ret = cpu->env.tlb->cpu_openrisc_map_address_code(cpu, physical,
-- 
1.7.12.4 (Apple Git-37)

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

* Re: [Qemu-devel] [PULL 0/2] Correction of the TLB handling of the OpenRISC target
  2013-10-03  8:41 [Qemu-devel] [PULL 0/2] Correction of the TLB handling of the OpenRISC target Jia Liu
  2013-10-03  8:41 ` [Qemu-devel] [PULL 1/2] target-openrisc: Correct handling of page faults Jia Liu
  2013-10-03  8:41 ` [Qemu-devel] [PULL 2/2] target-openrisc: Removes a non-conforming behavior for the first page of the memory Jia Liu
@ 2013-10-03  9:00 ` Peter Maydell
  2013-10-03 12:06   ` Jia Liu
  2013-10-14  9:06   ` Jia Liu
  2 siblings, 2 replies; 6+ messages in thread
From: Peter Maydell @ 2013-10-03  9:00 UTC (permalink / raw)
  To: Jia Liu; +Cc: sebastian, Anthony Liguori, QEMU Developers, stefan.kristiansson

On 3 October 2013 17:41, Jia Liu <proljc@gmail.com> wrote:
> Hi Anthony,
>
> This is my OpenRISC patch queue. It originally come from Sebastian Macke,
> split by me, and I used some comment come from Stefan Kristiansson.
>
> Please pull.

As this is a pull request, the patches in it need your Signed-off-by,
not just Reviewed-by.

thanks
-- PMM

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

* Re: [Qemu-devel] [PULL 0/2] Correction of the TLB handling of the OpenRISC target
  2013-10-03  9:00 ` [Qemu-devel] [PULL 0/2] Correction of the TLB handling of the OpenRISC target Peter Maydell
@ 2013-10-03 12:06   ` Jia Liu
  2013-10-14  9:06   ` Jia Liu
  1 sibling, 0 replies; 6+ messages in thread
From: Jia Liu @ 2013-10-03 12:06 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Sebastian Macke, Anthony Liguori, QEMU Developers, Stefan Kristiansson

Hi Peter,

On Thu, Oct 3, 2013 at 5:00 PM, Peter Maydell <peter.maydell@linaro.org> wrote:
> On 3 October 2013 17:41, Jia Liu <proljc@gmail.com> wrote:
>> Hi Anthony,
>>
>> This is my OpenRISC patch queue. It originally come from Sebastian Macke,
>> split by me, and I used some comment come from Stefan Kristiansson.
>>
>> Please pull.
>
> As this is a pull request, the patches in it need your Signed-off-by,
> not just Reviewed-by.

Thank you for mention.

>
> thanks
> -- PMM

Regards,
Jia

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

* Re: [Qemu-devel] [PULL 0/2] Correction of the TLB handling of the OpenRISC target
  2013-10-03  9:00 ` [Qemu-devel] [PULL 0/2] Correction of the TLB handling of the OpenRISC target Peter Maydell
  2013-10-03 12:06   ` Jia Liu
@ 2013-10-14  9:06   ` Jia Liu
  1 sibling, 0 replies; 6+ messages in thread
From: Jia Liu @ 2013-10-14  9:06 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Sebastian Macke, Anthony Liguori, QEMU Developers, Stefan Kristiansson

Hi Anthony,
Hi Peter,


On Thu, Oct 3, 2013 at 5:00 PM, Peter Maydell <peter.maydell@linaro.org> wrote:
> On 3 October 2013 17:41, Jia Liu <proljc@gmail.com> wrote:
>> Hi Anthony,
>>
>> This is my OpenRISC patch queue. It originally come from Sebastian Macke,
>> split by me, and I used some comment come from Stefan Kristiansson.
>>
>> Please pull.
>
> As this is a pull request, the patches in it need your Signed-off-by,
> not just Reviewed-by.

Need I resend this pull request?

>
> thanks
> -- PMM

Regards,
Jia

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

end of thread, other threads:[~2013-10-14  9:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-03  8:41 [Qemu-devel] [PULL 0/2] Correction of the TLB handling of the OpenRISC target Jia Liu
2013-10-03  8:41 ` [Qemu-devel] [PULL 1/2] target-openrisc: Correct handling of page faults Jia Liu
2013-10-03  8:41 ` [Qemu-devel] [PULL 2/2] target-openrisc: Removes a non-conforming behavior for the first page of the memory Jia Liu
2013-10-03  9:00 ` [Qemu-devel] [PULL 0/2] Correction of the TLB handling of the OpenRISC target Peter Maydell
2013-10-03 12:06   ` Jia Liu
2013-10-14  9:06   ` Jia Liu

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.