1/*
2 * Copyright (c) 2013 Andreas Sandberg
3 * All rights reserved
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;
--- 540 unchanged lines hidden (view full) ---
549
550void
551X86KvmCPU::startup()
552{
553 BaseKvmCPU::startup();
554
555 updateCPUID();
556
557 io_req.setThreadContext(tc->contextId(), 0);
558
559 // TODO: Do we need to create an identity mapped TSS area? We
560 // should call kvm.vm.setTSSAddress() here in that case. It should
561 // only be needed for old versions of the virtualization
562 // extensions. We should make sure that the identity range is
563 // reserved in the e820 memory map in that case.
564}
565
566void
--- 774 unchanged lines hidden (view full) ---
1341 (port & 0x3));
1342 } else {
1343 pAddr = X86ISA::x86IOAddress(port);
1344 }
1345 } else {
1346 pAddr = X86ISA::x86IOAddress(port);
1347 }
1348
1349 io_req.setPhys(pAddr, kvm_run.io.size, Request::UNCACHEABLE,
1350 dataMasterId());
1351
1352 const MemCmd cmd(isWrite ? MemCmd::WriteReq : MemCmd::ReadReq);
1353 // Temporarily lock and migrate to the event queue of the
1354 // VM. This queue is assumed to "own" all devices we need to
1355 // access if running in multi-core mode.
1356 EventQueue::ScopedMigration migrate(vm.eventQueue());
1357 for (int i = 0; i < count; ++i) {
1358 Packet pkt(&io_req, cmd);
--- 271 unchanged lines hidden ---
2 * Copyright (c) 2013 Andreas Sandberg
3 * All rights reserved
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;
--- 540 unchanged lines hidden (view full) ---
549
550void
551X86KvmCPU::startup()
552{
553 BaseKvmCPU::startup();
554
555 updateCPUID();
556
557 io_req.setThreadContext(tc->contextId(), 0);
558
559 // TODO: Do we need to create an identity mapped TSS area? We
560 // should call kvm.vm.setTSSAddress() here in that case. It should
561 // only be needed for old versions of the virtualization
562 // extensions. We should make sure that the identity range is
563 // reserved in the e820 memory map in that case.
564}
565
566void
--- 774 unchanged lines hidden (view full) ---
1341 (port & 0x3));
1342 } else {
1343 pAddr = X86ISA::x86IOAddress(port);
1344 }
1345 } else {
1346 pAddr = X86ISA::x86IOAddress(port);
1347 }
1348
1349 io_req.setPhys(pAddr, kvm_run.io.size, Request::UNCACHEABLE,
1350 dataMasterId());
1351
1352 const MemCmd cmd(isWrite ? MemCmd::WriteReq : MemCmd::ReadReq);
1353 // Temporarily lock and migrate to the event queue of the
1354 // VM. This queue is assumed to "own" all devices we need to
1355 // access if running in multi-core mode.
1356 EventQueue::ScopedMigration migrate(vm.eventQueue());
1357 for (int i = 0; i < count; ++i) {
1358 Packet pkt(&io_req, cmd);
--- 271 unchanged lines hidden ---