Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
advanced_virtualization_pub_soir_fall24
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
flg_courses
advanced_virtualization
advanced_virtualization_pub_soir_fall24
Commits
208d325d
Commit
208d325d
authored
6 months ago
by
Florent Gluck
Browse files
Options
Downloads
Patches
Plain Diff
updated 02-KVM.md
parent
670af459
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
course/02-KVM.md
+4
-14
4 additions, 14 deletions
course/02-KVM.md
with
4 additions
and
14 deletions
course/02-KVM.md
+
4
−
14
View file @
208d325d
...
...
@@ -856,16 +856,6 @@ if (!run->mmio.is_write) { // See struct kvm_run
[//]: # ----------------------------------------------------------------
# Device emulation
[//]: # ----------------------------------------------------------------
## Reminder: MMIO registers
When the VM is created:
- The VMM constructs the VM address space by:
- mapping the RAM into the VM address space
- if the VM exposes some device programmed through MMIO registers, it must ensure there is no memory mapping (RAM) where device registers are located:
- ensure `VMexits` (`KVM_EXIT_MMIO`) will be triggered when OS driver code read/write to these addresses (registers)
[//]: # ----------------------------------------------------------------
## Reminder: VMexits
...
...
@@ -914,8 +904,8 @@ outb(0x3C5, 0x0F);
\footnotesize
- The code above would typically be part of the VGA driver in the guest OS
- How can the VMM emulate the behavior of a real PC running this code?
- \footnotesize by analyzing the
code ran
by the guest OS
- if the VMM detects the exact
code
above, it then emulates the behavior on the host
- \footnotesize by analyzing the
sequence of VMExits triggered
by the guest OS
- if the VMM detects the exact
sequence of I/O registers reads/writes
above, it then emulates the behavior on the host
- for instance by opening a 400x300 pixels window in which pixels will be rendered
[//]: # ----------------------------------------------------------------
...
...
@@ -947,10 +937,10 @@ outb(0x3C5, 0x0F);
[//]: # ----------------------------------------------------------------
## Generic state machine representation (1/2)
R
epresent each state by a structure that defines:
**\textcolor{myblue}{Idea}**: to r
epresent each state by a structure that defines:
- the operation to perform
- the written/read
address
- the
address
written
to
/read
from
- the expected written value or value to inject
- the size of the operation (8, 16, or 32 bits)
- possibly a custom user function that would be executed at the beginning or end of the state
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment