qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hw/nios2: Update interrupt request when CR_STATUS_PIE disabled
@ 2020-06-11  8:13 wentongw
  2020-06-12 13:43 ` Wu, Wentong
  2020-06-16 15:39 ` Peter Maydell
  0 siblings, 2 replies; 6+ messages in thread
From: wentongw @ 2020-06-11  8:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, marex, thuth, crwulff, wentongw

Update interrupt request when external interupt pends for STATUS_PIE
disabled. Otherwise on icount enabled nios2 target there will be cpu
abort when guest code changes state register with wrctl instruction.

Signed-off-by: Wentong Wu <wentong.wu@intel.com>
---
 hw/nios2/cpu_pic.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/nios2/cpu_pic.c b/hw/nios2/cpu_pic.c
index 1c1989d5..2abc8fa8 100644
--- a/hw/nios2/cpu_pic.c
+++ b/hw/nios2/cpu_pic.c
@@ -42,6 +42,8 @@ static void nios2_pic_cpu_handler(void *opaque, int irq, int level)
         } else if (!level) {
             env->irq_pending = 0;
             cpu_reset_interrupt(cs, type);
+        } else {
+            cs->interrupt_request |= type;
         }
     } else {
         if (level) {
-- 
2.21.3



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

end of thread, other threads:[~2020-06-18  3:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-11  8:13 [PATCH] hw/nios2: Update interrupt request when CR_STATUS_PIE disabled wentongw
2020-06-12 13:43 ` Wu, Wentong
2020-06-12 15:31   ` Philippe Mathieu-Daudé
2020-06-16 15:05     ` Wu, Wentong
2020-06-16 15:39 ` Peter Maydell
2020-06-18  3:08   ` Wu, Wentong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).