- Timestamp:
- Jun 23, 2009 1:00:16 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 48968
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/DevAPIC.cpp
r20817 r20829 591 591 { 592 592 APICDeviceInfo *dev = PDMINS_2_DATA(pDevIns, APICDeviceInfo *); 593 Assert(PDMCritSectIsOwner(dev->CTX_SUFF(pCritSect))); 593 594 APICState *s = getLapic(dev); /** @todo fix interface */ 594 595 Log(("cpu_set_apic_base: %016RX64\n", val)); … … 698 699 { 699 700 APICDeviceInfo *dev = PDMINS_2_DATA(pDevIns, APICDeviceInfo *); 701 Assert(PDMCritSectIsOwner(dev->CTX_SUFF(pCritSect))); 700 702 APICState *s = getLapic(dev); /** @todo fix interface */ 701 703 LogFlow(("apicGetBase: %016llx\n", (uint64_t)s->apicbase)); … … 706 708 { 707 709 APICDeviceInfo *dev = PDMINS_2_DATA(pDevIns, APICDeviceInfo *); 710 Assert(PDMCritSectIsOwner(dev->CTX_SUFF(pCritSect))); 708 711 APICState *s = getLapicById(dev, idCpu); 709 712 LogFlow(("apicSetTPR: val=%#x (trp %#x -> %#x)\n", val, s->tpr, val)); … … 713 716 PDMBOTHCBDECL(uint8_t) apicGetTPR(PPDMDEVINS pDevIns, VMCPUID idCpu) 714 717 { 718 /* We don't perform any locking here as that would cause a lot of contention for VT-x/AMD-V. */ 715 719 APICDeviceInfo *dev = PDMINS_2_DATA(pDevIns, APICDeviceInfo *); 716 720 APICState *s = getLapicById(dev, idCpu); … … 733 737 { 734 738 APICDeviceInfo *dev = PDMINS_2_DATA(pDevIns, APICDeviceInfo *); 739 Assert(PDMCritSectIsOwner(dev->CTX_SUFF(pCritSect))); 735 740 int rc = VINF_SUCCESS; 736 741 … … 838 843 { 839 844 APICDeviceInfo *dev = PDMINS_2_DATA(pDevIns, APICDeviceInfo *); 845 Assert(PDMCritSectIsOwner(dev->CTX_SUFF(pCritSect))); 840 846 841 847 if (dev->enmVersion < PDMAPICVERSION_X2APIC) … … 928 934 { 929 935 APICDeviceInfo *dev = PDMINS_2_DATA(pDevIns, APICDeviceInfo *); 936 Assert(PDMCritSectIsOwner(dev->CTX_SUFF(pCritSect))); 930 937 LogFlow(("apicBusDeliverCallback: pDevIns=%p u8Dest=%#x u8DestMode=%#x u8DeliveryMode=%#x iVector=%#x u8Polarity=%#x u8TriggerMode=%#x\n", 931 938 pDevIns, u8Dest, u8DestMode, u8DeliveryMode, iVector, u8Polarity, u8TriggerMode)); … … 1017 1024 if (!dev) 1018 1025 return false; 1026 1027 /* We don't perform any locking here as that would cause a lot of contention for VT-x/AMD-V. */ 1028 1019 1029 APICState *s = getLapic(dev); /** @todo fix interface */ 1020 1030 … … 1261 1271 } 1262 1272 1263 A PIC_LOCK(dev, VERR_INTERNAL_ERROR);1273 Assert(PDMCritSectIsOwner(dev->CTX_SUFF(pCritSect))); 1264 1274 1265 1275 APICState *s = getLapic(dev); /** @todo fix interface */ … … 1268 1278 if (!(s->spurious_vec & APIC_SV_ENABLE)) { 1269 1279 Log(("CPU%d: apic_get_interrupt: returns -1 (APIC_SV_ENABLE)\n", s->phys_id)); 1270 intno = -1; 1271 goto done; 1280 return -1; 1272 1281 } 1273 1282 … … 1276 1285 if (intno < 0) { 1277 1286 Log(("CPU%d: apic_get_interrupt: returns -1 (irr)\n", s->phys_id)); 1278 intno = -1; 1279 goto done; 1287 return -1; 1280 1288 } 1281 1289 if (s->tpr && (uint32_t)intno <= s->tpr) { 1282 1290 Log(("apic_get_interrupt: returns %d (sp)\n", s->spurious_vec & 0xff)); 1283 intno = s->spurious_vec & 0xff; 1284 goto done; 1291 return s->spurious_vec & 0xff; 1285 1292 } 1286 1293 reset_bit(s->irr, intno); … … 1288 1295 apic_update_irq(dev, s); 1289 1296 LogFlow(("CPU%d: apic_get_interrupt: returns %d\n", s->phys_id, intno)); 1290 done:1291 APIC_UNLOCK(dev);1292 1297 return intno; 1293 1298 }
Note:
See TracChangeset
for help on using the changeset viewer.