mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 13:45:20 +00:00
hypervisor: emulator: drop the unused gva_to_gpa hook
That function is too limiting. It doesn't consider page permissions. It is not used, so just drop it. Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
parent
c67f799717
commit
cfaa192eb4
@ -137,14 +137,6 @@ pub trait PlatformEmulator {
|
||||
///
|
||||
fn set_cpu_state(&self, cpu_id: usize, state: Self::CpuState) -> Result<(), PlatformError>;
|
||||
|
||||
/// Translate a guest virtual address into a physical one
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `gva` - Guest virtual address to translate.
|
||||
///
|
||||
fn gva_to_gpa(&self, gva: u64) -> Result<u64, PlatformError>;
|
||||
|
||||
/// Fetch instruction bytes from memory.
|
||||
///
|
||||
/// # Arguments
|
||||
|
@ -750,10 +750,6 @@ mod mock_vmm {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn gva_to_gpa(&self, gva: u64) -> Result<u64, PlatformError> {
|
||||
Ok(gva)
|
||||
}
|
||||
|
||||
fn fetch(&self, ip: u64, instruction_bytes: &mut [u8]) -> Result<(), PlatformError> {
|
||||
let rip = self
|
||||
.state
|
||||
|
@ -1640,10 +1640,6 @@ impl<'a> PlatformEmulator for MshvEmulatorContext<'a> {
|
||||
.map_err(|e| PlatformError::SetCpuStateFailure(e.into()))
|
||||
}
|
||||
|
||||
fn gva_to_gpa(&self, gva: u64) -> Result<u64, PlatformError> {
|
||||
self.translate(gva)
|
||||
}
|
||||
|
||||
fn fetch(&self, ip: u64, instruction_bytes: &mut [u8]) -> Result<(), PlatformError> {
|
||||
let rip =
|
||||
self.cpu_state(self.vcpu.vp_index as usize)?
|
||||
|
Loading…
Reference in New Issue
Block a user