Commit graph

7885 commits

Author SHA1 Message Date
Daniel Verkamp
b0406736ed net_util, devices: refactor platform-specific net code
The validate_and_configure_tap() and virtio_features_to_tap_offload()
functions already effectively did nothing on Windows, since the
implementations of these for Slirp were not provided. These functions
are moved to sys so the Linux-specific TAP interfaces are no longer
needed in TapTCommon.

The get_ifreq() function is only called internally inside the
implementation of the Linux Tap struct; it does not need to be part of
the TapT trait at all.

The MacAddress <-> sockaddr interop is only needed on Linux, and the
conversion can be moved into the get_mac_address and set_mac_address
implementations for Linux.

With these changes, net_sys is used only on Linux, so it can be
conditionally compiled and not included in non-Linux builds at all.

BUG=None
TEST=tools/dev_container tools/presubmit

Change-Id: I3419a3bdb1470c4d72588fe19e43fabcdfe4e451
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5046598
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Noah Gold <nkgold@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2023-11-27 19:23:56 +00:00
recipe-roller
60e0767ce4 Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls
recipe changes from upstream projects (recipe_engine) into this repository.

The build that created this CL was
https://ci.chromium.org/b/8763259546928875761

recipe_engine:
c6e4e93c25
  c6e4e93 (mohrr@google.com)
      [defer] Drop "collect" step

Please check the following references for more information:
- autoroller, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/workflow.md#autoroller
- rollback, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/workflow.md#rollback
- cross-repo dependencies, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/cross_repo.md

Use https://goo.gl/noib3a to file a bug.

R=denniskempin@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Ignore-Freeze: Autoroller
Bugdroid-Send-Email: False
Change-Id: I05c54e1617ab9ed8619ee89b730dc7c7bfacb007
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5063668
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2023-11-27 16:36:23 +00:00
Shintaro Kawamura
2a97e3364d jail: seccomp: allow clock_gettime for swap monitor process
logging library uses clock_gettime(2) when it logs to syslog.
clock_gettime(2) is already allowed on common_device.policy.

BUG=b:313353640
TEST=tast run $DUT arc.Swap

Change-Id: Ib36e7523bef8331ef9a579aeaa6b64a51de2acde
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5061908
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: Shin Kawamura <kawasin@google.com>
2023-11-27 08:43:47 +00:00
Joe Hattori
46c4ddbbee devices: virtio: scsi: Handle write_config()
Currently crosvm ignores the write_config() method of the VirtioDevice
trait while the guest driver is actually updating `sense_size` and
`cdb_size` in the configuration space.

This commit implements the method to cope with the dynamic `sense_size`
and `cdb_size`.

BUG=b:301011017
TEST=./tools/presubmit
TEST=vm.Fio.scsi_* work

Change-Id: I8d47aba8bd6449ca7ad677d46c3226937f1b07cc
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5034062
Commit-Queue: Joe Hattori <hattorij@google.com>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Takaya Saeki <takayas@chromium.org>
2023-11-27 08:42:12 +00:00
Joe Hattori
4cbf5646b8 jail: seccomp: scsi: Add newfstatat(2) and ioctl(BLKDISCARD) to policy files
FIO tests fail after https://crrev.com/c/5019243 since the newfstatat
and ioctl(BLKDISCARD) syscalls are not listed in the seccomp file. This
commit adds those syscalls in each seccomp file.

BUG=b:300042376
TEST=tools/presubmit
TEST=vm.Fio.scsi_* works

Change-Id: I609e9599acda66a49a80606f94ae726de4eab9e8
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5052360
Reviewed-by: Takaya Saeki <takayas@chromium.org>
Commit-Queue: Joe Hattori <hattorij@google.com>
2023-11-27 08:20:45 +00:00
Joe Hattori
79b33c6d75 devices: virtio: scsi: Implement MODE SELECT(6) command
Currently crosvm does not implement the MODE SELECT(6) command, which
should be implemented since crosvm supports the MODE SENSE(6) command.
This commit implements the MODE SELECT(6) command.

All of the mode pages are not changable, therefore the command returns
an error when trying to change the value of any mode page.

BUG=b:303338922
TEST=`sdparm -6 --set=WCE /dev/sda` fails

Change-Id: I9ab29027718161dd7b71431cd24af49eac77d0d5
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5034058
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: Joe Hattori <hattorij@google.com>
Reviewed-by: Takaya Saeki <takayas@chromium.org>
2023-11-27 08:17:20 +00:00
recipe-roller
03c074b0a5 Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls
recipe changes from upstream projects (depot_tools) into this repository.

