Documentation
¶
Overview ¶
Package vm provides the models for address translations
Index ¶
- type DefaultPageTableFactory
- type InvalidationCompleteRsp
- type PTEInvalidationReq
- type Page
- type PageMigrationReqToDriver
- type PageMigrationRspFromDriver
- type PageTable
- type PageTableFactory
- type PageTableImpl
- type TLBFullInvalidateReq
- type TLBPartialInvalidateReq
- type TLBTracer
- type TranslationReadyRsp
- type TranslationReq
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultPageTableFactory ¶
type DefaultPageTableFactory struct{}
DefaultPageTableFactory builds PageTableImpl
func (DefaultPageTableFactory) Build ¶
func (f DefaultPageTableFactory) Build() PageTable
Build returns a default page table implementation
type InvalidationCompleteRsp ¶ added in v1.1.0
type InvalidationCompleteRsp struct { *akita.ReqBase RespondTo string // The ID of the request it replies InvalidationDone bool }
func NewInvalidationCompleteRsp ¶ added in v1.1.0
func NewInvalidationCompleteRsp( time akita.VTimeInSec, src, dst akita.Port, respondTo string, ) *InvalidationCompleteRsp
type PTEInvalidationReq ¶ added in v1.1.0
func NewPTEInvalidationReq ¶ added in v1.1.0
func NewPTEInvalidationReq( time akita.VTimeInSec, src, dst akita.Port, pid ca.PID, vAddr []uint64, ) *PTEInvalidationReq
type Page ¶
type Page struct { PID ca.PID PAddr uint64 VAddr uint64 PageSize uint64 Valid bool GPUID uint64 Unified bool IsMigrating bool }
A Page is an entry in the page table, maintaining the information about how to translate a virtual address to a physical address
type PageMigrationReqToDriver ¶ added in v1.2.2
type PageMigrationReqToDriver struct { *akita.ReqBase VAddr uint64 PhysicalAddress uint64 PageSize uint64 PID ca.PID RequestingGPU uint64 }
func NewPageMigrationReqToDriver ¶ added in v1.2.2
func NewPageMigrationReqToDriver( time akita.VTimeInSec, src, dst akita.Port, ) *PageMigrationReqToDriver
type PageMigrationRspFromDriver ¶ added in v1.2.2
func NewPageMigrationRspFromDriver ¶ added in v1.2.2
func NewPageMigrationRspFromDriver( time akita.VTimeInSec, src, dst akita.Port, ) *PageMigrationRspFromDriver
type PageTable ¶
type PageTable interface { InsertPage(page *Page) RemovePage(vAddr uint64) FindPage(vAddr uint64) *Page }
A PageTable holds the meta-data of the pages.
type PageTableFactory ¶
type PageTableFactory interface {
Build() PageTable
}
A PageTableFactory builds PageTables
type PageTableImpl ¶
PageTableImpl is the default implementation of a Page Table
func (*PageTableImpl) FindPage ¶
func (pt *PageTableImpl) FindPage(vAddr uint64) *Page
FindPage returns the page that contains the given virtual address. This function returns nil if the page is not found.
func (*PageTableImpl) InsertPage ¶
func (pt *PageTableImpl) InsertPage(page *Page)
InsertPage put a new page into the PageTable
func (*PageTableImpl) RemovePage ¶
func (pt *PageTableImpl) RemovePage(vAddr uint64)
RemovePage removes the entry in the page table that contains the target address.
type TLBFullInvalidateReq ¶ added in v1.1.0
type TLBPartialInvalidateReq ¶ added in v1.1.0
A TLBPartialInvalidate asks the receiver TLB to invalidate the list of particular entries. The list can consist anyhere from 0 to N entries
type TLBTracer ¶
type TLBTracer struct {
// contains filtered or unexported fields
}
A TLBTracer write logs for what happened in a TLB
func NewTLBTracer ¶
NewTLBTracer produce a new TLBTracer, injecting the dependency of a writer.
type TranslationReadyRsp ¶ added in v1.2.2
type TranslationReadyRsp struct { *akita.ReqBase RespondTo string // The ID of the request it replies Page *Page }
A TranslationReadyRsp is the respond for a TranslationReq. It carries the physical address.
func NewTranslationReadyRsp ¶ added in v1.2.2
func NewTranslationReadyRsp( time akita.VTimeInSec, src, dst akita.Port, respondTo string, ) *TranslationReadyRsp
NewTranslationReadyRsp creates a new TranslationReadyRsp
type TranslationReq ¶
A TranslationReq asks the receiver component to translate the request.
func NewTranslationReq ¶ added in v1.2.2
func NewTranslationReq( time akita.VTimeInSec, src, dst akita.Port, pid ca.PID, vAddr uint64, GPUID uint64, ) *TranslationReq
NewTranslationReq creates a new translation req