Home
last modified time | relevance | path

Searched refs:sregs (Results 1 – 25 of 45) sorted by relevance

12

/linux/tools/testing/selftests/kvm/x86_64/
H A Dset_sregs_test.c33 memcpy(&new, &orig, sizeof(sregs)); \
77 struct kvm_sregs sregs; in main() local
91 vcpu_sregs_get(vcpu, &sregs); in main()
93 sregs.cr0 = 0; in main()
94 sregs.cr4 |= calc_supported_cr4_feature_bits(); in main()
95 cr4 = sregs.cr4; in main()
97 rc = _vcpu_sregs_set(vcpu, &sregs); in main()
100 vcpu_sregs_get(vcpu, &sregs); in main()
101 TEST_ASSERT(sregs.cr4 == cr4, "sregs.CR4 (0x%llx) != CR4 (0x%lx)", in main()
102 sregs.cr4, cr4); in main()
[all …]
H A Dsync_regs_test.c138 __u64 *cr4 = &run->s.regs.sregs.cr4; in race_sregs_cr4()
178 TEST_ASSERT((run->s.regs.sregs.cr4 & X86_CR4_PAE) && in race_sync_regs()
179 (run->s.regs.sregs.efer & EFER_LME), in race_sync_regs()
181 !!(run->s.regs.sregs.cr4 & X86_CR4_PAE), in race_sync_regs()
182 !!(run->s.regs.sregs.efer & EFER_LME)); in race_sync_regs()
254 struct kvm_sregs sregs; in KVM_ONE_VCPU_TEST() local
266 vcpu_sregs_get(vcpu, &sregs); in KVM_ONE_VCPU_TEST()
267 compare_sregs(&sregs, &run->s.regs.sregs); in KVM_ONE_VCPU_TEST()
277 struct kvm_sregs sregs; in KVM_ONE_VCPU_TEST() local
287 run->s.regs.sregs.apic_base = 1 << 11; in KVM_ONE_VCPU_TEST()
[all …]
H A Dvmx_invalid_nested_guest_state.c56 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 Dcr4_cpuid_sync_test.c54 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 Dvmx_exception_with_invalid_guest_state.c58 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()
H A Dsev_smoke_test.c73 struct kvm_sregs sregs; in test_sync_vmsa() local
87 vcpu_sregs_get(vcpu, &sregs); in test_sync_vmsa()
88 sregs.cr4 |= X86_CR4_OSFXSR | X86_CR4_OSXSAVE; in test_sync_vmsa()
89 vcpu_sregs_set(vcpu, &sregs); in test_sync_vmsa()
/linux/arch/powerpc/kvm/
H A De500.c362 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 …]
H A De500mc.c220 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 Dbooke.c1510 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 De500_mmu.c567 void kvmppc_get_sregs_e500_tlb(struct kvm_vcpu *vcpu, struct kvm_sregs *sregs) in kvmppc_get_sregs_e500_tlb() argument
569 sregs->u.e.mas0 = vcpu->arch.shared->mas0; in kvmppc_get_sregs_e500_tlb()
570 sregs->u.e.mas1 = vcpu->arch.shared->mas1; in kvmppc_get_sregs_e500_tlb()
571 sregs->u.e.mas2 = vcpu->arch.shared->mas2; in kvmppc_get_sregs_e500_tlb()
572 sregs->u.e.mas7_3 = vcpu->arch.shared->mas7_3; in kvmppc_get_sregs_e500_tlb()
573 sregs->u.e.mas4 = vcpu->arch.shared->mas4; in kvmppc_get_sregs_e500_tlb()
574 sregs->u.e.mas6 = vcpu->arch.shared->mas6; in kvmppc_get_sregs_e500_tlb()
576 sregs->u.e.mmucfg = vcpu->arch.mmucfg; in kvmppc_get_sregs_e500_tlb()
577 sregs->u.e.tlbcfg[0] = vcpu->arch.tlbcfg[0]; in kvmppc_get_sregs_e500_tlb()
578 sregs->u.e.tlbcfg[1] = vcpu->arch.tlbcfg[1]; in kvmppc_get_sregs_e500_tlb()
[all …]
H A Dbook3s_pr.c1458 struct kvm_sregs *sregs) in kvm_arch_vcpu_ioctl_get_sregs_pr() argument
1463 sregs->pvr = vcpu->arch.pvr; in kvm_arch_vcpu_ioctl_get_sregs_pr()
1465 sregs->u.s.sdr1 = to_book3s(vcpu)->sdr1; in kvm_arch_vcpu_ioctl_get_sregs_pr()
1468 sregs->u.s.ppc64.slb[i].slbe = vcpu->arch.slb[i].orige | i; in kvm_arch_vcpu_ioctl_get_sregs_pr()
1469 sregs->u.s.ppc64.slb[i].slbv = vcpu->arch.slb[i].origv; in kvm_arch_vcpu_ioctl_get_sregs_pr()
1473 sregs->u.s.ppc32.sr[i] = kvmppc_get_sr(vcpu, i); in kvm_arch_vcpu_ioctl_get_sregs_pr()
1476 sregs->u.s.ppc32.ibat[i] = vcpu3s->ibat[i].raw; in kvm_arch_vcpu_ioctl_get_sregs_pr()
1477 sregs->u.s.ppc32.dbat[i] = vcpu3s->dbat[i].raw; in kvm_arch_vcpu_ioctl_get_sregs_pr()
1485 struct kvm_sregs *sregs) in kvm_arch_vcpu_ioctl_set_sregs_pr() argument
1490 kvmppc_set_pvr_pr(vcpu, sregs->pvr); in kvm_arch_vcpu_ioctl_set_sregs_pr()
[all …]
/linux/drivers/net/ethernet/seeq/
H A Dsgiseeq.c100 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 …]
/linux/tools/testing/selftests/kvm/lib/x86_64/
H A Dprocessor.c77 static void sregs_dump(FILE *stream, struct kvm_sregs *sregs, uint8_t indent) in sregs_dump() argument
82 segment_dump(stream, &sregs->cs, indent + 2); in sregs_dump()
84 segment_dump(stream, &sregs->ds, indent + 2); in sregs_dump()
86 segment_dump(stream, &sregs->es, indent + 2); in sregs_dump()
88 segment_dump(stream, &sregs->fs, indent + 2); in sregs_dump()
90 segment_dump(stream, &sregs->gs, indent + 2); in sregs_dump()
92 segment_dump(stream, &sregs->ss, indent + 2); in sregs_dump()
94 segment_dump(stream, &sregs->tr, indent + 2); in sregs_dump()
96 segment_dump(stream, &sregs->ldt, indent + 2); in sregs_dump()
99 dtable_dump(stream, &sregs->gdt, indent + 2); in sregs_dump()
[all …]
/linux/tools/testing/selftests/kvm/s390x/
H A Dresets.c88 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()
H A Dsync_regs_test.c119 struct kvm_sregs sregs; in test_req_and_verify_all_valid_regs() local
138 vcpu_sregs_get(vcpu, &sregs); in test_req_and_verify_all_valid_regs()
139 compare_sregs(&sregs, &run->s.regs); in test_req_and_verify_all_valid_regs()
145 struct kvm_sregs sregs; in test_set_and_verify_various_reg_values() local
177 vcpu_sregs_get(vcpu, &sregs); in test_set_and_verify_various_reg_values()
178 compare_sregs(&sregs, &run->s.regs); in test_set_and_verify_various_reg_values()
/linux/arch/s390/kernel/
H A Dsignal.c69 _sigregs sregs; member
122 static int save_sigregs(struct pt_regs *regs, _sigregs __user *sregs) in save_sigregs() argument
131 memcpy(&user_sregs.regs.gprs, &regs->gprs, sizeof(sregs->regs.gprs)); in save_sigregs()
135 if (__copy_to_user(sregs, &user_sregs, sizeof(_sigregs))) in save_sigregs()
140 static int restore_sigregs(struct pt_regs *regs, _sigregs __user *sregs) in restore_sigregs() argument
147 if (__copy_from_user(&user_sregs, sregs, sizeof(user_sregs))) in restore_sigregs()
164 memcpy(&regs->gprs, &user_sregs.regs.gprs, sizeof(sregs->regs.gprs)); in restore_sigregs()
226 if (restore_sigregs(regs, &frame->sregs)) in SYSCALL_DEFINE0()
312 sc.sregs = (_sigregs __user __force *) &frame->sregs; in setup_frame()
320 if (save_sigregs(regs, &frame->sregs)) in setup_frame()
H A Dcompat_signal.c41 _sigregs32 sregs; member
68 static int save_sigregs32(struct pt_regs *regs, _sigregs32 __user *sregs) in save_sigregs32() argument
83 if (__copy_to_user(sregs, &user_sregs, sizeof(_sigregs32))) in save_sigregs32()
88 static int restore_sigregs32(struct pt_regs *regs,_sigregs32 __user *sregs) in restore_sigregs32() argument
96 if (__copy_from_user(&user_sregs, &sregs->regs, sizeof(user_sregs))) in restore_sigregs32()
188 if (restore_sigregs32(regs, &frame->sregs)) in COMPAT_SYSCALL_DEFINE0()
280 if (__put_user(ptr_to_compat(&frame->sregs), &frame->sc.sregs)) in setup_frame32()
287 if (save_sigregs32(regs, &frame->sregs)) in setup_frame32()
/linux/drivers/spi/
H A Dspi-intel.c163 void __iomem *sregs; member
217 if (ispi->sregs) { in intel_spi_dump_regs()
218 value = readl(ispi->sregs + SSFSTS_CTL); in intel_spi_dump_regs()
221 readl(ispi->sregs + PREOP_OPTYPE)); in intel_spi_dump_regs()
223 readl(ispi->sregs + OPMENU0)); in intel_spi_dump_regs()
225 readl(ispi->sregs + OPMENU1)); in intel_spi_dump_regs()
322 return readl_poll_timeout(ispi->sregs + SSFSTS_CTL, val, in intel_spi_wait_sw_busy()
349 writel(opcode, ispi->sregs + OPMENU0); in intel_spi_opcode_index()
350 preop = readw(ispi->sregs + PREOP_OPTYPE); in intel_spi_opcode_index()
351 writel(optype << 16 | preop, ispi->sregs + PREOP_OPTYPE); in intel_spi_opcode_index()
[all …]
/linux/drivers/soc/fsl/qe/
H A Dgpio.c239 struct qe_pio_regs *sregs = &qe_gc->saved_regs; in qe_pin_set_dedicated() local
250 sregs->cpdir2 & mask2); in qe_pin_set_dedicated()
252 sregs->cppar2 & mask2); in qe_pin_set_dedicated()
255 sregs->cpdir1 & mask2); in qe_pin_set_dedicated()
257 sregs->cppar1 & mask2); in qe_pin_set_dedicated()
260 if (sregs->cpdata & mask1) in qe_pin_set_dedicated()
266 qe_clrsetbits_be32(&regs->cpodr, mask1, sregs->cpodr & mask1); in qe_pin_set_dedicated()
/linux/tools/testing/selftests/kvm/lib/s390x/
H A Dprocessor.c168 struct kvm_sregs sregs; in vm_arch_vcpu_add() local
185 vcpu_sregs_get(vcpu, &sregs); in vm_arch_vcpu_add()
186 sregs.crs[0] |= 0x00040000; /* Enable floating point regs */ in vm_arch_vcpu_add()
187 sregs.crs[1] = vm->pgd | 0xf; /* Primary region table */ in vm_arch_vcpu_add()
188 vcpu_sregs_set(vcpu, &sregs); in vm_arch_vcpu_add()
/linux/tools/testing/selftests/kvm/
H A Dmax_guest_memory_test.c65 struct kvm_sregs sregs; in vcpu_worker() local
73 vcpu_sregs_get(vcpu, &sregs); in vcpu_worker()
76 sregs.cr0 ^= X86_CR0_WP; in vcpu_worker()
78 vcpu_sregs_set(vcpu, &sregs); in vcpu_worker()
/linux/arch/arm/boot/dts/calxeda/
H A Dhighbank.dts149 sregs@fff3c200 {
150 compatible = "calxeda,hb-sregs-l2-ecc";
/linux/arch/mips/sgi-ip30/
H A Dip30-console.c14 return &ioc3->sregs.uarta; in console_uart()
/linux/arch/mips/sgi-ip27/
H A Dip27-console.c32 return &ioc3->sregs.uarta; in console_uart()
/linux/arch/x86/kvm/
H A Dx86.c11682 static void __get_sregs_common(struct kvm_vcpu *vcpu, struct kvm_sregs *sregs) in __get_sregs_common() argument
11689 kvm_get_segment(vcpu, &sregs->cs, VCPU_SREG_CS); in __get_sregs_common()
11690 kvm_get_segment(vcpu, &sregs->ds, VCPU_SREG_DS); in __get_sregs_common()
11691 kvm_get_segment(vcpu, &sregs->es, VCPU_SREG_ES); in __get_sregs_common()
11692 kvm_get_segment(vcpu, &sregs->fs, VCPU_SREG_FS); in __get_sregs_common()
11693 kvm_get_segment(vcpu, &sregs->gs, VCPU_SREG_GS); in __get_sregs_common()
11694 kvm_get_segment(vcpu, &sregs->ss, VCPU_SREG_SS); in __get_sregs_common()
11696 kvm_get_segment(vcpu, &sregs->tr, VCPU_SREG_TR); in __get_sregs_common()
11697 kvm_get_segment(vcpu, &sregs->ldt, VCPU_SREG_LDTR); in __get_sregs_common()
11700 sregs->idt.limit = dt.size; in __get_sregs_common()
[all …]

12