The build that created this CL was
https://ci.chromium.org/b/8763292892078826993

depot_tools:
9c44fe5fca
  9c44fe5 (tikuta@chromium.org)
      fix typo: director -> directory

Please check the following references for more information:
- autoroller, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/workflow.md#autoroller
- rollback, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/workflow.md#rollback
- cross-repo dependencies, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/cross_repo.md

Use https://goo.gl/noib3a to file a bug.

R=denniskempin@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Ignore-Freeze: Autoroller
Bugdroid-Send-Email: False
Change-Id: I0092d91781176369f552e48947e345ef03d1632a
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5061122
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2023-11-27 07:41:41 +00:00
Joe Hattori
f7fdb0e110 devices: virtio: scsi: Fix write-same behavior.
Current code does not multiply the given LBA address and length by the
block size in the WRITE SAME(10) and WRITE SAME(16) commands. This
commit fixes the bug and passes the correct values to the fallocate
syscall.

BUG=b:300042376
TEST=tools/presubmit
TEST=`vm.Fio.scsi_*` work

Change-Id: I97d5c85d39bc2cf597406d7e6ea516c14ea439a5
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5040450
Commit-Queue: Joe Hattori <hattorij@google.com>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Takaya Saeki <takayas@chromium.org>
2023-11-24 01:49:07 +00:00
recipe-roller
db39ba2f53 Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls
recipe changes from upstream projects (depot_tools) into this repository.

The build that created this CL was
https://ci.chromium.org/b/8763671637397330433

depot_tools:
25b4354fad
  25b4354 (sokcevic@chromium.org)
      Revert "pylint: Add pylint 2.13"

Please check the following references for more information:
- autoroller, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/workflow.md#autoroller
- rollback, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/workflow.md#rollback
- cross-repo dependencies, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/cross_repo.md

Use https://goo.gl/noib3a to file a bug.

R=denniskempin@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Ignore-Freeze: Autoroller
Bugdroid-Send-Email: False
Change-Id: I77a26b54a7f8f1c6232f1f8a7b82db58b350cabb
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5054419
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2023-11-23 03:18:45 +00:00
recipe-roller
ce9728d232 Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls
recipe changes from upstream projects (recipe_engine) into this repository.

The build that created this CL was
https://ci.chromium.org/b/8763686736551256113

recipe_engine:
259924fefe
  259924f (gbeaty@chromium.org)
      Enable setting a retcode for a canceled step.

Please check the following references for more information:
- autoroller, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/workflow.md#autoroller
- rollback, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/workflow.md#rollback
- cross-repo dependencies, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/cross_repo.md

Use https://goo.gl/noib3a to file a bug.

R=denniskempin@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Ignore-Freeze: Autoroller
Bugdroid-Send-Email: False
Change-Id: Id015d3e1fafc3056dbee36c956bdfc028154bcce
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5053934
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2023-11-22 23:21:42 +00:00
Noah Gold
45be65a0c7 hypervisor: stop restoring TSC offset snapshot.
The TSC itself is saved/restored as a MSR by most hypervisors
(e.g. KVM), so we generally don't need to also save/restore the
TSC offset*; in fact, this could desync TSC and lead to guest time
warping because the TSC offset cannot be set directly (it has to
use a host TSC reference moment). However, some hypervisors need
to use the TSC offset to fix up timekeeping in concert with
virtio-pvclock.

This CL does several things to resolve these issues:
1. Stop always restoring TSC offset.
2. Provide a new method for hypervisors to implement their own
   behavior with TSC offset & restoring timekeeping.
3. Take a common host TSC reference moment and provide it to the
   timekeeping restore method.

* We later discovered KVM's pvclock seems to not be working correctly if
  we stop restoring the TSC offset. It seems that setting TSC_KHZ via
  the KVM API somehow fixes the issue as well. Further investigation is
  needed to understand why. For the time being we're going to keep the
  existing TSC offset restore behavior.

Thanks to colindr@ for a ton of help debugging & understanding the
underlying timekeeping problem and hypervisor oddities.

BUG=b:311314468
TEST=tested on WHPX.

Change-Id: Ib2196085061f57931362b3d5da2383bc5e1abbe7
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5042037
Commit-Queue: Noah Gold <nkgold@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Colin Downs-Razouk <colindr@google.com>
Reviewed-by: Frederick Mayle <fmayle@google.com>
2023-11-22 23:04:24 +00:00
Noah Gold
62a3f60415 hypervisor: introduce set_tsc_value.
Sometimes we need to directly set a TSC value rather than an offset;
for example, when restoring from a snapshot. This CL introduces a
new Vcpu function for this, set_tsc_value.

