~ubuntu-branches/ubuntu/karmic/virtualbox-ose/karmic-updates

« back to all changes in this revision

Viewing changes to src/VBox/VMM/VMMR0/HWACCMR0.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2009-09-14 18:25:07 UTC
  • mfrom: (0.4.1 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090914182507-c98g07mq16hjmn6d
Tags: 3.0.6-dfsg-1ubuntu1
* Merge from debian unstable (LP: #429697), remaining changes:
  - Enable DKMS support on virtualbox host and guest modules (LP: #267097)
    - Drop virtualbox-ose{-guest,}-modules-* package templates
    - Recommend *-source instead of *-modules packages
    - Replace error messages related to missing/mismatched
      kernel module accordingly
  - Autoload kernel module
    - LOAD_VBOXDRV_MODULE=1 in virtualbox-ose.default
  - Disable update action
    - patches/u01-disable-update-action.dpatch
  - Virtualbox should go in Accessories, not in System tools (LP: #288590)
    - virtualbox-ose-qt.files/virtualbox-ose.desktop
  - Add apport hook
    - virtualbox-ose.files/source_virtualbox-ose.py
    - virtualbox-ose.install
  - Add launchpad integration
    - control
    - lpi-bug.xpm
    - patches/u02-lp-integration.dpatch
  - virtualbox, virtualbox-* (names of the upstream proprietary packages)
    conflict with virtualbox-ose (LP: #379878)
* Make debug package depend on normal or guest utils package
* Drop patches/22-pulseaudio-stubs.dpatch (applied upstream)
* Rename Ubuntu specific patches to uXX-*.dpatch
* Fix lintian warnings in maintainer scripts

Show diffs side-by-side

added added

removed removed

Lines of Context:
1220
1220
}
1221
1221
 
1222
1222
/**
 
1223
 * Save a pending IO read.
 
1224
 *
 
1225
 * @param   pVCpu           The VMCPU to operate on.
 
1226
 * @param   GCPtrRip        Address of IO instruction
 
1227
 * @param   GCPtrRipNext    Address of the next instruction
 
1228
 * @param   uPort           Port address
 
1229
 * @param   uAndVal         And mask for saving the result in eax
 
1230
 * @param   cbSize          Read size
 
1231
 */
 
1232
VMMR0DECL(void) HWACCMR0SavePendingIOPortRead(PVMCPU pVCpu, RTGCPTR GCPtrRip, RTGCPTR GCPtrRipNext, unsigned uPort, unsigned uAndVal, unsigned cbSize)
 
1233
{
 
1234
    pVCpu->hwaccm.s.PendingIO.enmType         = HWACCMPENDINGIO_PORT_READ;
 
1235
    pVCpu->hwaccm.s.PendingIO.GCPtrRip        = GCPtrRip;
 
1236
    pVCpu->hwaccm.s.PendingIO.GCPtrRipNext    = GCPtrRipNext;
 
1237
    pVCpu->hwaccm.s.PendingIO.s.Port.uPort    = uPort;
 
1238
    pVCpu->hwaccm.s.PendingIO.s.Port.uAndVal  = uAndVal;
 
1239
    pVCpu->hwaccm.s.PendingIO.s.Port.cbSize   = cbSize;
 
1240
    return;
 
1241
}
 
1242
 
 
1243
/**
 
1244
 * Save a pending IO write.
 
1245
 *
 
1246
 * @param   pVCpu           The VMCPU to operate on.
 
1247
 * @param   GCPtrRIP        Address of IO instruction
 
1248
 * @param   uPort           Port address
 
1249
 * @param   uAndVal         And mask for fetching the result from eax
 
1250
 * @param   cbSize          Read size
 
1251
 */
 
1252
VMMR0DECL(void) HWACCMR0SavePendingIOPortWrite(PVMCPU pVCpu, RTGCPTR GCPtrRip, RTGCPTR GCPtrRipNext, unsigned uPort, unsigned uAndVal, unsigned cbSize)
 
1253
{
 
1254
    pVCpu->hwaccm.s.PendingIO.enmType         = HWACCMPENDINGIO_PORT_WRITE;
 
1255
    pVCpu->hwaccm.s.PendingIO.GCPtrRip        = GCPtrRip;
 
1256
    pVCpu->hwaccm.s.PendingIO.GCPtrRipNext    = GCPtrRipNext;
 
1257
    pVCpu->hwaccm.s.PendingIO.s.Port.uPort    = uPort;
 
1258
    pVCpu->hwaccm.s.PendingIO.s.Port.uAndVal  = uAndVal;
 
1259
    pVCpu->hwaccm.s.PendingIO.s.Port.cbSize   = cbSize;
 
1260
    return;
 
1261
}
 
1262
 
 
1263
/**
1223
1264
 * Disable VT-x if it's active *and* the current switcher turns off paging
1224
1265
 *
1225
1266
 * @returns VBox status code.
1294
1335
}
1295
1336
 
1296
1337
#ifdef VBOX_STRICT
1297
 
# include <iprt/string.h>
1298
1338
/**
1299
1339
 * Dumps a descriptor.
1300
1340
 *
1302
1342
 * @param   Sel     Selector number.
1303
1343
 * @param   pszMsg  Message to prepend the log entry with.
1304
1344
 */
1305
 
VMMR0DECL(void) HWACCMR0DumpDescriptor(PX86DESCHC pDesc, RTSEL Sel, const char *pszMsg)
 
1345
VMMR0DECL(void) HWACCMR0DumpDescriptor(PCX86DESCHC pDesc, RTSEL Sel, const char *pszMsg)
1306
1346
{
1307
1347
    /*
1308
1348
     * Make variable description string.
1311
1351
    {
1312
1352
        unsigned    cch;
1313
1353
        const char *psz;
1314
 
    } const aTypes[32] =
 
1354
    } const s_aTypes[32] =
1315
1355
    {
1316
1356
# define STRENTRY(str) { sizeof(str) - 1, str }
1317
1357
 
1374
1414
    char        szMsg[128];
1375
1415
    char       *psz = &szMsg[0];
1376
1416
    unsigned    i = pDesc->Gen.u1DescType << 4 | pDesc->Gen.u4Type;
1377
 
    memcpy(psz, aTypes[i].psz, aTypes[i].cch);
1378
 
    psz += aTypes[i].cch;
 
1417
    memcpy(psz, s_aTypes[i].psz, s_aTypes[i].cch);
 
1418
    psz += s_aTypes[i].cch;
1379
1419
 
1380
1420
    if (pDesc->Gen.u1Present)
1381
1421
        ADD_STR(psz, "Present ");