/openbmc/linux/tools/testing/selftests/kvm/x86_64/ |
H A D | set_sregs_test.c | 34 memcpy(&new, &orig, sizeof(sregs)); \ 42 TEST_ASSERT(!memcmp(&new, &orig, sizeof(new)), "KVM modified sregs"); \ 78 struct kvm_sregs sregs; in main() local 92 vcpu_sregs_get(vcpu, &sregs); in main() 94 sregs.cr0 = 0; in main() 95 sregs.cr4 |= calc_supported_cr4_feature_bits(); in main() 96 cr4 = sregs.cr4; in main() 98 rc = _vcpu_sregs_set(vcpu, &sregs); in main() 101 vcpu_sregs_get(vcpu, &sregs); in main() 102 TEST_ASSERT(sregs.cr4 == cr4, "sregs.CR4 (0x%llx) != CR4 (0x%lx)", in main() [all …]
|
H A D | sync_regs_test.c | 131 * Toggle CR4.PAE while KVM is processing SREGS, EFER.LME=1 with CR4.PAE=0 is 137 __u64 *cr4 = &run->s.regs.sregs.cr4; in race_sregs_cr4() 180 TEST_ASSERT((run->s.regs.sregs.cr4 & X86_CR4_PAE) && in race_sync_regs() 181 (run->s.regs.sregs.efer & EFER_LME), in race_sync_regs() 183 !!(run->s.regs.sregs.cr4 & X86_CR4_PAE), in race_sync_regs() 184 !!(run->s.regs.sregs.efer & EFER_LME)); in race_sync_regs() 217 struct kvm_sregs sregs; in main() local 268 vcpu_sregs_get(vcpu, &sregs); in main() 269 compare_sregs(&sregs, &run->s.regs.sregs); in main() 276 run->s.regs.sregs.apic_base = 1 << 11; in main() [all …]
|
H A D | vmx_invalid_nested_guest_state.c | 56 struct kvm_sregs sregs; in main() local 88 memset(&sregs, 0, sizeof(sregs)); in main() 89 vcpu_sregs_get(vcpu, &sregs); in main() 90 sregs.tr.unusable = 1; in main() 91 vcpu_sregs_set(vcpu, &sregs); in main()
|
H A D | cr4_cpuid_sync_test.c | 54 struct kvm_sregs sregs; in main() local 68 vcpu_sregs_get(vcpu, &sregs); in main() 69 sregs.cr4 &= ~X86_CR4_OSXSAVE; in main() 70 vcpu_sregs_set(vcpu, &sregs); in main()
|
H A D | vmx_exception_with_invalid_guest_state.c | 58 static struct kvm_sregs sregs; in set_or_clear_invalid_guest_state() local 60 if (!sregs.cr0) in set_or_clear_invalid_guest_state() 61 vcpu_sregs_get(vcpu, &sregs); in set_or_clear_invalid_guest_state() 62 sregs.tr.unusable = !!set; in set_or_clear_invalid_guest_state() 63 vcpu_sregs_set(vcpu, &sregs); in set_or_clear_invalid_guest_state()
|
/openbmc/qemu/target/xtensa/ |
H A D | exc_helper.c | 53 if (env->sregs[PS] & PS_EXCM) { in HELPER() 55 env->sregs[DEPC] = pc; in HELPER() 57 env->sregs[EPC1] = pc; in HELPER() 61 env->sregs[EPC1] = pc; in HELPER() 62 vector = (env->sregs[PS] & PS_UM) ? EXC_USER : EXC_KERNEL; in HELPER() 65 env->sregs[EXCCAUSE] = cause; in HELPER() 66 env->sregs[PS] |= PS_EXCM; in HELPER() 74 env->sregs[EXCVADDR] = vaddr; in HELPER() 90 env->sregs[DEBUGCAUSE] = cause; in HELPER() 91 env->sregs[EPC1 + level - 1] = pc; in HELPER() [all …]
|
H A D | win_helper.c | 79 copy_window_from_phys(env, 0, env->sregs[WINDOW_BASE] * 4, 16); in xtensa_sync_window_from_phys() 84 copy_phys_from_window(env, env->sregs[WINDOW_BASE] * 4, 0, 16); in xtensa_sync_phys_from_window() 90 env->sregs[WINDOW_BASE] = windowbase_bound(position, env); in xtensa_rotate_window_abs() 96 xtensa_rotate_window_abs(env, env->sregs[WINDOW_BASE] + delta); in xtensa_rotate_window() 106 int callinc = (env->sregs[PS] & PS_CALLINC) >> PS_CALLINC_SHIFT; in HELPER() 109 env->windowbase_next = env->sregs[WINDOW_BASE] + callinc; in HELPER() 110 env->sregs[WINDOW_START] |= windowstart_bit(env->windowbase_next, env); in HELPER() 115 uint32_t windowbase = windowbase_bound(env->sregs[WINDOW_BASE], env); in HELPER() 117 (env->sregs[WINDOW_BASE] + 1); in HELPER() 123 env->sregs[PS] = (env->sregs[PS] & ~PS_OWB) | in HELPER() [all …]
|
H A D | dbg_helper.c | 39 uint32_t change = v ^ env->sregs[IBREAKENABLE]; in HELPER() 45 cpu_breakpoint_insert(cs, env->sregs[IBREAKA + i], in HELPER() 53 env->sregs[IBREAKENABLE] = v & ((1 << env->config->nibreak) - 1); in HELPER() 58 if (env->sregs[IBREAKENABLE] & (1 << i) && env->sregs[IBREAKA + i] != v) { in HELPER() 64 env->sregs[IBREAKA + i] = v; in HELPER() 76 if (env->sregs[IBREAKENABLE] & (1 << i) && in xtensa_debug_check_breakpoint() 77 env->sregs[IBREAKA + i] == env->pc) { in xtensa_debug_check_breakpoint() 118 uint32_t dbreakc = env->sregs[DBREAKC + i]; in HELPER() 121 env->sregs[DBREAKA + i] != v) { in HELPER() 124 env->sregs[DBREAKA + i] = v; in HELPER() [all …]
|
H A D | cpu.c | 109 env->sregs[LITBASE] &= ~1; in xtensa_cpu_reset_hold() 111 env->sregs[PS] = xtensa_option_enabled(env->config, in xtensa_cpu_reset_hold() 115 env->sregs[PS] = PS_UM | (3 << PS_RING_SHIFT); in xtensa_cpu_reset_hold() 119 env->sregs[PS] |= PS_WOE; in xtensa_cpu_reset_hold() 121 env->sregs[CPENABLE] = 0xff; in xtensa_cpu_reset_hold() 123 env->sregs[VECBASE] = env->config->vecbase; in xtensa_cpu_reset_hold() 124 env->sregs[IBREAKENABLE] = 0; in xtensa_cpu_reset_hold() 125 env->sregs[MEMCTL] = MEMCTL_IL0EN & env->config->memctl_mask; in xtensa_cpu_reset_hold() 126 env->sregs[ATOMCTL] = xtensa_option_enabled(env->config, in xtensa_cpu_reset_hold() 128 env->sregs[CONFIGID0] = env->config->configid[0]; in xtensa_cpu_reset_hold() [all …]
|
H A D | cpu.h | 513 uint32_t sregs[256]; member 658 int level = (env->sregs[PS] & PS_INTLEVEL) >> PS_INTLEVEL_SHIFT; in xtensa_get_cintlevel() 659 if ((env->sregs[PS] & PS_EXCM) && env->config->excm_level > level) { in xtensa_get_cintlevel() 670 return (env->sregs[PS] & PS_RING) >> PS_RING_SHIFT; in xtensa_get_ring() 681 (env->sregs[PS] & PS_EXCM) == 0) { in xtensa_get_cring() 682 return (env->sregs[PS] & PS_RING) >> PS_RING_SHIFT; in xtensa_get_cring() 706 return env->sregs[WINDOW_START] | in xtensa_replicate_windowstart() 707 (env->sregs[WINDOW_START] << env->config->nareg / 4); in xtensa_replicate_windowstart() 741 if (env->sregs[PS] & PS_EXCM) { in cpu_get_tb_cpu_state() 745 env->sregs[LEND] - (env->pc & -(1u << TARGET_PAGE_BITS)); in cpu_get_tb_cpu_state() [all …]
|
H A D | op_helper.c | 45 env->sregs[CCOUNT] = env->ccount_base + in HELPER() 54 env->ccount_base += v - env->sregs[CCOUNT]; in HELPER() 65 qatomic_and(&env->sregs[INTSET], in HELPER() 68 dcc = (uint64_t)(env->sregs[CCOMPARE + i] - env->sregs[CCOUNT] - 1) + 1; in HELPER() 83 uint32_t atomctl = env->sregs[ATOMCTL]; in HELPER() 137 uint32_t atomctl = env->sregs[ATOMCTL]; in HELPER() 196 env->sregs[MEMCTL] = v & env->config->memctl_mask; in HELPER()
|
/openbmc/linux/arch/powerpc/kvm/ |
H A D | e500mc.c | 220 struct kvm_sregs *sregs) in kvmppc_core_get_sregs_e500mc() argument 224 sregs->u.e.features |= KVM_SREGS_E_ARCH206_MMU | KVM_SREGS_E_PM | in kvmppc_core_get_sregs_e500mc() 226 sregs->u.e.impl_id = KVM_SREGS_E_IMPL_FSL; in kvmppc_core_get_sregs_e500mc() 228 sregs->u.e.impl.fsl.features = 0; in kvmppc_core_get_sregs_e500mc() 229 sregs->u.e.impl.fsl.svr = vcpu_e500->svr; in kvmppc_core_get_sregs_e500mc() 230 sregs->u.e.impl.fsl.hid0 = vcpu_e500->hid0; in kvmppc_core_get_sregs_e500mc() 231 sregs->u.e.impl.fsl.mcar = vcpu_e500->mcar; in kvmppc_core_get_sregs_e500mc() 233 kvmppc_get_sregs_e500_tlb(vcpu, sregs); in kvmppc_core_get_sregs_e500mc() 235 sregs->u.e.ivor_high[3] = in kvmppc_core_get_sregs_e500mc() 237 sregs->u.e.ivor_high[4] = vcpu->arch.ivor[BOOKE_IRQPRIO_DBELL]; in kvmppc_core_get_sregs_e500mc() [all …]
|
H A D | booke.c | 1510 struct kvm_sregs *sregs) in get_sregs_base() argument 1514 sregs->u.e.features |= KVM_SREGS_E_BASE; in get_sregs_base() 1516 sregs->u.e.csrr0 = vcpu->arch.csrr0; in get_sregs_base() 1517 sregs->u.e.csrr1 = vcpu->arch.csrr1; in get_sregs_base() 1518 sregs->u.e.mcsr = vcpu->arch.mcsr; in get_sregs_base() 1519 sregs->u.e.esr = kvmppc_get_esr(vcpu); in get_sregs_base() 1520 sregs->u.e.dear = kvmppc_get_dar(vcpu); in get_sregs_base() 1521 sregs->u.e.tsr = vcpu->arch.tsr; in get_sregs_base() 1522 sregs->u.e.tcr = vcpu->arch.tcr; in get_sregs_base() 1523 sregs->u.e.dec = kvmppc_get_dec(vcpu, tb); in get_sregs_base() [all …]
|
H A D | e500.c | 362 struct kvm_sregs *sregs) in kvmppc_core_get_sregs_e500() argument 366 sregs->u.e.features |= KVM_SREGS_E_ARCH206_MMU | KVM_SREGS_E_SPE | in kvmppc_core_get_sregs_e500() 368 sregs->u.e.impl_id = KVM_SREGS_E_IMPL_FSL; in kvmppc_core_get_sregs_e500() 370 sregs->u.e.impl.fsl.features = 0; in kvmppc_core_get_sregs_e500() 371 sregs->u.e.impl.fsl.svr = vcpu_e500->svr; in kvmppc_core_get_sregs_e500() 372 sregs->u.e.impl.fsl.hid0 = vcpu_e500->hid0; in kvmppc_core_get_sregs_e500() 373 sregs->u.e.impl.fsl.mcar = vcpu_e500->mcar; in kvmppc_core_get_sregs_e500() 375 sregs->u.e.ivor_high[0] = vcpu->arch.ivor[BOOKE_IRQPRIO_SPE_UNAVAIL]; in kvmppc_core_get_sregs_e500() 376 sregs->u.e.ivor_high[1] = vcpu->arch.ivor[BOOKE_IRQPRIO_SPE_FP_DATA]; in kvmppc_core_get_sregs_e500() 377 sregs->u.e.ivor_high[2] = vcpu->arch.ivor[BOOKE_IRQPRIO_SPE_FP_ROUND]; in kvmppc_core_get_sregs_e500() [all …]
|
/openbmc/qemu/linux-user/xtensa/ |
H A D | signal.c | 67 uint32_t wb = env->sregs[WINDOW_BASE]; in flush_window_regs() 105 g_assert(env->sregs[WINDOW_BASE] == wb); in flush_window_regs() 116 __put_user(env->sregs[PS], &sc->sc_ps); in setup_sigcontext() 117 __put_user(env->sregs[LBEG], &sc->sc_lbeg); in setup_sigcontext() 118 __put_user(env->sregs[LEND], &sc->sc_lend); in setup_sigcontext() 119 __put_user(env->sregs[LCOUNT], &sc->sc_lcount); in setup_sigcontext() 218 env->sregs[WINDOW_BASE] = 0; in setup_rt_frame() 219 env->sregs[WINDOW_START] = 1; in setup_rt_frame() 221 abi_call0 = (env->sregs[PS] & PS_WOE) == 0; in setup_rt_frame() 222 env->sregs[PS] = PS_UM | (3 << PS_RING_SHIFT); in setup_rt_frame() [all …]
|
H A D | cpu_loop.c | 29 env->pc = env->sregs[EPC1]; in xtensa_rfw() 34 env->sregs[WINDOW_START] |= (1 << env->sregs[WINDOW_BASE]); in xtensa_rfwu() 40 env->sregs[WINDOW_START] &= ~(1 << env->sregs[WINDOW_BASE]); in xtensa_rfwo() 138 env->sregs[PS] &= ~PS_EXCM; in cpu_loop() 163 switch (env->sregs[EXCCAUSE]) { in cpu_loop() 166 env->sregs[EPC1]); in cpu_loop() 170 env->sregs[EPC1]); in cpu_loop() 194 env->sregs[PS] = deposit32(env->sregs[PS], in cpu_loop() 197 env->sregs[WINDOW_BASE]); in cpu_loop() 220 env->sregs[EPC1]); in cpu_loop() [all …]
|
/openbmc/linux/drivers/net/ethernet/seeq/ |
H A D | sgiseeq.c | 100 struct sgiseeq_regs *sregs; member 137 struct sgiseeq_regs *sregs) in reset_hpc3_and_seeq() argument 148 struct sgiseeq_regs *sregs) in seeq_go() argument 150 sregs->rstat = sp->mode | RSTAT_GO_BITS; in seeq_go() 157 struct sgiseeq_regs *sregs = sp->sregs; in __sgiseeq_set_mac_address() local 160 sregs->tstat = SEEQ_TCMD_RB0; in __sgiseeq_set_mac_address() 162 sregs->rw.eth_addr[i] = dev->dev_addr[i]; in __sgiseeq_set_mac_address() 292 struct sgiseeq_regs *sregs) in init_seeq() argument 297 reset_hpc3_and_seeq(hregs, sregs); in init_seeq() 304 sregs->tstat = TSTAT_INIT_EDLC; in init_seeq() [all …]
|
/openbmc/qemu/target/ppc/ |
H A D | kvm.c | 185 struct kvm_sregs sregs; in kvm_arch_sync_sregs() local 204 ret = kvm_vcpu_ioctl(cs, KVM_GET_SREGS, &sregs); in kvm_arch_sync_sregs() 209 sregs.pvr = cenv->spr[SPR_PVR]; in kvm_arch_sync_sregs() 210 return kvm_vcpu_ioctl(cs, KVM_SET_SREGS, &sregs); in kvm_arch_sync_sregs() 486 /* Synchronize sregs with kvm */ in kvm_arch_init_vcpu() 864 struct kvm_sregs sregs = { }; in kvmppc_put_books_sregs() local 867 sregs.pvr = env->spr[SPR_PVR]; in kvmppc_put_books_sregs() 870 sregs.u.s.sdr1 = cpu->vhyp_class->encode_hpt_for_kvm_pr(cpu->vhyp); in kvmppc_put_books_sregs() 872 sregs.u.s.sdr1 = env->spr[SPR_SDR1]; in kvmppc_put_books_sregs() 878 sregs.u.s.ppc64.slb[i].slbe = env->slb[i].esid; in kvmppc_put_books_sregs() [all …]
|
/openbmc/linux/tools/testing/selftests/kvm/lib/x86_64/ |
H A D | processor.c | 75 static void sregs_dump(FILE *stream, struct kvm_sregs *sregs, uint8_t indent) in sregs_dump() argument 80 segment_dump(stream, &sregs->cs, indent + 2); in sregs_dump() 82 segment_dump(stream, &sregs->ds, indent + 2); in sregs_dump() 84 segment_dump(stream, &sregs->es, indent + 2); in sregs_dump() 86 segment_dump(stream, &sregs->fs, indent + 2); in sregs_dump() 88 segment_dump(stream, &sregs->gs, indent + 2); in sregs_dump() 90 segment_dump(stream, &sregs->ss, indent + 2); in sregs_dump() 92 segment_dump(stream, &sregs->tr, indent + 2); in sregs_dump() 94 segment_dump(stream, &sregs->ldt, indent + 2); in sregs_dump() 97 dtable_dump(stream, &sregs->gdt, indent + 2); in sregs_dump() [all …]
|
/openbmc/linux/arch/m68k/ifpsp060/src/ |
H A D | itest.S | 30 set SREGS, -64 180 movm.l &0x7fff,SREGS(%a6) 204 movm.l &0x7fff,SREGS(%a6) 227 movm.l &0x7fff,SREGS(%a6) 250 movm.l &0x7fff,SREGS(%a6) 274 movm.l &0x7fff,SREGS(%a6) 298 movm.l &0x7fff,SREGS(%a6) 322 movm.l &0x7fff,SREGS(%a6) 346 movm.l &0x7fff,SREGS(%a6) 370 movm.l &0x7fff,SREGS(%a6) [all …]
|
/openbmc/qemu/hw/xtensa/ |
H A D | pic_cpu.c | 39 uint32_t int_set_enabled = env->sregs[INTSET] & in check_interrupts() 40 (env->sregs[INTENABLE] | env->config->inttype_mask[INTTYPE_NMI]); in check_interrupts() 56 env->pc, env->regs[0], env->sregs[PS], in check_interrupts() 57 env->sregs[INTSET], env->sregs[INTENABLE], in check_interrupts() 58 env->sregs[CCOUNT]); in check_interrupts() 76 qatomic_or(&env->sregs[INTSET], irq_bit); in xtensa_set_irq() 78 qatomic_and(&env->sregs[INTSET], ~irq_bit); in xtensa_set_irq() 108 env->ccount_base = env->sregs[CCOUNT]; in xtensa_irq_init()
|
/openbmc/linux/tools/testing/selftests/kvm/s390x/ |
H A D | resets.c | 88 struct kvm_sregs sregs; in assert_clear() local 95 vcpu_sregs_get(vcpu, &sregs); in assert_clear() 96 TEST_ASSERT(!memcmp(&sregs.acrs, regs_null, sizeof(sregs.acrs)), "acrs == 0"); in assert_clear() 132 struct kvm_sregs sregs; in assert_initial() local 136 vcpu_sregs_get(vcpu, &sregs); in assert_initial() 137 TEST_ASSERT(sregs.crs[0] == 0xE0UL, "cr0 == 0xE0 (KVM_GET_SREGS)"); in assert_initial() 138 TEST_ASSERT(sregs.crs[14] == 0xC2000000UL, in assert_initial() 140 TEST_ASSERT(!memcmp(&sregs.crs[1], regs_null, sizeof(sregs.crs[1]) * 12), in assert_initial() 142 TEST_ASSERT(sregs.crs[15] == 0, "cr15 == 0 (KVM_GET_SREGS)"); in assert_initial()
|
/openbmc/linux/Documentation/devicetree/bindings/arm/calxeda/ |
H A D | hb-sregs.yaml | 4 $id: http://devicetree.org/schemas/arm/calxeda/hb-sregs.yaml# 19 const: calxeda,hb-sregs 35 sregs@fff3c000 { 36 compatible = "calxeda,hb-sregs";
|
/openbmc/u-boot/drivers/bios_emulator/ |
H A D | biosemu.c | 239 sregs - Real mode segment registers to load 247 void X86API BE_callRealMode(uint seg, uint off, RMREGS * regs, RMSREGS * sregs) in BE_callRealMode() argument 255 M.x86.R_DS = sregs->ds; in BE_callRealMode() 256 M.x86.R_ES = sregs->es; in BE_callRealMode() 257 M.x86.R_FS = sregs->fs; in BE_callRealMode() 258 M.x86.R_GS = sregs->gs; in BE_callRealMode() 281 sregs->ds = M.x86.R_DS; in BE_callRealMode() 282 sregs->es = M.x86.R_ES; in BE_callRealMode() 283 sregs->fs = M.x86.R_FS; in BE_callRealMode() 284 sregs->gs = M.x86.R_GS; in BE_callRealMode() [all …]
|
/openbmc/qemu/linux-user/s390x/ |
H A D | signal.c | 61 abi_ulong sregs; member 67 target_sigregs sregs; member 123 static void save_sigregs(CPUS390XState *env, target_sigregs *sregs) in save_sigregs() argument 134 __put_user(psw_mask, &sregs->regs.psw.mask); in save_sigregs() 135 __put_user(env->psw.addr, &sregs->regs.psw.addr); in save_sigregs() 138 __put_user(env->regs[i], &sregs->regs.gprs[i]); in save_sigregs() 141 __put_user(env->aregs[i], &sregs->regs.acrs[i]); in save_sigregs() 148 __put_user(env->fpc, &sregs->fpregs.fpc); in save_sigregs() 150 __put_user(*get_freg(env, i), &sregs->fpregs.fprs[i]); in save_sigregs() 193 __put_user(frame_addr + offsetof(sigframe, sregs), &frame->sc.sregs); in setup_frame() [all …]
|