Here, we are also removing an old WHPX call to set TSC offsets that
appears to no longer work.

BUG=b:311314468
TEST=ran on WHPX & verified guest timekeeping is working when using this
function on snapshot restore.

Change-Id: I05020711a61a6dc2a82ef009089266724f2d92f4
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5042036
Reviewed-by: Elie Kheirallah <khei@google.com>
Commit-Queue: Noah Gold <nkgold@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Frederick Mayle <fmayle@google.com>
2023-11-22 20:47:25 +00:00
Pujun Lun
8f98bc90c0 device: vhost-user: enable display config change on Windows.
This requires preserving VhostBackendReqConnection and using it to
send an interrupt to the guest when a display is added or removed.

BUG=b:306024335

Change-Id: I0cab862262d582ee09da687a788ddab633841235
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5038644
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Pujun Lun <lunpujun@google.com>
Reviewed-by: Idan Raiter <idanr@google.com>
2023-11-22 19:25:06 +00:00
Pujun Lun
0a2582c876 devices: fix gpu_control_tube polling for Windows.
This should make no change for Linux.

BUG=b:306024335

Change-Id: I1dcc85d70e04edc5ea3c539e252358cbbfbd5e03
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5051683
Reviewed-by: Noah Gold <nkgold@google.com>
Commit-Queue: Pujun Lun <lunpujun@google.com>
2023-11-22 18:54:25 +00:00
recipe-roller
325408c686 Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls
recipe changes from upstream projects (depot_tools) into this repository.

The build that created this CL was
https://ci.chromium.org/b/8763744618107662849

depot_tools:
8efb05d3d4
  8efb05d (tikuta@chromium.org)
      check `siso summary`

Please check the following references for more information:
- autoroller, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/workflow.md#autoroller
- rollback, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/workflow.md#rollback
- cross-repo dependencies, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/cross_repo.md

Use https://goo.gl/noib3a to file a bug.

R=denniskempin@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Ignore-Freeze: Autoroller
Bugdroid-Send-Email: False
Change-Id: Ie9e0a232a74435737fe42b87409391019890b64d
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5052672
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2023-11-22 08:00:19 +00:00
A. Cody Schuffelen
3210820847 Convert ScmSocket to a struct
On MacOS there is no MSG_NOSIGNAL, but there is SO_NOSIGPIPE which is
set as a socket option. This changes ScmSocket from a trait to a wrapper
type that can guarantee SO_NOSIGPIPE is set once on every relevant
socket before it is used in situations that can produce signals.

The biggest wrinkle is that setsockopt can produce errors, which makes
the conversion into ScmSocket a case that can possibly error. Not all
places that accept sockets were prepared to return errors.

Bug: b/309020556
Change-Id: I079bbaf8803e137ca7c0e0ebe60e63de5df59cc0
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5021438
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Cody Schuffelen <schuffelen@google.com>
2023-11-22 05:47:15 +00:00
Ying Xu
e55d202433 devices: console: enable multi-port on vhost-user console
Add new member 'port', to support multi-port, also to compatible
with the old paramters.

BUG=b:295881923
TEST=`./tools/run_tests` for non-vu virtio-console
TEST=Run vu console with multiport on our target board

Change-Id: I40618009c7a52de06c98e0409db6004b26150888
Signed-off-by: Ying Xu <ying123.xu@samsung.com>
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4776930
Reviewed-by: Noah Gold <nkgold@google.com>
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
2023-11-22 02:59:07 +00:00
Ying Xu
6f6e01d051 devices: console: add multi-port
Add new feature VIRTIO_CONSOLE_F_MULTIPORT.
ConsoleDevice:
  - ConsolePort: rename from the original ConsoleDevice, to process
                 one port with receiveq and transmitq
  - ControlPort: new to handshake with frontend

[acourbot@chromium.org: Split CL, various simplifications.]

BUG=b:295881923
TEST=./tools/run_tests

Change-Id: Idd4be46cfa4a89de268023eeb8e0426639f618a9
Signed-off-by: Ying Xu <ying123.xu@samsung.com>
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4776929
Reviewed-by: Frederick Mayle <fmayle@google.com>
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
2023-11-22 02:36:50 +00:00
Isaac Bosompem
83f07276a6 Revert "crosvm: Add vCPU thread nice adjustment support"
This reverts commit 43174889bc.

Reason for revert: There's a preference to do this prioritization within resourced.

