Lines Matching defs:seg

186 dumpKvm(const char *reg_name, const struct kvm_segment &seg)
191 seg.base, seg.limit, seg.selector, seg.type,
192 seg.present, seg.dpl, seg.db, seg.s, seg.l, seg.g, seg.avl, seg.unusable);
381 checkSeg(const char *name, const int idx, const struct kvm_segment &seg,
390 if (!isCanonicalAddress(seg.base))
391 warn("Illegal %s base: 0x%x\n", name, seg.base);
397 if (seg.unusable)
401 if (seg.base & 0xffffffff00000000ULL)
402 warn("Illegal %s base: 0x%x\n", name, seg.base);
409 switch (seg.type) {
411 if (seg.dpl != 0)
416 if (seg.dpl != sregs.ss.dpl)
417 warn("CS type is %i but CS DPL != SS DPL\n", seg.type);
421 if (seg.dpl > sregs.ss.dpl)
422 warn("CS type is %i but CS DPL > SS DPL\n", seg.type);
425 warn("Illegal CS type: %i\n", seg.type);
431 if (seg.unusable)
433 switch (seg.type) {
435 if (sregs.cs.type == 3 && seg.dpl != 0)
439 if (!(sregs.cr0 & 1) && seg.dpl != 0)
440 warn("SS DPL is %i, but CR0 PE is 0\n", seg.dpl);
443 warn("Illegal SS type: %i\n", seg.type);
452 if (seg.unusable)
454 if (!(seg.type & 0x1) ||
455 ((seg.type & 0x8) && !(seg.type & 0x2)))
456 warn("%s has an illegal type field: %i\n", name, seg.type);
461 if (seg.type != 3 && seg.type != 11)
462 warn("%s: Illegal segment type (%i)\n", name, seg.type);
466 if (seg.unusable)
468 if (seg.type != 2)
469 warn("%s: Illegal segment type (%i)\n", name, seg.type);
479 if (seg.unusable)
483 if (!seg.s)
488 if (seg.unusable)
492 if (seg.s)
504 if (seg.unusable)
509 if (!seg.present)
512 if (((seg.limit & 0xFFF) == 0 && seg.g) ||
513 ((seg.limit & 0xFFF00000) != 0 && !seg.g)) {
515 name, seg.limit, seg.g);
743 forceSegAccessed(struct kvm_segment &seg)
750 if (!seg.unusable)
751 seg.type |= SEG_TYPE_BIT_ACCESSED;