#include "sysemu/tcg.h"
#include "exec/exec-all.h"
#include "exec/page-protection.h"
-#include "trace.h"
#include "hw/hw.h"
#include "hw/s390x/storage-keys.h"
#include "hw/boards.h"
static S390SKeysClass *skeyclass;
static S390SKeysState *ss;
uint8_t key, old_key;
- int rc;
/*
* We expect to be called with an absolute address that has already been
*
* TODO: we have races between getting and setting the key.
*/
- rc = skeyclass->get_skeys(ss, addr / TARGET_PAGE_SIZE, 1, &key);
- if (rc) {
- trace_get_skeys_nonzero(rc);
+ if (s390_skeys_get(ss, addr / TARGET_PAGE_SIZE, 1, &key)) {
return;
}
old_key = key;
key |= SK_R;
if (key != old_key) {
- rc = skeyclass->set_skeys(ss, addr / TARGET_PAGE_SIZE, 1, &key);
- if (rc) {
- trace_set_skeys_nonzero(rc);
- }
+ s390_skeys_set(ss, addr / TARGET_PAGE_SIZE, 1, &key);
}
}
#include "hw/core/tcg-cpu-ops.h"
#include "qemu/int128.h"
#include "qemu/atomic128.h"
-#include "trace.h"
#if !defined(CONFIG_USER_ONLY)
#include "hw/s390x/storage-keys.h"
}
}
- rc = skeyclass->get_skeys(ss, addr / TARGET_PAGE_SIZE, 1, &key);
+ rc = s390_skeys_get(ss, addr / TARGET_PAGE_SIZE, 1, &key);
if (rc) {
- trace_get_skeys_nonzero(rc);
return 0;
}
return key;
static S390SKeysClass *skeyclass;
uint64_t addr = wrap_address(env, r2);
uint8_t key;
- int rc;
addr = mmu_real2abs(env, addr);
if (!mmu_absolute_addr_valid(addr, false)) {
}
key = r1 & 0xfe;
- rc = skeyclass->set_skeys(ss, addr / TARGET_PAGE_SIZE, 1, &key);
- if (rc) {
- trace_set_skeys_nonzero(rc);
- }
+ s390_skeys_set(ss, addr / TARGET_PAGE_SIZE, 1, &key);
/*
* As we can only flush by virtual address and not all the entries
* that point to a physical address we have to flush the whole TLB.
}
}
- rc = skeyclass->get_skeys(ss, addr / TARGET_PAGE_SIZE, 1, &key);
+ rc = s390_skeys_get(ss, addr / TARGET_PAGE_SIZE, 1, &key);
if (rc) {
- trace_get_skeys_nonzero(rc);
return 0;
}
re = key & (SK_R | SK_C);
key &= ~SK_R;
- rc = skeyclass->set_skeys(ss, addr / TARGET_PAGE_SIZE, 1, &key);
+ rc = s390_skeys_set(ss, addr / TARGET_PAGE_SIZE, 1, &key);
if (rc) {
- trace_set_skeys_nonzero(rc);
return 0;
}
/*
# See docs/devel/tracing.rst for syntax documentation.
-# mmu_helper.c
-get_skeys_nonzero(int rc) "SKEY: Call to get_skeys unexpectedly returned %d"
-set_skeys_nonzero(int rc) "SKEY: Call to set_skeys unexpectedly returned %d"
-
# ioinst.c
ioinst(const char *insn) "IOINST: %s"
ioinst_sch_id(const char *insn, int cssid, int ssid, int schid) "IOINST: %s (%x.%x.%04x)"