#
2bc8d51a |
| 09-Jun-2025 |
Jinank Jain <jinankjain@microsoft.com> |
misc: Fix missing lifetime syntax clippy warning
This was caught by the nightly compiler during cargo fuzz build.
error: lifetime flowing from input to output with different syntax can be confusing
misc: Fix missing lifetime syntax clippy warning
This was caught by the nightly compiler during cargo fuzz build.
error: lifetime flowing from input to output with different syntax can be confusing --> /home/runner/work/cloud-hypervisor/cloud-hypervisor/hypervisor/src/arch/x86/emulator/mod.rs:493:26 | 493 | pub fn new(platform: &mut dyn PlatformEmulator<CpuState = T>) -> Emulator<T> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ----------- the lifetime gets resolved as `'_` | | | this lifetime flows to the output | = note: `-D mismatched-lifetime-syntaxes` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(mismatched_lifetime_syntaxes)]` help: one option is to remove the lifetime for references and use the anonymous lifetime for paths | 493 | pub fn new(platform: &mut dyn PlatformEmulator<CpuState = T>) -> Emulator<'_, T> {
Signed-off-by: Jinank Jain <jinankjain@microsoft.com>
show more ...
|
#
73e1451a |
| 02-Jan-2025 |
Wei Liu <liuwe@microsoft.com> |
hypervisor: emulator: use wrapping arithmetic
Signed-off-by: Wei Liu <liuwe@microsoft.com>
|
#
1180f757 |
| 02-Jan-2025 |
Wei Liu <liuwe@microsoft.com> |
hypervisor: emulator: adjust iced-x86 feature flags
The fastfmt feature and VEX support use techniques that appear to leak memory in the eye of LLVM's address sanitizer.
While at it, disable a bunc
hypervisor: emulator: adjust iced-x86 feature flags
The fastfmt feature and VEX support use techniques that appear to leak memory in the eye of LLVM's address sanitizer.
While at it, disable a bunch of instruction set decoding support we never intend to support.
Signed-off-by: Wei Liu <liuwe@microsoft.com>
show more ...
|
#
166a005b |
| 21-Oct-2024 |
Rob Bradford <rbradford@rivosinc.com> |
hypervisor: mshv: Fix superflous lifetimes
warning: the following explicit lifetimes could be elided: 'a --> hypervisor/src/arch/x86/emulator/mod.rs:492:6 | 492 | impl<'a, T: CpuStateManager>
hypervisor: mshv: Fix superflous lifetimes
warning: the following explicit lifetimes could be elided: 'a --> hypervisor/src/arch/x86/emulator/mod.rs:492:6 | 492 | impl<'a, T: CpuStateManager> Emulator<'a, T> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes = note: `#[warn(clippy::needless_lifetimes)]` on by default help: elide the lifetimes | 492 - impl<'a, T: CpuStateManager> Emulator<'a, T> { 492 + impl<T: CpuStateManager> Emulator<'_, T> { |
warning: the following explicit lifetimes could be elided: 'a --> hypervisor/src/mshv/x86_64/emulator.rs:19:6 | 19 | impl<'a> MshvEmulatorContext<'a> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 19 - impl<'a> MshvEmulatorContext<'a> { 19 + impl MshvEmulatorContext<'_> { |
warning: the following explicit lifetimes could be elided: 'a --> hypervisor/src/mshv/x86_64/emulator.rs:65:6 | 65 | impl<'a> PlatformEmulator for MshvEmulatorContext<'a> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 65 - impl<'a> PlatformEmulator for MshvEmulatorContext<'a> { 65 + impl PlatformEmulator for MshvEmulatorContext<'_> { |
Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
show more ...
|
#
297236a7 |
| 30-Sep-2024 |
Ruoqing He <heruoqing@iscas.ac.cn> |
misc: Eliminate use of `assert!((...).is_ok())`
Asserting on .is_ok()/.is_err() leads to hard to debug failures (as if the test fails, it will only say "assertion failed: false". We replace these wi
misc: Eliminate use of `assert!((...).is_ok())`
Asserting on .is_ok()/.is_err() leads to hard to debug failures (as if the test fails, it will only say "assertion failed: false". We replace these with `.unwrap()`, which also prints the exact error variant that was unexpectedly encountered (we can to this these days thanks to efforts to implement Display and Debug for our error types). If the assert!((...).is_ok()) was followed by an .unwrap() anyway, we just drop the assert.
Inspired by and quoted from @roypat.
Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
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 ...
|
#
4c99aea6 |
| 02-Aug-2024 |
Jinank Jain <jinankjain@microsoft.com> |
hypervisor: Switch to use the new StandardRegisters
With this we are removing the CloudHypervisor definition of StandardRegisters instead using an enum which contains different variants of StandardR
hypervisor: Switch to use the new StandardRegisters
With this we are removing the CloudHypervisor definition of StandardRegisters instead using an enum which contains different variants of StandardRegisters coming from their bindigs crate.
Signed-off-by: Jinank Jain <jinankjain@microsoft.com>
show more ...
|
#
1c7997c5 |
| 09-Aug-2024 |
Wei Liu <liuwe@microsoft.com> |
hypervisor: x86: emulate MOVSQ
Signed-off-by: Wei Liu <liuwe@microsoft.com>
|
#
824e83ab |
| 17-Jul-2024 |
Wei Liu <liuwe@microsoft.com> |
hypervisor: x86: emulate STOS
Signed-off-by: Wei Liu <liuwe@microsoft.com>
|
#
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 ...
|
#
1eb41330 |
| 03-Jul-2024 |
Wei Liu <liuwe@microsoft.com> |
hypervisor: x86: emulator: set IP properly for newly fetched stream
The default value of IP is zero. If the decoder's state not set properly, then the guest state is going to be wrong.
Signed-off-b
hypervisor: x86: emulator: set IP properly for newly fetched stream
The default value of IP is zero. If the decoder's state not set properly, then the guest state is going to be wrong.
Signed-off-by: Wei Liu <liuwe@microsoft.com>
show more ...
|
#
7c608f63 |
| 27-Jun-2024 |
Wei Liu <liuwe@microsoft.com> |
hypervisor: x86: emulator: accept empty instruction stream input
The emulator should fetch from memory just fine.
Signed-off-by: Wei Liu <liuwe@microsoft.com>
|
#
3ad8d249 |
| 27-Jun-2024 |
Wei Liu <liuwe@microsoft.com> |
hypervisor: x86: emulator: fix a variable
Comparing RAX with RIP makes no logical sense other than RIP happens to be the correct value. Use `target_rax` instead.
Signed-off-by: Wei Liu <liuwe@micro
hypervisor: x86: emulator: fix a variable
Comparing RAX with RIP makes no logical sense other than RIP happens to be the correct value. Use `target_rax` instead.
Signed-off-by: Wei Liu <liuwe@microsoft.com>
show more ...
|
#
56c6c027 |
| 27-Jun-2024 |
Wei Liu <liuwe@microsoft.com> |
hypervisor: x86: emulator: test executing only one instruction
Signed-off-by: Wei Liu <liuwe@microsoft.com>
|
#
19b0ea84 |
| 27-Jun-2024 |
Wei Liu <liuwe@microsoft.com> |
hypervisor: x86: emulator: add the second instruction to test comment
Signed-off-by: Wei Liu <liuwe@microsoft.com>
|
#
42e9632c |
| 07-Jun-2024 |
Josh Soref <2119212+jsoref@users.noreply.github.com> |
misc: Fix spelling issues
Misspellings were identified by: https://github.com/marketplace/actions/check-spelling
* Initial corrections based on forbidden patterns from the action * Additional cor
misc: Fix spelling issues
Misspellings were identified by: https://github.com/marketplace/actions/check-spelling
* Initial corrections based on forbidden patterns from the action * Additional corrections by Google Chrome auto-suggest * Some manual corrections * Adding markdown bullets to readme credits section
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
show more ...
|
#
c721c0d8 |
| 19-Mar-2024 |
Rob Bradford <rbradford@rivosinc.com> |
hypervisor: emulator: Remove unnecessary #![allow(unused_mut)]
clippy was flagging this up as a mixture of mixed attributes but that attribute is no longer necessary
warning: item has both inner an
hypervisor: emulator: Remove unnecessary #![allow(unused_mut)]
clippy was flagging this up as a mixture of mixed attributes but that attribute is no longer necessary
warning: item has both inner and outer attributes --> hypervisor/src/arch/x86/emulator/mod.rs:769:1 | 769 | / #[cfg(test)] 770 | | mod tests { 771 | | #![allow(unused_mut)] | |_________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mixed_attributes_style = note: `#[warn(clippy::mixed_attributes_style)]` on by default
Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
show more ...
|
#
adb318f4 |
| 19-Feb-2024 |
Rob Bradford <rbradford@rivosinc.com> |
misc: Remove redundant "use" imports
With the nightly toolchain (2024-02-18) cargo check will flag up redundant imports either because they are pulled in by the prelude on earlier match.
Remove tho
misc: Remove redundant "use" imports
With the nightly toolchain (2024-02-18) cargo check will flag up redundant imports either because they are pulled in by the prelude on earlier match.
Remove those redundant imports.
Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
show more ...
|
#
442ac905 |
| 31-Jul-2023 |
Philipp Schuster <philipp.schuster@cyberus-technology.de> |
x86 emulator: add Mov_moffs_AX & Mov_AX_moffs (16,32,64)
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
|
#
ad202f9b |
| 27-Jan-2023 |
Praveen K Paladugu <prapal@linux.microsoft.com> |
hypervisor: x86: emulate MOVSB
Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
|
#
3a225aaa |
| 26-Jan-2023 |
Wei Liu <liuwe@microsoft.com> |
hypervisor: x86: emulate MOVSW
Signed-off-by: Wei Liu <liuwe@microsoft.com>
|
#
f1ab86fe |
| 14-Jul-2022 |
Wei Liu <liuwe@microsoft.com> |
hypervisor: x86: provide a generic SpecialRegisters structure
Signed-off-by: Wei Liu <liuwe@microsoft.com>
|
#
75797827 |
| 14-Jul-2022 |
Wei Liu <liuwe@microsoft.com> |
hypervisor: x86: provide a generic SegmentRegister structure
And drop SegmentRegisterOps since it is no longer required.
Signed-off-by: Wei Liu <liuwe@microsoft.com>
|
#
8b7781e2 |
| 14-Jul-2022 |
Wei Liu <liuwe@microsoft.com> |
hypervisor: x86: provide a generic StandardRegisters structure
We only need to do this for x86 since MSHV does not have aarch64 support yet. This reduces unnecessary code churn.
Signed-off-by: Wei
hypervisor: x86: provide a generic StandardRegisters structure
We only need to do this for x86 since MSHV does not have aarch64 support yet. This reduces unnecessary code churn.
Signed-off-by: Wei Liu <liuwe@microsoft.com>
show more ...
|
#
2716bc33 |
| 30-Jun-2022 |
Rob Bradford <robert.bradford@intel.com> |
build: Fix beta clippy issue (derive_partial_eq_without_eq)
warning: you are deriving `PartialEq` and can implement `Eq` --> vmm/src/serial_manager.rs:59:30 | 59 | #[derive(Debug, Clone, Copy,
build: Fix beta clippy issue (derive_partial_eq_without_eq)
warning: you are deriving `PartialEq` and can implement `Eq` --> vmm/src/serial_manager.rs:59:30 | 59 | #[derive(Debug, Clone, Copy, PartialEq)] | ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
show more ...
|