Original change's description:
> crosvm: Add vCPU thread nice adjustment support
>
> Adds support for specifying a nice value to be used for vCPU threads.
> This can be used to boost (or deboost) the priority of the vCPU threads
> relative to everything else. To boost the threads priority, the
> appropriate limits will need to be set.
>
> BUG=b:310707244
> TEST=Verified nice values on "crosvm_vcpuN" using top on host.
>
> Change-Id: Ia1ad8d2c8f88bdd411551f3be72c7eb3553417c8
> Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5027655
> Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
> Commit-Queue: Isaac Bosompem <mrisaacb@google.com>

BUG=b:310707244

Change-Id: I3376cc1c95a3f70ffa13f7b38e86c18c8eb1bc2d
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5044118
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2023-11-22 00:01:47 +00:00
Elie Kheirallah
f1cceab6f1 docs: add info about two-step snapshotting
BUG=b:303092706
TEST=mdbook build

Change-Id: I02f461d0643119d168a618373c7164fed988f115
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5046338
Auto-Submit: Elie Kheirallah <khei@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2023-11-21 20:26:48 +00:00
Daniel Verkamp
2e137a4d81 e2e_tests: add VmConfig::with_vhost_user() helper
Change-Id: I3bb814989906abf451a02572e6e162e8c03785f7
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5039154
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Zihan Chen <zihanchen@google.com>
2023-11-21 19:30:51 +00:00
Daniel Verkamp
dbb18f6396 devices: vhost-user: allow specifying PCI address
Allow choosing the PCI address of a vhost-user frontend device, e.g.:

  crosvm run --vhost-user fs,socket=/sock,pci-address=00:1d.0 ...

BUG=b:262291811
TEST=run with --vhost-user pci-address= option specified

Change-Id: Id4cb5b7c8c983fd7a857afcd85f498e607a9bc15
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5032349
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2023-11-21 19:30:51 +00:00
Daniel Verkamp
5172482b39 crosvm: add generic --vhost-user frontend option
Deprecate the existing --vhost-user-* device-specific frontend options
and replace them with a single --vhost-user option that takes the device
type as one of its arguments.

This simplifies the device setup code significantly; there is now a
single list of vhost_user frontend devices that can be created in one
loop instead of scattering device-type-specific creation all over the
create_virtio_devices() function.

The DeviceType names are normalized for this new --vhost-user option as
well - when relevant, they use the full name rather than abbreviating it
inconsistently (for example, "blk" is now known as "block", which
matches the option used with `crosvm devices`). A few special cases are
handled with serde renames (such as "p9" -> "9p"), but all other device
types use the default serde kebab-case naming.

BUG=b:262291811
TEST=connect to `crosvm devices` and virtiofsd with --vhost-user

Change-Id: I75e9442f73af122ccfda9731331cde5c238b88fb
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5030974
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Noah Gold <nkgold@google.com>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
2023-11-21 19:14:01 +00:00
Ying Xu
181d26baa1 devices: console: separate port from console device
Virtio allows several ports per console device. In order to support
this, move the port function into its own structure, so we can have
several per `ConsoleDevice`.

A port can be created from a `SerialParameters`, which will let each
port have its own configuration.

[acourbot@chromium.org: split from larger CL.]

BUG=b:295881923
TEST=presubmit

Change-Id: I4e0c87c01ffee8c813113c1b5a2ae89474324cc9
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4982433
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2023-11-21 18:46:40 +00:00
Alexandre Courbot
a2fe8b13bf devices: console: introduce SerialOptions
Multi-port support will require the serial device constructor to know
more properties of the port than just the out_timestamp switch. Wrap
them all into a structure that we can pass to create_serial_device
instead of making it take even more arguments.

BUG=b:295881923
TEST=presubmit

Change-Id: Ib9d555a2aa8dd901765525d998ee88533ad95906
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4982432
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2023-11-21 05:07:12 +00:00
Tianjie Zhao
201306976e devices: serial: add name to SerialParameters
This patch is to support the port name of VIRTIO_CONSOLE_F_MULTIPORT.

BUG=b:295881923
TEST=./tools/run_tests

Signed-off-by: Tianjie Zhao <tianjie.zhao@samsung.com>
Change-Id: I028bccd1fb52797dd402e312d96cec2a42a6289a
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4776928
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2023-11-21 05:05:59 +00:00
Daniel Verkamp
826a45af98 base: linux: fix is_block_file() st_mode check
The st_mode field consists of several bitfields, which must be extracted
with a mask like S_IFMT before comparing to values like S_IFBLK.

