-
Notifications
You must be signed in to change notification settings - Fork 192
wip: sidecar: sync RAX from intercept message in handle_io_port_exit #3360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
7393a78
722fc0f
21df6df
e4e66ee
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -707,25 +707,27 @@ impl<'a, 'b> InterceptHandler<'a, 'b> { | |
|
|
||
| tracing::trace!(msg = %format_args!("{:x?}", message), "io_port"); | ||
|
|
||
| assert_eq!( | ||
| message.rax, | ||
| self.vp.runner.cpu_context().gps_no_rsp[protocol::RAX] | ||
| ); | ||
|
|
||
| // Sync RAX from the intercept message. For sidecar VPs, cpu_context | ||
| // may be stale if the register page was unavailable or invalid. | ||
| let rax = message.rax; | ||
| let interruption_pending = message.header.execution_state.interruption_pending(); | ||
|
|
||
| if message.access_info.string_op() || message.access_info.rep_prefix() { | ||
| self.vp.runner.cpu_context_mut().gps_no_rsp[protocol::RAX] = rax; | ||
|
emirceski marked this conversation as resolved.
|
||
| let cache = self.vp.emulation_cache(self.intercepted_vtl); | ||
| self.vp | ||
| .emulate(dev, interruption_pending, self.intercepted_vtl, cache) | ||
| .await | ||
| } else { | ||
| let next_rip = next_rip(&message.header); | ||
| let access_size = message.access_info.access_size(); | ||
| let is_write = message.header.intercept_access_type == HvInterceptAccessType::WRITE; | ||
| let port = message.port_number; | ||
| self.vp.runner.cpu_context_mut().gps_no_rsp[protocol::RAX] = rax; | ||
|
||
| virt_support_x86emu::emulate::emulate_io( | ||
| self.vp.vp_index(), | ||
| message.header.intercept_access_type == HvInterceptAccessType::WRITE, | ||
| message.port_number, | ||
| is_write, | ||
| port, | ||
| &mut self.vp.runner.cpu_context_mut().gps_no_rsp[protocol::RAX], | ||
| access_size, | ||
| dev, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.