mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-11-04 19:11:11 +00:00
vmm: unify TranslateVirtualAddress error for both x86_64 and aarch64
Using anyhow::Error should cover both architectures. Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
parent
88bbf7989a
commit
3e6b0a5eab
@ -155,11 +155,7 @@ pub enum Error {
|
|||||||
#[error("Error during CPU debug: {0}")]
|
#[error("Error during CPU debug: {0}")]
|
||||||
CpuDebug(#[source] hypervisor::HypervisorCpuError),
|
CpuDebug(#[source] hypervisor::HypervisorCpuError),
|
||||||
|
|
||||||
#[cfg(all(target_arch = "x86_64", feature = "gdb"))]
|
#[cfg(feature = "gdb")]
|
||||||
#[error("Error translating virtual address: {0}")]
|
|
||||||
TranslateVirtualAddress(#[source] hypervisor::HypervisorCpuError),
|
|
||||||
|
|
||||||
#[cfg(all(target_arch = "aarch64", feature = "gdb"))]
|
|
||||||
#[error("Error translating virtual address: {0}")]
|
#[error("Error translating virtual address: {0}")]
|
||||||
TranslateVirtualAddress(#[source] anyhow::Error),
|
TranslateVirtualAddress(#[source] anyhow::Error),
|
||||||
|
|
||||||
@ -1505,7 +1501,7 @@ impl CpuManager {
|
|||||||
.unwrap()
|
.unwrap()
|
||||||
.vcpu
|
.vcpu
|
||||||
.translate_gva(gva, /* flags: unused */ 0)
|
.translate_gva(gva, /* flags: unused */ 0)
|
||||||
.map_err(Error::TranslateVirtualAddress)?;
|
.map_err(|e| Error::TranslateVirtualAddress(e.into()))?;
|
||||||
Ok(gpa)
|
Ok(gpa)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user