<https://man7.org/linux/man-pages/man7/inode.7.html>

BUG=b:302437024
TEST=tools/dev_container tools/presubmit

Change-Id: Idd116b9904d275ffadab9255a326caadf75f8043
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5045990
Reviewed-by: Takaya Saeki <takayas@chromium.org>
Auto-Submit: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Takaya Saeki <takayas@chromium.org>
2023-11-21 02:12:10 +00:00
recipe-roller
5ce35feb28 Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls
recipe changes from upstream projects (recipe_engine) into this repository.

The build that created this CL was
https://ci.chromium.org/b/8763864155698181521

recipe_engine:
421035bba2
  421035b (randymaldonado@google.com)
      [recipes-py] adding some task backend helper functions for migr...

Please check the following references for more information:
- autoroller, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/workflow.md#autoroller
- rollback, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/workflow.md#rollback
- cross-repo dependencies, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/cross_repo.md

Use https://goo.gl/noib3a to file a bug.

R=denniskempin@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Ignore-Freeze: Autoroller
Bugdroid-Send-Email: False
Change-Id: I538be361e3b9655410b9667501e9a42388334c6e
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5046604
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2023-11-21 00:22:25 +00:00
recipe-roller
891b78293f Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls
recipe changes from upstream projects (depot_tools) into this repository.

The build that created this CL was
https://ci.chromium.org/b/8763866043324566513

depot_tools:
f078723bf4
  f078723 (sokcevic@chromium.org)
      [recipes] Trigger recipe roller

Please check the following references for more information:
- autoroller, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/workflow.md#autoroller
- rollback, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/workflow.md#rollback
- cross-repo dependencies, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/cross_repo.md

Use https://goo.gl/noib3a to file a bug.

R=denniskempin@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Ignore-Freeze: Autoroller
Bugdroid-Send-Email: False
Change-Id: I27e560f47c4112e194db9131008f3c7b0f0f4c39
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5046341
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2023-11-20 23:49:55 +00:00
recipe-roller
663ad8542c Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls
recipe changes from upstream projects (depot_tools) into this repository.

The build that created this CL was
https://ci.chromium.org/b/8763869818278817521

depot_tools:
c348ad841f
  c348ad8 (sokcevic@chromium.org)
      [pylint] Upgrade dill version

Please check the following references for more information:
- autoroller, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/workflow.md#autoroller
- rollback, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/workflow.md#rollback
- cross-repo dependencies, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/cross_repo.md

Use https://goo.gl/noib3a to file a bug.

R=denniskempin@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Ignore-Freeze: Autoroller
Bugdroid-Send-Email: False
Change-Id: Ib411f25c7be59d16f5c6253f877fb0a907ce9d8e
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5046600
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2023-11-20 22:55:03 +00:00
Dennis Kempin
75f5fe0418 presubmit: Disable cl_tests
The tests stopped working due to issues with git.

BUG=b:309148074

Change-Id: I08cd522660927bb4d46d48ea9c6f3cbf8ec51486
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5005630
Auto-Submit: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2023-11-20 21:55:04 +00:00
Daniel Verkamp
f30fcc7671 base: unix: only test sock_ctrl_msg on Linux
For now, these unit tests rely on Linux-specific EventExt functions that
are not available on macos.

TEST=cargo test --target=aarch64-apple-darwin -p base

Change-Id: Ifb9115a185387d89f6729c79f65db38e87c02d91
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5039851
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2023-11-20 19:39:34 +00:00
Daniel Verkamp
e7e0dd4008 base: macos: stub out EventContext build_with and wait
Fixes a few compilation failures in unit test code.

TEST=cargo test --target=aarch64-apple-darwin -p base

Change-Id: I61e5a2cc67fbe6d50d9d1e4f0e27b89cbeedc8a8
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5039850
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2023-11-20 19:35:05 +00:00
Pierre-Clément Tosi
b5f4d7dde3 riscv: Fix broken build after crrev.com/c/5029655
Fix the call to arch::sys::linux::generate_platform_bus, as that CL
modified its signature without properly updating the RISC-V caller.

TEST=tools/run_tests -p riscv64

Change-Id: Ie481017d2b09729b1ea6e51f90792fdc2a78d978
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5040632
Auto-Submit: Pierre-Clément Tosi <ptosi@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2023-11-20 18:46:07 +00:00
Dennis Kempin
5cf0a98827 dev_container: Build new container without riscv
Also adds lld, which will be used in a follow-up to improve
linking performance.
Since debian has had a stable release since then, we also
need to upgrade a few library versions in the testvm.

