Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion vhost-user-backend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ vhost = { path = "../vhost", version = "0.14.0", features = ["test-utils", "vhos
vm-memory = { workspace = true, features = ["backend-mmap", "backend-atomic"] }
tempfile = "3.2.0"

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(RUTSDOC_disable_feature_compat_errors)'] }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/RUTSDOC/RUSTDOC


[package.metadata.cargo-all-features]
skip_feature_sets = [
["xen", "postcopy"]
]
]
13 changes: 9 additions & 4 deletions vhost-user-backend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,15 @@ pub use self::vring::{
VringMutex, VringRwLock, VringState, VringStateGuard, VringStateMutGuard, VringT,
};

/// Due to the way `xen` handles memory mappings we can not combine it with
/// `postcopy` feature which relies on persistent memory mappings. Thus we
/// disallow enabling both features at the same time.
#[cfg(all(feature = "postcopy", feature = "xen"))]
// Due to the way `xen` handles memory mappings we can not combine it with
// `postcopy` feature which relies on persistent memory mappings. Thus we
// disallow enabling both features at the same time.
#[cfg(all(
not(RUTSDOC_disable_feature_compat_errors),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/RUTSDOC/RUSTDOC

not(doc),
feature = "postcopy",
feature = "xen"
))]
compile_error!("Both `postcopy` and `xen` features can not be enabled at the same time.");

/// An alias for `GuestMemoryAtomic<GuestMemoryMmap<B>>` to simplify code.
Expand Down
3 changes: 3 additions & 0 deletions vhost/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ vm-memory = { workspace = true, features=["backend-mmap"] }
tempfile = "3.2.0"
serial_test = "3.0"

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(RUTSDOC_disable_feature_compat_errors)'] }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/RUTSDOC/RUSTDOC


[package.metadata.cargo-all-features]
skip_feature_sets = [
["xen", "postcopy"]
Expand Down
13 changes: 9 additions & 4 deletions vhost/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,15 @@ pub mod vhost_user;
#[cfg(feature = "vhost-vsock")]
pub mod vsock;

/// Due to the way `xen` handles memory mappings we can not combine it with
/// `postcopy` feature which relies on persistent memory mappings. Thus we
/// disallow enabling both features at the same time.
#[cfg(all(not(doc), feature = "postcopy", feature = "xen"))]
// Due to the way `xen` handles memory mappings we can not combine it with
// `postcopy` feature which relies on persistent memory mappings. Thus we
// disallow enabling both features at the same time.
#[cfg(all(
not(RUTSDOC_disable_feature_compat_errors),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/RUTSDOC/RUSTDOC

not(doc),
feature = "postcopy",
feature = "xen"
))]
compile_error!("Both `postcopy` and `xen` features can not be enabled at the same time.");

/// Error codes for vhost operations
Expand Down