Home
last modified time | relevance | path

Searched refs:seg (Results 1 – 25 of 99) sorted by relevance

1234

/xen/xen/arch/x86/
A Dvm_event.c146 reg->ss.limit = seg.g ? seg.limit >> 12 : seg.limit; in vm_event_pack_segment_register()
147 reg->ss.ar = seg.attr; in vm_event_pack_segment_register()
148 reg->ss_sel = seg.sel; in vm_event_pack_segment_register()
153 reg->fs.limit = seg.g ? seg.limit >> 12 : seg.limit; in vm_event_pack_segment_register()
154 reg->fs.ar = seg.attr; in vm_event_pack_segment_register()
155 reg->fs_sel = seg.sel; in vm_event_pack_segment_register()
160 reg->gs.limit = seg.g ? seg.limit >> 12 : seg.limit; in vm_event_pack_segment_register()
161 reg->gs.ar = seg.attr; in vm_event_pack_segment_register()
167 reg->cs.limit = seg.g ? seg.limit >> 12 : seg.limit; in vm_event_pack_segment_register()
174 reg->ds.limit = seg.g ? seg.limit >> 12 : seg.limit; in vm_event_pack_segment_register()
[all …]
A Dmsi.c284 u16 seg = dev->seg; in msi_set_enable() local
297 u16 control, seg = dev->seg; in msix_set_enable() local
324 u16 seg, control; in msi_set_mask_bit() local
331 seg = pdev->seg; in msi_set_mask_bit()
614 u16 control, seg = dev->seg; in msi_capability_init() local
777 u16 seg = dev->seg; in msix_capability_init() local
1014 msi->irq, msi->seg, msi->bus, in __pci_enable_msi()
1023 msi->seg, msi->bus, in __pci_enable_msi()
1113 u16 seg = dev->seg; in __pci_disable_msix() local
1159 pdev = pci_get_pdev(seg, bus, devfn); in pci_prepare_msix()
[all …]
/xen/xen/include/xen/
A Dpci.h61 uint16_t seg; member
92 uint16_t seg; member
153 bool_t pci_known_segment(u16 seg);
156 enum pdev_type pdev_type(u16 seg, u8 bus, u8 devfn);
160 struct domain *, int seg, int bus, int devfn);
166 int pci_add_segment(u16 seg);
167 const unsigned long *pci_get_ro_map(u16 seg);
168 int pci_add_device(u16 seg, u8 bus, u8 devfn,
170 int pci_remove_device(u16 seg, u8 bus, u8 devfn);
171 int pci_ro_device(int seg, int bus, int devfn);
[all …]
/xen/xen/drivers/pci/
A Dpci.c11 int pci_find_cap_offset(u16 seg, u8 bus, u8 dev, u8 func, u8 cap) in pci_find_cap_offset() argument
18 status = pci_conf_read16(PCI_SBDF(seg, bus, dev, func), PCI_STATUS); in pci_find_cap_offset()
24 pos = pci_conf_read8(PCI_SBDF(seg, bus, dev, func), pos); in pci_find_cap_offset()
49 pos = pci_conf_read8(PCI_SBDF3(seg, bus, devfn), pos); in pci_find_next_cap()
75 int pci_find_ext_capability(int seg, int bus, int devfn, int cap) in pci_find_ext_capability() argument
77 return pci_find_next_ext_capability(seg, bus, devfn, 0, cap); in pci_find_ext_capability()
96 header = pci_conf_read32(PCI_SBDF3(seg, bus, devfn), pos); in pci_find_next_ext_capability()
152 bus = seg; in parse_pci_seg()
153 seg = 0; in parse_pci_seg()
164 if ( seg != (seg_p ? (u16)seg : 0) || in parse_pci_seg()
[all …]
/xen/xen/arch/x86/x86_64/
A Dpci.c18 if ( sbdf.seg || reg > 255 ) in pci_conf_read8()
20 pci_mmcfg_read(sbdf.seg, sbdf.bus, sbdf.devfn, reg, 1, &value); in pci_conf_read8()
29 if ( sbdf.seg || reg > 255 ) in pci_conf_read16()
33 pci_mmcfg_read(sbdf.seg, sbdf.bus, sbdf.devfn, reg, 2, &value); in pci_conf_read16()
42 if ( sbdf.seg || reg > 255 ) in pci_conf_read32()
46 pci_mmcfg_read(sbdf.seg, sbdf.bus, sbdf.devfn, reg, 4, &value); in pci_conf_read32()
55 if ( sbdf.seg || reg > 255 ) in pci_conf_write8()
56 pci_mmcfg_write(sbdf.seg, sbdf.bus, sbdf.devfn, reg, 1, data); in pci_conf_write8()
63 if ( sbdf.seg || reg > 255 ) in pci_conf_write16()
64 pci_mmcfg_write(sbdf.seg, sbdf.bus, sbdf.devfn, reg, 2, data); in pci_conf_write16()
[all …]
A Dmmconfig_64.c29 static char __iomem *get_virt(unsigned int seg, unsigned int *bus) in get_virt() argument
36 if (cfg->pci_segment == seg && in get_virt()
52 addr = get_virt(seg, &bus); in pci_dev_base()
58 int pci_mmcfg_read(unsigned int seg, unsigned int bus, in pci_mmcfg_read() argument
69 addr = pci_dev_base(seg, bus, devfn); in pci_mmcfg_read()
88 int pci_mmcfg_write(unsigned int seg, unsigned int bus, in pci_mmcfg_write() argument
97 addr = pci_dev_base(seg, bus, devfn); in pci_mmcfg_write()
178 bool_t pci_mmcfg_decode(unsigned long mfn, unsigned int *seg, in pci_mmcfg_decode() argument
191 *seg = cfg->pci_segment; in pci_mmcfg_decode()
205 return pci_mmcfg_decode(mfn, seg, bdf) && in pci_ro_mmcfg_decode()
[all …]
/xen/tools/firmware/rombios/32bit/
A Drombios_compat.h9 #define ADDR_FROM_SEG_OFF(seg, off) (void *)((((uint32_t)(seg)) << 4) + (off)) argument
59 static inline Bit32u read_dword(Bit16u seg, Bit16u off) in read_dword() argument
61 uint32_t *addr = (uint32_t *)ADDR_FROM_SEG_OFF(seg,off); in read_dword()
65 static inline Bit16u read_word(Bit16u seg, Bit16u off) in read_word() argument
67 uint16_t *addr = (uint16_t *)ADDR_FROM_SEG_OFF(seg,off); in read_word()
71 static inline Bit8u read_byte(Bit16u seg, Bit16u off) in read_byte() argument
73 uint8_t *addr = (uint8_t *)ADDR_FROM_SEG_OFF(seg,off); in read_byte()
79 uint32_t *addr = (uint32_t *)ADDR_FROM_SEG_OFF(seg,off); in write_dword()
85 uint16_t *addr = (uint16_t *)ADDR_FROM_SEG_OFF(seg,off); in write_word()
89 static inline void write_byte(Bit16u seg, Bit16u off, Bit8u val) in write_byte() argument
[all …]
/xen/xen/drivers/passthrough/
A Dpci.c100 pseg->nr = seg; in alloc_pseg()
116 u16 seg = 0; in pci_segments_iterate() local
126 } while (!rc && seg); in pci_segments_iterate()
151 u16 seg; member
171 phantom.seg = seg; in parse_phantom_dev()
242 u16 seg = pdev->seg; in check_pdev() local
537 if ( seg == -1 ) in pci_get_pdev()
586 if ( seg == -1 ) in pci_get_pdev_by_domain()
611 u16 cap, ctrl, seg = pdev->seg; in pci_enable_acs() local
1581 if ( (pdev->seg != seg) || in iommu_get_device_group()
[all …]
A Dats.h30 static inline int pci_ats_enabled(int seg, int bus, int devfn) in pci_ats_enabled() argument
35 pos = pci_find_ext_capability(seg, bus, devfn, PCI_EXT_CAP_ID_ATS); in pci_ats_enabled()
38 value = pci_conf_read16(PCI_SBDF3(seg, bus, devfn), pos + ATS_REG_CTL); in pci_ats_enabled()
43 static inline int pci_ats_device(int seg, int bus, int devfn) in pci_ats_device() argument
48 return pci_find_ext_capability(seg, bus, devfn, PCI_EXT_CAP_ID_ATS); in pci_ats_device()
/xen/xen/drivers/passthrough/amd/
A Diommu_intr.c361 int seg, bdf, rc; in amd_iommu_ioapic_update_ire() local
378 seg = ioapic_sbdf[idx].seg; in amd_iommu_ioapic_update_ire()
379 iommu = find_iommu_for_device(seg, bdf); in amd_iommu_ioapic_update_ire()
467 uint16_t seg, bdf, req_id; in amd_iommu_read_ioapic_from_ire() local
479 seg = ioapic_sbdf[idx].seg; in amd_iommu_read_ioapic_from_ire()
481 iommu = find_iommu_for_device(seg, bdf); in amd_iommu_read_ioapic_from_ire()
606 if ( iommu->seg == seg && iommu->bdf == bdf ) in _find_iommu_for_device()
609 iommu = find_iommu_for_device(seg, bdf); in _find_iommu_for_device()
622 int bdf, seg, rc; in amd_iommu_msi_msg_update_ire() local
628 seg = pdev ? pdev->seg : hpet_sbdf.seg; in amd_iommu_msi_msg_update_ire()
[all …]
A Dpci_amd_iommu.c32 struct amd_iommu *find_iommu_for_device(int seg, int bdf) in find_iommu_for_device() argument
72 int get_dma_requestor_id(uint16_t seg, uint16_t bdf) in get_dma_requestor_id() argument
319 pci_ats_device(iommu->seg, bus, devfn) && in amd_iommu_disable_domain_device()
320 pci_ats_enabled(iommu->seg, bus, devfn) ) in amd_iommu_disable_domain_device()
332 iommu = find_iommu_for_device(pdev->seg, bdf); in reassign_device()
368 int req_id = get_dma_requestor_id(pdev->seg, bdf); in amd_iommu_assign_device()
455 if ( pdev->seg == iommu->seg && bdf == iommu->bdf ) in amd_iommu_add_device()
458 iommu = find_iommu_for_device(pdev->seg, bdf); in amd_iommu_add_device()
477 ivrs_mappings = get_ivrs_mappings(pdev->seg); in amd_iommu_add_device()
525 iommu = find_iommu_for_device(pdev->seg, bdf); in amd_iommu_remove_device()
[all …]
A Diommu_acpi.c108 u16 seg, u16 bdf, u16 cap_offset) in find_iommu_from_bdf_cap() argument
113 if ( (iommu->seg == seg) && (iommu->bdf == bdf) && in find_iommu_from_bdf_cap()
176 int seg = 0; /* XXX */ in register_exclusion_range_for_all_devices() local
210 int seg = 0; /* XXX */ in register_exclusion_range_for_device() local
343 int seg = 0; /* XXX */ in parse_ivmd_device_iommu() local
686 ioapic_sbdf[idx].seg = seg; in parse_ivrs_ioapic()
713 hpet_sbdf.seg = seg; in parse_ivrs_hpet()
760 ioapic_sbdf[idx].seg == seg && in parse_ivhd_device_special()
785 ioapic_sbdf[idx].seg == seg ) in parse_ivhd_device_special()
807 ioapic_sbdf[idx].seg = seg; in parse_ivhd_device_special()
[all …]
A Diommu_detect.c26 u16 seg, u8 bus, u8 dev, u8 func, struct amd_iommu *iommu) in get_iommu_msi_capabilities() argument
30 pos = pci_find_cap_offset(seg, bus, dev, func, PCI_CAP_ID_MSI); in get_iommu_msi_capabilities()
44 u16 seg, u8 bus, u8 dev, u8 func, u16 cap_ptr, struct amd_iommu *iommu) in get_iommu_capabilities() argument
48 iommu->cap.header = pci_conf_read32(PCI_SBDF(seg, bus, dev, func), cap_ptr); in get_iommu_capabilities()
162 iommu->seg = ivhd_block->pci_segment_group; in amd_iommu_detect_one_acpi()
174 rt = get_iommu_capabilities(iommu->seg, bus, dev, func, in amd_iommu_detect_one_acpi()
179 rt = get_iommu_msi_capabilities(iommu->seg, bus, dev, func, iommu); in amd_iommu_detect_one_acpi()
183 rt = pci_ro_device(iommu->seg, bus, PCI_DEVFN(dev, func)); in amd_iommu_detect_one_acpi()
187 iommu->seg, bus, dev, func, rt); in amd_iommu_detect_one_acpi()
A Diommu_init.c865 iommu->seg, bus, dev, func); in amd_iommu_erratum_746_workaround()
1153 u16 seg = 0; in iterate_ivrs_mappings() local
1161 seg = IVRS_MAPPINGS_SEG(map); in iterate_ivrs_mappings()
1162 rc = handler(seg, map); in iterate_ivrs_mappings()
1163 } while ( !rc && ++seg ); in iterate_ivrs_mappings()
1171 u16 seg = 0; in iterate_ivrs_entries() local
1180 seg = IVRS_MAPPINGS_SEG(map); in iterate_ivrs_entries()
1188 } while ( !rc && ++seg ); in iterate_ivrs_entries()
1200 if ( get_ivrs_mappings(seg) ) in alloc_ivrs_mappings()
1209 IVRS_MAPPINGS_SEG(ivrs_mappings) = seg; in alloc_ivrs_mappings()
[all …]
/xen/xen/drivers/passthrough/x86/
A Dats.c27 u16 seg = pdev->seg; in enable_ats_device() local
31 pos = pci_find_ext_capability(seg, bus, devfn, PCI_EXT_CAP_ID_ATS); in enable_ats_device()
36 seg, bus, PCI_SLOT(devfn), PCI_FUNC(devfn)); in enable_ats_device()
68 seg, bus, PCI_SLOT(devfn), PCI_FUNC(devfn), in enable_ats_device()
77 u16 seg = pdev->seg; in disable_ats_device() local
90 seg, bus, PCI_SLOT(devfn), PCI_FUNC(devfn)); in disable_ats_device()
/xen/tools/fuzz/x86_instruction_emulator/
A Dfuzz-emul.c167 enum x86_segment seg, in fuzz_read() argument
200 enum x86_segment seg, in fuzz_insn_fetch() argument
322 enum x86_segment seg, in fuzz_rep_stos() argument
339 enum x86_segment seg, in fuzz_write() argument
353 enum x86_segment seg, in fuzz_cmpxchg() argument
368 assert((seg == x86_seg_gdtr || seg == x86_seg_ldtr) && !(offset >> 16)); in fuzz_cmpxchg()
395 enum x86_segment seg, in fuzz_cache_op() argument
412 enum x86_segment seg, in fuzz_read_segment() argument
419 assert(is_x86_user_segment(seg) || is_x86_system_segment(seg)); in fuzz_read_segment()
427 enum x86_segment seg, in fuzz_write_segment() argument
[all …]
/xen/xen/arch/x86/x86_emulate/
A Dx86_emulate.h64 unsigned int idx = seg; in is_x86_user_segment()
70 return seg >= x86_seg_tr && seg < x86_seg_none; in is_x86_system_segment()
249 enum x86_segment seg,
263 enum x86_segment seg,
274 enum x86_segment seg,
287 enum x86_segment seg,
304 enum x86_segment seg,
320 enum x86_segment seg,
387 enum x86_segment seg,
398 enum x86_segment seg,
[all …]
/xen/tools/tests/depriv/
A Ddepriv-fd-checker.c187 xengnttab_grant_copy_segment_t seg; in test_gntdev() local
188 seg.source.foreign.ref = gntshr_gref; in test_gntdev()
189 seg.source.foreign.offset = 0; in test_gntdev()
190 seg.source.foreign.domid = 0; in test_gntdev()
191 seg.dest.virt = mybuf; in test_gntdev()
192 seg.len = 1; in test_gntdev()
193 seg.flags = GNTCOPY_source_gref; in test_gntdev()
195 seg.status = 0; in test_gntdev()
196 int r = xengnttab_grant_copy(xgt,1,&seg); in test_gntdev()
203 if (seg.status==GNTST_okay) in test_gntdev()
[all …]
/xen/xen/arch/x86/mm/shadow/
A Dhvm.c61 unsigned int idx = seg; in hvm_get_seg_reg()
74 enum x86_segment seg, in hvm_translate_virtual_addr() argument
84 reg = hvm_get_seg_reg(seg, sh_ctxt); in hvm_translate_virtual_addr()
99 if ( is_x86_user_segment(seg) ) in hvm_translate_virtual_addr()
110 hvm_read(enum x86_segment seg, in hvm_read() argument
152 hvm_emulate_read(enum x86_segment seg, in hvm_emulate_read() argument
158 if ( !is_x86_user_segment(seg) ) in hvm_emulate_read()
175 ASSERT(seg == x86_seg_cs); in hvm_emulate_insn_fetch()
188 hvm_emulate_write(enum x86_segment seg, in hvm_emulate_write() argument
202 if ( seg == x86_seg_ss ) in hvm_emulate_write()
[all …]
/xen/xen/drivers/passthrough/vtd/
A Dquirks.c414 int seg = pdev->seg; in pci_vtd_quirk() local
442 seg, bus, dev, func); in pci_vtd_quirk()
454 pos = pci_find_ext_capability(seg, bus, pdev->devfn, in pci_vtd_quirk()
458 pos = pci_find_ext_capability(seg, bus, pdev->devfn, in pci_vtd_quirk()
468 pos = pci_find_next_ext_capability(seg, bus, pdev->devfn, pos, in pci_vtd_quirk()
478 seg, bus, dev, func); in pci_vtd_quirk()
502 action, seg, bus, dev, func); in pci_vtd_quirk()
528 seg, bus, dev, func); in pci_vtd_quirk()
532 pa, seg, bus, dev, func); in pci_vtd_quirk()
536 bar, seg, bus, dev, func); in pci_vtd_quirk()
/xen/tools/flask/utils/
A Dlabel-pci.c39 int seg, bus, dev, fn; in main() local
57 sscanf(argv[1], "%x:%x:%x.%d", &seg, &bus, &dev, &fn); in main()
58 sbdf = (seg << 16) | (bus << 8) | (dev << 3) | fn; in main()
61 seg, bus, dev, fn); in main()
103 seg, bus, dev, fn); in main()
/xen/xen/arch/x86/hvm/
A Dhvm.c879 ctxt.cs_sel = seg.sel; in hvm_save_cpu_ctxt()
885 ctxt.ds_sel = seg.sel; in hvm_save_cpu_ctxt()
891 ctxt.es_sel = seg.sel; in hvm_save_cpu_ctxt()
897 ctxt.ss_sel = seg.sel; in hvm_save_cpu_ctxt()
903 ctxt.fs_sel = seg.sel; in hvm_save_cpu_ctxt()
909 ctxt.gs_sel = seg.sel; in hvm_save_cpu_ctxt()
2808 if ( (seg == x86_seg_cs) || (seg == x86_seg_ss) ) in task_switch_load_seg()
2845 switch ( seg ) in task_switch_load_seg()
5182 switch ( seg ) in hvm_get_segment_register()
5253 switch ( seg ) in hvm_set_segment_register()
[all …]
A Demulate.c831 enum x86_segment seg, in hvmemul_virtual_to_linear() argument
1252 enum x86_segment seg, in __hvmemul_read() argument
1279 enum x86_segment seg, in hvmemul_read() argument
1297 enum x86_segment seg, in hvmemul_insn_fetch() argument
1344 enum x86_segment seg, in hvmemul_write() argument
1392 enum x86_segment seg, in hvmemul_rmw() argument
1445 enum x86_segment seg, in hvmemul_blk() argument
1486 enum x86_segment seg, in hvmemul_write_discard() argument
1521 enum x86_segment seg, in hvmemul_rep_stos_discard() argument
2746 mmio_ro_ctxt.seg = seg; in hvm_emulate_one_mmio()
[all …]
/xen/xen/include/asm-x86/
A Dpci.h20 int pci_conf_write_intercept(unsigned int seg, unsigned int bdf,
25 bool_t pci_mmcfg_decode(unsigned long mfn, unsigned int *seg,
28 bool_t pci_ro_mmcfg_decode(unsigned long mfn, unsigned int *seg,
/xen/tools/firmware/hvmloader/
A Dxenbus.c183 } seg[MAX_SEGMENTS]; in xenbus_send() local
198 seg[i].data = va_arg(ap, const char *); in xenbus_send()
199 seg[i].len = va_arg(ap, uint32_t); in xenbus_send()
201 if ( seg[i].data == NULL ) in xenbus_send()
204 hdr.len += seg[i].len; in xenbus_send()
211 ring_write(seg[i].data, seg[i].len); in xenbus_send()

Completed in 59 milliseconds

1234