qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v1 04/12] s390x/tcg: check for addressing exceptions for for


From: David Hildenbrand
Subject: Re: [PATCH v1 04/12] s390x/tcg: check for addressing exceptions for for RRBE, SSKE and ISKE
Date: Thu, 5 Aug 2021 19:33:58 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

  void HELPER(sske)(CPUS390XState *env, uint64_t r1, uint64_t r2)
  {
-    MachineState *ms = MACHINE(qdev_get_machine());
      static S390SKeysState *ss;
      static S390SKeysClass *skeyclass;
      uint64_t addr = wrap_address(env, r2);
      uint8_t key;
+    int rc;
addr = mmu_real2abs(env, addr);
-    if (addr > ms->ram_size) {
-        return;
+    if (!mmu_absolute_addr_valid(addr, false)) {
+        trigger_pgm_exception(env, PGM_ADDRESSING);
      }
if (unlikely(!ss)) {
@@ -2213,7 +2216,11 @@ void HELPER(sske)(CPUS390XState *env, uint64_t r1, 
uint64_t r2)
      }
key = r1 & 0xfe;
-    skeyclass->set_skeys(ss, addr / TARGET_PAGE_SIZE, 1, &key);
+    rc = skeyclass->set_skeys(ss, addr / TARGET_PAGE_SIZE, 1, &key);
+    if (rc) {
+        trace_set_skeys_nonzero(rc);
+        return 0;

^ this has to go.


--
Thanks,

David / dhildenb




reply via email to

[Prev in Thread] Current Thread [Next in Thread]