Use the crates.io implementation of tempfile instead of our own version.
Our reimplementation is kept in the tree for now in case of dependencies
outside of the crosvm tree; it can be removed later once those are fully
switched over to the crates.io implementation.
BUG=b:199204746
TEST=emerge-hatch crosvm
Change-Id: I07d3404239302ab9a17f4ddc82a9479b256e4eb4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3209839
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
My editor doesn't like them, and probably they should be.
BUG=None
TEST=read it.
Change-Id: I40041e41841e47cb386fcd12a4622efeca33474d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3215932
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Tested-by: Dennis Kempin <denniskempin@google.com>
VK_KHR_external_memory requires VK_KHR_external_memory_capabilities which
requires VK_KHR_get_physical_device_properties2. Ash has started to check
that the instance extensions were required when creating devices.
BUG=b:189133053
TEST=launch Cuttlefish w/ Vulkano feature enabled in Crosvm
Change-Id: Ifaafda72500ccbd16dd461bcd5dc2633de4b8cfc
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3203233
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
This reverts commit 4ea81e3003.
Reason for revert: Breaks ToT. See: https://ci.chromium.org/ui/p/chromeos/builders/cq/hana-cq/b8833931827711281905/overview
Original change's description:
> Dump backing File system type.
>
> To aid investigation, the root file system image needs to reside on a
> file system with O_DIRECT support.
>
> BUG=b:199094605
> TEST=tast run localhost:2229 arc.Boot.vm_o_direct
> # logs: Disk image file is hosted on file system type ef53
>
> Change-Id: Ifd393e7009721c697d3d23177129f187454534a8
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3203719
> Tested-by: kokoro <noreply+kokoro@google.com>
> Commit-Queue: Junichi Uekawa <uekawa@chromium.org>
> Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Bug: b:199094605
Change-Id: I3da7c8284d1e6f2496e300d9f02c0063bbb5467c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3213363
Reviewed-by: Raul E Rangel <rrangel@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
If the guest sends a VIRTIO_BLK_T_GET_ID request and the block device
does not have an ID configured, crosvm prints an error message:
[devices/src/virtio/block/asynchronous.rs:191] failed executing disk
request: unsupported (8)
Since there is no corresponding feature flag for GET_ID support, the
guest can only detect if the command is supported by just trying it.
However, the error message is confusing to the crosvm user, since this
request failure is not indicative of a problem, just a part of normal
operation.
To avoid this confusion, suppress the error message when GET_ID fails
while still returning the unsupported status to the guest.
BUG=None
TEST=crosvm run -r vm_rootfs.img vm_kernel # check syslog for no error
Change-Id: I05fcd3c428ff1314998ac88fd92d78423155dba3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3213115
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
To aid investigation, the root file system image needs to reside on a
file system with O_DIRECT support.
BUG=b:199094605
TEST=tast run localhost:2229 arc.Boot.vm_o_direct
# logs: Disk image file is hosted on file system type ef53
Change-Id: Ifd393e7009721c697d3d23177129f187454534a8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3203719
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Junichi Uekawa <uekawa@chromium.org>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Add the vmm side for the vhost-user vsock device.
BUG=b:179756331
TEST=Connect to vshd inside a VM with a vhost-user vsock device
Change-Id: I332adbb6f8d6cfc8dff16375e93d946ecad2e84b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3153213
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Since vhost-user messages have a 1:1 mapping to vhost ioctls, this
device doesn't use DeviceRequestHandler but processes incoming messages
directly.
BUG=b:179756331
TEST=Connect to vshd inside a VM with a vhost-user vsock device
Cq-Depend: chromium:3105429
Change-Id: I9811e29282f7e79140be1203bce9030ec37a3343
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3153212
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
This CL adds --per-vm-core-scheduling command line option to crosvm
to allow ARCVM to use per-VM core scheduling for better performance.
Note that per-VM core scheduling makes all vCPU threads to share the
same core scheduling cookie.
The feature is disabled by default, and does not change Linux VMs
behavior unless the new command line flag is explicitly passed in.
Also, this CL never affect Parallels since it uses the plugin
infrastructure (src/plugin/).
For ARCVM, the feature will be enabled by default via Chromium's
base::Feature (see crrev.com/c/3207747) as an interim solution until
the optimized two-level core scheduling is ready. This is based on
the latest recommendation from the security team (newfel@, resch@,
and others) at go/arcvm-core-scheduling-recommendations.
Credit: This CL is based on an idea from joelhockey@ and bgeffon@
at go/exawj
BUG=b:194022819
TEST=boot ARCVM with the new flag and verify all vCPU threads have
same cookie.
Change-Id: Ib97ab9942b2516df9fbffe35517919f29b309a83
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3101607
Commit-Queue: Yusuke Sato <yusukes@chromium.org>
Owners-Override: Yusuke Sato <yusukes@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Joel Hockey <joelhockey@chromium.org>
Reviewed-by: Jorge Lucangeli Obes <jorgelo@chromium.org>
This includes https://r.android.com/1835176 in order to prevent bindgen
from modifying libminijail.rs on every build, causing the submodule to
be marked as dirty.
BUG=None
TEST=cargo build
TEST=./test_all
Change-Id: I73e97231c37ef49bff463b7cc282a1cb42d7bc84
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3209926
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
- 'vulkano::device::DeviceExtensions::supported_by_device` deprecated
* Use PhysicalDevice::supported_extensions instead
- formats now use VK naming convention, not Rust conventions
BUG=b:173630595
TEST=compile and run
Change-Id: Ibb1bdd8f98f9d6a5d38ac3605780a1ae8d818a6e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3203232
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Jason Macnak <natsu@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Both RutabagaError::SpecViolation and RutabagaError::Unsupported
are used as catch-alls for errors that don't fit any one
particular place.
With this change, RutabagaError::Unsupported means that a particular
function is not implemented.
RutabagaError::SpecViolation(..) now provides free-form debug
reporting for one-off errors. However, it is recommended to create a
new RutabagaError variant if two instances of the same spec violation
are noticed. Many new variants are added in CL in observance of this
recommendation.
In addition, we may create a CrossDomainError and RutabagaGrallocError
one day. Currently, it doesn't make sense to do so at the moment.
But prefix the new variants accordingly if the need arises.
BUG=b:173630595
TEST=compile and run
Change-Id: Ie610c77445f4406b40bb40f00bcabb8e65c8e02d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3203231
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Jason Macnak <natsu@google.com>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
This conversion adds source attribution for wrapped errors and
implicitly implements std::error::Error for mmap::Error which was
missing before.
Also some compile time warnings were fixed for the mmap::arena_msync
test case.
BUG=None
TEST=cargo test
Change-Id: I13b6257692887bcd7229f1cb59c10edb850d0a65
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3207106
Auto-Submit: Allen Webb <allenwebb@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Allen Webb <allenwebb@google.com>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Something in our Kokoro infrastructure has changed and the tests
are timing out.
Disabling the tests to get things unblocked while I further
investigate.
BUG=b:202196400
TEST=Kokoro
Change-Id: I852cf254013f8c3ebe0e44bab510609df21d260c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3207108
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Abhishek Bhardwaj <abhishekbh@chromium.org>
Auto-Submit: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Abhishek Bhardwaj <abhishekbh@chromium.org>
Extend VFIO command line option to specify full path to VFIO platform
device that is going to be assigned.
BUG=b:185504618
TEST=trogdor64-manatee SDHCI and GENIQUP device passthrough boots/works
Change-Id: Iad6a24124b383fadb9e025dc64f8a90fa8763ff8
Signed-off-by: Tomasz Nowicki <tn@semihalf.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2961217
Commit-Queue: Micah Morton <mortonm@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Platform device is another type of device which might be assigned
directly to VM by using the same IOMMU DMA isolation technique.
In contrary to PCI, platform device has no config space which
describes device resources and makes it self-contained and
self-discoverable. Therefore, platform device resources are described in
FW and host is the one who enumerates/probes devices by parsing DT/ACPI.
We have ioctl i/f which allows to expose all that info to VMM.
Add platform bus specific calls to interact with host properly and
plug in to aarch64 bus creation code.
Note, for now all IRQs are abstracted to wired line (SPI in ARM GIC world)
which means guest wont see MSI-X for platform devices.
BUG=b:185504618
TEST=trogdor64-manatee SDHCI and GENIQUP device passthrough boots/works
Change-Id: Id0e9efde3586af77ed1d0b8bf79ca485906afb83
Signed-off-by: Tomasz Nowicki <tn@semihalf.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2961216
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Tomasz Nowicki <tnowicki@google.com>
Commit-Queue: Micah Morton <mortonm@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Some devices (like platform device) has no PCI config which describes
associated IRQs. Instead, IRQs are described either via DT or ACPI.
In any case, host is the one who keeps that info and needs to expose
to VMM. Add function to collect IRQs info for further processing.
BUG=b:185504618
TEST=trogdor64-manatee SDHCI and GENIQUP device passthrough boots/works
Change-Id: Ica7d60d50b905968285f61722897ef150d419a56
Signed-off-by: Tomasz Nowicki <tn@semihalf.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2961215
Commit-Queue: Tomasz Nowicki <tnowicki@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
In preparation for adding VFIO platform support add function which
allows to get number of regions and size of specific region.
BUG=b:185504618
TEST=trogdor64-manatee SDHCI and GENIQUP device passthrough boots/works
Change-Id: I4ad99d7658d5b76cae4aa686b2b1f772e2bc3e44
Signed-off-by: Tomasz Nowicki <tn@semihalf.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2961214
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Micah Morton <mortonm@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
DT platform bus abstraction requires its own MMIO address range.
Let it allocate from well defined address range.
BUG=b:185504618
TEST=trogdor64-manatee SDHCI and GENIQUP device passthrough boots/works
Change-Id: I357e909433a565968a7f081c727a3b1e420e7729
Signed-off-by: Tomasz Nowicki <tn@semihalf.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2961212
Commit-Queue: Micah Morton <mortonm@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
This adds a safe wrapper for libc::waitforpid that converts the *status
field to an enum so the various edgecases can be handled.
BUG=None
TEST=cargo build
Change-Id: Ic518e686b8ea60fa968f849f1cae571ebfe069e8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3199623
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Auto-Submit: Allen Webb <allenwebb@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Allen Webb <allenwebb@google.com>
Google drive and file systems used for external media (like FAT32) don't
support xattrs, which means they also don't support posix acls.
However, we unconditionally enable FUSE support for posix acls
preventing us from using virtio-fs for those mount points.
Make posix acl support optional so that we can also use virtio-fs for
gdrive and external media. This feature is on-by-default since we
currently use it for every other virtio-fs mount point.
BUG=b:196946147
TEST=arc.PlayStore.vm
Change-Id: I9139852d6dceb46bef21af43f77fc527f3fa58d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3168564
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
This change adds the bar index and offset to the read_bar and write_bar
methods to the VirtioDevice trait. VirtioDevice needs these parameters
to implement the device bars.
BUG=b:194136484
TEST=Compile.
Change-Id: I48cb6e743b29467dc9707e13ce72b6b61951a6db
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3188668
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Abhishek Bhardwaj <abhishekbh@chromium.org>
Auto-Submit: Abhishek Bhardwaj <abhishekbh@chromium.org>
This reverts commit 79d6696394.
Reason for revert: The change made it through to ChromeOS builds
because the audio_streams ebuild is not manually upreved yet. Re-submit after https://crrev.com/c/3192217 is landed.
Original change's description:
> Add StreamEffect to new(_async)_capture_stream
>
> It is needed to support AEC in virtio-snd (cras backend)
>
> BUG=b:201472965
> TEST=cargo test
>
> Change-Id: If79eee8a41d1da7e6d643e8187bbc75768f31ad9
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3193841
> Reviewed-by: Judy Hsiao <judyhsiao@google.com>
> Reviewed-by: Chih-Yang Hsia <paulhsia@chromium.org>
> Commit-Queue: Dennis Kempin <denniskempin@google.com>
> Tested-by: kokoro <noreply+kokoro@google.com>
Bug: b:201472965
Change-Id: Ib68978ea148ae3598109a779e620377f7f1f9d94
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3200179
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
VFIO-PCI device type is not the only one. To manage VFIO device type:
- add new structure to keep device type, its sysfs path
- refactor VFIO command line parser and let parameter options to be
extensible
BUG=b:185504618
TEST=manatee PCI device passthrough boots/works
Change-Id: I8f3226d388267e1a15dc537e37bb2054e3c6e486
Signed-off-by: Tomasz Nowicki <tn@semihalf.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2961211
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Tomasz Nowicki <tnowicki@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
newfstatat has been added to a few policies for the
two 64bit architectures, but some more require it to
avoid crashes, so add it to all which contain fstat
or statx.
BUG=b:187795909
TEST=CQ
Change-Id: I3cd0f5379b87102caa256503a888c5a1aa4103b6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3198571
Commit-Queue: Manoj Gupta <manojgupta@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
It is needed to support AEC in virtio-snd (cras backend)
BUG=b:201472965
TEST=cargo test
Change-Id: If79eee8a41d1da7e6d643e8187bbc75768f31ad9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3193841
Reviewed-by: Judy Hsiao <judyhsiao@google.com>
Reviewed-by: Chih-Yang Hsia <paulhsia@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
We don't currently have it enabled anywhere but we still always allocate
PCI shared memory regions for it. Instead make it optional and off by
default. We can re-enable it on a per-device basis.
BUG=none
TEST=arc.PlayStore.vm
Change-Id: Icf122a561251a3e55757a9ffe4633b96adc4066d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3168563
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Acquire/Release orderings are not sufficient when accessing memory
that's also touched by the guest kernel. Use SeqCst ordering, which
also more closely matches what the kernel does.
BUG=b:200637442
TEST=Run vm.Virtiofs 15 times in a row both with and without
VIRTIO_RING_F_EVENT_IDX enabled and observe that the test does not
hang
Change-Id: I54f1d7123bdcbbf01f94935193e48a9c2e252bbc
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3199301
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: Chirantan Ekbote <chirantan@chromium.org>
Before we call build_vm we are creating devices and there is no reason
to assume those have to be PCI only. In preparation for VFIO platform
device support, add super trait which allows to pass generic device
structure around and still be able get back to our original type.
BUG=b:185504618
TEST=manatee PCI device passthrough boots/works
Change-Id: I500f44af430f5f06299f20fc4ca17ca008a7e0c5
Signed-off-by: Tomasz Nowicki <tn@semihalf.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2961210
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Tomasz Nowicki <tnowicki@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Trying to chase down what is failing in the bots that cannot be
reproduced.
BUG=b:199094605
TEST=tast run localhost:2229 arc.Boot.vm
shows:
2021-09-30T00:51:27.843991Z INFO ARCVM(34)[23414]: [src/linux.rs:228] Trying to attach block device: /opt/google/vms/android/system.raw.img
2021-09-30T00:51:27.844122Z INFO ARCVM(34)[23414]: [disk/src/disk.rs:283] disk size 648871936,
2021-09-30T00:51:27.844456Z INFO ARCVM(34)[23414]: [disk/src/disk.rs:283] disk size 648871936,
2021-09-30T00:51:27.844753Z INFO ARCVM(34)[23414]: [src/linux.rs:228] Trying to attach block device: /opt/google/vms/android/vendor.raw.img
2021-09-30T00:51:27.844785Z INFO ARCVM(34)[23414]: [disk/src/disk.rs:283] disk size 139890688,
2021-09-30T00:51:27.844998Z INFO ARCVM(34)[23414]: [disk/src/disk.rs:283] disk size 139890688,
Change-Id: Ief63cf75ba86e5324c6cc65a825c2717d3a0cb18
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3195154
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Commit-Queue: Junichi Uekawa <uekawa@chromium.org>
It's a common idea to have ARCHITECTURE.md next to README.md and
CONTRIBUTING.md [1].
So, let's do so instead of having the doc only under mdbook.
[1] https://matklad.github.io//2021/02/06/ARCHITECTURE.md.html
BUG=b:195003973
TEST=mdbook build
Change-Id: I8d3f479ba65c7f85865c51b5c22fb5b37d6e8f78
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3188675
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
If we need descriptor for things that aren't file or other shared_memory objects, we can create a separate descriptor change, but it shouldn't be the default.
This reverts commit 533c5c8258.
Reason for revert: this causes conflicts with other platforms.
Original change's description:
> vm_memory: Add from_desciptor() in MemoryMappingBuilder
>
> MemoryMappingBuilder had `from_file()` and `from_shared_memory`, which
> are almost the same. So, this commit adds `from_descriptor()` to replace
> both of the two.
>
> BUG=b:194137301
> TEST=build
>
> Change-Id: Ia13f5e8e0f95a5c32e47dc9b3be13b7a7fa510bf
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3159881
> Tested-by: kokoro <noreply+kokoro@google.com>
> Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
> Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Bug: b:194137301
Change-Id: Ie203ee3eb3dcddd41c5e55b6980dc6292eb24f85
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3183183
Auto-Submit: Udam Saini <udam@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Udam Saini <udam@google.com>
Reviewed-by: Noah Gold <nkgold@google.com>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>