History log of /cloud-hypervisor/hypervisor/src/arch/emulator/mod.rs (Results 1 – 16 of 16)
Revision Date Author Comments
# 72c81783 21-May-2025 Philipp Schuster <philipp.schuster@cyberus-technology.de>

misc: hypervisor: streamline error Display::fmt()

The changes were mostly automatically applied using the Python
script mentioned in the first commit of this series.

Signed-off-by: Philipp Schuster

misc: hypervisor: streamline error Display::fmt()

The changes were mostly automatically applied using the Python
script mentioned in the first commit of this series.

Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
On-behalf-of: SAP philipp.schuster@sap.com

show more ...


# 8696bc66 19-May-2025 Philipp Schuster <philipp.schuster@cyberus-technology.de>

misc: hypervisor: streamline #[source] and Error

This streamlines the code base to follow best practices for
error handling in Rust: Each error struct implements
std::error::Error (most due via this

misc: hypervisor: streamline #[source] and Error

This streamlines the code base to follow best practices for
error handling in Rust: Each error struct implements
std::error::Error (most due via thiserror::Error derive macro)
and sets its source accordingly.

This allows future work that nicely prints the error chains,
for example.

So far, the convention is that each error prints its
sub error as part of its Display::fmt() impl.

Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
On-behalf-of: SAP philipp.schuster@sap.com

show more ...


# 88a9f799 29-Sep-2024 Rob Bradford <rbradford@rivosinc.com>

misc: Adapt consistent import style formatting

Historically the Cloud Hypervisor coding style has been to ensure that
all imports are ordered and placed in a single group. Unfortunately
cargo fmt ha

misc: Adapt consistent import style formatting

Historically the Cloud Hypervisor coding style has been to ensure that
all imports are ordered and placed in a single group. Unfortunately
cargo fmt has no support for ensuring that all imports are in a single
group so if whitespace lines were added as part of the import statements
then they would only be odered correctly in the group.

By adopting "group_imports="StdExternalCrate" we can enforce a style
where imports are placed in at most three groups for std, external
crates and the crate itself. Choosing a style enforceable by the tooling
reduces the reviewer burden.

Signed-off-by: Rob Bradford <rbradford@rivosinc.com>

show more ...


# cfaa192e 11-Jul-2024 Wei Liu <liuwe@microsoft.com>

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.c

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>

show more ...


# 5e527294 14-Dec-2022 Rob Bradford <robert.bradford@intel.com>

misc: Automatically fix cargo clippy issues added in 1.65 (stable)

Signed-off-by: Rob Bradford <robert.bradford@intel.com>


# a64bdcf3 20-Jun-2022 Wei Liu <liuwe@microsoft.com>

hypervisor: drop Send+Sync bounds for PlatformEmulator

Signed-off-by: Wei Liu <liuwe@microsoft.com>


# 7d757700 19-Oct-2021 Rob Bradford <robert.bradford@intel.com>

hypervisor: emulator: Print out all exception details

Print out all the details from an emulator exception.

As identified by the new beta clippy.

Signed-off-by: Rob Bradford <robert.bradford@intel

hypervisor: emulator: Print out all exception details

Print out all the details from an emulator exception.

As identified by the new beta clippy.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>

show more ...


# 496ceed1 11-May-2021 Rob Bradford <robert.bradford@intel.com>

misc: Remove unnecessary "extern crate"

Now all crates use edition = "2018" then the majority of the "extern
crate" statements can be removed. Only those for importing macros need
to remain.

Signed

misc: Remove unnecessary "extern crate"

Now all crates use edition = "2018" then the majority of the "extern
crate" statements can be removed. Only those for importing macros need
to remain.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>

show more ...


# 0c27f69f 25-Mar-2021 Rob Bradford <robert.bradford@intel.com>

hypervisor: Address Rust 1.51.0 clippy issue (upper_case_acroynms)

warning: name `TranslateGVA` contains a capitalized acronym
--> hypervisor/src/arch/emulator/mod.rs:51:5
|
51 | TranslateG

hypervisor: Address Rust 1.51.0 clippy issue (upper_case_acroynms)

warning: name `TranslateGVA` contains a capitalized acronym
--> hypervisor/src/arch/emulator/mod.rs:51:5
|
51 | TranslateGVA(#[source] anyhow::Error),
| ^^^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `TranslateGva`
|
= note: `#[warn(clippy::upper_case_acronyms)]` on by default
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms

Signed-off-by: Rob Bradford <robert.bradford@intel.com>

show more ...


# 74565538 01-Mar-2021 Wei Liu <liuwe@microsoft.com>

hypervisor: mshv: hook up TranslateGVA hypercall

At this stage this is the bare minimum needed to make Windows server
2019 work on MSHV.

Signed-off-by: Wei Liu <liuwe@microsoft.com>


# 53c3b00f 05-Dec-2020 Wei Liu <liuwe@microsoft.com>

hypervisor: emulator: introduce get/set_op

Provide two helpers to get and set operands. This reduces repetition.

Signed-off-by: Wei Liu <liuwe@microsoft.com>


# 15f0451c 30-Nov-2020 Samuel Ortiz <sameo@linux.intel.com>

hypervisor: emulator: Format instructions on error paths

Formatting instructions might be costly, so we only want to do that on
the emulation error paths.

Signed-off-by: Samuel Ortiz <sameo@linux.i

hypervisor: emulator: Format instructions on error paths

Formatting instructions might be costly, so we only want to do that on
the emulation error paths.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>

show more ...


# 1ac4c42a 26-Nov-2020 Samuel Ortiz <sameo@linux.intel.com>

hypervisor: emulator: Add initial fetch support

When the x86 instruction decoder tells us about some missing bytes from
the instruction stream, we call into the platform fetch method and
emulate one

hypervisor: emulator: Add initial fetch support

When the x86 instruction decoder tells us about some missing bytes from
the instruction stream, we call into the platform fetch method and
emulate one last instruction.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>

show more ...


# 7a4edecd 26-Nov-2020 Samuel Ortiz <sameo@linux.intel.com>

hypervisor: x86: Add an address linearization method to CpuStateManager

From a CPU state and a segment, we can translate a logical (segmented)
address into a linear one.

Signed-off-by: Samuel Ortiz

hypervisor: x86: Add an address linearization method to CpuStateManager

From a CPU state and a segment, we can translate a logical (segmented)
address into a linear one.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>

show more ...


# 3faffcb0 26-Nov-2020 Samuel Ortiz <sameo@linux.intel.com>

hypervisor: emulator: Add a CPU mode getter to CpuStateManager

We need to be able to build the CPU mode from its state in order to
start implementing mode related checks in the x86 emulator.

Signed

hypervisor: emulator: Add a CPU mode getter to CpuStateManager

We need to be able to build the CPU mode from its state in order to
start implementing mode related checks in the x86 emulator.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>

show more ...


# f0360aff 13-Nov-2020 Samuel Ortiz <sameo@linux.intel.com>

hypervisor: Architecture agnostic instruction emulation interface

In order to emulate instructions, we need a way to get access to some of
the guest resources. The PlatformEmulator interface provide

hypervisor: Architecture agnostic instruction emulation interface

In order to emulate instructions, we need a way to get access to some of
the guest resources. The PlatformEmulator interface provides guest
memory and CPU state access to emulator implementations.

Typically, an hypervisor will implement PlatformEmulator for architecture
specific instruction emulators to build their framework on top of.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>

show more ...