VirtualBox

Changeset 24193 in vbox


Ignore:
Timestamp:
Oct 30, 2009 2:27:04 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
54140
Message:

DevAPIC: Properly clear local APIC state on VM reset.

Location:
trunk/src/VBox/Devices/PC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/DevAPIC.cpp

    r24133 r24193  
    202202    /* Task priority register (interrupt level) */
    203203    uint32_t   tpr;
    204     /* Logical APIC id */
     204    /* Logical APIC id - user programmable */
    205205    LogApicId  id;
    206     /* Physical APIC id */
     206    /* Physical APIC id - not visible to user, constant */
    207207    PhysApicId phys_id;
    208208    /** @todo: is it logical or physical? Not really used anyway now. */
     
    411411static void apicTimerSetInitialCount(APICDeviceInfo *dev, APICState *s, uint32_t initial_count);
    412412static void apicTimerSetLvt(APICDeviceInfo *dev, APICState *pThis, uint32_t fNew);
     413static void apicSendInitIpi(APICDeviceInfo* dev, APICState *s);
    413414
    414415#endif /* VBOX */
     
    557558#ifdef IN_RING3
    558559            foreach_apic(dev, deliver_bitmask,
    559                          apic_init_ipi(dev, apic));
     560                         apicSendInitIpi(dev, apic));
    560561            return VINF_SUCCESS;
    561562#else
     
    12491250    s->initial_count_load_time = 0;
    12501251    s->next_time = 0;
     1252}
     1253
    12511254
    12521255#ifdef VBOX
     1256static void apicSendInitIpi(APICDeviceInfo* dev, APICState *s)
     1257{
     1258    apic_init_ipi(dev, s);
    12531259    cpuSendInitIpi(dev, s);
    1254 #endif
    1255 }
     1260}
     1261#endif
    12561262
    12571263/* send a SIPI message to the CPU to start it */
     
    26732679        TMTimerStop(pApic->CTX_SUFF(pTimer));
    26742680
    2675         /* Do not send an init ipi to the VCPU; we take
    2676         * care of the proper init ourselves.
     2681        /* Clear LAPIC state as if an INIT IPI was sent. */
    26772682        apic_init_ipi(dev, pApic);
    2678         */
    2679 
    2680         /* malc, I've removed the initing duplicated in apic_init_ipi(). This
    2681         * arb_id was left over.. */
    2682         pApic->arb_id = 0;
     2683        /* The IDs are not touched by apic_init_ipi() and must be reset now. */
     2684        pApic->arb_id = pApic->id = i;
     2685        Assert(pApic->id == pApic->phys_id);    /* The two should match again. */
    26832686        /* Reset should re-enable the APIC. */
    26842687        pApic->apicbase = 0xfee00000 | MSR_IA32_APICBASE_ENABLE;
  • trunk/src/VBox/Devices/PC/DevPcBios.cpp

    r24092 r24193  
    13171317    floatPtr.u8Checksum            = 0;
    13181318    floatPtr.au8Feature[0]         = 0;
    1319     floatPtr.au8Feature[1]         = 0;
     1319    floatPtr.au8Feature[1]         = 0x80;
    13201320    floatPtr.au8Feature[2]         = 0;
    13211321    floatPtr.au8Feature[3]         = 0;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette