gdb: Do not use VmmOps for memory manipulation

We don't use the VmmOps trait directly for manipulating memory in the
core of the VMM as it's really designed for the MSHV crate to handle
instruction decoding. As I plan to make this trait MSHV specific to
allow reduced locking for MMIO and PIO handling when running on KVM this
use should be removed.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford
2022-05-04 15:22:27 +01:00
committed by Bo Chen
parent 5bd7a1f03c
commit c47e3b8689
2 changed files with 15 additions and 13 deletions
+4 -5
View File
@@ -5,8 +5,6 @@
//
// SPDX-License-Identifier: BSD-3-Clause
use std::{os::unix::net::UnixListener, sync::mpsc};
use gdbstub::{
arch::Arch,
common::{Signal, Tid},
@@ -30,7 +28,8 @@ use gdbstub::{
use gdbstub_arch::x86::reg::X86_64CoreRegs as CoreRegs;
#[cfg(target_arch = "x86_64")]
use gdbstub_arch::x86::X86_64_SSE as GdbArch;
use vm_memory::GuestAddress;
use std::{os::unix::net::UnixListener, sync::mpsc};
use vm_memory::{GuestAddress, GuestMemoryError};
#[cfg(target_arch = "x86_64")]
type ArchUsize = u64;
@@ -42,8 +41,8 @@ pub enum DebuggableError {
Resume(vm_migration::MigratableError),
ReadRegs(crate::cpu::Error),
WriteRegs(crate::cpu::Error),
ReadMem(hypervisor::HypervisorVmError),
WriteMem(hypervisor::HypervisorVmError),
ReadMem(GuestMemoryError),
WriteMem(GuestMemoryError),
TranslateGva(crate::cpu::Error),
PoisonedState,
}