Swap tests that require userfaultfd were able to run without
root before. In the latest version of debian we need to configure
for unprivileged access.
Since this is the case for glinux workstations as well, let's
mark those tests as root-only and let them execute via sudo.

BUG=b:304875018,b:256905223
TEST=presubmit

Change-Id: Ied0b34e248990378a7864b4a394aa21d8f824f71
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5013631
Reviewed-by: Zihan Chen <zihanchen@google.com>
Reviewed-by: Shin Kawamura <kawasin@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2023-11-20 18:34:35 +00:00
Dennis Kempin
24b4e58282 swap: Uprev version of userfaultfd
Specifically to uprev to userfaultfd-sys 0.5.0, which uses a newer
version of bindgen that fixes an issue with the latest version of
clang in debian.
See: https://github.com/rust-lang/rust-bindgen/issues/2312

BUG=None
TEST=presubmit

Change-Id: I91e3d3bba17ca423be61db4d4fb6d97c53eb2780
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5014785
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Shin Kawamura <kawasin@google.com>
2023-11-20 18:34:35 +00:00
Daniel Verkamp
92aeb322b3 media: ffmpeg: update bindings to ffmpeg 6.0
thread_safe_callbacks is removed because that field has been deprecated
and the callbacks are required to be thread safe now.

BUG=b:309563850
TEST=crosvm builds locally and boots with a working ffmpeg video device.

Change-Id: Ic6777c1c413d27c038106adbf6022eb044a5365d
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5008192
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
2023-11-20 18:34:35 +00:00
Takaya Saeki
5c5483d0ea base: linux: replace AsRawFd with AsRawDescriptor in base
`AsRawDescriptor` is preferred over `AsRawFd` everywhere. This commit
replaces `AsRawFd` of the file related helpers in base except functions
which explicitly intend to handle FDs such as `validate_raw_fd` or
`get_fd_flags`.

BUG=None
TEST=./tools/presubmit

Change-Id: Ia0f1b149bf281a97dfe754fd20e3d9d898539df1
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5020382
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Takaya Saeki <takayas@chromium.org>
2023-11-20 09:56:30 +00:00
Takaya Saeki
dd2769b549 base: move PunchHoleMut from disk crate to base crate
`PunchHoleMut` trait is defined in the disk crate, but the base crate is
more suitable since `PunchHole` is defined by the base. This change
moves `PunchHoleMut` to base.

BUG=None
TEST=./tools/presubmit

Change-Id: Iee3eb48c88e58e4f54118bedde62a78fa9ff05dc
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5019622
Commit-Queue: Takaya Saeki <takayas@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
2023-11-20 09:56:30 +00:00
Takaya Saeki
3b4d1a6f5c cros_async: fix punch_hole so that it works for a block file
Currently, `punch_hole` operation is translated to
`fallocate(PUNCH_HOLE|KEEP_SIZE)`. However, this does not work as
expected if the target file is a block device file such as an LVM
partition block file. It does not succeed and the area will not be
reclaimed, which is causing a problem on ARCVM.

The right way to punch-hole a block device file is calling
`ioctl(BLKDISCARD)`. This change fixes `PollSource`, `UringSource`,
and the default implementation of `PunchHole` trait.

BUG=b:302437024
TEST=./tools/presubmit
TEST=`strace -f -e ioctl crosvm run ... --block \
path=/dev/glinux_20230808/test_lv kernel` and `blkdiscard /dev/vda`
inside, then confirmed BLKDISCARD with epoll and io_uring

Change-Id: Ibedecd2c401bbb9ab25d7f0bfe18a3334f79ea85
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5019243
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: Takaya Saeki <takayas@chromium.org>
2023-11-20 09:53:12 +00:00
recipe-roller
0a68045c07 Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls
recipe changes from upstream projects (depot_tools) into this repository.

The build that created this CL was
https://ci.chromium.org/b/8764144125283355121

depot_tools:
eb48a6ac0f
  eb48a6a (sokcevic@chromium.org)
      git_cl: Fix xml format on Win

Please check the following references for more information:
- autoroller, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/workflow.md#autoroller
- rollback, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/workflow.md#rollback
- cross-repo dependencies, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/cross_repo.md

Use https://goo.gl/noib3a to file a bug.

R=denniskempin@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Ignore-Freeze: Autoroller
Bugdroid-Send-Email: False
Change-Id: I0526651047eb64a5d48e1eed550d867405194594
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5041420
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2023-11-17 22:15:17 +00:00
Pujun Lun
4a07a42e6d device: add gpu_control_tube to Windows.
This will enable us to reuse some Linux logic to execute GPU commands
(add/list/remove displays), which can be sent from the CLI.

