Import QEMU upstream snapshot d2e570c
Upstream: https://gitlab.com/qemu-project/qemu.git Upstream-Commit: d2e570cc0f97b936902a5b1b86b73c0f5998b475
This commit is contained in:
commit
cf256aa081
11315 files changed
+3598369
No files matched your search
@@ -0,0 +1,31 @@
|
||||
[package]
|
||||
name = "system-sys"
|
||||
version = "0.1.0"
|
||||
description = "Rust sys bindings for QEMU/system"
|
||||
publish = false
|
||||
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
homepage.workspace = true
|
||||
license.workspace = true
|
||||
repository.workspace = true
|
||||
rust-version.workspace = true
|
||||
|
||||
[lib]
|
||||
path = "lib.rs"
|
||||
|
||||
[dependencies]
|
||||
glib-sys = { workspace = true }
|
||||
common = { path = "../../common" }
|
||||
migration-sys = { path = "../migration-sys" }
|
||||
util-sys = { path = "../util-sys" }
|
||||
qom-sys = { path = "../qom-sys" }
|
||||
hwcore-sys = { path = "../hwcore-sys" }
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
[package.metadata.bindgen]
|
||||
header = "wrapper.h"
|
||||
rustified-enum = ["device_endian"]
|
||||
additional-files = ["system/memory.*"]
|
||||
+1
@@ -0,0 +1 @@
|
||||
../build.rs
|
||||
@@ -0,0 +1,44 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#![allow(
|
||||
dead_code,
|
||||
improper_ctypes_definitions,
|
||||
improper_ctypes,
|
||||
non_camel_case_types,
|
||||
non_snake_case,
|
||||
non_upper_case_globals,
|
||||
unnecessary_transmutes,
|
||||
unsafe_op_in_unsafe_fn,
|
||||
clippy::pedantic,
|
||||
clippy::restriction,
|
||||
clippy::style,
|
||||
clippy::missing_const_for_fn,
|
||||
clippy::ptr_offset_with_cast,
|
||||
clippy::useless_transmute,
|
||||
clippy::missing_safety_doc,
|
||||
clippy::too_many_arguments
|
||||
)]
|
||||
|
||||
use common::Zeroable;
|
||||
use hwcore_sys::{qemu_irq, DeviceClass, DeviceState};
|
||||
use qom_sys::{Object, ObjectClass};
|
||||
use util_sys::{Error, EventNotifier, QEMUBH};
|
||||
|
||||
#[cfg(MESON)]
|
||||
include!("bindings.inc.rs");
|
||||
|
||||
#[cfg(not(MESON))]
|
||||
include!(concat!(env!("OUT_DIR"), "/bindings.inc.rs"));
|
||||
|
||||
// SAFETY: these are constants and vtables; the Send and Sync requirements
|
||||
// are deferred to the unsafe callbacks that they contain
|
||||
unsafe impl Send for MemoryRegionOps {}
|
||||
unsafe impl Sync for MemoryRegionOps {}
|
||||
|
||||
// SAFETY: this is a pure data struct
|
||||
unsafe impl Send for CoalescedMemoryRange {}
|
||||
unsafe impl Sync for CoalescedMemoryRange {}
|
||||
|
||||
unsafe impl Zeroable for MemoryRegionOps__bindgen_ty_1 {}
|
||||
unsafe impl Zeroable for MemoryRegionOps__bindgen_ty_2 {}
|
||||
unsafe impl Zeroable for MemoryRegionOps {}
|
||||
unsafe impl Zeroable for MemTxAttrs {}
|
||||
@@ -0,0 +1,9 @@
|
||||
_bindgen_system_rs = rust.bindgen(
|
||||
args: bindgen_args_common + bindgen_args_data['system-sys'].split(),
|
||||
kwargs: bindgen_kwargs)
|
||||
|
||||
_system_sys_rs = cargo_ws.package('system-sys').library(
|
||||
structured_sources(['lib.rs', _bindgen_system_rs]))
|
||||
cargo_ws.package('system-sys').override_dependency(declare_dependency(link_with: _system_sys_rs))
|
||||
|
||||
system_sys_rs = declare_dependency(link_with: [_system_sys_rs])
|
||||
@@ -0,0 +1,21 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
/*
|
||||
* This header file is meant to be used as input to the `bindgen` application
|
||||
* in order to generate C FFI compatible Rust bindings.
|
||||
*/
|
||||
|
||||
/*
|
||||
* We block include/qemu/typedefs.h from bindgen, add here symbols
|
||||
* that are needed as opaque types by other functions.
|
||||
*/
|
||||
typedef struct DirtyBitmapSnapshot DirtyBitmapSnapshot;
|
||||
typedef struct MemoryRegion MemoryRegion;
|
||||
typedef struct RAMBlock RAMBlock;
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
|
||||
#include "exec/hwaddr.h"
|
||||
#include "system/address-spaces.h"
|
||||
#include "system/memory.h"
|
||||
#include "hw/core/sysbus.h"
|
||||
Reference in new issue
Block a user