mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-10 12:09:31 +00:00
hypervisor: Switch inflate/deflate functions
The methods names got switched in commit https://crrev.com/c/3640424. Switch them to the right names. BUG=b:213150327 TEST=compiled. Change-Id: I7f8df13367abc2314f26c9da206bcbd9665e8ba5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3654202 Commit-Queue: Vaibhav Nagarnaik <vnagarnaik@google.com> Reviewed-by: Colin Downs-Razouk <colindr@google.com> Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Anton Romanov <romanton@google.com>
This commit is contained in:
parent
8c126493ad
commit
eb06419c56
2 changed files with 5 additions and 5 deletions
|
@ -650,7 +650,7 @@ impl Vm for KvmVm {
|
|||
}
|
||||
}
|
||||
|
||||
fn handle_deflate(&mut self, guest_address: GuestAddress, size: u64) -> Result<()> {
|
||||
fn handle_inflate(&mut self, guest_address: GuestAddress, size: u64) -> Result<()> {
|
||||
match self.guest_mem.remove_range(guest_address, size) {
|
||||
Ok(_) => Ok(()),
|
||||
Err(vm_memory::Error::MemoryAccess(_, MmapError::SystemCallFailed(e))) => Err(e),
|
||||
|
@ -658,7 +658,7 @@ impl Vm for KvmVm {
|
|||
}
|
||||
}
|
||||
|
||||
fn handle_inflate(&mut self, _guest_address: GuestAddress, _size: u64) -> Result<()> {
|
||||
fn handle_deflate(&mut self, _guest_address: GuestAddress, _size: u64) -> Result<()> {
|
||||
// No-op, when the guest attempts to access the pages again, Linux/KVM will provide them.
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
@ -169,15 +169,15 @@ pub trait Vm: Send {
|
|||
/// # Arguments
|
||||
/// * `guest_address` - Address in the guest's "physical" memory to begin the unmapping
|
||||
/// * `size` - The size of the region to unmap, in bytes
|
||||
fn handle_deflate(&mut self, guest_address: GuestAddress, size: u64) -> Result<()>;
|
||||
fn handle_inflate(&mut self, guest_address: GuestAddress, size: u64) -> Result<()>;
|
||||
|
||||
/// Reallocates memory and maps it to provide to the guest. This is intended to be used
|
||||
/// exclusively in tandem with `handle_deflate`, and will return an `Err` Result otherwise.
|
||||
/// exclusively in tandem with `handle_inflate`, and will return an `Err` Result otherwise.
|
||||
///
|
||||
/// # Arguments
|
||||
/// * `guest_address` - Address in the guest's "physical" memory to begin the mapping
|
||||
/// * `size` - The size of the region to map, in bytes
|
||||
fn handle_inflate(&mut self, guest_address: GuestAddress, size: u64) -> Result<()>;
|
||||
fn handle_deflate(&mut self, guest_address: GuestAddress, size: u64) -> Result<()>;
|
||||
}
|
||||
|
||||
/// A unique fingerprint for a particular `VcpuRunHandle`, used in `Vcpu` impls to ensure the
|
||||
|
|
Loading…
Reference in a new issue