Currently only listing displays is supported. We'll need to plumb in
guest interrupt signaling to support adding/removing displays.

BUG=b:306024335

Change-Id: I8d6dfbd3e30eb414baa3f258af3424c538a5e2db
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5038008
Reviewed-by: Noah Gold <nkgold@google.com>
Commit-Queue: Pujun Lun <lunpujun@google.com>
Reviewed-by: Kaiyi Li <kaiyili@google.com>
Reviewed-by: Doug Horn <doughorn@google.com>
2023-11-17 22:13:23 +00:00
recipe-roller
bc27f832af Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls
recipe changes from upstream projects (depot_tools) into this repository.

The build that created this CL was
https://ci.chromium.org/b/8764149788143131073

depot_tools:
06c4261af7~..af69249965141de50193144674b2db3fe30f5d55
  06c4261 (sokcevic@chromium.org)
      tests: Use collections.abc.MutableSet
  af69249 (msavigny@google.com)
      Fix deletion of old build logs

Please check the following references for more information:
- autoroller, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/workflow.md#autoroller
- rollback, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/workflow.md#rollback
- cross-repo dependencies, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/cross_repo.md

Use https://goo.gl/noib3a to file a bug.

R=denniskempin@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Ignore-Freeze: Autoroller
Bugdroid-Send-Email: False
Change-Id: I022c3c475909163513da826dc8c2c88c063d9d9b
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5041772
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2023-11-17 20:44:24 +00:00
Pierre-Clément Tosi
869e16cdeb vfio_platform: Map device MMIO before booting pVMs
When memory is protected, the guest address space mapped to physical
memory shouldn't be modified dynamically after the guest has started
running so force CrosVM to map the device MMIO regions before that.
Otherwise, the protected VM firmware will fail to validate the assigned
regions (as they haven't actually been assigned yet), aborting the boot
of the pVM.

Note that we can't simply call device.regions_mmap() at this point
because the crosvm internal IPC (in particular vm_memory_handler_thread)
isn't set-up yet so this commit had to duplicate the mmap() logic to be
available in the main thread.

This change was verified using strace, going from

    ioctl(7, KVM_CREATE_VM, 0x80000028)     = 9
    [...]
    ioctl(36, VFIO_SET_IOMMU, 0xb)          = 0
    ioctl(9, KVM_CREATE_DEVICE, {type=KVM_DEV_TYPE_VFIO, flags=0}) = 0
    ioctl(43, KVM_SET_DEVICE_ATTR, {flags=0, group=1, attr=1, addr=0x7fdd3a4a60}) = 0
    ioctl(42, VFIO_GROUP_GET_DEVICE_FD, 0xb400007cc3d0eb90) = 60
    ioctl(60, VFIO_DEVICE_GET_INFO, 0x7fdd3a3cd0) = 0
    ioctl(60, VFIO_DEVICE_GET_REGION_INFO, 0x7fdd3a3570) = 0
    [...]
    [pid  4279] ioctl(5, KVM_RUN <unfinished ...>
    [...]
    [pid  4279] ioctl(5, KVM_RUN, 0)        = 0
    [pid  4281] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_SHARED, 369, 0) = 0x7d5b3fb000
    [pid  4281] ioctl(239, KVM_SET_USER_MEMORY_REGION, {slot=2, flags=0, guest_phys_addr=0x90000000, memory_size=4096, userspace_addr=0x7d5b3fb000}) = 0

to

    ioctl(7, KVM_CREATE_VM, 0x80000028)     = 9
    [...]
    ioctl(36, VFIO_SET_IOMMU, 0xb)          = 0
    ioctl(9, KVM_CREATE_DEVICE, {type=KVM_DEV_TYPE_VFIO, flags=0}) = 0
    ioctl(43, KVM_SET_DEVICE_ATTR, {flags=0, group=1, attr=1, addr=0x7fd1c1e030}) = 0
    ioctl(42, VFIO_GROUP_GET_DEVICE_FD, 0xb4000077a0628b70) = 60
    ioctl(60, VFIO_DEVICE_GET_INFO, 0x7fd1c1d2a0) = 0
    ioctl(60, VFIO_DEVICE_GET_REGION_INFO, 0x7fd1c1cb40) = 0
    [...]
    mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_SHARED, 189, 0) = 0x7917dbc000
    ioctl(9, KVM_SET_USER_MEMORY_REGION, {slot=2, flags=0, guest_phys_addr=0x90000000, memory_size=4096, userspace_addr=0x7917dbc000}) = 0
    [...]
    [pid  4233] ioctl(5, KVM_RUN <unfinished ...>

BUG=b:308642771
TEST=Manual run with a pKVM-VFIO device assigned

Change-Id: Iad3494c4e9c309f99fc5cab37ed913d484fc5150
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5029655
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Pierre-Clément Tosi <ptosi@google.com>
2023-11-17 12:04:03 +00:00
Joe Hattori
c01b7d2a47 devices: virtio: scsi: Remove obsolete fields in READ CAPACITY(10)
Some of the fields in the READ CAPACITY(10) command were marked as
obsolete by the spec, but crosvm is currenctly using them.

This commit removes the usage of those fields to catch up the with the
spec.

BUG=b:300042376
TEST=./tools/presubmit

Change-Id: I9d871aa5b26ea219b41c9598249cc5a1b916ad48
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5034063
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Takaya Saeki <takayas@chromium.org>
Commit-Queue: Joe Hattori <hattorij@google.com>
2023-11-17 07:42:42 +00:00
Dmitry Osipenko
d504733ae7 virgl_renderer: Bump minimum virglrenderer version requirement to 1.0
Release of virglrenderer v1.0 stabilized lots of APIs and features.
In particular Venus became stable. Bump minimum virglrenderer version
requirement to 1.0.

This change removes vast majority of virgl_renderer_next usage. The
only unstable virglrenderer API that continues to be used is the optional
fence exporting feature.

The virglrenderer C binding was out of sync. The write_context_fence()
and virgl_renderer_context_create_fence() callback ABIs changed a year
ago. The virgl_renderer_export_fence() ABI was changed recently.
This all is fixed by this commit since the binding is regenerated.

TEST=none
Link: 9c9d55ecbe
Link: a5346dec8e
Link: f8383c4799
Suggested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Change-Id: I41bfe7f045e8e518d390d02ff9eb4bc7dff8f96a
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4890315
Commit-Queue: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
2023-11-17 03:15:47 +00:00
Dmitry Osipenko
571c94478e virglrenderer: Uprev submodule
Uprev virglrenderer submodule to version 1.0, which brings new APIs needed
for enabling new features in crosvm. In particular this allows to enable
fence passing feature in crosvm.

TEST=none
BUG=b:253779836
Link: https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/1138
Change-Id: I831a75eaa8056f2fef3f3bf6d68e005002ac93cb
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4890314
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Commit-Queue: Yiwei Zhang <zzyiwei@chromium.org>
2023-11-17 03:15:47 +00:00
Pujun Lun
1a8f413d7d gpu_display: add KeyboardInputManager to handle key events on Windows.
BUG=b:306407787

Change-Id: I28286cb6f999da56020fba2e79d4ad9a1875c8eb
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5026248
Reviewed-by: Noah Gold <nkgold@google.com>
Commit-Queue: Pujun Lun <lunpujun@google.com>
2023-11-17 01:34:38 +00:00
recipe-roller
279dc9d77d Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls
recipe changes from upstream projects (depot_tools) into this repository.

The build that created this CL was
https://ci.chromium.org/b/8764222140263839025

depot_tools:
44d6d1a666
  44d6d1a (sunnyps@chromium.org)
      Fix compile_single_file with remoteexec

Please check the following references for more information:
- autoroller, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/workflow.md#autoroller
- rollback, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/workflow.md#rollback
- cross-repo dependencies, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/cross_repo.md

Use https://goo.gl/noib3a to file a bug.

R=denniskempin@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Ignore-Freeze: Autoroller
Bugdroid-Send-Email: False
Change-Id: I3f2f649f5702d6bfb87927c18147d3703a51660e
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5037138
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2023-11-17 01:26:23 +00:00
A. Cody Schuffelen
6b0bf3108b Move net, sock_ctrl_msg, stream_channel back to unix in base
MacOS differences:
 - sockaddr_* structs have a length field, and rust requires that all
   fields are mentioned explicitly.
 - There is no accept4 or O_CLOEXEC for sockets: this property is
   instead set in a racy way with fcntl.
 - Rather than setting MSG_NOSIGNAL at sendmsg() time, SO_NOSIGPIPE is
   assigned with setsockopt to the socket.

Bug: b/309020556
Change-Id: Ide9f7284afc2279c13206583e8eb5ac09091401b
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5005754
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Cody Schuffelen <schuffelen@google.com>
2023-11-17 00:54:11 +00:00