All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC for-3.0 0/4] block: Add qcow2-rust block driver
@ 2017-04-18 15:58 Max Reitz
  2017-04-18 15:58 ` [Qemu-devel] [RFC for-3.0 2/4] block/qcow2-rust: " Max Reitz
                   ` (8 more replies)
  0 siblings, 9 replies; 13+ messages in thread
From: Max Reitz @ 2017-04-18 15:58 UTC (permalink / raw)
  To: qemu-block; +Cc: qemu-devel, Max Reitz, Kevin Wolf, John Snow

The issues of using C are well understood and nobody likes it. Let's use
a better language. C++ is not a better language, Rust is. Everybody
loves Rust. Rust is good. Rust is hip. It will attract developers, it
will improve code quality, it will improve performance, it will even
improve your marriage. Rust is the future and the future is now.

As the block layer, let's show our commitment to the future by replacing
one of our core parts, the the LEGACY (Bah! Yuck! Ugh!) qcow2 driver, by
a shiny (Oooh! Aaah!) Rust driver. Much better. My VMs now run thrice as
fast. Promise.


Max Reitz (4):
  block: Add Rust interface
  block/qcow2-rust: Add qcow2-rust block driver
  block/qcow2-rust: Add partial write support
  block/qcow2-rust: Register block driver

 configure                                  |    2 +
 Makefile                                   |    6 +-
 Makefile.target                            |    2 +-
 block/Makefile.objs                        |    1 +
 block/qcow2-rust.c                         |   38 ++
 block/rust/Cargo.toml                      |   10 +
 block/rust/src/interface/c_constants.rs    |    8 +
 block/rust/src/interface/c_functions.rs    |   37 +
 block/rust/src/interface/c_structs.rs      |  587 ++++++++++++++++
 block/rust/src/interface/mod.rs            | 1012 ++++++++++++++++++++++++++++
 block/rust/src/lib.rs                      |   12 +
 block/rust/src/qcow2/allocation.rs         |  162 +++++
 block/rust/src/qcow2/io.rs                 |  439 ++++++++++++
 block/rust/src/qcow2/mod.rs                |  347 ++++++++++
 block/rust/src/qcow2/on_disk_structures.rs |   59 ++
 block/rust/src/qcow2/refcount.rs           |   96 +++
 16 files changed, 2816 insertions(+), 2 deletions(-)
 create mode 100644 block/qcow2-rust.c
 create mode 100644 block/rust/Cargo.toml
 create mode 100644 block/rust/src/interface/c_constants.rs
 create mode 100644 block/rust/src/interface/c_functions.rs
 create mode 100644 block/rust/src/interface/c_structs.rs
 create mode 100644 block/rust/src/interface/mod.rs
 create mode 100644 block/rust/src/lib.rs
 create mode 100644 block/rust/src/qcow2/allocation.rs
 create mode 100644 block/rust/src/qcow2/io.rs
 create mode 100644 block/rust/src/qcow2/mod.rs
 create mode 100644 block/rust/src/qcow2/on_disk_structures.rs
 create mode 100644 block/rust/src/qcow2/refcount.rs

---

Yes, I'm late. I thought somebody else would do something but nobody
did. It's still April, though, so I think I'm all good. Also, it's my
birthday today so you're not allowed to complain!

I could have waited until next year, but I'm afraid it would no longer
have been funny by then because we might truly have Rust code in master
then...

-- 
2.12.2

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Qemu-devel] [RFC for-3.0 2/4] block/qcow2-rust: Add qcow2-rust block driver
  2017-04-18 15:58 [Qemu-devel] [RFC for-3.0 0/4] block: Add qcow2-rust block driver Max Reitz
@ 2017-04-18 15:58 ` Max Reitz
  2017-04-18 15:58 ` [Qemu-devel] [RFC for-3.0 1/4] block: Add Rust interface Max Reitz
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 13+ messages in thread
From: Max Reitz @ 2017-04-18 15:58 UTC (permalink / raw)
  To: qemu-block; +Cc: qemu-devel, Max Reitz, Kevin Wolf, John Snow

Currently, this MUCH MORE SECURE block driver than the LEGACY C qcow2
driver (SAD!) only has read support. But this makes it actually much
less likely to destroy your data, so this is a GOOD thing.

Signed-off-by: Max Reitz <mreitz@redhat.com>
---
 block/rust/src/lib.rs                      |   3 +
 block/rust/src/qcow2/io.rs                 | 322 +++++++++++++++++++++++++++
 block/rust/src/qcow2/mod.rs                | 334 +++++++++++++++++++++++++++++
 block/rust/src/qcow2/on_disk_structures.rs |  59 +++++
 4 files changed, 718 insertions(+)
 create mode 100644 block/rust/src/qcow2/io.rs
 create mode 100644 block/rust/src/qcow2/mod.rs
 create mode 100644 block/rust/src/qcow2/on_disk_structures.rs

diff --git a/block/rust/src/lib.rs b/block/rust/src/lib.rs
index 2aa2f365ba..9892a22b84 100644
--- a/block/rust/src/lib.rs
+++ b/block/rust/src/lib.rs
@@ -7,3 +7,6 @@ extern crate libc;
 
 #[macro_use]
 mod interface;
+
+mod qcow2;
+pub use qcow2::*; /* Export symbols */
diff --git a/block/rust/src/qcow2/io.rs b/block/rust/src/qcow2/io.rs
new file mode 100644
index 0000000000..069cc78303
--- /dev/null
+++ b/block/rust/src/qcow2/io.rs
@@ -0,0 +1,322 @@
+use interface::*;
+use qcow2::*;
+
+
+pub enum MNMIOV<'a> {
+    Mut(Vec<&'a mut [u8]>),
+    Const(Vec<&'a [u8]>),
+}
+
+pub enum MNMIOVSlice<'a> {
+    Mut(&'a mut [u8]),
+    Const(&'a [u8]),
+}
+
+
+pub struct HostOffsetInfo {
+    pub guest_offset: u64,
+
+    pub cluster_size: u32,
+    pub compressed_shift: u8,
+
+    pub file: BdrvChild,
+
+    pub l1_index: u32,
+    pub l2_index: u32,
+    pub offset_in_cluster: u32,
+
+    pub l1_entry: L1Entry,
+    pub l2_entry: Option<L2Entry>,
+}
+
+pub enum L1Entry {
+    Unallocated,
+
+    /* L2 offset, COPIED */
+    Allocated(u64, bool),
+}
+
+pub enum L2Entry {
+    Unallocated,
+
+    /* Offset, COPIED */
+    Normal(u64, bool),
+
+    /* Offset (if allocated), COPIED */
+    Zero(Option<u64>, bool),
+
+    /* Offset, compressed length */
+    Compressed(u64, usize),
+}
+
+impl L1Entry {
+    pub fn from_bits(l1_entry: u64, cluster_size: u32) -> Result<L1Entry, IOError>
+    {
+        let l2_offset = l1_entry & L1E_OFFSET_MASK;
+
+        if l2_offset == 0 {
+            Ok(L1Entry::Unallocated)
+        } else if (l2_offset & ((cluster_size - 1) as u64)) != 0 {
+            Err(IOError::InvalidMetadata)
+        } else {
+            Ok(L1Entry::Allocated(l2_offset, (l1_entry & OFLAG_COPIED) != 0))
+        }
+    }
+
+
+    pub fn to_bits(&self) -> u64
+    {
+        match *self {
+            L1Entry::Unallocated                => 0u64,
+            L1Entry::Allocated(offset, false)   => offset,
+            L1Entry::Allocated(offset, true)    => offset | OFLAG_COPIED,
+        }
+    }
+}
+
+impl L2Entry {
+    pub fn from_bits(l2_entry: u64, cluster_size: u32, compressed_shift: u8)
+        -> Result<L2Entry, IOError>
+    {
+        if (l2_entry & OFLAG_COMPRESSED) != 0 {
+            let offset = l2_entry & ((1u64 << compressed_shift) - 1);
+            let sectors = (l2_entry & L2E_COMPRESSED_MASK) >> compressed_shift;
+            let length = sectors * BDRV_SECTOR_SIZE;
+
+            Ok(L2Entry::Compressed(offset, length as usize))
+        } else {
+            let offset = l2_entry & L2E_OFFSET_MASK;
+            let copied = (l2_entry & OFLAG_COPIED) != 0;
+
+            if (offset & ((cluster_size - 1) as u64)) != 0 {
+                Err(IOError::InvalidMetadata)
+            } else {
+                if (l2_entry & OFLAG_ZERO) != 0 {
+                    if offset == 0 {
+                        Ok(L2Entry::Zero(None, false))
+                    } else {
+                        Ok(L2Entry::Zero(Some(offset), copied))
+                    }
+                } else {
+                    if offset == 0 {
+                        Ok(L2Entry::Unallocated)
+                    } else {
+                        Ok(L2Entry::Normal(offset, copied))
+                    }
+                }
+            }
+        }
+    }
+
+
+    pub fn to_bits(&self, compressed_shift: u8) -> u64
+    {
+        match *self {
+            L2Entry::Unallocated                => 0u64,
+            L2Entry::Normal(offset, false)      => offset,
+            L2Entry::Normal(offset, true)       => offset | OFLAG_COPIED,
+            L2Entry::Zero(None, _)              => OFLAG_ZERO,
+            L2Entry::Zero(Some(offset), false)  => offset | OFLAG_ZERO,
+            L2Entry::Zero(Some(offset), true)   => offset
+                                                   | OFLAG_COPIED | OFLAG_ZERO,
+
+            L2Entry::Compressed(offset, length) => {
+                let secs = ((length as u64) + BDRV_SECTOR_SIZE - 1)
+                               / BDRV_SECTOR_SIZE;
+
+                assert!((offset & !((1u64 << compressed_shift) - 1)) == 0);
+                assert!((secs << compressed_shift) >> compressed_shift == secs);
+
+                offset | (secs << compressed_shift) | OFLAG_COMPRESSED
+            }
+        }
+    }
+}
+
+
+impl QCow2BDS {
+    pub fn split_io_to_clusters(cbds: &mut CBDS, mut offset: u64, bytes: u64,
+                                mut iov_mnm: MNMIOV, flags: u32,
+                                func: &Fn(&mut CBDS, u64, u32, &mut MNMIOVSlice,
+                                          u32)
+                                     -> Result<(), IOError>)
+        -> Result<(), IOError>
+    {
+        let cluster_size = {
+            let_bds!(this, cbds);
+            this.cluster_size
+        };
+
+        let mut current_slice_outer: Option<MNMIOVSlice> = None;
+
+        let end_offset = offset + bytes;
+        while offset < end_offset {
+            /* Using a single current_slice variable does not work, and my
+             * knowledge of Rust does not suffice to explain why. */
+            current_slice_outer = {
+                let mut current_slice_opt = current_slice_outer;
+
+                let mut cs_len;
+
+                while (cs_len = match current_slice_opt {
+                        None                                => 0,
+                        Some(MNMIOVSlice::Mut(ref slice))   => slice.len(),
+                        Some(MNMIOVSlice::Const(ref slice)) => slice.len(),
+                    }, cs_len) == ((), 0)
+                {
+                    current_slice_opt = match iov_mnm {
+                        MNMIOV::Mut(ref mut iov) =>
+                            Some(MNMIOVSlice::Mut(iov.pop().unwrap())),
+
+                        MNMIOV::Const(ref mut iov) =>
+                            Some(MNMIOVSlice::Const(iov.pop().unwrap())),
+                    }
+                }
+
+                let mut current_slice = current_slice_opt.unwrap();
+
+                let mut this_bytes: u32 = cluster_size;
+                if cs_len < (this_bytes as usize) {
+                    this_bytes = cs_len as u32;
+                }
+                if end_offset - offset < (this_bytes as u64) {
+                    this_bytes = (end_offset - offset) as u32;
+                }
+
+                try!(func(cbds, offset, this_bytes, &mut current_slice, flags));
+
+                offset += this_bytes as u64;
+
+                Some(match current_slice {
+                    MNMIOVSlice::Mut(iov) =>
+                        MNMIOVSlice::Mut(iov.split_at_mut(this_bytes as usize).1),
+
+                    MNMIOVSlice::Const(iov) =>
+                        MNMIOVSlice::Const(iov.split_at(this_bytes as usize).1),
+                })
+            };
+        }
+
+        Ok(())
+    }
+
+
+    fn do_backing_read(cbds: &mut CBDS, offset: u64, dest: &mut [u8])
+        -> Result<(), IOError>
+    {
+        let backing = {
+            let_mut_bds!(this, cbds);
+
+            if !this.common.has_backing() {
+                zero_byte_slice(dest);
+                return Ok(());
+            }
+
+            this.common.backing()
+        };
+
+        match backing.bdrv_pread(offset, dest) {
+            Ok(_) => Ok(()),
+            Err(_) => Err(IOError::GenericError),
+        }
+    }
+
+
+    fn find_host_offset(cbds: &mut CBDS, offset: u64)
+        -> Result<HostOffsetInfo, IOError>
+    {
+        let mut res = {
+            let_mut_bds!(this, cbds);
+
+            let cluster_offset_mask = (this.cluster_size - 1) as u64;
+            let l2_mask = (this.l2_size - 1) as u32;
+
+            let l1_index = (offset >> this.l1_bits) as usize;
+
+            HostOffsetInfo {
+                guest_offset: offset,
+
+                cluster_size: this.cluster_size,
+                compressed_shift: 63 - (this.cluster_bits - 8),
+
+                file: this.common.file(),
+
+                l1_index: l1_index as u32,
+                l2_index: ((offset >> this.cluster_bits) as u32) & l2_mask,
+                offset_in_cluster: (offset & cluster_offset_mask) as u32,
+
+                l1_entry: try!(L1Entry::from_bits(this.l1_table[l1_index],
+                                                  this.cluster_size)),
+                l2_entry: None,
+            }
+        };
+
+        let mut l2_entry_offset;
+
+        match res.l1_entry {
+            L1Entry::Unallocated    => return Ok(res),
+            L1Entry::Allocated(l2_offset, _) => l2_entry_offset = l2_offset,
+        }
+
+        l2_entry_offset += (res.l2_index as u64) * 8;
+
+        let mut l2_entry = 0u64;
+        if let Err(_) =
+            res.file.bdrv_pread(l2_entry_offset,
+                                object_as_mut_byte_slice(&mut l2_entry))
+        {
+            return Err(IOError::GenericError);
+        }
+
+        let l2_entry = try!(L2Entry::from_bits(u64::from_be(l2_entry),
+                                               res.cluster_size,
+                                               res.compressed_shift));
+        res.l2_entry = Some(l2_entry);
+        return Ok(res);
+    }
+
+
+    fn do_read_cluster(cbds: &mut CBDS, hoi: &HostOffsetInfo, dest: &mut [u8],
+                       _: u32)
+        -> Result<(), IOError>
+    {
+        match hoi.l2_entry {
+            None | Some(L2Entry::Unallocated) =>
+                Self::do_backing_read(cbds, hoi.guest_offset, dest),
+
+            Some(L2Entry::Zero(_, _)) => {
+                zero_byte_slice(dest);
+                Ok(())
+            },
+
+            Some(L2Entry::Compressed(_, _)) =>
+                Err(IOError::UnsupportedImageFeature),
+
+            Some(L2Entry::Normal(offset, _)) => {
+                let full_offset = offset + (hoi.offset_in_cluster as u64);
+                if let Err(_) = hoi.file.bdrv_pread(full_offset, dest) {
+                    Err(IOError::GenericError)
+                } else {
+                    Ok(())
+                }
+            }
+        }
+    }
+
+
+    pub fn read_cluster(cbds: &mut CBDS, offset: u64, bytes: u32,
+                        full_dest_mnm: &mut MNMIOVSlice, flags: u32)
+        -> Result<(), IOError>
+    {
+        let mut dest = match *full_dest_mnm {
+            MNMIOVSlice::Mut(ref mut full_dest) =>
+                full_dest.split_at_mut(bytes as usize).0,
+
+            MNMIOVSlice::Const(_) =>
+                panic!("read_cluster() requires a mutable I/O vector"),
+        };
+
+        let hoi = try!(Self::find_host_offset(cbds, offset));
+        Self::do_read_cluster(cbds, &hoi, dest, flags)
+    }
+}
diff --git a/block/rust/src/qcow2/mod.rs b/block/rust/src/qcow2/mod.rs
new file mode 100644
index 0000000000..5fb523c93b
--- /dev/null
+++ b/block/rust/src/qcow2/mod.rs
@@ -0,0 +1,334 @@
+mod io;
+mod on_disk_structures;
+
+
+use interface::*;
+use self::on_disk_structures::*;
+
+
+const MIN_CLUSTER_BITS: u32 =  9;
+const MAX_CLUSTER_BITS: u32 = 21;
+const MAX_L1_SIZE       : u32 = 0x02000000u32;
+const MAX_REFTABLE_SIZE : u32 = 0x00800000u32;
+const L1E_OFFSET_MASK       : u64 = 0x00fffffffffffe00u64;
+const L2E_OFFSET_MASK       : u64 = 0x00fffffffffffe00u64;
+const L2E_COMPRESSED_MASK   : u64 = 0x3fffffffffffffffu64;
+const REFT_OFFSET_MASK      : u64 = 0xfffffffffffffe00u64;
+
+const OFLAG_COPIED      : u64 = 1u64 << 63;
+const OFLAG_COMPRESSED  : u64 = 1u64 << 62;
+const OFLAG_ZERO        : u64 = 1u64 <<  0;
+
+
+pub struct QCow2BDS {
+    common: BDSCommon<QCow2BDS>,
+
+    qcow_version: u8,
+
+    cluster_bits: u8,
+    cluster_size: u32,
+    cluster_sectors: u32,
+
+    l1_bits: u8,
+    l1_size: u32,
+    l2_bits: u8,
+    l2_size: u32,
+
+    l1_offset: u64,
+    l1_table: Vec<u64>,
+
+    refcount_order: u8,
+    reftable_bits: u8,
+    refblock_size: u32,
+
+    reftable_offset: u64,
+    reftable_size: u32,
+    reftable: Vec<u64>,
+
+    first_free_cluster_offset: u64,
+}
+
+
+impl QCow2BDS {
+    fn do_open(cbds: &mut CBDS, _: QDict, _: u32)
+        -> Result<(), String>
+    {
+        let file = {
+            let_mut_bds!(this, cbds);
+            this.common.file()
+        };
+
+        let mut header = QCow2Header::default();
+        try_prepend!(file.bdrv_pread(0, object_as_mut_byte_slice(&mut header)),
+                     "Could not read qcow2 header");
+
+        header.from_be();
+
+        let reftable_size;
+
+        {
+            let_mut_bds!(this, cbds);
+
+            if header.magic != 0x514649fb {
+                return Err(String::from("Image is not in qcow2 format"));
+            }
+            if header.version < 2 || header.version > 3 {
+                return Err(format!("Unsupported qcow2 version {}",
+                                   header.version));
+            }
+
+            this.qcow_version = header.version as u8;
+
+            if header.cluster_bits < MIN_CLUSTER_BITS ||
+                header.cluster_bits > MAX_CLUSTER_BITS
+            {
+                return Err(format!("Unsupported cluster size: 2^{}",
+                                   header.cluster_bits));
+            }
+
+            this.cluster_bits = header.cluster_bits as u8;
+            this.cluster_size = 1u32 << this.cluster_bits;
+            this.cluster_sectors = this.cluster_size >> BDRV_SECTOR_SHIFT;
+
+            if this.qcow_version > 2 {
+                if header.header_length < 104 {
+                    return Err(String::from("qcow2 header too short"));
+                }
+                if header.header_length > this.cluster_size {
+                    return Err(String::from("qcow2 header exceeds cluster \
+                                             size"));
+                }
+            }
+
+            if header.backing_file_offset > (this.cluster_size as u64) {
+                return Err(String::from("Invalid backing file offset"));
+            }
+
+            if this.qcow_version > 2 {
+                if header.incompatible_features != 0 {
+                    return Err(format!("Unsupported incompatible features: \
+                                        {:x}", header.incompatible_features));
+                }
+
+                if header.refcount_order > 6 {
+                    return Err(String::from("Refcount width may not exceed 64 \
+                                             bits"));
+                }
+                this.refcount_order = header.refcount_order as u8;
+            }
+
+            /* No need to do anything about snapshots, compression, encryption,
+             * or other funky extensions: We do not support them */
+
+            if header.crypt_method != 0 {
+                return Err(format!("Unsupported encryption method: {}",
+                                   header.crypt_method));
+            }
+
+            if header.backing_file_size > 1023 ||
+                (header.backing_file_size as u64) >
+                    (this.cluster_size as u64) - header.backing_file_offset
+            {
+                return Err(String::from("Backing file name too long"));
+            }
+
+
+            this.l2_bits = this.cluster_bits - 3 /* ld(sizeof(u64)) */;
+            this.l2_size = 1u32 << this.l2_bits;
+
+            cbds.total_sectors = (header.size / BDRV_SECTOR_SIZE) as i64;
+
+            this.l1_offset = header.l1_table_offset;
+            this.l1_bits = this.cluster_bits + this.l2_bits;
+
+            if header.l1_size > MAX_L1_SIZE / 8 {
+                return Err(String::from("Active L1 table too large"));
+            }
+
+            let min_l1_size = (header.size + (1u64 << this.l1_bits) - 1) >>
+                                  this.l1_bits;
+            if (header.l1_size as u64) < min_l1_size || header.l1_size == 0 {
+                return Err(String::from("Active L1 table too small"));
+            }
+
+            this.l1_size = header.l1_size;
+
+            this.reftable_offset = header.refcount_table_offset;
+
+            reftable_size = (header.refcount_table_clusters as u64) <<
+                                (this.cluster_bits - 3);
+            if reftable_size > (MAX_REFTABLE_SIZE as u64) {
+                return Err(String::from("Refcount table too large"));
+            }
+
+            this.reftable_size = reftable_size as u32;
+
+            let refblock_bits = this.cluster_bits + this.refcount_order - 3;
+            this.reftable_bits = this.cluster_bits + refblock_bits;
+            this.refblock_size = 1u32 << refblock_bits;
+        }
+
+        /* Read L1 table */
+        let mut l1_table = Vec::<u64>::new();
+        l1_table.resize(header.l1_size as usize, 0);
+
+        try_prepend!(file.bdrv_pread(header.l1_table_offset,
+                                     vec_as_mut_byte_slice(&mut l1_table)),
+                     "Could not read L1 table");
+
+        for i in 0..header.l1_size {
+            l1_table[i as usize] = u64::from_be(l1_table[i as usize]);
+        }
+
+        /* Read reftable */
+        let mut reftable = Vec::<u64>::new();
+        reftable.resize(reftable_size as usize, 0);
+
+        try_prepend!(file.bdrv_pread(header.refcount_table_offset,
+                                     vec_as_mut_byte_slice(&mut reftable)),
+                     "Could not read refcount table");
+
+        for i in 0..reftable_size {
+            reftable[i as usize] = u64::from_be(reftable[i as usize]);
+        }
+
+        /* Read backing file name */
+        try_prepend!(
+            file.bdrv_pread(header.backing_file_offset,
+                            slice_as_mut_byte_slice(&mut cbds.backing_file)),
+            "Could not read backing file name");
+        cbds.backing_file[header.backing_file_size as usize] = 0;
+
+        {
+            let_mut_bds!(this, cbds);
+            this.l1_table = l1_table;
+            this.reftable = reftable;
+        }
+
+        Ok(())
+    }
+}
+
+
+impl BlockDriverState for QCow2BDS {
+    fn new() -> Self
+    {
+        QCow2BDS {
+            common: BDSCommon::<Self>::new(),
+
+            qcow_version: 0,
+
+            cluster_bits: 0,
+            cluster_size: 0,
+            cluster_sectors: 0,
+
+            l1_bits: 0,
+            l1_size: 0,
+            l2_bits: 0,
+            l2_size: 0,
+
+            l1_offset: 0,
+            l1_table: Vec::new(),
+
+            refcount_order: 0,
+            reftable_bits: 0,
+            refblock_size: 0,
+
+            reftable_offset: 0,
+            reftable_size: 0,
+            reftable: Vec::new(),
+
+            first_free_cluster_offset: 0,
+        }
+    }
+
+    /* Required for the generic BlockDriverState implementation */
+    fn common(&mut self) -> &mut BDSCommon<Self>
+    {
+        &mut self.common
+    }
+}
+
+
+impl BlockDriverOpen for QCow2BDS {
+    fn bdrv_open(cbds: &mut CBDS, options: QDict, flags: u32)
+        -> Result<(), String>
+    {
+        let role = bdrv_get_standard_child_role(StandardChildRole::File);
+        let file = try!(bdrv_open_child(None, Some(options),
+                                        String::from("file"), cbds, role,
+                                        false));
+
+        {
+            let_mut_bds!(this, cbds);
+            this.common.set_file(Some(file));
+        }
+
+        cbds.read_only = true;
+
+        QCow2BDS::do_open(cbds, options, flags)
+    }
+}
+
+
+impl BlockDriverClose for QCow2BDS {
+    fn bdrv_close(_: &mut CBDS)
+    {
+    }
+}
+
+
+impl BlockDriverRead for QCow2BDS {
+    fn bdrv_co_preadv(cbds: &mut CBDS, offset: u64, bytes: u64,
+                      iov: Vec<&mut [u8]>, flags: u32)
+        -> Result<(), IOError>
+    {
+        /* TODO: Do not split */
+        Self::split_io_to_clusters(cbds, offset, bytes, io::MNMIOV::Mut(iov),
+                                   flags, &Self::read_cluster)
+    }
+}
+
+
+impl BlockDriverChildPerm for QCow2BDS {
+    fn bdrv_child_perm(cbds: &mut CBDS, c: Option<&mut BdrvChild>,
+                       role: &c_structs::BdrvChildRole, perm: u64, shared: u64)
+        -> (u64, u64)
+    {
+        bdrv_format_default_perms(c, role, perm, shared,
+                                  bdrv_is_read_only(cbds))
+    }
+}
+
+
+impl BlockDriverInfo for QCow2BDS {
+    fn bdrv_get_info(cbds: &mut CBDS, bdi: &mut c_structs::BlockDriverInfo)
+        -> Result<(), String>
+    {
+        let_bds!(this, cbds);
+
+        bdi.unallocated_blocks_are_zero = true;
+        bdi.can_write_zeroes_with_unmap = false; /* no discard support */
+        bdi.cluster_size = this.cluster_size as i32;
+        /* no VM state support */
+
+        Ok(())
+    }
+}
+
+
+#[no_mangle]
+pub extern fn bdrv_qcow2_rust_init()
+{
+    let mut bdrv = BlockDriver::<QCow2BDS>::new(String::from("qcow2-rust"));
+
+    bdrv.provides_open();
+    bdrv.provides_close();
+    bdrv.provides_read();
+    bdrv.provides_child_perm();
+    bdrv.provides_info();
+
+    bdrv.supports_backing();
+
+    bdrv_register(bdrv);
+}
diff --git a/block/rust/src/qcow2/on_disk_structures.rs b/block/rust/src/qcow2/on_disk_structures.rs
new file mode 100644
index 0000000000..bdc8be7418
--- /dev/null
+++ b/block/rust/src/qcow2/on_disk_structures.rs
@@ -0,0 +1,59 @@
+/* TODO: Write a derive(Endianness) macro */
+
+#[repr(C, packed)]
+#[derive(Default)]
+pub struct QCow2Header {
+    pub magic: u32,
+    pub version: u32,
+    pub backing_file_offset: u64,
+    pub backing_file_size: u32,
+    pub cluster_bits: u32,
+    pub size: u64,
+    pub crypt_method: u32,
+    pub l1_size: u32,
+    pub l1_table_offset: u64,
+    pub refcount_table_offset: u64,
+    pub refcount_table_clusters: u32,
+    pub nb_snapshots: u32,
+    pub snapshots_offset: u64,
+
+    pub incompatible_features: u64,
+    pub compatible_features: u64,
+    pub autoclear_features: u64,
+
+    pub refcount_order: u32,
+    pub header_length: u32,
+}
+
+
+impl QCow2Header {
+    pub fn from_be(&mut self)
+    {
+        self.magic                  = u32::from_be(self.magic);
+        self.version                = u32::from_be(self.version);
+
+        self.backing_file_offset    = u64::from_be(self.backing_file_offset);
+        self.backing_file_size      = u32::from_be(self.backing_file_size);
+
+        self.cluster_bits           = u32::from_be(self.cluster_bits);
+        self.size                   = u64::from_be(self.size);
+        self.crypt_method           = u32::from_be(self.crypt_method);
+
+        self.l1_size                = u32::from_be(self.l1_size);
+        self.l1_table_offset        = u64::from_be(self.l1_table_offset);
+
+        self.refcount_table_offset  = u64::from_be(self.refcount_table_offset);
+        self.refcount_table_clusters
+            = u32::from_be(self.refcount_table_clusters);
+
+        self.nb_snapshots           = u32::from_be(self.nb_snapshots);
+        self.snapshots_offset       = u64::from_be(self.snapshots_offset);
+
+        self.incompatible_features  = u64::from_be(self.incompatible_features);
+        self.compatible_features    = u64::from_be(self.compatible_features);
+        self.autoclear_features     = u64::from_be(self.autoclear_features);
+
+        self.refcount_order         = u32::from_be(self.refcount_order);
+        self.header_length          = u32::from_be(self.header_length);
+    }
+}
-- 
2.12.2

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Qemu-devel] [RFC for-3.0 1/4] block: Add Rust interface
  2017-04-18 15:58 [Qemu-devel] [RFC for-3.0 0/4] block: Add qcow2-rust block driver Max Reitz
  2017-04-18 15:58 ` [Qemu-devel] [RFC for-3.0 2/4] block/qcow2-rust: " Max Reitz
@ 2017-04-18 15:58 ` Max Reitz
  2017-04-18 15:58 ` [Qemu-devel] [RFC for-3.0 3/4] block/qcow2-rust: Add partial write support Max Reitz
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 13+ messages in thread
From: Max Reitz @ 2017-04-18 15:58 UTC (permalink / raw)
  To: qemu-block; +Cc: qemu-devel, Max Reitz, Kevin Wolf, John Snow

This patch adds an FFI interface for block drivers written in Rust, the
language of the future. It's a very good interface, in fact, it's the
best interface there is. We are truly making QEMU great again!

Signed-off-by: Max Reitz <mreitz@redhat.com>
---
 configure                               |    2 +
 Makefile                                |    6 +-
 Makefile.target                         |    2 +-
 block/rust/Cargo.toml                   |   10 +
 block/rust/src/interface/c_constants.rs |    8 +
 block/rust/src/interface/c_functions.rs |   37 ++
 block/rust/src/interface/c_structs.rs   |  587 ++++++++++++++++++
 block/rust/src/interface/mod.rs         | 1012 +++++++++++++++++++++++++++++++
 block/rust/src/lib.rs                   |    9 +
 9 files changed, 1671 insertions(+), 2 deletions(-)
 create mode 100644 block/rust/Cargo.toml
 create mode 100644 block/rust/src/interface/c_constants.rs
 create mode 100644 block/rust/src/interface/c_functions.rs
 create mode 100644 block/rust/src/interface/c_structs.rs
 create mode 100644 block/rust/src/interface/mod.rs
 create mode 100644 block/rust/src/lib.rs

diff --git a/configure b/configure
index be4d326ae0..f99d19e47b 100755
--- a/configure
+++ b/configure
@@ -745,6 +745,8 @@ if test "$mingw32" = "yes" ; then
   libs_qga="-lws2_32 -lwinmm -lpowrprof -liphlpapi -lnetapi32 $libs_qga"
 fi
 
+LIBS="-ldl $LIBS"
+
 werror=""
 
 for opt do
diff --git a/Makefile b/Makefile
index 6c359b2f86..5cf071fb30 100644
--- a/Makefile
+++ b/Makefile
@@ -368,9 +368,13 @@ Makefile: $(version-obj-y)
 libqemustub.a: $(stub-obj-y)
 libqemuutil.a: $(util-obj-y)
 
+.PHONY: rust_block_drivers_source
+rust/debug/libqemu_rust_block_drivers.a: rust_block_drivers_source
+	cd "$(SRC_PATH)/block/rust" && CARGO_TARGET_DIR="$(BUILD_DIR)/rust" cargo build
+
 ######################################################################
 
-COMMON_LDADDS = $(trace-obj-y) libqemuutil.a libqemustub.a
+COMMON_LDADDS = $(trace-obj-y) libqemuutil.a libqemustub.a rust/debug/libqemu_rust_block_drivers.a
 
 qemu-img.o: qemu-img-cmds.h
 
diff --git a/Makefile.target b/Makefile.target
index 7df2b8c149..0dc4c0a35b 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -201,7 +201,7 @@ all-obj-$(CONFIG_SOFTMMU) += $(io-obj-y)
 
 $(QEMU_PROG_BUILD): config-devices.mak
 
-COMMON_LDADDS = $(trace-obj-y) ../libqemuutil.a ../libqemustub.a
+COMMON_LDADDS = $(trace-obj-y) ../libqemuutil.a ../libqemustub.a ../rust/debug/libqemu_rust_block_drivers.a
 
 # build either PROG or PROGW
 $(QEMU_PROG_BUILD): $(all-obj-y) $(COMMON_LDADDS)
diff --git a/block/rust/Cargo.toml b/block/rust/Cargo.toml
new file mode 100644
index 0000000000..13cdf068b3
--- /dev/null
+++ b/block/rust/Cargo.toml
@@ -0,0 +1,10 @@
+[package]
+name = "qemu-rust-block-drivers"
+version = "3.0.0"
+authors = ["Max Reitz <mreitz@redhat.com>"]
+
+[dependencies]
+libc = "0.2.0"
+
+[lib]
+crate-type = ["staticlib"]
diff --git a/block/rust/src/interface/c_constants.rs b/block/rust/src/interface/c_constants.rs
new file mode 100644
index 0000000000..56919f1a04
--- /dev/null
+++ b/block/rust/src/interface/c_constants.rs
@@ -0,0 +1,8 @@
+use interface::c_structs::*;
+
+
+extern {
+    pub static child_file: BdrvChildRole;
+    pub static child_format: BdrvChildRole;
+    pub static child_backing: BdrvChildRole;
+}
diff --git a/block/rust/src/interface/c_functions.rs b/block/rust/src/interface/c_functions.rs
new file mode 100644
index 0000000000..1be8d85ccb
--- /dev/null
+++ b/block/rust/src/interface/c_functions.rs
@@ -0,0 +1,37 @@
+use interface::c_structs::*;
+use libc::{c_char,c_int,c_void,size_t};
+
+
+extern {
+    pub fn bdrv_is_read_only(bs: *mut BlockDriverState) -> bool;
+
+    pub fn bdrv_open_child(filename: *const c_char, options: *mut QDict,
+                           bdref_key: *const c_char,
+                           parent: *mut BlockDriverState,
+                           child_role: *const BdrvChildRole,
+                           allow_none: bool, errp: *mut *mut Error)
+        -> *mut BdrvChild;
+
+    pub fn bdrv_pread(child: *mut BdrvChild, offset: i64, buf: *mut c_void,
+                      bytes: c_int)
+        -> c_int;
+
+    pub fn bdrv_pwrite(child: *mut BdrvChild, offset: i64, buf: *const c_void,
+                       bytes: c_int)
+        -> c_int;
+
+    pub fn bdrv_register(bdrv: *mut BlockDriver);
+
+    pub fn error_get_pretty(err: *mut Error) -> *const c_char;
+
+    pub fn error_setg_internal(errp: *mut *mut Error, src: *const c_char,
+                               line: c_int, func: *const c_char,
+                               fmt: *const c_char, ...);
+
+    pub fn g_strdup(str: *const c_char) -> *mut c_char;
+
+    pub fn qemu_blockalign(bs: *mut BlockDriverState, size: size_t)
+        -> *mut c_void;
+
+    pub fn qemu_vfree(ptr: *mut c_void);
+}
diff --git a/block/rust/src/interface/c_structs.rs b/block/rust/src/interface/c_structs.rs
new file mode 100644
index 0000000000..74e342b0c7
--- /dev/null
+++ b/block/rust/src/interface/c_structs.rs
@@ -0,0 +1,587 @@
+use libc::{c_char,c_int,c_uint,c_ulong,c_void,size_t};
+
+
+const BLOCK_OP_TYPE_MAX: usize = 16;
+
+
+#[repr(C)]
+pub struct BlockDriver {
+    pub format_name: *const c_char,
+    pub instance_size: c_int,
+
+    pub is_filter: bool,
+
+    pub bdrv_recurse_is_first_non_filter: Option<
+            extern fn(bs: *mut BlockDriverState,
+                      candidate: *mut BlockDriverState)
+                -> bool
+        >,
+
+    pub bdrv_probe: Option<
+            extern fn(buf: *const c_char, buf_size: c_int,
+                      filename: *const c_char)
+                -> c_int
+        >,
+    pub bdrv_probe_device: Option<extern fn(filename: *const c_char) -> c_int>,
+
+    pub bdrv_parse_filename: Option<
+            extern fn(filename: *const c_char,
+                      options: *mut QDict,
+                      errp: *mut *mut Error)
+        >,
+    pub bdrv_needs_filename: bool,
+
+    pub supports_backing: bool,
+
+    pub bdrv_reopen_prepare: Option<
+            extern fn(reopen_state: *mut BDRVReopenState,
+                      queue: *mut BlockReopenQueue,
+                      errp: *mut *mut Error)
+                -> c_int
+        >,
+    pub bdrv_reopen_commit: Option<
+            extern fn(reopen_state: *mut BDRVReopenState)
+        >,
+    pub bdrv_reopen_abort: Option<
+            extern fn(reopen_state: *mut BDRVReopenState)
+        >,
+    pub bdrv_join_options: Option<
+            extern fn(options: *mut QDict, old_options: *mut QDict)
+        >,
+
+    pub bdrv_open: Option<
+            extern fn(bs: *mut BlockDriverState, options: *mut QDict,
+                      flags: c_int, errp: *mut *mut Error)
+                -> c_int
+        >,
+    pub bdrv_file_open: Option<
+            extern fn(bs: *mut BlockDriverState, options: *mut QDict,
+                      flags: c_int, errp: *mut *mut Error)
+                -> c_int
+        >,
+    pub bdrv_close: Option<extern fn(bs: *mut BlockDriverState)>,
+    pub bdrv_create: Option<
+            extern fn(filename: *const c_char, opts: *mut QemuOpts,
+                      errp: *mut *mut Error)
+                -> c_int
+        >,
+    pub bdrv_set_key: Option<DeprecatedFn>,
+    pub bdrv_make_empty: Option<extern fn(bs: *mut BlockDriverState)>,
+
+    pub bdrv_refresh_filename: Option<
+            extern fn(bs: *mut BlockDriverState, options: *mut QDict)
+        >,
+
+    pub bdrv_aio_readv: Option<DeprecatedFn>,
+    pub bdrv_aio_writev: Option<DeprecatedFn>,
+    pub bdrv_aio_flush: Option<DeprecatedFn>,
+    pub bdrv_aio_pdiscard: Option<DeprecatedFn>,
+
+    pub bdrv_co_readv: Option<DeprecatedFn>,
+    pub bdrv_co_preadv: Option<
+            extern fn(bs: *mut BlockDriverState, offset: u64, bytes: u64,
+                      qiov: *mut QEMUIOVector, flags: c_int)
+                -> c_int
+        >,
+    pub bdrv_co_writev: Option<DeprecatedFn>,
+    pub bdrv_co_writev_flags: Option<DeprecatedFn>,
+    pub bdrv_co_pwritev: Option<
+            extern fn(bs: *mut BlockDriverState, offset: u64, bytes: u64,
+                      qiov: *mut QEMUIOVector, flags: c_int)
+                -> c_int
+        >,
+
+    pub bdrv_co_pwrite_zeroes: Option<
+            extern fn(bs: *mut BlockDriverState, offset: i64, count: c_int,
+                      flags: c_int /* BdrvRequestFlags */)
+                -> c_int
+        >,
+    pub bdrv_co_pdiscard: Option<
+            extern fn(bs: *mut BlockDriverState, offset: i64, count: c_int)
+                -> c_int
+        >,
+    pub bdrv_co_get_block_status: Option<
+            extern fn(bs: *mut BlockDriverState, sector_num: i64,
+                      nb_sectors: c_int, pnum: *mut c_int,
+                      file: *mut *mut BlockDriverState)
+                -> i64
+        >,
+
+    pub bdrv_invalidate_cache: Option<
+            extern fn(bs: *mut BlockDriverState, errp: *mut *mut Error)
+        >,
+    pub bdrv_inactivate: Option<extern fn(bs: *mut BlockDriverState) -> c_int>,
+
+    pub bdrv_co_flush: Option<extern fn(bs: *mut BlockDriverState) -> c_int>,
+
+    pub bdrv_co_flush_to_disk: Option<
+            extern fn(bs: *mut BlockDriverState) -> c_int
+        >,
+
+    pub bdrv_co_flush_to_os: Option<
+            extern fn(bs: *mut BlockDriverState) -> c_int
+        >,
+
+    pub protocol_name: *const c_char,
+    pub bdrv_truncate: Option<
+            extern fn(bs: *mut BlockDriverState, offset: i64,
+                      errp: *mut *mut Error)
+                -> c_int
+        >,
+
+    pub bdrv_getlength: Option<extern fn(bs: *mut BlockDriverState) -> c_int>,
+    pub has_variable_length: bool,
+    pub bdrv_get_allocated_file_size: Option<
+            extern fn(bs: *mut BlockDriverState) -> i64
+        >,
+
+    pub bdrv_co_pwritev_compressed: Option<
+            extern fn(bs: *mut BlockDriverState, offset: u64, bytes: u64,
+                      qiov: *mut QEMUIOVector)
+                -> c_int
+        >,
+
+    pub bdrv_snapshot_create: Option<
+            extern fn(bs: *mut BlockDriverState, sn_info: *mut QEMUSnapshotInfo)
+                -> c_int
+        >,
+    pub bdrv_snapshot_goto: Option<
+            extern fn(bs: *mut BlockDriverState, snapshot_id: *const c_char)
+                -> c_int
+        >,
+    pub bdrv_snapshot_delete: Option<
+            extern fn(bs: *mut BlockDriverState, snapshot_id: *const c_char,
+                      name: *const c_char, errp: *mut *mut Error)
+                -> c_int
+        >,
+    pub bdrv_snapshot_list: Option<
+            extern fn(bs: *mut BlockDriverState,
+                      psn_info: *mut *mut QEMUSnapshotInfo)
+                -> c_int
+        >,
+    pub bdrv_snapshot_load_tmp: Option<
+            extern fn(bs: *mut BlockDriverState, snapshot_id: *const c_char,
+                      name: *const c_char, errp: *mut *mut Error)
+                -> c_int
+        >,
+
+    pub bdrv_get_info: Option<
+            extern fn(bs: *mut BlockDriverState, bdi: *mut BlockDriverInfo)
+                -> c_int
+        >,
+    /* Note that the return object should be allocated in the C program */
+    pub bdrv_get_specific_info: Option<
+            extern fn(bs: *mut BlockDriverState) -> *mut ImageInfoSpecific
+        >,
+
+    pub bdrv_save_vmstate: Option<
+            extern fn(bs: *mut BlockDriverState, qiov: *mut QEMUIOVector,
+                      pos: i64)
+                -> c_int
+        >,
+    pub bdrv_load_vmstate: Option<
+            extern fn(bs: *mut BlockDriverState, qiov: *mut QEMUIOVector,
+                      pos: i64)
+                -> c_int
+        >,
+
+    pub bdrv_change_backing_file: Option<
+            extern fn(bs: *mut BlockDriverState,
+                      backing_file: *const c_char, backing_fmt: *const c_char)
+                -> c_int
+        >,
+
+    pub bdrv_is_inserted: Option<extern fn(bs: *mut BlockDriverState) -> bool>,
+    pub bdrv_media_changed: Option<
+            extern fn(bs: *mut BlockDriverState) -> c_int
+        >,
+    pub bdrv_eject: Option<
+            extern fn(bs: *mut BlockDriverState, eject_flag: bool)
+        >,
+    pub bdrv_lock_medium: Option<
+            extern fn(bs: *mut BlockDriverState, locked: bool)
+        >,
+
+    pub bdrv_aio_ioctl: Option<DeprecatedFn>,
+    pub bdrv_co_ioctl: Option<
+            extern fn(bs: *mut BlockDriverState, req: c_ulong, buf: *mut c_void)
+                -> c_int
+        >,
+
+    pub create_opts: *mut QemuOptsList,
+
+    pub bdrv_check: Option<
+            extern fn(bs: *mut BlockDriverState, result: *mut BdrvCheckResult,
+                      fix: c_int /* BdrvCheckResult */)
+                -> c_int
+        >,
+
+    pub bdrv_amend_options: Option<
+            extern fn(bs: *mut BlockDriverState, opts: *mut QemuOpts,
+                      status_cb: BlockDriverAmendStatusCB,
+                      cb_opaque: *mut c_void)
+                -> c_int
+        >,
+
+    pub bdrv_debug_event: Option<
+            extern fn(bs: *mut BlockDriverState,
+                      event: c_int /* BlkdebugEvent */)
+        >,
+
+    pub bdrv_debug_breakpoint: Option<
+            extern fn(bs: *mut BlockDriverState, event: *const c_char,
+                      tag: *const c_char)
+                -> c_int
+        >,
+    pub bdrv_debug_remove_breakpoint: Option<
+            extern fn(bs: *mut BlockDriverState, tag: *const c_char) -> c_int
+        >,
+    pub bdrv_debug_resume: Option<
+            extern fn(bs: *mut BlockDriverState, tag: *const c_char) -> c_int
+        >,
+    pub bdrv_debug_is_suspended: Option<
+            extern fn(bs: *mut BlockDriverState, tag: *const c_char) -> bool
+        >,
+
+    pub bdrv_refresh_limits: Option<
+            extern fn(bs: *mut BlockDriverState, errp: *mut *mut Error)
+        >,
+
+    pub bdrv_has_zero_init: Option<
+            extern fn(bs: *mut BlockDriverState) -> c_int
+        >,
+
+    pub bdrv_detach_aio_context: Option<extern fn(bs: *mut BlockDriverState)>,
+
+    pub bdrv_attach_aio_context: Option<
+            extern fn(bs: *mut BlockDriverState, new_context: *mut AioContext)
+        >,
+
+    pub bdrv_io_plug: Option<extern fn(bs: *mut BlockDriverState)>,
+    pub bdrv_io_unplug: Option<extern fn(bs: *mut BlockDriverState)>,
+
+    pub bdrv_probe_blocksizes: Option<
+            extern fn(bs: *mut BlockDriverState, bsz: *mut BlockSizes)
+                -> c_int
+        >,
+    pub bdrv_probe_geometry: Option<
+            extern fn(bs: *mut BlockDriverState, geo: *mut HDGeometry)
+                -> c_int
+        >,
+
+    pub bdrv_drain: Option<extern fn(bs: *mut BlockDriverState)>,
+
+    pub bdrv_add_child: Option<
+            extern fn(parent: *mut BlockDriverState,
+                      child: *mut BlockDriverState,
+                      errp: *mut *mut Error)
+        >,
+    pub bdrv_del_child: Option<
+            extern fn(parent: *mut BlockDriverState,
+                      child: *mut BlockDriverState,
+                      errp: *mut *mut Error)
+        >,
+
+    pub bdrv_check_perm: Option<
+            extern fn(bs: *mut BlockDriverState, perm: u64, shared: u64,
+                      errp: *mut *mut Error)
+                -> c_int
+        >,
+    pub bdrv_set_perm: Option<
+            extern fn(bs: *mut BlockDriverState, perm: u64, shared: u64)
+        >,
+    pub bdrv_abort_perm_update: Option<extern fn(bs: *mut BlockDriverState)>,
+
+    pub bdrv_child_perm: Option<
+            extern fn(bs: *mut BlockDriverState, c: *mut BdrvChild,
+                      role: *const BdrvChildRole,
+                      parent_perm: u64, parent_shared: u64,
+                      nperm: *mut u64, nshared: *mut u64)
+        >,
+
+    pub list: QListEntry<BlockDriver>,
+}
+
+#[repr(C)]
+pub struct BlockDriverState {
+    pub open_flags: c_int,
+    pub read_only: bool,
+    pub encrypted: bool,
+    pub valid_key: bool,
+    pub sg: bool,
+    pub probed: bool,
+
+    pub drv: *mut BlockDriver,
+    pub opaque: *mut c_void,
+
+    pub aio_context: *mut AioContext,
+    pub aio_notifiers: *mut BdrvAioNotifier,
+    pub walking_aio_notifiers: bool,
+
+    pub filename: [c_char; 4096],
+    pub backing_file: [c_char; 4096],
+
+    pub backing_format: [c_char; 16],
+
+    pub full_open_options: *mut QDict,
+    pub exact_filename: [c_char; 4096],
+
+    pub backing: *mut BdrvChild,
+    pub file: *mut BdrvChild,
+
+    pub bl: BlockLimits,
+
+    pub supported_write_flags: c_uint,
+    pub supported_zero_flags: c_uint,
+
+    pub node_name: [c_char; 32],
+    pub node_list: QTailQEntry<BlockDriverState>,
+    pub bs_list: QTailQEntry<BlockDriverState>,
+    pub monitor_list: QTailQEntry<BlockDriverState>,
+    pub refcnt: c_int,
+
+    pub op_blockers: [QListHead<BdrvOpBlocker>; BLOCK_OP_TYPE_MAX],
+
+    pub job: *mut BlockJob,
+
+    pub inherits_from: *mut BlockDriverState,
+    pub children: QListHead<BdrvChild>,
+    pub parents: QListHead<BdrvChild>,
+
+    pub options: *mut QDict,
+    pub explicit_options: *mut QDict,
+    pub detect_zeroes: c_int, /* BlockdevDetectZeroesOptions */
+
+    pub backing_blocker: *mut Error,
+
+    pub copy_on_read: c_int,
+
+    pub total_sectors: i64,
+
+    pub before_write_notifiers: NotifierWithReturnList,
+
+    pub in_flight: c_uint,
+    pub serialising_in_flight: c_uint,
+
+    pub wakeup: bool,
+
+    pub wr_highest_offset: u64,
+
+    pub write_threshold_offset: u64,
+    pub write_threshold_notifier: NotifierWithReturn,
+
+    pub io_plugged: c_uint,
+
+    pub tracked_requests: QListHead<BdrvTrackedRequest>,
+    pub flush_queue: CoQueue,
+    pub active_flush_req: bool,
+    pub write_gen: c_uint,
+    pub flushed_gen: c_uint,
+
+    pub dirty_bitmaps: QListHead<BdrvDirtyBitmap>,
+
+    pub enable_write_cache: c_int,
+
+    pub quiesce_counter: c_int,
+}
+
+#[repr(C)]
+pub struct BDRVReopenState {
+    pub bs: *mut BlockDriverState,
+    pub flags: c_int,
+    pub options: *mut QDict,
+    pub explicit_options: *mut QDict,
+    pub opaque: *mut c_void,
+}
+
+#[repr(C)]
+pub struct BdrvCheckResult {
+    pub corruptions: c_int,
+    pub leaks: c_int,
+    pub check_errors: c_int,
+    pub corruptions_fixed: c_int,
+    pub leaks_fixed: c_int,
+    pub image_end_offset: i64,
+    pub bfi: c_int, /* BlockFragInfo */
+}
+
+#[repr(C)]
+pub struct BlockSizes {
+    pub phys: u32,
+    pub log: u32,
+}
+
+#[repr(C)]
+pub struct HDGeometry {
+    pub heads: u32,
+    pub sectors: u32,
+    pub cylinders: u32,
+}
+
+#[repr(C)]
+pub struct BlockLimits {
+    pub request_alignment: u32,
+    pub max_pdiscard: i32,
+    pub pdiscard_alignment: u32,
+    pub max_pwrite_zeroes: i32,
+    pub pwrite_zeroes_alignment: u32,
+    pub opt_transfer: u32,
+    pub max_transfer: u32,
+    pub min_mem_alignment: size_t,
+    pub opt_mem_alignment: size_t,
+    pub max_iov: c_int,
+}
+
+#[repr(C)]
+pub struct BdrvChild {
+    pub bs: *mut BlockDriverState,
+    pub name: *mut c_char,
+    pub role: *const BdrvChildRole,
+    pub opaque: *mut c_void,
+
+    pub perm: u64,
+
+    pub shared_perm: u64,
+
+    pub next: QListEntry<BdrvChild>,
+    pub next_parent: QListEntry<BdrvChild>,
+}
+
+#[repr(C)]
+pub struct BdrvChildRole {
+    pub stay_at_node: bool,
+
+    pub inherit_options: Option<
+            extern fn(child_flags: *mut c_int, child_options: *mut QDict,
+                      parent_flags: c_int, parent_options: *mut QDict)
+        >,
+
+    pub change_media: Option<extern fn(child: *mut BdrvChild, load: bool)>,
+    pub resize: Option<extern fn(child: *mut BdrvChild)>,
+
+    pub get_name: Option<extern fn(child: *mut BdrvChild) -> *const c_char>,
+
+    /* Return value should probably be allocated in the C program */
+    pub get_parent_desc: Option<
+            extern fn(child: *mut BdrvChild) -> *mut c_char
+        >,
+
+    pub drained_begin: Option<extern fn(child: *mut BdrvChild)>,
+    pub drained_end: Option<extern fn(child: *mut BdrvChild)>,
+
+    pub attach: Option<extern fn(child: *mut BdrvChild)>,
+    pub detach: Option<extern fn(child: *mut BdrvChild)>,
+}
+
+#[repr(C)]
+pub struct BdrvAioNotifier {
+    pub attached_aio_context: Option<
+            extern fn(new_context: *mut AioContext, opaque: *mut c_void)
+        >,
+    pub detach_aio_context: Option<extern fn(opaque: *mut c_void)>,
+
+    pub opaque: *mut c_void,
+    pub deleted: bool,
+
+    pub list: QListEntry<BdrvAioNotifier>,
+}
+
+#[repr(C)]
+pub struct BlockDriverInfo {
+    pub cluster_size: c_int,
+    pub vm_state_offset: i64,
+    pub is_dirty: bool,
+    pub unallocated_blocks_are_zero: bool,
+    pub can_write_zeroes_with_unmap: bool,
+    pub needs_compressed_writes: bool,
+}
+
+#[repr(C)]
+pub struct ImageInfoSpecific {
+    pub kind: c_int, /* ImageInfoSpecificKind */
+    pub date: *mut c_void, /* type depends on kind */
+}
+
+#[repr(C)]
+pub struct QEMUIOVector {
+    pub iov: *mut iovec,
+    pub niov: c_int,
+    pub nalloc: c_int,
+    pub size: size_t,
+}
+
+#[repr(C)]
+pub struct iovec {
+    pub iov_base: *mut c_void,
+    pub iov_len: size_t,
+}
+
+#[repr(C)]
+pub struct QEMUSnapshotInfo {
+    pub id_str: [c_char; 128],
+    pub name: [c_char; 256],
+    pub vm_state_size: u64,
+    pub date_sec: u32,
+    pub date_nsec: u32,
+    pub vm_clock_nsec: u64,
+}
+
+#[repr(C)]
+pub struct NotifierWithReturnList {
+    pub notifiers: *mut NotifierWithReturn,
+}
+
+#[repr(C)]
+pub struct NotifierWithReturn {
+    pub notify: extern fn(notifier: *mut NotifierWithReturn, data: *mut c_void)
+                    -> c_int,
+    pub node: QListEntry<NotifierWithReturn>,
+}
+
+#[repr(C)]
+pub struct CoQueue {
+    pub entries: CoroutineQSimpleQHead,
+}
+
+#[repr(C)]
+pub struct CoroutineQSimpleQHead {
+    pub sqh_first: *mut Coroutine,
+    pub sqh_last: *mut *mut Coroutine,
+}
+
+#[repr(C)]
+pub struct QListHead<T> {
+    pub lh_first: *mut T,
+}
+
+#[repr(C)]
+pub struct QListEntry<T> {
+    pub le_next: *mut T,
+    pub le_prev: *mut *mut T,
+}
+
+#[repr(C)]
+pub struct QTailQEntry<T> {
+    pub tqe_next: *mut T,
+    pub tqe_prev: *mut *mut T,
+}
+
+type BlockDriverAmendStatusCB = extern fn(bs: *mut BlockDriverState,
+                                          offset: i64, total_work_size: i64,
+                                          opaque: *mut c_void);
+
+/* Opaque types */
+pub enum AioContext {}
+pub enum BdrvDirtyBitmap {}
+pub enum BdrvOpBlocker {}
+pub enum BdrvTrackedRequest {}
+pub enum BlockReopenQueue {}
+pub enum BlockJob {}
+pub enum Coroutine {}
+pub enum Error {}
+pub enum QDict {}
+pub enum QemuOpts {}
+pub enum QemuOptsList {}
+
+/* Used for deprecated function pointers */
+type DeprecatedFn = extern fn();
diff --git a/block/rust/src/interface/mod.rs b/block/rust/src/interface/mod.rs
new file mode 100644
index 0000000000..8afcbe36c5
--- /dev/null
+++ b/block/rust/src/interface/mod.rs
@@ -0,0 +1,1012 @@
+pub mod c_constants;
+pub mod c_functions;
+pub mod c_structs;
+
+
+use core::intrinsics::transmute;
+use core::marker::Sized;
+pub use core::ops::{Deref,DerefMut};
+use libc;
+use libc::{c_char,c_int,c_void,size_t,EINVAL,EIO,ENOSPC,ENOTSUP,EPERM};
+use self::c_functions::error_setg_internal;
+use std::{mem,ptr,slice};
+use std::cell::RefCell;
+use std::ffi::CString;
+use std::io;
+use std::io::Write;
+use std::marker::PhantomData;
+use std::rc::{Rc,Weak};
+
+
+pub type QDict = *mut c_structs::QDict;
+pub type CBDS = c_structs::BlockDriverState;
+
+
+pub const BDRV_SECTOR_SIZE: u64 = 512u64;
+pub const BDRV_SECTOR_SHIFT: i32 = 9;
+
+
+pub enum IOError {
+    GenericError,
+    NoSpaceLeft,
+    InvalidMetadata,
+    UnsupportedImageFeature,
+}
+
+impl IOError {
+    pub fn to_errno(&self) -> c_int
+    {
+        match *self {
+            IOError::GenericError => -EIO,
+            IOError::NoSpaceLeft => -ENOSPC,
+            IOError::InvalidMetadata => -EIO,
+            IOError::UnsupportedImageFeature => -ENOTSUP,
+        }
+    }
+}
+
+
+pub struct BDSOpaqueLink<T> {
+    pub opaque: Option<Rc<Box<BDSOpaque<T>>>>,
+}
+
+pub struct BDSOpaque<T> {
+    c_obj: *mut CBDS,
+    pub driver_obj: RefCell<T>,
+}
+
+
+/*
+ * Macros for extracting the block driver's opaque BDS from a &mut CBDS
+ *
+ * Note that we have to pass a CBDS to the block driver functions instead of
+ * the opaque BDS itself because a block driver is allowed to do recursive calls
+ * (and even if it does not do so actively, the qemu block layer may just do it
+ * anyway). The borrow checker will prevent us from borrowing the opaque BDS in
+ * recursive function invocations, so the functions will have to borrow it only
+ * when needed.
+ */
+#[macro_export]
+macro_rules! let_bds {
+    ($result:ident, $cbds:expr) => (
+        let _bds_opaque = get_bds_opaque_link::<Self>($cbds).unwrap();
+        let mut _driver_obj_ref = _bds_opaque.driver_obj.borrow();
+        let $result = _driver_obj_ref.deref();
+    );
+}
+
+#[macro_export]
+macro_rules! let_mut_bds {
+    ($result:ident, $cbds:expr) => (
+        let _bds_opaque = get_bds_opaque_link::<Self>($cbds).unwrap();
+        let mut _driver_obj_ref = _bds_opaque.driver_obj.borrow_mut();
+        let $result = _driver_obj_ref.deref_mut();
+    );
+}
+
+
+/* Allows you to prepend an error string to an error string on error */
+#[macro_export]
+macro_rules! try_prepend {
+    ($e:expr, $m:expr) => (match $e {
+        Ok(val) => val,
+        Err(err) => return Err(String::from($m) + ": " + err.as_str()),
+    });
+}
+
+
+/* try! that executes a qemu_vfree() on error */
+#[macro_export]
+macro_rules! try_vfree {
+    ($e:expr, $buffer:ident) => (match $e {
+            Ok(ok) => ok,
+            Err(err) => {
+                qemu_vfree($buffer);
+                return Err(err);
+            },
+        });
+}
+
+
+
+pub struct BDSBacklink<T> {
+    pub link: Weak<Box<BDSOpaque<T>>>,
+}
+
+pub struct BDSCommon<T> {
+    backlink: Option<BDSBacklink<T>>,
+}
+
+impl<T> BDSCommon<T> {
+    pub fn new() -> Self
+    {
+        Self {
+            backlink: None,
+        }
+    }
+
+    pub fn set_backlink(&mut self, backlink: BDSBacklink<T>)
+    {
+        self.backlink = Some(backlink);
+    }
+
+    pub fn get_cbds(&self) -> &mut CBDS
+    {
+        let backlink = self.backlink.as_ref().unwrap();
+        let bds_opaque_rc = backlink.link.upgrade();
+        let bds_opaque = Rc::as_ref(bds_opaque_rc.as_ref().unwrap());
+
+        let res = unsafe { &mut *bds_opaque.c_obj };
+        return res;
+    }
+
+    pub fn has_file(&self) -> bool
+    {
+        let cbds = self.get_cbds();
+        !cbds.file.is_null()
+    }
+
+    pub fn file(&self) -> BdrvChild
+    {
+        let cbds = self.get_cbds();
+        BdrvChild { c_ptr: cbds.file }
+    }
+
+    pub fn set_file(&mut self, file: Option<BdrvChild>)
+    {
+        let cbds = self.get_cbds();
+
+        match file {
+            None => cbds.file = ptr::null_mut(),
+            Some(ref child) => cbds.file = child.c_ptr,
+        };
+    }
+
+    pub fn has_backing(&self) -> bool
+    {
+        let cbds = self.get_cbds();
+        !cbds.backing.is_null()
+    }
+
+    pub fn backing(&self) -> BdrvChild
+    {
+        let cbds = self.get_cbds();
+        BdrvChild { c_ptr: cbds.backing }
+    }
+
+    pub fn set_backing(&mut self, backing: Option<BdrvChild>)
+    {
+        let cbds = self.get_cbds();
+
+        match backing {
+            None => cbds.file = ptr::null_mut(),
+            Some(ref child) => cbds.file = child.c_ptr,
+        };
+    }
+}
+
+
+pub trait BlockDriverState where Self: Sized {
+    fn new() -> Self;
+    fn common(&mut self) -> &mut BDSCommon<Self>;
+
+    fn set_backlink(&mut self, backlink: BDSBacklink<Self>)
+    {
+        self.common().set_backlink(backlink);
+    }
+}
+
+pub trait BlockDriverOpen: BlockDriverState {
+    fn bdrv_open(cbds: &mut CBDS, options: QDict, flags: u32)
+        -> Result<(), String>;
+}
+
+pub trait BlockDriverClose: BlockDriverState {
+    fn bdrv_close(cbds: &mut CBDS);
+}
+
+pub trait BlockDriverRead: BlockDriverState {
+    /* iov is ordered backwards so you can pop in order */
+    fn bdrv_co_preadv(cbds: &mut CBDS, offset: u64, bytes: u64,
+                      iov: Vec<&mut [u8]>, flags: u32)
+        -> Result<(), IOError>;
+}
+
+pub trait BlockDriverWrite: BlockDriverState {
+    /* iov is ordered backwards so you can pop in order */
+    fn bdrv_co_pwritev(cbds: &mut CBDS, offset: u64, bytes: u64,
+                       iov: Vec<&[u8]>, flags: u32)
+        -> Result<(), IOError>;
+}
+
+pub trait BlockDriverPerm: BlockDriverState {
+    fn bdrv_check_perm(cbds: &mut CBDS, perm: u64, shared: u64)
+        -> Result<(), String>;
+    fn bdrv_set_perm(cbds: &mut CBDS, perm: u64, shared: u64);
+    fn bdrv_abort_perm_update(cbds: &mut CBDS);
+}
+
+pub trait BlockDriverChildPerm: BlockDriverState {
+    fn bdrv_child_perm(cbds: &mut CBDS, c: Option<&mut BdrvChild>,
+                       role: &c_structs::BdrvChildRole,
+                       parent_perm: u64, parent_shared: u64)
+        -> (u64, u64); /* nperm, nshared */
+}
+
+pub trait BlockDriverInfo: BlockDriverState {
+    fn bdrv_get_info(cbds: &mut CBDS, bdi: &mut c_structs::BlockDriverInfo)
+        -> Result<(), String>;
+}
+
+
+pub struct BlockDriver<T> {
+    c_obj: c_structs::BlockDriver,
+
+    _phantom: PhantomData<T>,
+}
+
+
+pub fn get_bds_opaque_link<'a, T>(bds: *mut CBDS)
+    -> &'a mut BDSOpaqueLink<T>
+{
+    unsafe {
+        let r = transmute::<*mut c_void, *mut BDSOpaqueLink<T>>((*bds).opaque);
+        return &mut *r;
+    }
+}
+
+impl<T> BDSOpaqueLink<T> {
+    pub fn unwrap(&self) -> &BDSOpaque<T>
+    {
+        Rc::as_ref(self.opaque.as_ref().unwrap()).as_ref()
+    }
+}
+
+
+pub struct BdrvChild {
+    c_ptr: *mut c_structs::BdrvChild,
+}
+
+
+impl BdrvChild {
+    pub fn perm(&self) -> u64
+    {
+        unsafe {
+            (*self.c_ptr).perm
+        }
+    }
+
+    pub fn shared(&self) -> u64
+    {
+        unsafe {
+            (*self.c_ptr).shared_perm
+        }
+    }
+
+    pub fn borrow(&self) -> Self
+    {
+        BdrvChild {
+            c_ptr: self.c_ptr
+        }
+    }
+
+    pub fn bdrv_pread(&self, offset: u64, buf: &mut [u8])
+        -> Result<(), String>
+    {
+        let ret = unsafe {
+             c_functions::bdrv_pread(self.c_ptr, offset as i64,
+                                     buf.as_mut_ptr() as *mut c_void,
+                                     buf.len() as c_int)
+        };
+
+        if ret < 0 {
+            Err(strerror(-ret))
+        } else {
+            Ok(())
+        }
+    }
+
+    pub fn bdrv_pwrite(&self, offset: u64, buf: &[u8])
+        -> Result<(), String>
+    {
+        let ret = unsafe {
+            c_functions::bdrv_pwrite(self.c_ptr, offset as i64,
+                                     buf.as_ptr() as *const c_void,
+                                     buf.len() as c_int)
+        };
+
+        if ret < 0 {
+            Err(strerror(-ret))
+        } else {
+            Ok(())
+        }
+    }
+}
+
+
+impl<T: BlockDriverOpen> BlockDriver<T> {
+    extern fn invoke_open(bds: *mut CBDS, options: *mut c_structs::QDict,
+                          flags: c_int, errp: *mut *mut c_structs::Error)
+        -> c_int
+    {
+        let bds_opaque_link = get_bds_opaque_link::<T>(bds);
+
+        assert!(bds_opaque_link.opaque.is_none());
+
+        let weak_bds_opaque = {
+            let rc_bds_opaque = Rc::new(Box::new(BDSOpaque::<T> {
+                    c_obj: bds,
+                    driver_obj: RefCell::new(T::new()),
+                }));
+
+            let weak_link = Rc::downgrade(&rc_bds_opaque);
+            bds_opaque_link.opaque = Some(rc_bds_opaque);
+
+            weak_link
+        };
+
+        {
+            let bds_opaque = bds_opaque_link.unwrap();
+            let mut driver_obj_ref = bds_opaque.driver_obj.borrow_mut();
+            let backlink = BDSBacklink::<T> {
+                link: weak_bds_opaque
+            };
+
+            driver_obj_ref.deref_mut().set_backlink(backlink);
+        }
+
+        let cbds = unsafe { &mut *bds };
+        let res = T::bdrv_open(cbds, options, flags as u32);
+
+        match res {
+            Ok(_) => 0,
+            Err(msg) => {
+                bds_opaque_link.opaque = None;
+                error_set_message(errp, msg);
+
+                -EINVAL
+            }
+        }
+    }
+}
+
+
+impl<T: BlockDriverClose> BlockDriver<T> {
+    extern fn invoke_close(bds: *mut CBDS)
+    {
+        let cbds = unsafe { &mut *bds };
+        T::bdrv_close(cbds);
+
+        get_bds_opaque_link::<T>(bds).opaque = None;
+    }
+}
+
+
+impl<T: BlockDriverRead> BlockDriver<T> {
+    extern fn invoke_co_preadv(bds: *mut CBDS, offset: u64, bytes: u64,
+                               qiov: *mut c_structs::QEMUIOVector, flags: c_int)
+        -> c_int
+    {
+        let cbds = unsafe { &mut *bds };
+        let qiov_deref = unsafe { &*qiov };
+
+        let qiov_vecs = unsafe {
+                slice::from_raw_parts(qiov_deref.iov, qiov_deref.niov as usize)
+            };
+
+        let mut iov = Vec::new();
+        /* Push backwards so the driver can pop in the right order */
+        for vec in qiov_vecs.iter().rev() {
+            iov.push(iov_as_mut_byte_slice(vec));
+        }
+
+        let res = T::bdrv_co_preadv(cbds, offset, bytes, iov, flags as u32);
+        match res {
+            Ok(_) => 0,
+            Err(err) => err.to_errno(),
+        }
+    }
+}
+
+
+impl<T: BlockDriverWrite> BlockDriver<T> {
+    extern fn invoke_co_pwritev(bds: *mut CBDS, offset: u64, bytes: u64,
+                                qiov: *mut c_structs::QEMUIOVector, flags: c_int)
+        -> c_int
+    {
+        let cbds = unsafe { &mut *bds };
+        let qiov_deref = unsafe { &*qiov };
+
+        let qiov_vecs = unsafe {
+                slice::from_raw_parts(qiov_deref.iov, qiov_deref.niov as usize)
+            };
+
+        let mut iov = Vec::new();
+        /* Push backwards so the driver can pop in the right order */
+        for vec in qiov_vecs.iter().rev() {
+            iov.push(iov_as_byte_slice(vec));
+        }
+
+        let res = T::bdrv_co_pwritev(cbds, offset, bytes, iov, flags as u32);
+        match res {
+            Ok(_) => 0,
+            Err(err) => err.to_errno(),
+        }
+    }
+}
+
+
+impl<T: BlockDriverPerm> BlockDriver<T> {
+    extern fn invoke_check_perm(bds: *mut CBDS, perm: u64, shared: u64,
+                                errp: *mut *mut c_structs::Error)
+        -> c_int
+    {
+        let cbds = unsafe { &mut *bds };
+        let res = T::bdrv_check_perm(cbds, perm, shared);
+        match res {
+            Ok(_) => 0,
+            Err(msg) => {
+                error_set_message(errp, msg);
+                -EPERM
+            }
+        }
+    }
+
+    extern fn invoke_set_perm(bds: *mut CBDS, perm: u64, shared: u64)
+    {
+        let cbds = unsafe { &mut *bds };
+        T::bdrv_set_perm(cbds, perm, shared);
+    }
+
+    extern fn invoke_abort_perm_update(bds: *mut CBDS)
+    {
+        let cbds = unsafe { &mut *bds };
+        T::bdrv_abort_perm_update(cbds);
+    }
+}
+
+
+impl<T: BlockDriverChildPerm> BlockDriver<T> {
+    extern fn invoke_child_perm(bds: *mut CBDS, c: *mut c_structs::BdrvChild,
+                                role: *const c_structs::BdrvChildRole,
+                                parent_perm: u64, parent_shared: u64,
+                                nperm: *mut u64, nshared: *mut u64)
+    {
+        let cbds = unsafe { &mut *bds };
+        let role_deref = unsafe { &*role };
+
+        let res = if c.is_null() {
+                T::bdrv_child_perm(cbds, None, role_deref,
+                                   parent_perm, parent_shared)
+            } else {
+                let mut child = BdrvChild { c_ptr: c };
+                T::bdrv_child_perm(cbds, Some(&mut child), role_deref,
+                                   parent_perm, parent_shared)
+            };
+
+        unsafe {
+            *nperm = res.0;
+            *nshared = res.1;
+        }
+    }
+}
+
+
+impl<T: BlockDriverInfo> BlockDriver<T> {
+    extern fn invoke_get_info(bds: *mut CBDS,
+                              bdi: *mut c_structs::BlockDriverInfo)
+        -> c_int
+    {
+        let cbds = unsafe { &mut *bds };
+        let bdi_deref = unsafe { &mut *bdi };
+
+        let res = T::bdrv_get_info(cbds, bdi_deref);
+        match res {
+            Ok(_) => 0,
+            Err(msg) => {
+                writeln!(&mut io::stderr(), "{}", msg).unwrap();
+                -EIO
+            }
+        }
+    }
+}
+
+
+impl<T: BlockDriverState> BlockDriver<T> {
+    pub fn new(name: String) -> BlockDriver<T>
+    {
+        let instance_size = mem::size_of::<BDSOpaque<T>>();
+        let /*mut*/ bdrv = BlockDriver::<T> {
+            c_obj: c_structs::BlockDriver {
+                format_name: CString::new(name).unwrap().into_raw(),
+                instance_size: instance_size as c_int,
+
+                is_filter: false,
+
+                bdrv_recurse_is_first_non_filter: None,
+
+                bdrv_probe: None,
+                bdrv_probe_device: None,
+
+                bdrv_parse_filename: None,
+                bdrv_needs_filename: false,
+
+                supports_backing: false,
+
+                bdrv_reopen_prepare: None,
+                bdrv_reopen_commit: None,
+                bdrv_reopen_abort: None,
+                bdrv_join_options: None,
+
+                bdrv_open: None,
+                bdrv_file_open: None,
+                bdrv_close: None,
+                bdrv_create: None,
+                bdrv_set_key: None,
+                bdrv_make_empty: None,
+
+                bdrv_refresh_filename: None,
+
+                bdrv_aio_readv: None,
+                bdrv_aio_writev: None,
+                bdrv_aio_flush: None,
+                bdrv_aio_pdiscard: None,
+
+                bdrv_co_readv: None,
+                bdrv_co_preadv: None,
+                bdrv_co_writev: None,
+                bdrv_co_writev_flags: None,
+                bdrv_co_pwritev: None,
+
+                bdrv_co_pwrite_zeroes: None,
+                bdrv_co_pdiscard: None,
+                bdrv_co_get_block_status: None,
+
+                bdrv_invalidate_cache: None,
+                bdrv_inactivate: None,
+
+                bdrv_co_flush: None,
+
+                bdrv_co_flush_to_disk: None,
+
+                bdrv_co_flush_to_os: None,
+
+                protocol_name: ptr::null(),
+                bdrv_truncate: None,
+
+                bdrv_getlength: None,
+                has_variable_length: false,
+                bdrv_get_allocated_file_size: None,
+
+                bdrv_co_pwritev_compressed: None,
+
+                bdrv_snapshot_create: None,
+                bdrv_snapshot_goto: None,
+                bdrv_snapshot_delete: None,
+                bdrv_snapshot_list: None,
+                bdrv_snapshot_load_tmp: None,
+
+                bdrv_get_info: None,
+                bdrv_get_specific_info: None,
+
+                bdrv_save_vmstate: None,
+                bdrv_load_vmstate: None,
+
+                bdrv_change_backing_file: None,
+
+                bdrv_is_inserted: None,
+                bdrv_media_changed: None,
+                bdrv_eject: None,
+                bdrv_lock_medium: None,
+
+                bdrv_aio_ioctl: None,
+                bdrv_co_ioctl: None,
+
+                create_opts: ptr::null_mut(),
+
+                bdrv_check: None,
+
+                bdrv_amend_options: None,
+
+                bdrv_debug_event: None,
+                bdrv_debug_breakpoint: None,
+                bdrv_debug_remove_breakpoint: None,
+                bdrv_debug_resume: None,
+                bdrv_debug_is_suspended: None,
+
+                bdrv_refresh_limits: None,
+
+                bdrv_has_zero_init: None,
+
+                bdrv_detach_aio_context: None,
+
+                bdrv_attach_aio_context: None,
+
+                bdrv_io_plug: None,
+                bdrv_io_unplug: None,
+
+                bdrv_probe_blocksizes: None,
+                bdrv_probe_geometry: None,
+
+                bdrv_drain: None,
+
+                bdrv_add_child: None,
+                bdrv_del_child: None,
+
+                bdrv_check_perm: None,
+                bdrv_set_perm: None,
+                bdrv_abort_perm_update: None,
+
+                bdrv_child_perm: None,
+
+                list: c_structs::QListEntry::<c_structs::BlockDriver> {
+                    le_next: ptr::null_mut(),
+                    le_prev: ptr::null_mut(),
+                },
+            },
+
+            _phantom: PhantomData,
+        };
+
+        /* TODO: Call provides_* automatically
+         * (We cannot do this currently because there is no way to either
+         *  (1) Check whether T implements a trait in an if clause
+         *  (2) Implement provides_* if T does not implement a trait
+         *  (The latter of which is something that Rust is expected to implement
+         *   at some point in the future.)) */
+
+        return bdrv;
+    }
+
+    pub fn supports_backing(&mut self)
+    {
+        self.c_obj.supports_backing = true;
+    }
+
+    pub fn has_variable_length(&mut self)
+    {
+        self.c_obj.has_variable_length = true;
+    }
+}
+
+
+impl<T: BlockDriverOpen> BlockDriver<T> {
+    pub fn provides_open(&mut self)
+    {
+        self.c_obj.bdrv_open = Some(BlockDriver::<T>::invoke_open);
+    }
+}
+
+
+impl<T: BlockDriverClose> BlockDriver<T> {
+    pub fn provides_close(&mut self)
+    {
+        self.c_obj.bdrv_close = Some(BlockDriver::<T>::invoke_close);
+    }
+}
+
+
+impl<T: BlockDriverRead> BlockDriver<T> {
+    pub fn provides_read(&mut self)
+    {
+        self.c_obj.bdrv_co_preadv = Some(BlockDriver::<T>::invoke_co_preadv);
+    }
+}
+
+
+impl<T: BlockDriverWrite> BlockDriver<T> {
+    pub fn provides_write(&mut self)
+    {
+        self.c_obj.bdrv_co_pwritev = Some(BlockDriver::<T>::invoke_co_pwritev);
+    }
+}
+
+
+impl<T: BlockDriverPerm> BlockDriver<T> {
+    pub fn provides_perm(&mut self)
+    {
+        self.c_obj.bdrv_check_perm = Some(BlockDriver::<T>::invoke_check_perm);
+        self.c_obj.bdrv_set_perm = Some(BlockDriver::<T>::invoke_set_perm);
+        self.c_obj.bdrv_abort_perm_update =
+            Some(BlockDriver::<T>::invoke_abort_perm_update);
+    }
+}
+
+
+impl<T: BlockDriverChildPerm> BlockDriver<T> {
+    pub fn provides_child_perm(&mut self)
+    {
+        self.c_obj.bdrv_child_perm = Some(BlockDriver::<T>::invoke_child_perm);
+    }
+}
+
+
+impl<T: BlockDriverInfo> BlockDriver<T> {
+    pub fn provides_info(&mut self)
+    {
+        self.c_obj.bdrv_get_info = Some(BlockDriver::<T>::invoke_get_info);
+    }
+}
+
+
+pub fn bdrv_register<T>(bdrv: BlockDriver<T>)
+{
+    /* Box so it doesn't go away */
+    let bdrv_box = Box::new(bdrv);
+
+    unsafe {
+        c_functions::bdrv_register(&mut (*Box::into_raw(bdrv_box)).c_obj);
+    }
+}
+
+
+pub fn bdrv_open_child(filename: Option<String>, options: Option<QDict>,
+                       bdref_key: String, parent: &mut CBDS,
+                       child_role: &c_structs::BdrvChildRole, allow_none: bool)
+    -> Result<BdrvChild, String>
+{
+    let c_filename = match filename {
+        None => ptr::null(),
+        Some(x) => CString::new(x).unwrap().into_raw(),
+    };
+
+    let c_options = match options {
+        None => ptr::null_mut(),
+        Some(x) => x,
+    };
+
+    let c_bdref_key = CString::new(bdref_key).unwrap().into_raw();
+    let c_parent = parent as *mut CBDS;
+    let c_child_role = child_role as *const c_structs::BdrvChildRole;
+
+    let c_allow_none = allow_none;
+
+    unsafe {
+        let mut local_err: *mut c_structs::Error = ptr::null_mut();
+        let c_errp = &mut local_err as *mut *mut c_structs::Error;
+
+        let child = c_functions::bdrv_open_child(c_filename, c_options,
+                                                 c_bdref_key, c_parent,
+                                                 c_child_role, c_allow_none,
+                                                 c_errp);
+
+        if child.is_null() {
+            Err(error_get_string(local_err))
+        } else {
+            Ok(BdrvChild { c_ptr: child })
+        }
+    }
+}
+
+
+pub enum StandardChildRole {
+    File,
+    Format,
+    Backing,
+}
+
+pub fn bdrv_get_standard_child_role(role: StandardChildRole)
+    -> &'static c_structs::BdrvChildRole
+{
+    unsafe {
+        match role {
+            StandardChildRole::File => &c_constants::child_file,
+            StandardChildRole::Format => &c_constants::child_format,
+            StandardChildRole::Backing => &c_constants::child_backing,
+        }
+    }
+}
+
+
+const BLK_PERM_CONSISTENT_READ  : u64 = 0x01u64;
+const BLK_PERM_WRITE            : u64 = 0x02u64;
+const BLK_PERM_WRITE_UNCHANGED  : u64 = 0x04u64;
+const BLK_PERM_RESIZE           : u64 = 0x08u64;
+const BLK_PERM_GRAPH_MOD        : u64 = 0x10u64;
+
+const BLK_PERM_ALL              : u64 = 0x1fu64;
+
+
+pub fn bdrv_filter_default_perms(c: Option<&mut BdrvChild>,
+                                 _: &c_structs::BdrvChildRole,
+                                 perm: u64, shared: u64)
+    -> (u64, u64)
+{
+    let default_perm_passthrough = BLK_PERM_CONSISTENT_READ
+                                   | BLK_PERM_WRITE
+                                   | BLK_PERM_WRITE_UNCHANGED
+                                   | BLK_PERM_RESIZE;
+    let default_perm_unchanged = BLK_PERM_ALL & !default_perm_passthrough;
+
+    if c.is_none() {
+        (perm & default_perm_passthrough,
+         (shared & default_perm_passthrough) | default_perm_unchanged)
+    } else {
+        let child = c.unwrap();
+
+        ((perm & default_perm_passthrough) |
+         (child.perm() & default_perm_unchanged),
+
+         (shared & default_perm_passthrough) |
+         (child.shared() & default_perm_unchanged))
+    }
+}
+
+
+pub fn bdrv_format_default_perms(c: Option<&mut BdrvChild>,
+                                 role: &c_structs::BdrvChildRole,
+                                 perm: u64, shared: u64, is_read_only: bool)
+    -> (u64, u64)
+{
+    let backing_role =
+        bdrv_get_standard_child_role(StandardChildRole::Backing);
+
+    let mut p = perm;
+    let mut s = shared;
+
+    if role as *const c_structs::BdrvChildRole
+        == backing_role as *const c_structs::BdrvChildRole
+    {
+        p &= BLK_PERM_CONSISTENT_READ;
+
+        if (s & BLK_PERM_WRITE) != 0 {
+            s = BLK_PERM_WRITE | BLK_PERM_RESIZE;
+        } else {
+            s = 0;
+        }
+
+        s |= BLK_PERM_CONSISTENT_READ | BLK_PERM_GRAPH_MOD |
+             BLK_PERM_WRITE_UNCHANGED;
+    } else {
+        let filter = bdrv_filter_default_perms(c, role, p, s);
+        p = filter.0;
+        s = filter.1;
+
+        if !is_read_only {
+            p |= BLK_PERM_WRITE | BLK_PERM_RESIZE;
+        }
+
+        p |= BLK_PERM_CONSISTENT_READ;
+        s &= !(BLK_PERM_WRITE | BLK_PERM_RESIZE);
+    }
+
+    (p, s)
+}
+
+
+pub fn bdrv_is_read_only(bds: *mut CBDS) -> bool
+{
+    unsafe {
+        c_functions::bdrv_is_read_only(bds)
+    }
+}
+
+
+fn error_get_string(err: *mut c_structs::Error) -> String
+{
+    unsafe {
+        let msg = c_functions::error_get_pretty(err);
+        let dmsg = c_functions::g_strdup(msg);
+
+        CString::from_raw(dmsg).into_string().unwrap()
+    }
+}
+
+
+fn error_set_message(errp: *mut *mut c_structs::Error, msg: String)
+{
+    let file = CString::new("<FILE>").unwrap();
+    let func = CString::new("<FUNC>").unwrap();
+    let format = CString::new("%.*s").unwrap();
+
+    unsafe {
+        error_setg_internal(errp, file.as_ptr(), -1, func.as_ptr(),
+                            format.as_ptr(),
+                            msg.len() as c_int,
+                            msg.as_ptr() as *const c_char);
+    }
+}
+
+
+fn strerror(errno: c_int) -> String
+{
+    unsafe {
+        let msg = libc::strerror(errno);
+        let dmsg = c_functions::g_strdup(msg);
+
+        CString::from_raw(dmsg).into_string().unwrap()
+    }
+}
+
+
+/* Attention: The content of the slice is undefined!
+ * (Also: Remember that the slice will not be automatically freed; you have to
+ *  manually call qemu_vfree() for that.) */
+pub fn qemu_blockalign(bds: *mut CBDS, size: usize) -> &'static mut [u8]
+{
+    unsafe {
+        let p = c_functions::qemu_blockalign(bds, size as size_t);
+        slice::from_raw_parts_mut(p as *mut u8, size)
+    }
+}
+
+
+pub fn qemu_vfree(mem: &mut [u8])
+{
+    unsafe {
+        c_functions::qemu_vfree(mem.as_mut_ptr() as *mut c_void);
+    }
+}
+
+
+pub fn object_as_mut_byte_slice<T>(obj: &mut T) -> &mut [u8]
+{
+    unsafe {
+        let p = obj as *mut T;
+        slice::from_raw_parts_mut(p as *mut u8, mem::size_of::<T>())
+    }
+}
+
+
+pub fn object_as_byte_slice<T>(obj: &T) -> &[u8]
+{
+    unsafe {
+        let p = obj as *const T;
+        slice::from_raw_parts(p as *const u8, mem::size_of::<T>())
+    }
+}
+
+
+pub fn vec_as_mut_byte_slice<T>(obj: &mut Vec<T>) -> &mut [u8]
+{
+    unsafe {
+        let p = &mut obj[0] as *mut T;
+        slice::from_raw_parts_mut(p as *mut u8, obj.len() * mem::size_of::<T>())
+    }
+}
+
+
+pub fn slice_as_mut_byte_slice<T>(obj: &mut [T]) -> &mut [u8]
+{
+    unsafe {
+        slice::from_raw_parts_mut(obj.as_mut_ptr() as *mut u8,
+                                  obj.len() * mem::size_of::<T>())
+    }
+}
+
+
+pub fn iov_as_mut_byte_slice(obj: &c_structs::iovec) -> &mut [u8]
+{
+    unsafe {
+        slice::from_raw_parts_mut(obj.iov_base as *mut u8, obj.iov_len)
+    }
+}
+
+
+pub fn iov_as_byte_slice(obj: &c_structs::iovec) -> &[u8]
+{
+    unsafe {
+        slice::from_raw_parts(obj.iov_base as *const u8, obj.iov_len)
+    }
+}
+
+
+pub fn zero_byte_slice(slice: &mut [u8])
+{
+    unsafe {
+        libc::memset(slice.as_mut_ptr() as *mut c_void, 0, slice.len());
+    }
+}
+
+
+pub fn copy_into_byte_slice(dest: &mut [u8], offset: usize, src: &[u8])
+{
+    assert!(dest.len() >= offset + src.len());
+    unsafe {
+        let ptr = dest.as_mut_ptr();
+        ptr.offset(offset as isize);
+
+        libc::memcpy(ptr as *mut c_void, src.as_ptr() as *const c_void,
+                     src.len());
+    }
+}
diff --git a/block/rust/src/lib.rs b/block/rust/src/lib.rs
new file mode 100644
index 0000000000..2aa2f365ba
--- /dev/null
+++ b/block/rust/src/lib.rs
@@ -0,0 +1,9 @@
+/* Rust cannot not complain about unused public interfaces, which is rather
+ * annoying */
+#![allow(dead_code)]
+
+extern crate core;
+extern crate libc;
+
+#[macro_use]
+mod interface;
-- 
2.12.2

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Qemu-devel] [RFC for-3.0 3/4] block/qcow2-rust: Add partial write support
  2017-04-18 15:58 [Qemu-devel] [RFC for-3.0 0/4] block: Add qcow2-rust block driver Max Reitz
  2017-04-18 15:58 ` [Qemu-devel] [RFC for-3.0 2/4] block/qcow2-rust: " Max Reitz
  2017-04-18 15:58 ` [Qemu-devel] [RFC for-3.0 1/4] block: Add Rust interface Max Reitz
@ 2017-04-18 15:58 ` Max Reitz
  2017-04-18 15:58 ` [Qemu-devel] [RFC for-3.0 4/4] block/qcow2-rust: Register block driver Max Reitz
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 13+ messages in thread
From: Max Reitz @ 2017-04-18 15:58 UTC (permalink / raw)
  To: qemu-block; +Cc: qemu-devel, Max Reitz, Kevin Wolf, John Snow

Some people may want to lead you to believe write support may destroy
your data. These entirely BASELESS and FALSE accusations are COMPLETE
and UTTER LIES because you actually cannot use this driver yet at all,
as it does not register itself as a qemu block driver.

This is a very modest approach, in contrast to some other LEGACY drivers
that do just assume they are worthy of this honor (which of course is
utterly wrong, they are INSECURE and NOT SUITED FOR THE JOB) and just
want to bury the gem the QEMU project is under a pile of not-greatness.
VERY SAD!

Also, we do not allocate any new clusters because we do not TAKE from
HONEST HARD-WORKING other programs that may want to use disk space, but
we just make do with what we have and that is enough!

Signed-off-by: Max Reitz <mreitz@redhat.com>
---
 block/rust/src/qcow2/allocation.rs | 162 +++++++++++++++++++++++++++++++++++++
 block/rust/src/qcow2/io.rs         | 117 +++++++++++++++++++++++++++
 block/rust/src/qcow2/mod.rs        |  17 +++-
 block/rust/src/qcow2/refcount.rs   |  96 ++++++++++++++++++++++
 4 files changed, 390 insertions(+), 2 deletions(-)
 create mode 100644 block/rust/src/qcow2/allocation.rs
 create mode 100644 block/rust/src/qcow2/refcount.rs

diff --git a/block/rust/src/qcow2/allocation.rs b/block/rust/src/qcow2/allocation.rs
new file mode 100644
index 0000000000..9ed975d853
--- /dev/null
+++ b/block/rust/src/qcow2/allocation.rs
@@ -0,0 +1,162 @@
+use interface::*;
+use qcow2::*;
+use qcow2::io::*;
+
+
+impl QCow2BDS {
+    fn allocate_cluster(cbds: &mut CBDS) -> Result<u64, IOError>
+    {
+        let (mut offset, cluster_size) = {
+            let_bds!(this, cbds);
+            (this.first_free_cluster_offset, this.cluster_size)
+        };
+
+        /* TODO: Optimize by scanning whole refblocks */
+        while try!(Self::get_refcount(cbds, offset)) > 0 {
+            offset += cluster_size as u64;
+        }
+
+        try!(Self::change_refcount(cbds, offset, 1));
+
+        {
+            let_mut_bds!(this, cbds);
+            this.first_free_cluster_offset = offset + (cluster_size as u64);
+        }
+
+        Ok(offset)
+    }
+
+
+    pub fn allocate_l2(cbds: &mut CBDS, mut hoi: HostOffsetInfo)
+        -> Result<HostOffsetInfo, IOError>
+    {
+        let offset = try!(Self::allocate_cluster(cbds));
+
+        /* Zero the new table */
+        {
+            let zero_data = qemu_blockalign(cbds, hoi.cluster_size as usize);
+            zero_byte_slice(zero_data);
+
+            let res = hoi.file.bdrv_pwrite(offset, zero_data);
+            qemu_vfree(zero_data);
+
+            if let Err(_) = res {
+                return Err(IOError::GenericError);
+            }
+        }
+
+        hoi.l1_entry = L1Entry::Allocated(offset, true);
+        try!(Self::update_l1_entry(cbds, &hoi));
+
+        hoi.l2_entry = Some(L2Entry::Unallocated);
+
+        Ok(hoi)
+    }
+
+
+    pub fn allocate_data_cluster(cbds: &mut CBDS, mut hoi: HostOffsetInfo)
+        -> Result<HostOffsetInfo, IOError>
+    {
+        let offset = try!(Self::allocate_cluster(cbds));
+
+        hoi.l2_entry = Some(L2Entry::Normal(offset, true));
+        hoi = try!(Self::update_l2_entry(cbds, hoi));
+
+        Ok(hoi)
+    }
+
+
+    pub fn free_cluster(cbds: &mut CBDS, l2e: L2Entry) -> Result<(), IOError>
+    {
+        match l2e {
+            L2Entry::Unallocated    => Ok(()),
+            L2Entry::Zero(None, _)  => Ok(()),
+
+            L2Entry::Normal(offset, _)
+            | L2Entry::Zero(Some(offset), _)
+            | L2Entry::Compressed(offset, _) => {
+                {
+                    let_mut_bds!(this, cbds);
+                    if offset < this.first_free_cluster_offset {
+                        this.first_free_cluster_offset = offset;
+                    }
+                }
+
+                Self::change_refcount(cbds, offset, -1)
+            },
+        }
+    }
+
+
+    pub fn update_l1_entry(cbds: &mut CBDS, hoi: &HostOffsetInfo)
+        -> Result<(), IOError>
+    {
+        let (l1_offset, l1_size) = {
+            let_bds!(this, cbds);
+            (this.l1_offset, this.l1_table.len())
+        };
+
+        assert!((hoi.l1_index as usize) < l1_size);
+        let entry_offset = l1_offset + (hoi.l1_index * 8) as u64;
+        let l1_entry_cpu = hoi.l1_entry.to_bits();
+        let l1_entry = u64::to_be(l1_entry_cpu);
+
+        if let Err(_) = hoi.file.bdrv_pwrite(entry_offset,
+                                             object_as_byte_slice(&l1_entry))
+        {
+            return Err(IOError::GenericError);
+        }
+
+        let_mut_bds!(this, cbds);
+        this.l1_table[hoi.l1_index as usize] = l1_entry_cpu;
+
+        Ok(())
+    }
+
+
+    /* hoi.l2_entry must be Some(_) */
+    pub fn update_l2_entry(cbds: &mut CBDS, mut hoi: HostOffsetInfo)
+        -> Result<HostOffsetInfo, IOError>
+    {
+        let (l2_offset, copied) = match hoi.l1_entry {
+            L1Entry::Unallocated => panic!("L2 table must be allocated"),
+            L1Entry::Allocated(o, c) => (o, c),
+        };
+
+        let l2_entry = u64::to_be(hoi.l2_entry.as_ref().unwrap()
+                                              .to_bits(hoi.compressed_shift));
+
+        if copied {
+            let entry_offset = l2_offset + (hoi.l2_index * 8) as u64;
+            if let Err(_) = hoi.file.bdrv_pwrite(entry_offset,
+                                                 object_as_byte_slice(&l2_entry))
+            {
+                return Err(IOError::GenericError);
+            }
+        } else {
+            let table_data = qemu_blockalign(cbds, hoi.cluster_size as usize);
+
+            if let Err(_) = hoi.file.bdrv_pread(l2_offset, table_data) {
+                qemu_vfree(table_data);
+                return Err(IOError::GenericError);
+            }
+
+            copy_into_byte_slice(table_data, (hoi.l2_index * 8) as usize,
+                                 object_as_byte_slice(&l2_entry));
+
+            let new_offset = try_vfree!(Self::allocate_cluster(cbds),
+                                        table_data);
+            let res = hoi.file.bdrv_pwrite(new_offset, table_data);
+            qemu_vfree(table_data);
+
+            if let Err(_) = res {
+                return Err(IOError::GenericError);
+            }
+
+            hoi.l1_entry = L1Entry::Allocated(new_offset, true);
+            try!(Self::update_l1_entry(cbds, &hoi));
+        }
+
+        Ok(hoi)
+    }
+}
diff --git a/block/rust/src/qcow2/io.rs b/block/rust/src/qcow2/io.rs
index 069cc78303..36556282de 100644
--- a/block/rust/src/qcow2/io.rs
+++ b/block/rust/src/qcow2/io.rs
@@ -319,4 +319,121 @@ impl QCow2BDS {
         let hoi = try!(Self::find_host_offset(cbds, offset));
         Self::do_read_cluster(cbds, &hoi, dest, flags)
     }
+
+
+    /* If necessary. copies a cluster somewhere else (freeing the original
+     * allocation), overlaying the data with the given slice (if given). */
+    fn copy_and_overlay_cluster(cbds: &mut CBDS, mut hoi: HostOffsetInfo,
+                                overlay_opt: Option<&[u8]>, flags: u32)
+        -> Result<(), IOError>
+    {
+        let free_original: L2Entry;
+
+        let mut cluster_data = qemu_blockalign(cbds, hoi.cluster_size as usize);
+        try_vfree!(Self::do_read_cluster(cbds, &hoi, cluster_data, 0),
+                   cluster_data);
+
+        match hoi.l2_entry {
+            None => panic!("L2 entry expected"),
+
+            Some(L2Entry::Zero(Some(offset), true)) => {
+                /* We are going to use this cluster, so do not free it */
+                free_original = L2Entry::Unallocated;
+                hoi.l2_entry = Some(L2Entry::Normal(offset, true));
+                hoi = try_vfree!(Self::update_l2_entry(cbds, hoi),
+                                 cluster_data);
+            },
+
+            Some(unwrapped_entry) => {
+                free_original = unwrapped_entry;
+                hoi.l2_entry = Some(L2Entry::Unallocated);
+
+                hoi = try_vfree!(Self::allocate_data_cluster(cbds, hoi),
+                                 cluster_data);
+            }
+        }
+
+        try_vfree!(Self::free_cluster(cbds, free_original),
+                   cluster_data);
+
+        if let Some(overlay) = overlay_opt {
+            copy_into_byte_slice(cluster_data, hoi.offset_in_cluster as usize,
+                                 overlay);
+        }
+
+        /* TODO: Maybe on failure we should try pointing back to the original
+         *       cluster? */
+        hoi.offset_in_cluster = 0;
+        try_vfree!(Self::do_write_cluster(cbds, hoi, cluster_data, flags),
+                   cluster_data);
+
+        qemu_vfree(cluster_data);
+
+        Ok(())
+    }
+
+
+    fn do_write_cluster(cbds: &mut CBDS, mut hoi: HostOffsetInfo, src: &[u8],
+                        flags: u32)
+        -> Result<(), IOError>
+    {
+        /* Try to set COPIED flag */
+        match hoi.l2_entry {
+            Some(L2Entry::Normal(offset, false)) => {
+                if try!(Self::get_refcount(cbds, offset)) == 1 {
+                    hoi.l2_entry = Some(L2Entry::Normal(offset, true));
+                    /* We are going to write directly into this cluster without
+                     * updating the L2 table, so do it now */
+                    hoi = try!(Self::update_l2_entry(cbds, hoi));
+                }
+            },
+
+            Some(L2Entry::Zero(Some(offset), false)) => {
+                if try!(Self::get_refcount(cbds, offset)) == 1 {
+                    hoi.l2_entry = Some(L2Entry::Zero(Some(offset), true));
+                    /* No need to update the L2 table entry now: We will call
+                     * copy_and_overlay_cluster() and that will do the update */
+                }
+            },
+
+            _ => (),
+        }
+
+        match hoi.l2_entry {
+            None => {
+                hoi = try!(Self::allocate_l2(cbds, hoi));
+                Self::do_write_cluster(cbds, hoi, src, flags)
+            },
+
+            Some(L2Entry::Normal(offset, true)) => {
+                let full_offset = offset + (hoi.offset_in_cluster as u64);
+                if let Err(_) = hoi.file.bdrv_pwrite(full_offset, src) {
+                    Err(IOError::GenericError)
+                } else {
+                    Ok(())
+                }
+            },
+
+            _ => {
+                Self::copy_and_overlay_cluster(cbds, hoi, Some(src), flags)
+            },
+        }
+    }
+
+
+    pub fn write_cluster(cbds: &mut CBDS, offset: u64, bytes: u32,
+                         full_src_mnm: &mut MNMIOVSlice, flags: u32)
+        -> Result<(), IOError>
+    {
+        let src = match *full_src_mnm {
+            MNMIOVSlice::Mut(ref mut full_src) =>
+                full_src.split_at(bytes as usize).0,
+
+            MNMIOVSlice::Const(ref mut full_src) =>
+                full_src.split_at(bytes as usize).0,
+        };
+
+        let hoi = try!(Self::find_host_offset(cbds, offset));
+        Self::do_write_cluster(cbds, hoi, src, flags)
+    }
 }
diff --git a/block/rust/src/qcow2/mod.rs b/block/rust/src/qcow2/mod.rs
index 5fb523c93b..6cd413c5cb 100644
--- a/block/rust/src/qcow2/mod.rs
+++ b/block/rust/src/qcow2/mod.rs
@@ -1,4 +1,6 @@
+mod allocation;
 mod io;
+mod refcount;
 mod on_disk_structures;
 
 
@@ -264,8 +266,6 @@ impl BlockDriverOpen for QCow2BDS {
             this.common.set_file(Some(file));
         }
 
-        cbds.read_only = true;
-
         QCow2BDS::do_open(cbds, options, flags)
     }
 }
@@ -290,6 +290,18 @@ impl BlockDriverRead for QCow2BDS {
 }
 
 
+impl BlockDriverWrite for QCow2BDS {
+    fn bdrv_co_pwritev(cbds: &mut CBDS, offset: u64, bytes: u64,
+                       iov: Vec<&[u8]>, flags: u32)
+        -> Result<(), IOError>
+    {
+        /* TODO: Do not split */
+        Self::split_io_to_clusters(cbds, offset, bytes, io::MNMIOV::Const(iov),
+                                   flags, &Self::write_cluster)
+    }
+}
+
+
 impl BlockDriverChildPerm for QCow2BDS {
     fn bdrv_child_perm(cbds: &mut CBDS, c: Option<&mut BdrvChild>,
                        role: &c_structs::BdrvChildRole, perm: u64, shared: u64)
@@ -325,6 +337,7 @@ pub extern fn bdrv_qcow2_rust_init()
     bdrv.provides_open();
     bdrv.provides_close();
     bdrv.provides_read();
+    bdrv.provides_write();
     bdrv.provides_child_perm();
     bdrv.provides_info();
 
diff --git a/block/rust/src/qcow2/refcount.rs b/block/rust/src/qcow2/refcount.rs
new file mode 100644
index 0000000000..4f5e14a9f8
--- /dev/null
+++ b/block/rust/src/qcow2/refcount.rs
@@ -0,0 +1,96 @@
+use interface::*;
+use qcow2::*;
+
+
+impl QCow2BDS {
+    pub fn get_refcount(cbds: &mut CBDS, offset: u64) -> Result<u64, IOError>
+    {
+        let refblock_index;
+        let refcount_order;
+        let cluster_size;
+        let file;
+
+        let reftable_entry = {
+            let_bds!(this, cbds);
+
+            refcount_order = this.refcount_order;
+            cluster_size = this.cluster_size;
+            file = this.common.file();
+
+            let cluster_index = offset >> this.cluster_bits;
+            let reftable_index = offset >> this.reftable_bits;
+
+            refblock_index = (cluster_index as u32) & (this.refblock_size - 1);
+
+            if reftable_index >= (this.reftable_size as u64) {
+                0
+            } else {
+                this.reftable[reftable_index as usize]
+            }
+        };
+
+        let refblock_offset = reftable_entry & REFT_OFFSET_MASK;
+
+        if refblock_offset == 0 {
+            return Ok(0);
+        }
+
+        if (refblock_offset & ((cluster_size - 1) as u64)) != 0 {
+            return Err(IOError::InvalidMetadata);
+        }
+
+        assert!(refcount_order <= 6);
+        if refcount_order == 6 {
+            let mut refcount: u64 = 0;
+            let byte_offset = (refblock_index * 8) as u64;
+            if let Err(_) =
+                file.bdrv_pread(refblock_offset + byte_offset,
+                                object_as_mut_byte_slice(&mut refcount))
+            {
+                return Err(IOError::GenericError);
+            }
+            Ok(u64::from_be(refcount))
+        } else if refcount_order == 5 {
+            let mut refcount: u32 = 0;
+            let byte_offset = (refblock_index * 4) as u64;
+            if let Err(_) =
+                file.bdrv_pread(refblock_offset + byte_offset,
+                                object_as_mut_byte_slice(&mut refcount))
+            {
+                return Err(IOError::GenericError);
+            }
+            Ok(u32::from_be(refcount) as u64)
+        } else if refcount_order == 4 {
+            let mut refcount: u16 = 0;
+            let byte_offset = (refblock_index * 2) as u64;
+            if let Err(_) =
+                file.bdrv_pread(refblock_offset + byte_offset,
+                                object_as_mut_byte_slice(&mut refcount))
+            {
+                return Err(IOError::GenericError);
+            }
+            Ok(u16::from_be(refcount) as u64)
+        } else {
+            let mut refcount_byte: u8 = 0;
+            let byte_offset = (refblock_index >> (3 - refcount_order)) as u64;
+            if let Err(_) =
+                file.bdrv_pread(refblock_offset + byte_offset,
+                                object_as_mut_byte_slice(&mut refcount_byte))
+            {
+                return Err(IOError::GenericError);
+            }
+
+            let mask = ((1u16 << (1u8 << refcount_order)) - 1) as u8;
+            let shift = (refblock_index << refcount_order) & 0x7;
+
+            Ok(((refcount_byte >> shift) & mask) as u64)
+        }
+    }
+
+
+    pub fn change_refcount(_: &mut CBDS, _: u64, _: i8)
+        -> Result<(), IOError>
+    {
+        Err(IOError::UnsupportedImageFeature)
+    }
+}
-- 
2.12.2

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Qemu-devel] [RFC for-3.0 4/4] block/qcow2-rust: Register block driver
  2017-04-18 15:58 [Qemu-devel] [RFC for-3.0 0/4] block: Add qcow2-rust block driver Max Reitz
                   ` (2 preceding siblings ...)
  2017-04-18 15:58 ` [Qemu-devel] [RFC for-3.0 3/4] block/qcow2-rust: Add partial write support Max Reitz
@ 2017-04-18 15:58 ` Max Reitz
  2017-04-19 11:28   ` Fam Zheng
  2017-04-18 16:08 ` [Qemu-devel] [RFC for-3.0 0/4] block: Add qcow2-rust " no-reply
                   ` (4 subsequent siblings)
  8 siblings, 1 reply; 13+ messages in thread
From: Max Reitz @ 2017-04-18 15:58 UTC (permalink / raw)
  To: qemu-block; +Cc: qemu-devel, Max Reitz, Kevin Wolf, John Snow

The rust qcow2 driver is now actually MUCH BETTER than the LEGACY
CROOKED qcow2 driver, so let's not beat around the bush and just
register it as a block driver. Has always been my opinion, never said
anything different. The QEMU project will deal with the C issue in a
decisive way. Q.M.U.

Signed-off-by: Max Reitz <mreitz@redhat.com>
---
 block/Makefile.objs |  1 +
 block/qcow2-rust.c  | 38 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 39 insertions(+)
 create mode 100644 block/qcow2-rust.c

diff --git a/block/Makefile.objs b/block/Makefile.objs
index de96f8ee80..4802946e4e 100644
--- a/block/Makefile.objs
+++ b/block/Makefile.objs
@@ -24,6 +24,7 @@ block-obj-y += accounting.o dirty-bitmap.o
 block-obj-y += write-threshold.o
 block-obj-y += backup.o
 block-obj-$(CONFIG_REPLICATION) += replication.o
+block-obj-y += qcow2-rust.o
 
 block-obj-y += crypto.o
 
diff --git a/block/qcow2-rust.c b/block/qcow2-rust.c
new file mode 100644
index 0000000000..1465fa9fe1
--- /dev/null
+++ b/block/qcow2-rust.c
@@ -0,0 +1,38 @@
+/* C basis of the Rust qcow2 block driver
+ *
+ * Copyright (C) 2017 Red Hat, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#include "qemu/osdep.h"
+#include "block/block_int.h"
+#include "qapi/error.h"
+#include "qemu/option.h"
+
+
+/* This is just for the module loading system to detect this driver */
+static BlockDriver _ __attribute__((used)) = {
+    .format_name = "qcow2-rust",
+};
+
+
+extern void bdrv_qcow2_rust_init(void);
+
+block_init(bdrv_qcow2_rust_init);
-- 
2.12.2

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [RFC for-3.0 0/4] block: Add qcow2-rust block driver
  2017-04-18 15:58 [Qemu-devel] [RFC for-3.0 0/4] block: Add qcow2-rust block driver Max Reitz
                   ` (3 preceding siblings ...)
  2017-04-18 15:58 ` [Qemu-devel] [RFC for-3.0 4/4] block/qcow2-rust: Register block driver Max Reitz
@ 2017-04-18 16:08 ` no-reply
  2017-04-18 16:08 ` no-reply
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 13+ messages in thread
From: no-reply @ 2017-04-18 16:08 UTC (permalink / raw)
  To: mreitz; +Cc: famz, qemu-block, kwolf, jsnow, qemu-devel

Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: 20170401155751.14322-1-mreitz@redhat.com
Subject: [Qemu-devel] [RFC for-3.0 0/4] block: Add qcow2-rust block driver

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

# Useful git options
git config --local diff.renamelimit 0
git config --local diff.renames True

commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
    echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
    if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
        failed=1
        echo
    fi
    n=$((n+1))
done

exit $failed
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 * [new tag]         patchew/20170401155751.14322-1-mreitz@redhat.com -> patchew/20170401155751.14322-1-mreitz@redhat.com
 - [tag update]      patchew/20170418075911.7579-1-famz@redhat.com -> patchew/20170418075911.7579-1-famz@redhat.com
Switched to a new branch 'test'
f29e573 block/qcow2-rust: Register block driver
5fb5514 block/qcow2-rust: Add partial write support
a349cfd block/qcow2-rust: Add qcow2-rust block driver
430d32b block: Add Rust interface

=== OUTPUT BEGIN ===
Checking PATCH 1/4: block: Add Rust interface...
Checking PATCH 2/4: block/qcow2-rust: Add qcow2-rust block driver...
Checking PATCH 3/4: block/qcow2-rust: Add partial write support...
Checking PATCH 4/4: block/qcow2-rust: Register block driver...
ERROR: open brace '{' following function declarations go on the next line
#63: FILE: block/qcow2-rust.c:31:
+static BlockDriver _ __attribute__((used)) = {

ERROR: externs should be avoided in .c files
#68: FILE: block/qcow2-rust.c:36:
+extern void bdrv_qcow2_rust_init(void);

total: 2 errors, 0 warnings, 45 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

=== OUTPUT END ===

Test command exited with code: 1


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@freelists.org

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [RFC for-3.0 0/4] block: Add qcow2-rust block driver
  2017-04-18 15:58 [Qemu-devel] [RFC for-3.0 0/4] block: Add qcow2-rust block driver Max Reitz
                   ` (4 preceding siblings ...)
  2017-04-18 16:08 ` [Qemu-devel] [RFC for-3.0 0/4] block: Add qcow2-rust " no-reply
@ 2017-04-18 16:08 ` no-reply
  2017-04-18 16:09 ` Marc-André Lureau
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 13+ messages in thread
From: no-reply @ 2017-04-18 16:08 UTC (permalink / raw)
  To: mreitz; +Cc: famz, qemu-block, kwolf, jsnow, qemu-devel

Hi,

This series failed build test on s390x host. Please find the details below.

Type: series
Message-id: 20170401155751.14322-1-mreitz@redhat.com
Subject: [Qemu-devel] [RFC for-3.0 0/4] block: Add qcow2-rust block driver

=== TEST SCRIPT BEGIN ===
#!/bin/bash
# Testing script will be invoked under the git checkout with
# HEAD pointing to a commit that has the patches applied on top of "base"
# branch
set -e
echo "=== ENV ==="
env
echo "=== PACKAGES ==="
rpm -qa
echo "=== TEST BEGIN ==="
CC=$HOME/bin/cc
INSTALL=$PWD/install
BUILD=$PWD/build
echo -n "Using CC: "
realpath $CC
mkdir -p $BUILD $INSTALL
SRC=$PWD
cd $BUILD
$SRC/configure --cc=$CC --prefix=$INSTALL
make -j4
# XXX: we need reliable clean up
# make check -j4 V=1
make install
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 * [new tag]         patchew/20170401155751.14322-1-mreitz@redhat.com -> patchew/20170401155751.14322-1-mreitz@redhat.com
 - [tag update]      patchew/20170418075911.7579-1-famz@redhat.com -> patchew/20170418075911.7579-1-famz@redhat.com
Switched to a new branch 'test'
f29e573 block/qcow2-rust: Register block driver
5fb5514 block/qcow2-rust: Add partial write support
a349cfd block/qcow2-rust: Add qcow2-rust block driver
430d32b block: Add Rust interface

=== OUTPUT BEGIN ===
=== ENV ===
XDG_SESSION_ID=12131
SHELL=/bin/sh
USER=fam
PATCHEW=/home/fam/patchew/patchew-cli -s http://patchew.org --nodebug
PATH=/usr/bin:/bin
PWD=/var/tmp/patchew-tester-tmp-ayu3niwi/src
LANG=en_US.UTF-8
HOME=/home/fam
SHLVL=2
LOGNAME=fam
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1012/bus
XDG_RUNTIME_DIR=/run/user/1012
_=/usr/bin/env
=== PACKAGES ===
gpg-pubkey-873529b8-54e386ff
xz-libs-5.2.2-2.fc24.s390x
libxshmfence-1.2-3.fc24.s390x
giflib-4.1.6-15.fc24.s390x
trousers-lib-0.3.13-6.fc24.s390x
ncurses-base-6.0-6.20160709.fc25.noarch
gmp-6.1.1-1.fc25.s390x
libidn-1.33-1.fc25.s390x
slang-2.3.0-7.fc25.s390x
libsemanage-2.5-8.fc25.s390x
pkgconfig-0.29.1-1.fc25.s390x
alsa-lib-1.1.1-2.fc25.s390x
yum-metadata-parser-1.1.4-17.fc25.s390x
python3-slip-dbus-0.6.4-4.fc25.noarch
python2-cssselect-0.9.2-1.fc25.noarch
python-fedora-0.8.0-2.fc25.noarch
createrepo_c-libs-0.10.0-6.fc25.s390x
initscripts-9.69-1.fc25.s390x
wget-1.18-2.fc25.s390x
dhcp-client-4.3.5-1.fc25.s390x
parted-3.2-21.fc25.s390x
flex-2.6.0-3.fc25.s390x
colord-libs-1.3.4-1.fc25.s390x
python-osbs-client-0.33-3.fc25.noarch
perl-Pod-Simple-3.35-1.fc25.noarch
python2-simplejson-3.10.0-1.fc25.s390x
brltty-5.4-2.fc25.s390x
librados2-10.2.4-2.fc25.s390x
tcp_wrappers-7.6-83.fc25.s390x
libcephfs_jni1-10.2.4-2.fc25.s390x
nettle-devel-3.3-1.fc25.s390x
bzip2-devel-1.0.6-21.fc25.s390x
libuuid-2.28.2-2.fc25.s390x
mesa-libglapi-13.0.3-5.fc25.s390x
pcre-cpp-8.40-5.fc25.s390x
pango-1.40.4-1.fc25.s390x
python3-magic-5.29-3.fc25.noarch
python3-dnf-1.1.10-6.fc25.noarch
cryptsetup-libs-1.7.4-1.fc25.s390x
texlive-kpathsea-doc-svn41139-33.fc25.1.noarch
netpbm-10.77.00-3.fc25.s390x
openssh-7.4p1-4.fc25.s390x
kernel-headers-4.10.5-200.fc25.s390x
texlive-kpathsea-bin-svn40473-33.20160520.fc25.1.s390x
texlive-graphics-svn41015-33.fc25.1.noarch
texlive-dvipdfmx-def-svn40328-33.fc25.1.noarch
texlive-mfware-svn40768-33.fc25.1.noarch
texlive-texlive-scripts-svn41433-33.fc25.1.noarch
texlive-euro-svn22191.1.1-33.fc25.1.noarch
texlive-etex-svn37057.0-33.fc25.1.noarch
texlive-iftex-svn29654.0.2-33.fc25.1.noarch
texlive-palatino-svn31835.0-33.fc25.1.noarch
texlive-texlive-docindex-svn41430-33.fc25.1.noarch
texlive-xunicode-svn30466.0.981-33.fc25.1.noarch
texlive-koma-script-svn41508-33.fc25.1.noarch
texlive-pst-grad-svn15878.1.06-33.fc25.1.noarch
texlive-pst-blur-svn15878.2.0-33.fc25.1.noarch
texlive-jknapltx-svn19440.0-33.fc25.1.noarch
netpbm-progs-10.77.00-3.fc25.s390x
mesa-libgbm-devel-13.0.3-5.fc25.s390x
texinfo-6.1-4.fc25.s390x
openssl-devel-1.0.2k-1.fc25.s390x
python2-sssdconfig-1.15.2-1.fc25.noarch
libaio-0.3.110-6.fc24.s390x
libfontenc-1.1.3-3.fc24.s390x
lzo-2.08-8.fc24.s390x
isl-0.14-5.fc24.s390x
libXau-1.0.8-6.fc24.s390x
linux-atm-libs-2.5.1-14.fc24.s390x
libXext-1.3.3-4.fc24.s390x
libXxf86vm-1.1.4-3.fc24.s390x
bison-3.0.4-4.fc24.s390x
perl-srpm-macros-1-20.fc25.noarch
gawk-4.1.3-8.fc25.s390x
libwayland-client-1.12.0-1.fc25.s390x
perl-Exporter-5.72-366.fc25.noarch
perl-version-0.99.17-1.fc25.s390x
fftw-libs-double-3.3.5-3.fc25.s390x
libssh2-1.8.0-1.fc25.s390x
ModemManager-glib-1.6.4-1.fc25.s390x
newt-python3-0.52.19-2.fc25.s390x
python-munch-2.0.4-3.fc25.noarch
python-bugzilla-1.2.2-4.fc25.noarch
libedit-3.1-16.20160618cvs.fc25.s390x
python-pycurl-7.43.0-4.fc25.s390x
createrepo_c-0.10.0-6.fc25.s390x
device-mapper-multipath-libs-0.4.9-83.fc25.s390x
yum-3.4.3-510.fc25.noarch
dhcp-common-4.3.5-1.fc25.noarch
dracut-config-rescue-044-78.fc25.s390x
teamd-1.26-1.fc25.s390x
mozjs17-17.0.0-16.fc25.s390x
libselinux-2.5-13.fc25.s390x
libgo-devel-6.3.1-1.fc25.s390x
NetworkManager-libnm-1.4.4-3.fc25.s390x
python2-pyparsing-2.1.10-1.fc25.noarch
cairo-gobject-1.14.8-1.fc25.s390x
kernel-devel-4.9.3-200.fc25.s390x
ethtool-4.8-1.fc25.s390x
xorg-x11-proto-devel-7.7-20.fc25.noarch
brlapi-0.6.5-2.fc25.s390x
librados-devel-10.2.4-2.fc25.s390x
libXinerama-devel-1.1.3-6.fc24.s390x
quota-4.03-7.fc25.s390x
lua-posix-33.3.1-3.fc25.s390x
p11-kit-devel-0.23.2-2.fc24.s390x
usbredir-devel-0.7.1-2.fc24.s390x
libcurl-devel-7.51.0-4.fc25.s390x
python-libs-2.7.13-1.fc25.s390x
libX11-devel-1.6.4-4.fc25.s390x
python-devel-2.7.13-1.fc25.s390x
nss-util-3.29.3-1.0.fc25.s390x
libepoxy-1.4.1-1.fc25.s390x
freetype-devel-2.6.5-3.fc25.s390x
system-python-3.5.3-3.fc25.s390x
glusterfs-cli-3.10.0-1.fc25.s390x
python3-dnf-plugins-core-0.1.21-5.fc25.noarch
perl-macros-5.24.1-385.fc25.s390x
texlive-pdftex-doc-svn41149-33.fc25.1.noarch
mariadb-config-10.1.21-3.fc25.s390x
openssh-clients-7.4p1-4.fc25.s390x
iptables-1.6.0-3.fc25.s390x
texlive-texlive.infra-svn41280-33.fc25.1.noarch
texlive-graphics-cfg-svn40269-33.fc25.1.noarch
texlive-bibtex-svn40768-33.fc25.1.noarch
texlive-mfware-bin-svn40473-33.20160520.fc25.1.s390x
texlive-texlive-scripts-bin-svn29741.0-33.20160520.fc25.1.noarch
texlive-sauerj-svn15878.0-33.fc25.1.noarch
texlive-enctex-svn34957.0-33.fc25.1.noarch
texlive-ifetex-svn24853.1.2-33.fc25.1.noarch
texlive-ntgclass-svn15878.2.1a-33.fc25.1.noarch
texlive-tex-gyre-math-svn41264-33.fc25.1.noarch
texlive-bera-svn20031.0-33.fc25.1.noarch
texlive-ms-svn29849.0-33.fc25.1.noarch
texlive-pst-fill-svn15878.1.01-33.fc25.1.noarch
texlive-ctable-svn38672-33.fc25.1.noarch
texlive-extsizes-svn17263.1.4a-33.fc25.1.noarch
texlive-collection-latexrecommended-svn35765.0-33.20160520.fc25.1.noarch
dbus-devel-1.11.10-1.fc25.s390x
perl-Filter-1.57-1.fc25.s390x
krb5-workstation-1.14.4-7.fc25.s390x
python2-rpm-macros-3-12.fc25.noarch
gpg-pubkey-efe550f5-5220ba41
gpg-pubkey-81b46521-55b3ca9a
filesystem-3.2-37.fc24.s390x
libffi-3.1-9.fc24.s390x
keyutils-libs-1.5.9-8.fc24.s390x
libnfnetlink-1.0.1-8.fc24.s390x
libtheora-1.1.1-14.fc24.s390x
xml-common-0.6.3-44.fc24.noarch
autoconf-2.69-22.fc24.noarch
libXt-1.1.5-3.fc24.s390x
kbd-legacy-2.0.3-3.fc24.noarch
ghostscript-fonts-5.50-35.fc24.noarch
libXevie-1.0.3-11.fc24.s390x
libcap-2.25-2.fc25.s390x
mpfr-3.1.5-1.fc25.s390x
perl-Carp-1.40-365.fc25.noarch
libmnl-1.0.4-1.fc25.s390x
perl-Unicode-EastAsianWidth-1.33-8.fc25.noarch
libwayland-cursor-1.12.0-1.fc25.s390x
python-krbV-1.0.90-12.fc25.s390x
python2-urllib3-1.15.1-3.fc25.noarch
fipscheck-1.4.1-11.fc25.s390x
libndp-1.6-1.fc25.s390x
gnupg2-2.1.13-2.fc25.s390x
libXfixes-5.0.3-1.fc25.s390x
adwaita-icon-theme-3.22.0-1.fc25.noarch
dconf-0.26.0-1.fc25.s390x
ncurses-devel-6.0-6.20160709.fc25.s390x
dejagnu-1.6-1.fc25.noarch
libstdc++-devel-6.3.1-1.fc25.s390x
python-beautifulsoup4-4.5.3-1.fc25.noarch
device-mapper-1.02.136-3.fc25.s390x
subversion-1.9.5-1.fc25.s390x
libtool-ltdl-2.4.6-13.fc25.s390x
libevent-2.0.22-1.fc25.s390x
atk-devel-2.22.0-1.fc25.s390x
libev-4.24-1.fc25.s390x
xorg-x11-fonts-Type1-7.5-16.fc24.noarch
libtasn1-devel-4.10-1.fc25.s390x
vte291-devel-0.46.1-1.fc25.s390x
brlapi-devel-0.6.5-2.fc25.s390x
pulseaudio-libs-10.0-2.fc25.s390x
libnl3-cli-3.2.29-2.fc25.s390x
perl-libs-5.24.1-385.fc25.s390x
dbus-libs-1.11.10-1.fc25.s390x
mesa-libwayland-egl-devel-13.0.3-5.fc25.s390x
glib2-2.50.3-1.fc25.s390x
python3-firewall-0.4.4.4-1.fc25.noarch
python2-rpm-4.13.0.1-1.fc25.s390x
gnutls-3.5.10-1.fc25.s390x
java-1.8.0-openjdk-headless-1.8.0.121-8.b14.fc25.s390x
pango-devel-1.40.4-1.fc25.s390x
dnf-1.1.10-6.fc25.noarch
mesa-libEGL-devel-13.0.3-5.fc25.s390x
texlive-metafont-bin-svn40987-33.20160520.fc25.1.s390x
texlive-xkeyval-svn35741.2.7a-33.fc25.1.noarch
texlive-euler-svn17261.2.5-33.fc25.1.noarch
texlive-mptopdf-svn41282-33.fc25.1.noarch
texlive-wasy-svn35831.0-33.fc25.1.noarch
texlive-avantgar-svn31835.0-33.fc25.1.noarch
texlive-eurosym-svn17265.1.4_subrfix-33.fc25.1.noarch
texlive-knuth-lib-svn35820.0-33.fc25.1.noarch
texlive-parallel-svn15878.0-33.fc25.1.noarch
texlive-texlive-msg-translations-svn41431-33.fc25.1.noarch
texlive-latex-svn40218-33.fc25.1.noarch
texlive-lualatex-math-svn40621-33.fc25.1.noarch
texlive-auto-pst-pdf-svn23723.0.6-33.fc25.1.noarch
texlive-powerdot-svn38984-33.fc25.1.noarch
texlive-wasysym-svn15878.2.0-33.fc25.1.noarch
ImageMagick-libs-6.9.3.0-6.fc25.s390x
geoclue2-2.4.5-1.fc25.s390x
perl-IO-Socket-IP-0.39-1.fc25.noarch
gdb-7.12.1-47.fc25.s390x
python2-pyasn1-0.2.3-1.fc25.noarch
gpg-pubkey-34ec9cba-54e38751
gpg-pubkey-030d5aed-55b577f0
basesystem-11-2.fc24.noarch
libmpc-1.0.2-5.fc24.s390x
libunistring-0.9.4-3.fc24.s390x
libmodman-2.0.1-12.fc24.s390x
lsscsi-0.28-3.fc24.s390x
kbd-misc-2.0.3-3.fc24.noarch
rpmconf-base-1.0.18-2.fc25.noarch
libxml2-2.9.3-4.fc25.s390x
kmod-23-1.fc25.s390x
newt-0.52.19-2.fc25.s390x
perl-Text-Unidecode-1.27-3.fc25.noarch
plymouth-core-libs-0.9.3-0.6.20160620git0e65b86c.fc25.s390x
which-2.21-1.fc25.s390x
python3-slip-0.6.4-4.fc25.noarch
python3-systemd-232-1.fc25.s390x
python-lockfile-0.11.0-4.fc25.noarch
python2-requests-2.10.0-4.fc25.noarch
libarchive-3.2.2-1.fc25.s390x
libnghttp2-1.13.0-2.fc25.s390x
python-urlgrabber-3.10.1-9.fc25.noarch
iputils-20161105-1.fc25.s390x
rest-0.8.0-1.fc25.s390x
adwaita-cursor-theme-3.22.0-1.fc25.noarch
authconfig-6.2.10-14.fc25.s390x
expat-devel-2.2.0-1.fc25.s390x
automake-1.15-7.fc25.noarch
shared-mime-info-1.8-1.fc25.s390x
pigz-2.3.4-1.fc25.s390x
device-mapper-libs-1.02.136-3.fc25.s390x
dnsmasq-2.76-2.fc25.s390x
fedora-packager-0.6.0.1-1.fc25.noarch
gcc-c++-6.3.1-1.fc25.s390x
libwebp-0.5.2-1.fc25.s390x
boost-system-1.60.0-10.fc25.s390x
libasyncns-0.8-10.fc24.s390x
libXau-devel-1.0.8-6.fc24.s390x
libverto-libev-0.2.6-6.fc24.s390x
python3-html5lib-0.999-9.fc25.noarch
ttmkfdir-3.0.9-48.fc24.s390x
pulseaudio-libs-glib2-10.0-2.fc25.s390x
wpa_supplicant-2.6-1.fc25.s390x
texlive-lib-2016-33.20160520.fc25.s390x
mesa-libwayland-egl-13.0.3-5.fc25.s390x
libXi-devel-1.7.9-1.fc25.s390x
gdk-pixbuf2-2.36.5-1.fc25.s390x
python3-distro-1.0.3-1.fc25.noarch
rpm-plugin-systemd-inhibit-4.13.0.1-1.fc25.s390x
gnutls-c++-3.5.10-1.fc25.s390x
texlive-texlive-common-doc-svn40682-33.fc25.1.noarch
packagedb-cli-2.14.1-1.fc25.noarch
rpcbind-0.2.4-5.fc25.s390x
libdrm-devel-2.4.75-1.fc25.s390x
texlive-metafont-svn40793-33.fc25.1.noarch
texlive-tools-svn40934-33.fc25.1.noarch
texlive-enumitem-svn24146.3.5.2-33.fc25.1.noarch
texlive-mptopdf-bin-svn18674.0-33.20160520.fc25.1.noarch
texlive-underscore-svn18261.0-33.fc25.1.noarch
texlive-anysize-svn15878.0-33.fc25.1.noarch
texlive-euenc-svn19795.0.1h-33.fc25.1.noarch
texlive-kastrup-svn15878.0-33.fc25.1.noarch
texlive-paralist-svn39247-33.fc25.1.noarch
texlive-texlive-en-svn41185-33.fc25.1.noarch
texlive-tipa-svn29349.1.3-33.fc25.1.noarch
texlive-currfile-svn40725-33.fc25.1.noarch
texlive-pst-node-svn40743-33.fc25.1.noarch
texlive-pst-slpe-svn24391.1.31-33.fc25.1.noarch
texlive-typehtml-svn17134.0-33.fc25.1.noarch
SDL2-devel-2.0.5-3.fc25.s390x
audit-2.7.3-1.fc25.s390x
perl-Module-CoreList-5.20170320-1.fc25.noarch
libcroco-0.6.11-3.fc25.s390x
publicsuffix-list-dafsa-20170206-1.fc25.noarch
fontpackages-filesystem-1.44-17.fc24.noarch
groff-base-1.22.3-8.fc24.s390x
ilmbase-2.2.0-5.fc24.s390x
OpenEXR-libs-2.2.0-5.fc24.s390x
hesiod-3.2.1-6.fc24.s390x
sysfsutils-2.1.0-19.fc24.s390x
ocaml-srpm-macros-2-4.fc24.noarch
mailx-12.5-19.fc24.s390x
ncurses-libs-6.0-6.20160709.fc25.s390x
ipset-libs-6.29-1.fc25.s390x
gmp-devel-6.1.1-1.fc25.s390x
python-pip-8.1.2-2.fc25.noarch
harfbuzz-1.3.2-1.fc25.s390x
python2-iniparse-0.4-20.fc25.noarch
python3-iniparse-0.4-20.fc25.noarch
python3-kickstart-2.32-1.fc25.noarch
perl-Net-SSLeay-1.78-1.fc25.s390x
drpm-0.3.0-3.fc25.s390x
glib-networking-2.50.0-1.fc25.s390x
webkitgtk3-2.4.11-3.fc25.s390x
libXaw-1.0.13-4.fc25.s390x
sudo-1.8.18p1-1.fc25.s390x
xorg-x11-font-utils-7.5-32.fc25.s390x
hardlink-1.1-1.fc25.s390x
libcom_err-1.43.3-1.fc25.s390x
iproute-4.6.0-6.fc25.s390x
python2-dateutil-2.6.0-1.fc25.noarch
libXpm-3.5.12-1.fc25.s390x
python2-smmap-2.0.1-1.fc25.noarch
kernel-4.9.3-200.fc25.s390x
poppler-data-0.4.7-6.fc25.noarch
nspr-devel-4.13.1-1.fc25.s390x
librbd1-10.2.4-2.fc25.s390x
libsndfile-1.0.27-1.fc25.s390x
perl-Digest-MD5-2.55-2.fc25.s390x
wayland-protocols-devel-1.7-1.fc25.noarch
libacl-devel-2.2.52-11.fc24.s390x
texi2html-5.0-4.fc24.noarch
libxkbcommon-0.7.1-1.fc25.s390x
freetype-2.6.5-3.fc25.s390x
libuuid-devel-2.28.2-2.fc25.s390x
coreutils-common-8.25-16.fc25.s390x
gdb-headless-7.12.1-47.fc25.s390x
nss-sysinit-3.29.3-1.0.fc25.s390x
libcacard-2.5.3-1.fc25.s390x
perl-threads-shared-1.55-1.fc25.s390x
python2-rpkg-1.49-2.fc25.noarch
libwmf-lite-0.2.8.4-50.fc25.s390x
mesa-libGL-13.0.3-5.fc25.s390x
unbound-libs-1.6.0-6.fc25.s390x
texlive-tetex-svn41059-33.fc25.1.noarch
texlive-thumbpdf-svn34621.3.16-33.fc25.1.noarch
texlive-carlisle-svn18258.0-33.fc25.1.noarch
texlive-makeindex-bin-svn40473-33.20160520.fc25.1.s390x
texlive-pdftex-svn41149-33.fc25.1.noarch
texlive-csquotes-svn39538-33.fc25.1.noarch
texlive-courier-svn35058.0-33.fc25.1.noarch
texlive-helvetic-svn31835.0-33.fc25.1.noarch
texlive-mfnfss-svn19410.0-33.fc25.1.noarch
texlive-sepnum-svn20186.2.0-33.fc25.1.noarch
texlive-utopia-svn15878.0-33.fc25.1.noarch
texlive-luatexbase-svn38550-33.fc25.1.noarch
texlive-pst-3d-svn17257.1.10-33.fc25.1.noarch
texlive-latex-bin-bin-svn14050.0-33.20160520.fc25.1.noarch
texlive-l3experimental-svn41163-33.fc25.1.noarch
bind99-libs-9.9.9-4.P6.fc25.s390x
net-tools-2.0-0.40.20160329git.fc25.s390x
perl-Pod-Perldoc-3.28-1.fc25.noarch
openssl-1.0.2k-1.fc25.s390x
man-pages-4.06-4.fc25.noarch
gpg-pubkey-95a43f54-5284415a
dejavu-fonts-common-2.35-3.fc24.noarch
libSM-1.2.2-4.fc24.s390x
diffutils-3.3-13.fc24.s390x
libogg-1.3.2-5.fc24.s390x
hunspell-en-US-0.20140811.1-5.fc24.noarch
libdaemon-0.14-10.fc24.s390x
patch-2.7.5-3.fc24.s390x
libsysfs-2.1.0-19.fc24.s390x
procmail-3.22-39.fc24.s390x
libXdamage-1.1.4-8.fc24.s390x
libotf-0.9.13-7.fc24.s390x
urw-fonts-2.4-22.fc24.noarch
crontabs-1.11-12.20150630git.fc24.noarch
ppp-2.4.7-9.fc24.s390x
polkit-0.113-5.fc24.s390x
cyrus-sasl-2.1.26-26.2.fc24.s390x
zlib-devel-1.2.8-10.fc24.s390x
time-1.7-49.fc24.s390x
gpg-pubkey-fdb19c98-56fd6333
fedora-release-25-1.noarch
libcap-ng-0.7.8-1.fc25.s390x
gdbm-1.12-1.fc25.s390x
binutils-2.26.1-1.fc25.s390x
lcms2-2.8-2.fc25.s390x
libcomps-0.1.7-5.fc25.s390x
less-481-6.fc25.s390x
apr-1.5.2-4.fc25.s390x
perl-constant-1.33-367.fc25.noarch
perl-Data-Dumper-2.161-1.fc25.s390x
ipcalc-0.1.8-1.fc25.s390x
libteam-1.26-1.fc25.s390x
gmp-c++-6.1.1-1.fc25.s390x
fontconfig-2.12.1-1.fc25.s390x
enchant-1.6.0-14.fc25.s390x
pyliblzma-0.5.3-16.fc25.s390x
libsepol-devel-2.5-10.fc25.s390x
python3-ordered-set-2.0.0-4.fc25.noarch
python3-rpmconf-1.0.18-2.fc25.noarch
python-ipaddress-1.0.16-3.fc25.noarch
python2-kerberos-1.2.5-1.fc25.s390x
python2-pysocks-1.5.6-5.fc25.noarch
fipscheck-lib-1.4.1-11.fc25.s390x
libatomic_ops-7.4.4-1.fc25.s390x
net-snmp-agent-libs-5.7.3-13.fc25.s390x
dracut-044-78.fc25.s390x
python2-pygpgme-0.3-18.fc25.s390x
libsoup-2.56.0-2.fc25.s390x
orc-0.4.26-1.fc25.s390x
yum-utils-1.1.31-511.fc25.noarch
libXrender-0.9.10-1.fc25.s390x
libXrandr-1.5.1-1.fc25.s390x
go-srpm-macros-2-7.fc25.noarch
gnupg2-smime-2.1.13-2.fc25.s390x
guile-devel-2.0.13-1.fc25.s390x
uboot-tools-2016.09.01-2.fc25.s390x
pykickstart-2.32-1.fc25.noarch
python-bunch-1.0.1-9.fc25.noarch
perl-generators-1.10-1.fc25.noarch
perl-Mozilla-CA-20160104-3.fc25.noarch
glibc-all-langpacks-2.24-4.fc25.s390x
bzip2-libs-1.0.6-21.fc25.s390x
libpng-1.6.27-1.fc25.s390x
desktop-file-utils-0.23-2.fc25.s390x
python2-cccolutils-1.4-1.fc25.s390x
libcurl-7.51.0-4.fc25.s390x
cups-libs-2.2.0-5.fc25.s390x
python2-lxml-3.7.2-1.fc25.s390x
redhat-rpm-config-45-1.fc25.noarch
elfutils-libs-0.168-1.fc25.s390x
device-mapper-event-libs-1.02.136-3.fc25.s390x
lvm2-libs-2.02.167-3.fc25.s390x
elfutils-0.168-1.fc25.s390x
python2-gitdb-2.0.0-1.fc25.noarch
gcc-gfortran-6.3.1-1.fc25.s390x
libselinux-python-2.5-13.fc25.s390x
openjpeg2-2.1.2-3.fc25.s390x
js-jquery-2.2.4-1.fc25.noarch
boost-thread-1.60.0-10.fc25.s390x
json-c-0.12-7.fc24.s390x
librbd-devel-10.2.4-2.fc25.s390x
libXcursor-devel-1.1.14-6.fc24.s390x
python3-beautifulsoup4-4.5.3-1.fc25.noarch
latex2html-2012-7.fc24.noarch
lksctp-tools-1.0.16-5.fc24.s390x
vte291-0.46.1-1.fc25.s390x
at-spi2-core-devel-2.22.0-1.fc25.s390x
libfdt-1.4.2-1.fc25.s390x
libXft-devel-2.3.2-4.fc24.s390x
libattr-devel-2.4.47-16.fc24.s390x
libiscsi-devel-1.15.0-2.fc24.s390x
gettext-0.19.8.1-3.fc25.s390x
libjpeg-turbo-devel-1.5.1-0.fc25.s390x
libX11-1.6.4-4.fc25.s390x
pulseaudio-libs-devel-10.0-2.fc25.s390x
ccache-3.3.3-1.fc25.s390x
systemd-libs-231-14.fc25.s390x
file-5.29-3.fc25.s390x
nss-softokn-freebl-3.29.3-1.0.fc25.s390x
libepoxy-devel-1.4.1-1.fc25.s390x
krb5-libs-1.14.4-7.fc25.s390x
libmount-2.28.2-2.fc25.s390x
ghostscript-core-9.20-6.fc25.s390x
python3-decorator-4.0.11-1.fc25.noarch
rpm-plugin-selinux-4.13.0.1-1.fc25.s390x
python3-hawkey-0.6.4-1.fc25.s390x
nss-devel-3.29.3-1.0.fc25.s390x
libidn2-0.16-1.fc25.s390x
perl-threads-2.15-1.fc25.s390x
tzdata-java-2017b-1.fc25.noarch
python-srpm-macros-3-12.fc25.noarch
gdk-pixbuf2-devel-2.36.5-1.fc25.s390x
libsmartcols-2.28.2-2.fc25.s390x
glusterfs-api-3.10.0-1.fc25.s390x
mesa-libGLES-13.0.3-5.fc25.s390x
kernel-core-4.10.5-200.fc25.s390x
kernel-modules-4.10.5-200.fc25.s390x
jasper-libs-1.900.13-2.fc25.s390x
texlive-kpathsea-svn41139-33.fc25.1.noarch
texlive-amsmath-svn41561-33.fc25.1.noarch
texlive-thumbpdf-bin-svn6898.0-33.20160520.fc25.1.noarch
texlive-psnfss-svn33946.9.2a-33.fc25.1.noarch
texlive-subfig-svn15878.1.3-33.fc25.1.noarch
texlive-fancybox-svn18304.1.4-33.fc25.1.noarch
texlive-lua-alt-getopt-svn29349.0.7.0-33.fc25.1.noarch
texlive-natbib-svn20668.8.31b-33.fc25.1.noarch
texlive-pdftex-bin-svn40987-33.20160520.fc25.1.s390x
texlive-xdvi-svn40768-33.fc25.1.noarch
texlive-crop-svn15878.1.5-33.fc25.1.noarch
texlive-babel-english-svn30264.3.3p-33.fc25.1.noarch
texlive-cmextra-svn32831.0-33.fc25.1.noarch
texlive-fancyhdr-svn15878.3.1-33.fc25.1.noarch
texlive-luatex-svn40963-33.fc25.1.noarch
texlive-knuth-local-svn38627-33.fc25.1.noarch
texlive-mflogo-font-svn36898.1.002-33.fc25.1.noarch
texlive-parskip-svn19963.2.0-33.fc25.1.noarch
texlive-section-svn20180.0-33.fc25.1.noarch
texlive-textcase-svn15878.0-33.fc25.1.noarch
texlive-updmap-map-svn41159-33.fc25.1.noarch
texlive-attachfile-svn38830-33.fc25.1.noarch
texlive-luaotfload-svn40902-33.fc25.1.noarch
texlive-unicode-math-svn38462-33.fc25.1.noarch
texlive-fancyvrb-svn18492.2.8-33.fc25.1.noarch
texlive-pst-pdf-bin-svn7838.0-33.20160520.fc25.1.noarch
texlive-amscls-svn36804.0-33.fc25.1.noarch
texlive-ltxmisc-svn21927.0-33.fc25.1.noarch
texlive-breqn-svn38099.0.98d-33.fc25.1.noarch
texlive-xetex-def-svn40327-33.fc25.1.noarch
glusterfs-extra-xlators-3.10.0-1.fc25.s390x
bluez-libs-devel-5.43-2.fc25.s390x
openssh-server-7.4p1-4.fc25.s390x
sendmail-8.15.2-8.fc25.s390x
python-firewall-0.4.4.4-1.fc25.noarch
perl-Test-Harness-3.38-1.fc25.noarch
python3-sssdconfig-1.15.2-1.fc25.noarch
python-magic-5.29-3.fc25.noarch
tzdata-2017b-1.fc25.noarch
hunspell-1.4.1-2.fc25.s390x
gpg-pubkey-8e1431d5-53bcbac7
zlib-1.2.8-10.fc24.s390x
sed-4.2.2-15.fc24.s390x
p11-kit-0.23.2-2.fc24.s390x
psmisc-22.21-8.fc24.s390x
gpm-libs-1.20.7-9.fc24.s390x
zip-3.0-16.fc24.s390x
hostname-3.15-7.fc24.s390x
libyubikey-1.13-2.fc24.s390x
sg3_utils-libs-1.41-3.fc24.s390x
polkit-pkla-compat-0.1-7.fc24.s390x
passwd-0.79-8.fc24.s390x
trousers-0.3.13-6.fc24.s390x
grubby-8.40-3.fc24.s390x
rootfiles-8.1-19.fc24.noarch
nettle-3.3-1.fc25.s390x
jansson-2.9-1.fc25.s390x
libksba-1.3.5-1.fc25.s390x
perl-Text-ParseWords-3.30-365.fc25.noarch
perl-PathTools-3.63-366.fc25.s390x
perl-File-Temp-0.23.04-365.fc25.noarch
fuse-libs-2.9.7-1.fc25.s390x
perl-Pod-Escapes-1.07-365.fc25.noarch
perl-Term-ANSIColor-4.05-2.fc25.noarch
perl-URI-1.71-5.fc25.noarch
libXfont-1.5.2-1.fc25.s390x
python-six-1.10.0-3.fc25.noarch
dbus-glib-0.108-1.fc25.s390x
gobject-introspection-1.50.0-1.fc25.s390x
libpwquality-1.3.0-6.fc25.s390x
python-gobject-base-3.22.0-1.fc25.s390x
python-html5lib-0.999-9.fc25.noarch
python3-dbus-1.2.4-2.fc25.s390x
python3-chardet-2.3.0-1.fc25.noarch
python3-urllib3-1.15.1-3.fc25.noarch
python-offtrac-0.1.0-7.fc25.noarch
python2-cryptography-1.5.3-3.fc25.s390x
python2-requests-kerberos-0.10.0-2.fc25.noarch
libserf-1.3.9-1.fc25.s390x
libdatrie-0.2.9-3.fc25.s390x
s390utils-base-1.36.0-1.fc25.s390x
kpartx-0.4.9-83.fc25.s390x
s390utils-cpuplugd-1.36.0-1.fc25.s390x
rpmconf-1.0.18-2.fc25.noarch
s390utils-osasnmpd-1.36.0-1.fc25.s390x
python-dnf-plugins-extras-common-0.0.12-4.fc25.noarch
fpc-srpm-macros-1.0-1.fc25.noarch
libuser-0.62-4.fc25.s390x
man-db-2.7.5-3.fc25.s390x
sqlite-3.14.2-1.fc25.s390x
python-systemd-doc-232-1.fc25.s390x
libdb-5.3.28-16.fc25.s390x
lz4-1.7.5-1.fc25.s390x
tar-1.29-3.fc25.s390x
emacs-common-25.1-3.fc25.s390x
unzip-6.0-31.fc25.s390x
bodhi-client-0.9.12.2-6.fc25.noarch
glibc-headers-2.24-4.fc25.s390x
kernel-core-4.9.3-200.fc25.s390x
cairo-1.14.8-1.fc25.s390x
ca-certificates-2017.2.11-1.0.fc25.noarch
NetworkManager-glib-1.4.4-3.fc25.s390x
gcc-go-6.3.1-1.fc25.s390x
cracklib-dicts-2.9.6-4.fc25.s390x
iproute-tc-4.6.0-6.fc25.s390x
libselinux-python3-2.5-13.fc25.s390x
python2-enchant-1.6.8-1.fc25.noarch
boost-iostreams-1.60.0-10.fc25.s390x
userspace-rcu-0.9.2-2.fc25.s390x
libXext-devel-1.3.3-4.fc24.s390x
libXrandr-devel-1.5.1-1.fc25.s390x
perl-XML-XPath-1.39-1.fc25.noarch
python3-lxml-3.7.2-1.fc25.s390x
vte-profile-0.46.1-1.fc25.s390x
sqlite-devel-3.14.2-1.fc25.s390x
libiscsi-1.15.0-2.fc24.s390x
fontconfig-devel-2.12.1-1.fc25.s390x
libfdt-devel-1.4.2-1.fc25.s390x
ceph-devel-compat-10.2.4-2.fc25.s390x
zlib-static-1.2.8-10.fc24.s390x
chrpath-0.16-3.fc24.s390x
python-2.7.13-1.fc25.s390x
perl-Git-2.9.3-2.fc25.noarch
kernel-core-4.9.5-200.fc25.s390x
info-6.1-4.fc25.s390x
libtiff-4.0.7-2.fc25.s390x
iptables-libs-1.6.0-3.fc25.s390x
bind-license-9.10.4-4.P6.fc25.noarch
lua-5.3.4-1.fc25.s390x
glusterfs-libs-3.10.0-1.fc25.s390x
glusterfs-client-xlators-3.10.0-1.fc25.s390x
libfdisk-2.28.2-2.fc25.s390x
nss-pem-1.0.3-2.fc25.s390x
libsolv-0.6.26-1.fc25.s390x
dnf-plugins-core-0.1.21-5.fc25.noarch
selinux-policy-3.13.1-225.11.fc25.noarch
perl-Errno-1.25-385.fc25.s390x
perl-Storable-2.56-368.fc25.s390x
python2-decorator-4.0.11-1.fc25.noarch
pcre-utf16-8.40-5.fc25.s390x
mariadb-common-10.1.21-3.fc25.s390x
glusterfs-3.10.0-1.fc25.s390x
systemtap-client-3.1-2.fc25.s390x
glusterfs-server-3.10.0-1.fc25.s390x
libnetfilter_conntrack-1.0.6-2.fc25.s390x
bluez-libs-5.43-2.fc25.s390x
texlive-texlive.infra-bin-svn40312-33.20160520.fc25.1.s390x
texlive-ifluatex-svn41346-33.fc25.1.noarch
texlive-fp-svn15878.0-33.fc25.1.noarch
texlive-latex-fonts-svn28888.0-33.fc25.1.noarch
texlive-bibtex-bin-svn40473-33.20160520.fc25.1.s390x
texlive-glyphlist-svn28576.0-33.fc25.1.noarch
texlive-marvosym-svn29349.2.2a-33.fc25.1.noarch
texlive-tex-bin-svn40987-33.20160520.fc25.1.s390x
texlive-texconfig-svn40768-33.fc25.1.noarch
texlive-wasy2-ps-svn35830.0-33.fc25.1.noarch
texlive-psfrag-svn15878.3.04-33.fc25.1.noarch
texlive-charter-svn15878.0-33.fc25.1.noarch
texlive-ec-svn25033.1.0-33.fc25.1.noarch
texlive-lineno-svn21442.4.41-33.fc25.1.noarch
texlive-hyphen-base-svn41138-33.fc25.1.noarch
texlive-manfnt-font-svn35799.0-33.fc25.1.noarch
texlive-ncntrsbk-svn31835.0-33.fc25.1.noarch
texlive-pst-math-svn34786.0.63-33.fc25.1.noarch
texlive-symbol-svn31835.0-33.fc25.1.noarch
texlive-environ-svn33821.0.3-33.fc25.1.noarch
texlive-algorithms-svn38085.0.1-33.fc25.1.noarch
texlive-ifplatform-svn21156.0.4-33.fc25.1.noarch
texlive-eso-pic-svn37925.2.0g-33.fc25.1.noarch
texlive-xcolor-svn41044-33.fc25.1.noarch
texlive-pst-eps-svn15878.1.0-33.fc25.1.noarch
texlive-pst-text-svn15878.1.00-33.fc25.1.noarch
texlive-rotating-svn16832.2.16b-33.fc25.1.noarch
texlive-pdfpages-svn40638-33.fc25.1.noarch
texlive-cm-super-svn15878.0-33.fc25.1.noarch
texlive-xetex-svn41438-33.fc25.1.noarch
glusterfs-devel-3.10.0-1.fc25.s390x
gtk3-devel-3.22.9-2.fc25.s390x
dnf-yum-1.1.10-6.fc25.noarch
mariadb-libs-10.1.21-3.fc25.s390x
java-1.8.0-openjdk-1.8.0.121-8.b14.fc25.s390x
rpmlint-1.9-8.fc25.noarch
systemtap-sdt-devel-3.1-2.fc25.s390x
libseccomp-devel-2.3.2-1.fc25.s390x
telnet-0.17-67.fc25.s390x
gpgme-1.8.0-10.fc25.s390x
apr-util-1.5.4-3.fc24.s390x
rsync-3.1.2-2.fc24.s390x
jbigkit-libs-2.1-5.fc24.s390x
pixman-0.34.0-2.fc24.s390x
dwz-0.12-2.fc24.s390x
expect-5.45-22.fc24.s390x
libsigsegv-2.10-10.fc24.s390x
fakeroot-libs-1.20.2-4.fc24.s390x
m17n-lib-1.7.0-5.fc24.s390x
libverto-0.2.6-6.fc24.s390x
libXmu-1.1.2-4.fc24.s390x
libXcursor-1.1.14-6.fc24.s390x
python-kitchen-1.2.4-2.fc24.noarch
polkit-libs-0.113-5.fc24.s390x
fakeroot-1.20.2-4.fc24.s390x
blktrace-1.1.0-3.fc24.s390x
usermode-1.111-8.fc24.s390x
kbd-2.0.3-3.fc24.s390x
libaio-devel-0.3.110-6.fc24.s390x
web-assets-filesystem-5-4.fc24.noarch
expat-2.2.0-1.fc25.s390x
libgpg-error-1.24-1.fc25.s390x
libgcrypt-1.6.6-1.fc25.s390x
findutils-4.6.0-8.fc25.s390x
libassuan-2.4.3-1.fc25.s390x
libusbx-1.0.21-1.fc25.s390x
libxslt-1.1.28-13.fc25.s390x
libmetalink-0.1.3-1.fc25.s390x
perl-File-Path-2.12-365.fc25.noarch
perl-MIME-Base64-3.15-365.fc25.s390x
ncurses-6.0-6.20160709.fc25.s390x
libwayland-server-1.12.0-1.fc25.s390x
perl-Fedora-VSP-0.001-4.fc25.noarch
perl-libintl-perl-1.26-1.fc25.s390x
shadow-utils-4.2.1-11.fc25.s390x
atk-2.22.0-1.fc25.s390x
pam-1.3.0-1.fc25.s390x
harfbuzz-icu-1.3.2-1.fc25.s390x
libsecret-0.18.5-2.fc25.s390x
s390utils-iucvterm-1.36.0-1.fc25.s390x
python3-requests-2.10.0-4.fc25.noarch
pyusb-1.0.0-2.fc25.noarch
python-enum34-1.0.4-6.fc25.noarch
pyOpenSSL-16.0.0-2.fc25.noarch
pyxattr-0.5.3-8.fc25.s390x
libbabeltrace-1.4.0-3.fc25.s390x
libthai-0.1.25-1.fc25.s390x
deltarpm-3.6-17.fc25.s390x
s390utils-mon_statd-1.36.0-1.fc25.s390x
device-mapper-multipath-0.4.9-83.fc25.s390x
python3-pygpgme-0.3-18.fc25.s390x
libreport-filesystem-2.8.0-1.fc25.s390x
ghc-srpm-macros-1.4.2-4.fc25.noarch
rpmdevtools-8.9-1.fc25.noarch
python-dnf-plugins-extras-migrate-0.0.12-4.fc25.noarch
perl-IO-Socket-SSL-2.038-1.fc25.noarch
mc-4.8.18-2.fc25.s390x
perl-File-ShareDir-1.102-7.fc25.noarch
tcl-8.6.6-1.fc25.s390x
glibc-2.24-4.fc25.s390x
elfutils-libelf-0.168-1.fc25.s390x
perl-Scalar-List-Utils-1.47-1.fc25.s390x
bzip2-1.0.6-21.fc25.s390x
libss-1.43.3-1.fc25.s390x
libselinux-utils-2.5-13.fc25.s390x
policycoreutils-2.5-19.fc25.s390x
koji-1.11.0-1.fc25.noarch
python3-enchant-1.6.8-1.fc25.noarch
python2-dockerfile-parse-0.0.5-7.fc25.noarch
systemd-bootchart-231-2.fc25.s390x
gcc-objc-6.3.1-1.fc25.s390x
e2fsprogs-1.43.3-1.fc25.s390x
libstdc++-static-6.3.1-1.fc25.s390x
libpng-devel-1.6.27-1.fc25.s390x
perl-XML-Parser-2.44-5.fc25.s390x
lttng-ust-2.8.1-2.fc25.s390x
libXfixes-devel-5.0.3-1.fc25.s390x
libXcomposite-devel-0.4.4-8.fc24.s390x
quota-nls-4.03-7.fc25.noarch
python3-javapackages-4.7.0-6.1.fc25.noarch
libcephfs_jni-devel-10.2.4-2.fc25.s390x
keyutils-libs-devel-1.5.9-8.fc24.s390x
libicu-devel-57.1-4.fc25.s390x
harfbuzz-devel-1.3.2-1.fc25.s390x
libidn-devel-1.33-1.fc25.s390x
libnfs-1.9.8-2.fc24.s390x
libssh2-devel-1.8.0-1.fc25.s390x
qemu-sanity-check-nodeps-1.1.5-5.fc24.s390x
alsa-lib-devel-1.1.1-2.fc25.s390x
libnl3-3.2.29-2.fc25.s390x
git-core-doc-2.9.3-2.fc25.s390x
git-2.9.3-2.fc25.s390x
kernel-modules-4.9.5-200.fc25.s390x
libpsl-0.17.0-1.fc25.s390x
lua-libs-5.3.4-1.fc25.s390x
libseccomp-2.3.2-1.fc25.s390x
nss-util-devel-3.29.3-1.0.fc25.s390x
nss-softokn-freebl-devel-3.29.3-1.0.fc25.s390x
copy-jdk-configs-2.2-2.fc25.noarch
system-python-libs-3.5.3-3.fc25.s390x
json-glib-1.2.6-1.fc25.s390x
python3-libs-3.5.3-3.fc25.s390x
nss-3.29.3-1.0.fc25.s390x
hawkey-0.6.4-1.fc25.s390x
python2-dnf-1.1.10-6.fc25.noarch
bind-libs-lite-9.10.4-4.P6.fc25.s390x
perl-IO-1.36-385.fc25.s390x
vim-filesystem-8.0.425-1.fc25.s390x
python2-GitPython-2.1.3-1.fc25.noarch
pcre-devel-8.40-5.fc25.s390x
linux-firmware-20170313-72.git695f2d6d.fc25.noarch
libdrm-2.4.75-1.fc25.s390x
mesa-libEGL-13.0.3-5.fc25.s390x
systemd-container-231-14.fc25.s390x
gnutls-dane-3.5.10-1.fc25.s390x
gtk3-3.22.9-2.fc25.s390x
texlive-tetex-bin-svn36770.0-33.20160520.fc25.1.noarch
texlive-amsfonts-svn29208.3.04-33.fc25.1.noarch
texlive-babel-svn40706-33.fc25.1.noarch
texlive-colortbl-svn29803.v1.0a-33.fc25.1.noarch
texlive-babelbib-svn25245.1.31-33.fc25.1.noarch
texlive-footmisc-svn23330.5.5b-33.fc25.1.noarch
texlive-makeindex-svn40768-33.fc25.1.noarch
texlive-plain-svn40274-33.fc25.1.noarch
texlive-texconfig-bin-svn29741.0-33.20160520.fc25.1.noarch
texlive-zapfding-svn31835.0-33.fc25.1.noarch
texlive-microtype-svn41127-33.fc25.1.noarch
texlive-bookman-svn31835.0-33.fc25.1.noarch
texlive-dvisvgm-def-svn41011-33.fc25.1.noarch
texlive-finstrut-svn21719.0.5-33.fc25.1.noarch
texlive-hyph-utf8-svn41189-33.fc25.1.noarch
texlive-lualibs-svn40370-33.fc25.1.noarch
texlive-mparhack-svn15878.1.4-33.fc25.1.noarch
texlive-pspicture-svn15878.0-33.fc25.1.noarch
texlive-soul-svn15878.2.4-33.fc25.1.noarch
texlive-trimspaces-svn15878.1.1-33.fc25.1.noarch
texlive-varwidth-svn24104.0.92-33.fc25.1.noarch
texlive-geometry-svn19716.5.6-33.fc25.1.noarch
texlive-memoir-svn41203-33.fc25.1.noarch
texlive-pgf-svn40966-33.fc25.1.noarch
texlive-pst-coil-svn37377.1.07-33.fc25.1.noarch
texlive-pst-plot-svn41242-33.fc25.1.noarch
texlive-latex-bin-svn41438-33.fc25.1.noarch
texlive-ucs-svn35853.2.2-33.fc25.1.noarch
texlive-ae-svn15878.1.4-33.fc25.1.noarch
texlive-xetex-bin-svn41091-33.20160520.fc25.1.s390x
glusterfs-api-devel-3.10.0-1.fc25.s390x
mesa-libGL-devel-13.0.3-5.fc25.s390x
fedora-upgrade-26.1-1.fc25.noarch
fedpkg-1.28-1.fc25.noarch
vim-enhanced-8.0.425-1.fc25.s390x
perl-Thread-Queue-3.12-1.fc25.noarch
gstreamer1-plugins-base-1.10.4-1.fc25.s390x
screen-4.5.1-1.fc25.s390x
strace-4.16-1.fc25.s390x
fedora-repos-25-3.noarch
libacl-2.2.52-11.fc24.s390x
cdparanoia-libs-10.2-21.fc24.s390x
ustr-1.0.4-21.fc24.s390x
libusb-0.1.5-7.fc24.s390x
readline-devel-6.3-8.fc24.s390x
chkconfig-1.8-1.fc25.s390x
avahi-libs-0.6.32-4.fc25.s390x
perl-Unicode-Normalize-1.25-365.fc25.s390x
perl-libnet-3.10-1.fc25.noarch
perl-podlators-4.09-1.fc25.noarch
graphite2-1.3.6-1.fc25.s390x
dbus-python-1.2.4-2.fc25.s390x
libgnome-keyring-3.12.0-7.fc25.s390x
python-backports-1.0-8.fc25.s390x
python-pycparser-2.14-7.fc25.noarch
plymouth-scripts-0.9.3-0.6.20160620git0e65b86c.fc25.s390x
cronie-1.5.1-2.fc25.s390x
python2-librepo-1.7.18-3.fc25.s390x
at-spi2-core-2.22.0-1.fc25.s390x
libXv-1.0.11-1.fc25.s390x
python2-ndg_httpsclient-0.4.0-4.fc25.noarch
btrfs-progs-4.6.1-1.fc25.s390x
libgcc-6.3.1-1.fc25.s390x
libgomp-6.3.1-1.fc25.s390x
perl-Encode-2.88-5.fc25.s390x
cracklib-2.9.6-4.fc25.s390x
libobjc-6.3.1-1.fc25.s390x
gcc-6.3.1-1.fc25.s390x
python3-dnf-plugin-system-upgrade-0.7.1-4.fc25.noarch
NetworkManager-1.4.4-3.fc25.s390x
glibc-static-2.24-4.fc25.s390x
boost-random-1.60.0-10.fc25.s390x
libref_array-0.1.5-29.fc25.s390x
libXrender-devel-0.9.10-1.fc25.s390x
javapackages-tools-4.7.0-6.1.fc25.noarch
keyutils-1.5.9-8.fc24.s390x
libcom_err-devel-1.43.3-1.fc25.s390x
graphite2-devel-1.3.6-1.fc25.s390x
lzo-minilzo-2.08-8.fc24.s390x
libusbx-devel-1.0.21-1.fc25.s390x
virglrenderer-devel-0.5.0-1.20160411git61846f92f.fc25.s390x
acpica-tools-20160831-1.fc25.s390x
grep-2.27-2.fc25.s390x
dnf-conf-1.1.10-6.fc25.noarch
crypto-policies-20160921-4.gitf3018dd.fc25.noarch
gtk-update-icon-cache-3.22.9-2.fc25.s390x
rpm-build-libs-4.13.0.1-1.fc25.s390x
libnfsidmap-0.27-1.fc25.s390x
systemtap-devel-3.1-2.fc25.s390x
pcre2-10.23-4.fc25.s390x
systemd-231-14.fc25.s390x
gssproxy-0.7.0-2.fc25.s390x
SDL2-2.0.5-3.fc25.s390x
texlive-etex-pkg-svn39355-33.fc25.1.noarch
texlive-multido-svn18302.1.42-33.fc25.1.noarch
texlive-gsftopk-svn40768-33.fc25.1.noarch
texlive-pst-ovl-svn40873-33.fc25.1.noarch
texlive-ltabptch-svn17533.1.74d-33.fc25.1.noarch
texlive-cite-svn36428.5.5-33.fc25.1.noarch
texlive-fpl-svn15878.1.002-33.fc25.1.noarch
texlive-mathpazo-svn15878.1.003-33.fc25.1.noarch
texlive-rcs-svn15878.0-33.fc25.1.noarch
texlive-type1cm-svn21820.0-33.fc25.1.noarch
texlive-l3kernel-svn41246-33.fc25.1.noarch
texlive-hyperref-svn41396-33.fc25.1.noarch
texlive-pst-tree-svn24142.1.12-33.fc25.1.noarch
texlive-sansmathaccent-svn30187.0-33.fc25.1.noarch
texlive-dvipdfmx-bin-svn40273-33.20160520.fc25.1.s390x
texlive-zapfchan-svn31835.0-33.fc25.1.noarch
firewalld-0.4.4.4-1.fc25.noarch
glib2-static-2.50.3-1.fc25.s390x
libmicrohttpd-0.9.52-3.fc25.s390x
perl-open-1.10-385.fc25.noarch
bash-completion-2.5-1.fc25.noarch
gpg-pubkey-a29cb19c-53bcbba6
m4-1.4.17-9.fc24.s390x
liblockfile-1.09-4.fc24.s390x
sg3_utils-1.41-3.fc24.s390x
libXinerama-1.1.3-6.fc24.s390x
libXft-2.3.2-4.fc24.s390x
tcp_wrappers-libs-7.6-83.fc25.s390x
perl-Text-Tabs+Wrap-2013.0523-365.fc25.noarch
perl-Error-0.17024-7.fc25.noarch
perl-Term-Cap-1.17-365.fc25.noarch
perl-Pod-Usage-1.69-1.fc25.noarch
device-mapper-persistent-data-0.6.3-1.fc25.s390x
net-snmp-libs-5.7.3-13.fc25.s390x
libgusb-0.2.9-1.fc25.s390x
python3-six-1.10.0-3.fc25.noarch
python3-pysocks-1.5.6-5.fc25.noarch
python-chardet-2.3.0-1.fc25.noarch
python2-cffi-1.7.0-2.fc25.s390x
gc-devel-7.4.4-1.fc25.s390x
plymouth-0.9.3-0.6.20160620git0e65b86c.fc25.s390x
ebtables-2.0.10-21.fc25.s390x
python3-librepo-1.7.18-3.fc25.s390x
net-snmp-5.7.3-13.fc25.s390x
at-spi2-atk-2.22.0-1.fc25.s390x
avahi-autoipd-0.6.32-4.fc25.s390x
libcrypt-nss-2.24-4.fc25.s390x
libgo-6.3.1-1.fc25.s390x
cpp-6.3.1-1.fc25.s390x
glibc-devel-2.24-4.fc25.s390x
kernel-modules-4.9.3-200.fc25.s390x
emacs-25.1-3.fc25.s390x
pyparsing-2.1.10-1.fc25.noarch
libproxy-0.4.14-1.fc25.s390x
python3-pyparsing-2.1.10-1.fc25.noarch
libcollection-0.7.0-29.fc25.s390x
libcephfs-devel-10.2.4-2.fc25.s390x
libXdamage-devel-1.1.4-8.fc24.s390x
libverto-devel-0.2.6-6.fc24.s390x
snappy-1.1.3-2.fc24.s390x
cairo-gobject-devel-1.14.8-1.fc25.s390x
cyrus-sasl-devel-2.1.26-26.2.fc24.s390x
kernel-devel-4.9.5-200.fc25.s390x
libXi-1.7.9-1.fc25.s390x
distribution-gpg-keys-1.11-1.fc25.noarch
texlive-base-2016-33.20160520.fc25.noarch
gstreamer1-1.10.4-1.fc25.s390x
python3-rpm-4.13.0.1-1.fc25.s390x
systemtap-runtime-3.1-2.fc25.s390x
perl-SelfLoader-1.23-385.fc25.noarch
pcre-utf32-8.40-5.fc25.s390x
dbus-1.11.10-1.fc25.s390x
nfs-utils-2.1.1-2.rc1.fc25.s390x
bind99-license-9.9.9-4.P6.fc25.noarch
texlive-booktabs-svn40846-33.fc25.1.noarch
texlive-lm-svn28119.2.004-33.fc25.1.noarch
texlive-gsftopk-bin-svn40473-33.20160520.fc25.1.s390x
texlive-tex-svn40793-33.fc25.1.noarch
texlive-fancyref-svn15878.0.9c-33.fc25.1.noarch
texlive-chngcntr-svn17157.1.0a-33.fc25.1.noarch
texlive-fix2col-svn38770-33.fc25.1.noarch
texlive-marginnote-svn41382-33.fc25.1.noarch
texlive-pxfonts-svn15878.0-33.fc25.1.noarch
texlive-txfonts-svn15878.0-33.fc25.1.noarch
texlive-l3packages-svn41246-33.fc25.1.noarch
texlive-oberdiek-svn41346-33.fc25.1.noarch
texlive-pst-tools-svn34067.0.05-33.fc25.1.noarch
texlive-tex-gyre-svn18651.2.004-33.fc25.1.noarch
texlive-dvipdfmx-svn41149-33.fc25.1.noarch
texlive-collection-fontsrecommended-svn35830.0-33.20160520.fc25.1.noarch
gnutls-devel-3.5.10-1.fc25.s390x
libcacard-devel-2.5.3-1.fc25.s390x
selinux-policy-targeted-3.13.1-225.11.fc25.noarch
ykpers-1.18.0-2.fc25.s390x
python2-idna-2.5-1.fc25.noarch
python-async-0.6.1-9.fc22.s390x
dejavu-sans-mono-fonts-2.35-3.fc24.noarch
popt-1.16-7.fc24.s390x
cyrus-sasl-lib-2.1.26-26.2.fc24.s390x
xz-5.2.2-2.fc24.s390x
libpipeline-1.4.1-2.fc24.s390x
pinentry-0.9.7-2.fc24.s390x
pth-2.0.7-27.fc24.s390x
libsepol-2.5-10.fc25.s390x
sqlite-libs-3.14.2-1.fc25.s390x
libxcb-1.12-1.fc25.s390x
libicu-57.1-4.fc25.s390x
perl-Getopt-Long-2.49.1-1.fc25.noarch
avahi-glib-0.6.32-4.fc25.s390x
python3-pip-8.1.2-2.fc25.noarch
python3-libcomps-0.1.7-5.fc25.s390x
python-slip-0.6.4-4.fc25.noarch
python2-libcomps-0.1.7-5.fc25.s390x
gc-7.4.4-1.fc25.s390x
s390utils-cmsfs-1.36.0-1.fc25.s390x
newt-python-0.52.19-2.fc25.s390x
valgrind-3.12.0-1.fc25.s390x
emacs-filesystem-25.1-3.fc25.noarch
libdb-utils-5.3.28-16.fc25.s390x
qt5-srpm-macros-5.7.1-1.fc25.noarch
elfutils-default-yama-scope-0.168-1.fc25.noarch
device-mapper-event-1.02.136-3.fc25.s390x
perl-Class-Inspector-1.31-2.fc25.noarch
poppler-0.45.0-2.fc25.s390x
libbasicobjects-0.1.1-29.fc25.s390x
libradosstriper1-10.2.4-2.fc25.s390x
libXxf86vm-devel-1.1.4-3.fc24.s390x
gsm-1.0.16-1.fc25.s390x
zziplib-0.13.62-7.fc24.s390x
libpaper-1.1.24-12.fc24.s390x
libini_config-1.3.0-29.fc25.s390x
snappy-devel-1.1.3-2.fc24.s390x
libcap-ng-devel-0.7.8-1.fc25.s390x
libxkbcommon-devel-0.7.1-1.fc25.s390x
kernel-4.9.5-200.fc25.s390x
audit-libs-2.7.3-1.fc25.s390x
nss-softokn-3.29.3-1.0.fc25.s390x
openssl-libs-1.0.2k-1.fc25.s390x
libkadm5-1.14.4-7.fc25.s390x
rpm-libs-4.13.0.1-1.fc25.s390x
nss-tools-3.29.3-1.0.fc25.s390x
perl-5.24.1-385.fc25.s390x
pcre2-utf32-10.23-4.fc25.s390x
util-linux-2.28.2-2.fc25.s390x
mesa-libGLES-devel-13.0.3-5.fc25.s390x
libICE-1.0.9-8.fc25.s390x
texlive-etoolbox-svn38031.2.2a-33.fc25.1.noarch
texlive-dvips-svn41149-33.fc25.1.noarch
texlive-latexconfig-svn40274-33.fc25.1.noarch
texlive-tex-ini-files-svn40533-33.fc25.1.noarch
texlive-qstest-svn15878.0-33.fc25.1.noarch
texlive-cmap-svn41168-33.fc25.1.noarch
texlive-luatex-bin-svn41091-33.20160520.fc25.1.s390x
texlive-mflogo-svn38628-33.fc25.1.noarch
texlive-sansmath-svn17997.1.1-33.fc25.1.noarch
texlive-unicode-data-svn39808-33.fc25.1.noarch
texlive-luaotfload-bin-svn34647.0-33.20160520.fc25.1.noarch
texlive-listings-svn37534.1.6-33.fc25.1.noarch
texlive-pstricks-svn41321-33.fc25.1.noarch
texlive-metalogo-svn18611.0.12-33.fc25.1.noarch
texlive-collection-latex-svn41011-33.20160520.fc25.1.noarch
ghostscript-9.20-6.fc25.s390x
kernel-4.10.5-200.fc25.s390x
pcre-static-8.40-5.fc25.s390x
python2-dnf-plugins-core-0.1.21-5.fc25.noarch
xkeyboard-config-2.20-2.fc25.noarch
libattr-2.4.47-16.fc24.s390x
acl-2.2.52-11.fc24.s390x
libvisual-0.4.0-20.fc24.s390x
libpcap-1.7.4-2.fc24.s390x
libutempter-1.1.6-8.fc24.s390x
libgudev-230-3.fc24.s390x
popt-devel-1.16-7.fc24.s390x
make-4.1-5.fc24.s390x
hicolor-icon-theme-0.15-3.fc24.noarch
setup-2.10.4-1.fc25.noarch
bash-4.3.43-4.fc25.s390x
nspr-4.13.1-1.fc25.s390x
libjpeg-turbo-1.5.1-0.fc25.s390x
perl-Socket-2.024-1.fc25.s390x
perl-HTTP-Tiny-0.070-1.fc25.noarch
ipset-6.29-1.fc25.s390x
python2-setuptools-25.1.1-1.fc25.noarch
gsettings-desktop-schemas-3.22.0-1.fc25.s390x
python3-setuptools-25.1.1-1.fc25.noarch
python-slip-dbus-0.6.4-4.fc25.noarch
python2-ply-3.8-2.fc25.noarch
dtc-1.4.2-1.fc25.s390x
guile-2.0.13-1.fc25.s390x
cronie-anacron-1.5.1-2.fc25.s390x
libXtst-1.2.3-1.fc25.s390x
iso-codes-3.70-1.fc25.noarch
s390utils-1.36.0-1.fc25.s390x
python-backports-ssl_match_hostname-3.5.0.1-3.fc25.noarch
fedora-cert-0.6.0.1-1.fc25.noarch
libstdc++-6.3.1-1.fc25.s390x
subversion-libs-1.9.5-1.fc25.s390x
libgfortran-6.3.1-1.fc25.s390x
libtasn1-4.10-1.fc25.s390x
dnf-plugin-system-upgrade-0.7.1-4.fc25.noarch
lvm2-2.02.167-3.fc25.s390x
libselinux-devel-2.5-13.fc25.s390x
perl-Time-Local-1.250-1.fc25.noarch
libtirpc-1.0.1-3.rc3.fc25.s390x
libradosstriper-devel-10.2.4-2.fc25.s390x
flac-libs-1.3.2-1.fc25.s390x
perl-Digest-1.17-366.fc25.noarch
teckit-2.5.1-15.fc24.s390x
libpath_utils-0.2.1-29.fc25.s390x
attr-2.4.47-16.fc24.s390x
usbredir-0.7.1-2.fc24.s390x
cairo-devel-1.14.8-1.fc25.s390x
lzo-devel-2.08-8.fc24.s390x
libcap-devel-2.25-2.fc25.s390x
opus-1.1.3-2.fc25.s390x
pcre-8.40-5.fc25.s390x
firewalld-filesystem-0.4.4.4-1.fc25.noarch
coreutils-8.25-16.fc25.s390x
krb5-devel-1.14.4-7.fc25.s390x
rpm-4.13.0.1-1.fc25.s390x
openldap-2.4.44-7.fc25.s390x
kernel-devel-4.10.5-200.fc25.s390x
pcre2-utf16-10.23-4.fc25.s390x
systemd-pam-231-14.fc25.s390x
glusterfs-fuse-3.10.0-1.fc25.s390x
libbsd-0.8.3-1.fc25.s390x
texlive-url-svn32528.3.4-33.fc25.1.noarch
texlive-dvips-bin-svn40987-33.20160520.fc25.1.s390x
texlive-index-svn24099.4.1beta-33.fc25.1.noarch
texlive-setspace-svn24881.6.7a-33.fc25.1.noarch
texlive-mathtools-svn38833-33.fc25.1.noarch
texlive-cm-svn32865.0-33.fc25.1.noarch
texlive-graphics-def-svn41879-33.fc25.1.noarch
texlive-mdwtools-svn15878.1.05.4-33.fc25.1.noarch
texlive-rsfs-svn15878.0-33.fc25.1.noarch
texlive-ucharcat-svn38907-33.fc25.1.noarch
texlive-fontspec-svn41262-33.fc25.1.noarch
texlive-showexpl-svn32737.v0.3l-33.fc25.1.noarch
texlive-pstricks-add-svn40744-33.fc25.1.noarch
texlive-beamer-svn36461.3.36-33.fc25.1.noarch
texlive-collection-basic-svn41149-33.20160520.fc25.1.noarch
ghostscript-x11-9.20-6.fc25.s390x
mock-1.3.4-1.fc25.noarch
pcre2-devel-10.23-4.fc25.s390x
rpm-build-4.13.0.1-1.fc25.s390x
xemacs-filesystem-21.5.34-20.20170124hgf412e9f093d4.fc25.noarch
gpg-pubkey-a0a7badb-52844296
readline-6.3-8.fc24.s390x
cpio-2.12-3.fc24.s390x
p11-kit-trust-0.23.2-2.fc24.s390x
qrencode-libs-3.4.2-6.fc24.s390x
GeoIP-1.6.9-2.fc24.s390x
libXcomposite-0.4.4-8.fc24.s390x
procps-ng-3.3.10-11.fc24.s390x
GConf2-3.2.6-16.fc24.s390x
xz-devel-5.2.2-2.fc24.s390x
fedora-logos-22.0.0-3.fc24.s390x
gpg-pubkey-e372e838-56fd7943
kmod-libs-23-1.fc25.s390x
perl-parent-0.236-1.fc25.noarch
perl-TermReadKey-2.37-1.fc25.s390x
dhcp-libs-4.3.5-1.fc25.s390x
ncurses-c++-libs-6.0-6.20160709.fc25.s390x
gzip-1.8-1.fc25.s390x
python3-gobject-base-3.22.0-1.fc25.s390x
python2-yubico-1.3.2-3.fc25.noarch
s390utils-ziomon-1.36.0-1.fc25.s390x
librepo-1.7.18-3.fc25.s390x
librsvg2-2.40.16-2.fc25.s390x
gnat-srpm-macros-4-1.fc25.noarch
python-decoratortools-1.8-12.fc25.noarch
m17n-db-1.7.0-7.fc25.noarch
glibc-common-2.24-4.fc25.s390x
e2fsprogs-libs-1.43.3-1.fc25.s390x
curl-7.51.0-4.fc25.s390x
libvorbis-1.3.5-1.fc25.s390x
gcc-gdb-plugin-6.3.1-1.fc25.s390x
perl-Time-HiRes-1.9741-1.fc25.s390x
npth-1.3-1.fc25.s390x
libcephfs1-10.2.4-2.fc25.s390x
wayland-devel-1.12.0-1.fc25.s390x
libxcb-devel-1.12-1.fc25.s390x
perl-encoding-2.19-5.fc25.s390x
python3-cssselect-0.9.2-1.fc25.noarch
gettext-libs-0.19.8.1-3.fc25.s390x
at-spi2-atk-devel-2.22.0-1.fc25.s390x
virglrenderer-0.5.0-1.20160411git61846f92f.fc25.s390x
pixman-devel-0.34.0-2.fc24.s390x
libnfs-devel-1.9.8-2.fc24.s390x
git-core-2.9.3-2.fc25.s390x
libX11-common-1.6.4-4.fc25.noarch
GeoIP-GeoLite-data-2017.01-1.fc25.noarch
file-libs-5.29-3.fc25.s390x
nss-softokn-devel-3.29.3-1.0.fc25.s390x
libblkid-2.28.2-2.fc25.s390x
python3-3.5.3-3.fc25.s390x
python2-hawkey-0.6.4-1.fc25.s390x
bind-libs-9.10.4-4.P6.fc25.s390x
vim-common-8.0.425-1.fc25.s390x
glib2-devel-2.50.3-1.fc25.s390x
mesa-libgbm-13.0.3-5.fc25.s390x
systemd-udev-231-14.fc25.s390x
gdk-pixbuf2-modules-2.36.5-1.fc25.s390x
texlive-ifxetex-svn19685.0.5-33.fc25.1.noarch
texlive-caption-svn41409-33.fc25.1.noarch
texlive-float-svn15878.1.3d-33.fc25.1.noarch
texlive-pdftex-def-svn22653.0.06d-33.fc25.1.noarch
texlive-xdvi-bin-svn40750-33.20160520.fc25.1.s390x
texlive-beton-svn15878.0-33.fc25.1.noarch
texlive-filecontents-svn24250.1.3-33.fc25.1.noarch
texlive-lm-math-svn36915.1.959-33.fc25.1.noarch
texlive-pslatex-svn16416.0-33.fc25.1.noarch
texlive-times-svn35058.0-33.fc25.1.noarch
texlive-breakurl-svn29901.1.40-33.fc25.1.noarch
texlive-filehook-svn24280.0.5d-33.fc25.1.noarch
texlive-pst-pdf-svn31660.1.1v-33.fc25.1.noarch
texlive-seminar-svn34011.1.62-33.fc25.1.noarch
texlive-xetexconfig-svn41133-33.fc25.1.noarch
python2-gluster-3.10.0-1.fc25.s390x
systemtap-3.1-2.fc25.s390x
python-rpm-macros-3-12.fc25.noarch
rpm-devel-4.13.0.1-1.fc25.s390x
vim-minimal-8.0.425-1.fc25.s390x
=== TEST BEGIN ===
Using CC: /home/fam/bin/cc
Install prefix    /var/tmp/patchew-tester-tmp-ayu3niwi/src/install
BIOS directory    /var/tmp/patchew-tester-tmp-ayu3niwi/src/install/share/qemu
binary directory  /var/tmp/patchew-tester-tmp-ayu3niwi/src/install/bin
library directory /var/tmp/patchew-tester-tmp-ayu3niwi/src/install/lib
module directory  /var/tmp/patchew-tester-tmp-ayu3niwi/src/install/lib/qemu
libexec directory /var/tmp/patchew-tester-tmp-ayu3niwi/src/install/libexec
include directory /var/tmp/patchew-tester-tmp-ayu3niwi/src/install/include
config directory  /var/tmp/patchew-tester-tmp-ayu3niwi/src/install/etc
local state directory   /var/tmp/patchew-tester-tmp-ayu3niwi/src/install/var
Manual directory  /var/tmp/patchew-tester-tmp-ayu3niwi/src/install/share/man
ELF interp prefix /usr/gnemul/qemu-%M
Source path       /var/tmp/patchew-tester-tmp-ayu3niwi/src
C compiler        /home/fam/bin/cc
Host C compiler   cc
C++ compiler      c++
Objective-C compiler /home/fam/bin/cc
ARFLAGS           rv
CFLAGS            -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -g 
QEMU_CFLAGS       -I/usr/include/pixman-1  -Werror -DHAS_LIBSSH2_SFTP_FSYNC -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -D_GNU_SOURCE -m64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv  -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -I/usr/include/p11-kit-1    -I/usr/include/libpng16 -I/usr/include/libdrm  -I/usr/include/cacard -I/usr/include/nss3 -I/usr/include/nspr4 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/libusb-1.0 
LDFLAGS           -Wl,--warn-common -m64 -g 
make              make
install           install
python            python -B
smbd              /usr/sbin/smbd
module support    no
host CPU          s390x
host big endian   yes
target list        aarch64-softmmu alpha-softmmu arm-softmmu cris-softmmu i386-softmmu lm32-softmmu m68k-softmmu microblazeel-softmmu microblaze-softmmu mips64el-softmmu mips64-softmmu mipsel-softmmu mips-softmmu moxie-softmmu nios2-softmmu or1k-softmmu ppc64-softmmu ppcemb-softmmu ppc-softmmu s390x-softmmu sh4eb-softmmu sh4-softmmu sparc64-softmmu sparc-softmmu tricore-softmmu unicore32-softmmu x86_64-softmmu xtensaeb-softmmu xtensa-softmmu aarch64-linux-user alpha-linux-user armeb-linux-user arm-linux-user cris-linux-user hppa-linux-user i386-linux-user m68k-linux-user microblazeel-linux-user microblaze-linux-user mips64el-linux-user mips64-linux-user mipsel-linux-user mips-linux-user mipsn32el-linux-user mipsn32-linux-user nios2-linux-user or1k-linux-user ppc64abi32-linux-user ppc64le-linux-user ppc64-linux-user ppc-linux-user s390x-linux-user sh4eb-linux-user sh4-linux-user sparc32plus-linux-user sparc64-linux-user sparc-linux-user tilegx-linux-user x86_64-linux-user
tcg debug enabled no
gprof enabled     no
sparse enabled    no
strip binaries    yes
profiler          no
static build      no
pixman            system
SDL support       yes (2.0.5)
GTK support       yes (3.22.9)
GTK GL support    yes
VTE support       yes (0.46.1)
TLS priority      NORMAL
GNUTLS support    yes
GNUTLS rnd        yes
libgcrypt         no
libgcrypt kdf     no
nettle            yes (3.3)
nettle kdf        yes
libtasn1          yes
curses support    yes
virgl support     yes
curl support      yes
mingw32 support   no
Audio drivers     oss
Block whitelist (rw) 
Block whitelist (ro) 
VirtFS support    yes
VNC support       yes
VNC SASL support  yes
VNC JPEG support  yes
VNC PNG support   yes
xen support       no
brlapi support    yes
bluez  support    yes
Documentation     yes
PIE               no
vde support       no
netmap support    no
Linux AIO support yes
ATTR/XATTR support yes
Install blobs     yes
KVM support       yes
HAX support       no
RDMA support      no
TCG interpreter   no
fdt support       yes
preadv support    yes
fdatasync         yes
madvise           yes
posix_madvise     yes
libcap-ng support yes
vhost-net support yes
vhost-scsi support yes
vhost-vsock support yes
Trace backends    log
spice support     no 
rbd support       yes
xfsctl support    no
smartcard support yes
libusb            yes
usb net redir     yes
OpenGL support    yes
OpenGL dmabufs    yes
libiscsi support  yes
libnfs support    yes
build guest agent yes
QGA VSS support   no
QGA w32 disk info no
QGA MSI support   no
seccomp support   no
coroutine backend ucontext
coroutine pool    yes
debug stack usage no
GlusterFS support yes
gcov              gcov
gcov enabled      no
TPM support       yes
libssh2 support   yes
TPM passthrough   no
QOM debugging     yes
lzo support       yes
snappy support    yes
bzip2 support     yes
NUMA host support no
tcmalloc support  no
jemalloc support  no
avx2 optimization no
replication support yes
  GEN     aarch64-softmmu/config-devices.mak.tmp
  GEN     cris-softmmu/config-devices.mak.tmp
  GEN     alpha-softmmu/config-devices.mak.tmp
  GEN     arm-softmmu/config-devices.mak.tmp
  GEN     cris-softmmu/config-devices.mak
  GEN     i386-softmmu/config-devices.mak.tmp
  GEN     arm-softmmu/config-devices.mak
  GEN     alpha-softmmu/config-devices.mak
  GEN     lm32-softmmu/config-devices.mak.tmp
  GEN     m68k-softmmu/config-devices.mak.tmp
  GEN     aarch64-softmmu/config-devices.mak
  GEN     microblazeel-softmmu/config-devices.mak.tmp
  GEN     i386-softmmu/config-devices.mak
  GEN     lm32-softmmu/config-devices.mak
  GEN     m68k-softmmu/config-devices.mak
  GEN     microblaze-softmmu/config-devices.mak.tmp
  GEN     mips64el-softmmu/config-devices.mak.tmp
  GEN     microblazeel-softmmu/config-devices.mak
  GEN     mips64-softmmu/config-devices.mak.tmp
  GEN     mipsel-softmmu/config-devices.mak.tmp
  GEN     microblaze-softmmu/config-devices.mak
  GEN     mips-softmmu/config-devices.mak.tmp
  GEN     mips64el-softmmu/config-devices.mak
  GEN     mips64-softmmu/config-devices.mak
  GEN     moxie-softmmu/config-devices.mak.tmp
  GEN     nios2-softmmu/config-devices.mak.tmp
  GEN     mipsel-softmmu/config-devices.mak
  GEN     or1k-softmmu/config-devices.mak.tmp
  GEN     mips-softmmu/config-devices.mak
  GEN     moxie-softmmu/config-devices.mak
  GEN     nios2-softmmu/config-devices.mak
  GEN     ppc64-softmmu/config-devices.mak.tmp
  GEN     ppcemb-softmmu/config-devices.mak.tmp
  GEN     ppc-softmmu/config-devices.mak.tmp
  GEN     or1k-softmmu/config-devices.mak
  GEN     s390x-softmmu/config-devices.mak.tmp
  GEN     ppc-softmmu/config-devices.mak
  GEN     s390x-softmmu/config-devices.mak
  GEN     sh4eb-softmmu/config-devices.mak.tmp
  GEN     ppcemb-softmmu/config-devices.mak
  GEN     ppc64-softmmu/config-devices.mak
  GEN     sparc64-softmmu/config-devices.mak.tmp
  GEN     sparc-softmmu/config-devices.mak.tmp
  GEN     sh4-softmmu/config-devices.mak.tmp
  GEN     sparc-softmmu/config-devices.mak
  GEN     sh4eb-softmmu/config-devices.mak
  GEN     tricore-softmmu/config-devices.mak.tmp
  GEN     unicore32-softmmu/config-devices.mak.tmp
  GEN     sh4-softmmu/config-devices.mak
  GEN     sparc64-softmmu/config-devices.mak
  GEN     x86_64-softmmu/config-devices.mak.tmp
  GEN     tricore-softmmu/config-devices.mak
  GEN     unicore32-softmmu/config-devices.mak
  GEN     xtensaeb-softmmu/config-devices.mak.tmp
  GEN     xtensa-softmmu/config-devices.mak.tmp
  GEN     aarch64-linux-user/config-devices.mak.tmp
  GEN     xtensa-softmmu/config-devices.mak
  GEN     xtensaeb-softmmu/config-devices.mak
  GEN     x86_64-softmmu/config-devices.mak
  GEN     alpha-linux-user/config-devices.mak.tmp
  GEN     armeb-linux-user/config-devices.mak.tmp
  GEN     arm-linux-user/config-devices.mak.tmp
  GEN     aarch64-linux-user/config-devices.mak
  GEN     cris-linux-user/config-devices.mak.tmp
  GEN     armeb-linux-user/config-devices.mak
  GEN     hppa-linux-user/config-devices.mak.tmp
  GEN     arm-linux-user/config-devices.mak
  GEN     i386-linux-user/config-devices.mak.tmp
  GEN     cris-linux-user/config-devices.mak
  GEN     m68k-linux-user/config-devices.mak.tmp
  GEN     alpha-linux-user/config-devices.mak
  GEN     hppa-linux-user/config-devices.mak
  GEN     microblaze-linux-user/config-devices.mak.tmp
  GEN     microblazeel-linux-user/config-devices.mak.tmp
  GEN     i386-linux-user/config-devices.mak
  GEN     m68k-linux-user/config-devices.mak
  GEN     mips64el-linux-user/config-devices.mak.tmp
  GEN     mips64-linux-user/config-devices.mak.tmp
  GEN     microblazeel-linux-user/config-devices.mak
  GEN     microblaze-linux-user/config-devices.mak
  GEN     mipsel-linux-user/config-devices.mak.tmp
  GEN     mips-linux-user/config-devices.mak.tmp
  GEN     mips64el-linux-user/config-devices.mak
  GEN     mipsel-linux-user/config-devices.mak
  GEN     mips64-linux-user/config-devices.mak
  GEN     mipsn32el-linux-user/config-devices.mak.tmp
  GEN     mips-linux-user/config-devices.mak
  GEN     mipsn32-linux-user/config-devices.mak.tmp
  GEN     or1k-linux-user/config-devices.mak.tmp
  GEN     nios2-linux-user/config-devices.mak.tmp
  GEN     mipsn32el-linux-user/config-devices.mak
  GEN     mipsn32-linux-user/config-devices.mak
  GEN     nios2-linux-user/config-devices.mak
  GEN     ppc64abi32-linux-user/config-devices.mak.tmp
  GEN     or1k-linux-user/config-devices.mak
  GEN     ppc64-linux-user/config-devices.mak.tmp
  GEN     ppc64le-linux-user/config-devices.mak.tmp
  GEN     ppc-linux-user/config-devices.mak.tmp
  GEN     ppc64abi32-linux-user/config-devices.mak
  GEN     ppc64le-linux-user/config-devices.mak
  GEN     s390x-linux-user/config-devices.mak.tmp
  GEN     ppc64-linux-user/config-devices.mak
  GEN     sh4-linux-user/config-devices.mak.tmp
  GEN     sh4eb-linux-user/config-devices.mak.tmp
  GEN     ppc-linux-user/config-devices.mak
  GEN     s390x-linux-user/config-devices.mak
  GEN     sparc32plus-linux-user/config-devices.mak.tmp
  GEN     sh4-linux-user/config-devices.mak
  GEN     sparc64-linux-user/config-devices.mak.tmp
  GEN     sh4eb-linux-user/config-devices.mak
  GEN     sparc-linux-user/config-devices.mak.tmp
  GEN     tilegx-linux-user/config-devices.mak.tmp
  GEN     sparc32plus-linux-user/config-devices.mak
  GEN     sparc64-linux-user/config-devices.mak
  GEN     sparc-linux-user/config-devices.mak
  GEN     x86_64-linux-user/config-devices.mak.tmp
  GEN     config-host.h
  GEN     tilegx-linux-user/config-devices.mak
  GEN     qemu-options.def
  GEN     qmp-commands.h
  GEN     x86_64-linux-user/config-devices.mak
  GEN     qapi-types.h
  GEN     qapi-visit.h
  GEN     qapi-event.h
  GEN     qmp-marshal.c
  GEN     qapi-types.c
  GEN     qapi-visit.c
  GEN     qapi-event.c
  GEN     qmp-introspect.h
  GEN     qmp-introspect.c
  GEN     trace/generated-tcg-tracers.h
  GEN     trace/generated-helpers-wrappers.h
  GEN     trace/generated-helpers.h
  GEN     trace/generated-helpers.c
  GEN     module_block.h
  GEN     tests/test-qapi-types.h
  GEN     tests/test-qapi-visit.h
  GEN     tests/test-qmp-commands.h
  GEN     tests/test-qapi-event.h
  GEN     trace-root.h
  GEN     tests/test-qmp-introspect.h
  GEN     util/trace.h
  GEN     crypto/trace.h
  GEN     io/trace.h
  GEN     migration/trace.h
  GEN     block/trace.h
  GEN     backends/trace.h
  GEN     hw/block/trace.h
  GEN     hw/block/dataplane/trace.h
  GEN     hw/char/trace.h
  GEN     hw/intc/trace.h
  GEN     hw/virtio/trace.h
  GEN     hw/net/trace.h
  GEN     hw/audio/trace.h
  GEN     hw/scsi/trace.h
  GEN     hw/usb/trace.h
  GEN     hw/misc/trace.h
  GEN     hw/nvram/trace.h
  GEN     hw/display/trace.h
  GEN     hw/input/trace.h
  GEN     hw/timer/trace.h
  GEN     hw/dma/trace.h
  GEN     hw/sparc/trace.h
  GEN     hw/sd/trace.h
  GEN     hw/isa/trace.h
  GEN     hw/mem/trace.h
  GEN     hw/i386/trace.h
  GEN     hw/i386/xen/trace.h
  GEN     hw/ppc/trace.h
  GEN     hw/9pfs/trace.h
  GEN     hw/pci/trace.h
  GEN     hw/s390x/trace.h
  GEN     hw/vfio/trace.h
  GEN     hw/acpi/trace.h
  GEN     hw/arm/trace.h
  GEN     hw/alpha/trace.h
  GEN     hw/xen/trace.h
  GEN     ui/trace.h
  GEN     audio/trace.h
  GEN     net/trace.h
  GEN     target/arm/trace.h
  GEN     target/i386/trace.h
  GEN     target/mips/trace.h
  GEN     target/sparc/trace.h
  GEN     target/s390x/trace.h
  GEN     target/ppc/trace.h
  GEN     qom/trace.h
  GEN     linux-user/trace.h
  GEN     qapi/trace.h
  GEN     trace-root.c
  GEN     util/trace.c
  GEN     crypto/trace.c
  GEN     io/trace.c
  GEN     migration/trace.c
  GEN     block/trace.c
  GEN     backends/trace.c
  GEN     hw/block/dataplane/trace.c
  GEN     hw/block/trace.c
  GEN     hw/char/trace.c
  GEN     hw/intc/trace.c
  GEN     hw/virtio/trace.c
  GEN     hw/net/trace.c
  GEN     hw/audio/trace.c
  GEN     hw/misc/trace.c
  GEN     hw/usb/trace.c
  GEN     hw/scsi/trace.c
  GEN     hw/nvram/trace.c
  GEN     hw/display/trace.c
  GEN     hw/input/trace.c
  GEN     hw/timer/trace.c
  GEN     hw/dma/trace.c
  GEN     hw/sparc/trace.c
  GEN     hw/sd/trace.c
  GEN     hw/isa/trace.c
  GEN     hw/mem/trace.c
  GEN     hw/i386/trace.c
  GEN     hw/i386/xen/trace.c
  GEN     hw/9pfs/trace.c
  GEN     hw/ppc/trace.c
  GEN     hw/pci/trace.c
  GEN     hw/s390x/trace.c
  GEN     hw/vfio/trace.c
  GEN     hw/acpi/trace.c
  GEN     hw/arm/trace.c
  GEN     hw/alpha/trace.c
  GEN     hw/xen/trace.c
  GEN     ui/trace.c
  GEN     audio/trace.c
  GEN     net/trace.c
  GEN     target/arm/trace.c
  GEN     target/i386/trace.c
  GEN     target/mips/trace.c
  GEN     target/sparc/trace.c
  GEN     target/s390x/trace.c
  GEN     target/ppc/trace.c
  GEN     qom/trace.c
  GEN     linux-user/trace.c
  GEN     config-all-devices.mak
  GEN     qapi/trace.c
  CC      tests/qemu-iotests/socket_scm_helper.o
  GEN     qemu-options.texi
  GEN     qemu-monitor.texi
  GEN     qemu-img-cmds.texi
  GEN     qemu-monitor-info.texi
  GEN     qemu-img.1
  GEN     qemu-nbd.8
  GEN     qemu-ga.8
  GEN     docs/version.texi
  GEN     docs/qemu-qmp-qapi.texi
  GEN     docs/qemu-ga-qapi.texi
  GEN     fsdev/virtfs-proxy-helper.1
  GEN     qga/qapi-generated/qga-qapi-types.h
  GEN     qga/qapi-generated/qga-qapi-visit.h
  GEN     qga/qapi-generated/qga-qmp-commands.h
  GEN     qga/qapi-generated/qga-qapi-types.c
  GEN     qga/qapi-generated/qga-qapi-visit.c
  GEN     qga/qapi-generated/qga-qmp-marshal.c
  CC      util/trace.o
  CC      trace-root.o
  CC      io/trace.o
  CC      crypto/trace.o
  CC      block/trace.o
  CC      migration/trace.o
  CC      backends/trace.o
  CC      hw/block/trace.o
  CC      hw/block/dataplane/trace.o
  CC      hw/intc/trace.o
  CC      hw/char/trace.o
  CC      hw/net/trace.o
  CC      hw/virtio/trace.o
  CC      hw/audio/trace.o
  CC      hw/misc/trace.o
  CC      hw/usb/trace.o
  CC      hw/scsi/trace.o
  CC      hw/nvram/trace.o
  CC      hw/display/trace.o
  CC      hw/input/trace.o
  CC      hw/timer/trace.o
  CC      hw/dma/trace.o
  CC      hw/sparc/trace.o
  CC      hw/sd/trace.o
  CC      hw/isa/trace.o
  CC      hw/mem/trace.o
  CC      hw/i386/xen/trace.o
  CC      hw/i386/trace.o
  CC      hw/9pfs/trace.o
  CC      hw/ppc/trace.o
  CC      hw/pci/trace.o
  CC      hw/s390x/trace.o
  CC      hw/vfio/trace.o
  CC      hw/acpi/trace.o
  CC      hw/arm/trace.o
  CC      hw/alpha/trace.o
  CC      hw/xen/trace.o
  CC      ui/trace.o
  CC      audio/trace.o
  CC      net/trace.o
  CC      target/arm/trace.o
  CC      target/i386/trace.o
  CC      target/mips/trace.o
  CC      target/sparc/trace.o
  CC      target/s390x/trace.o
  CC      target/ppc/trace.o
  CC      linux-user/trace.o
  CC      qom/trace.o
  CC      qapi/trace.o
  CC      qmp-introspect.o
  CC      qapi-types.o
  CC      qapi-visit.o
  CC      qapi-event.o
  CC      qapi/qapi-visit-core.o
  CC      qapi/qapi-dealloc-visitor.o
  CC      qapi/qobject-input-visitor.o
  CC      qapi/qmp-registry.o
  CC      qapi/qobject-output-visitor.o
  CC      qapi/qmp-dispatch.o
  CC      qapi/string-input-visitor.o
  CC      qapi/string-output-visitor.o
  CC      qapi/opts-visitor.o
  CC      qapi/qapi-clone-visitor.o
  CC      qapi/qmp-event.o
  CC      qapi/qapi-util.o
  CC      qobject/qnull.o
  CC      qobject/qint.o
  CC      qobject/qdict.o
  CC      qobject/qstring.o
  CC      qobject/qlist.o
  CC      qobject/qfloat.o
  CC      qobject/qbool.o
  CC      qobject/qjson.o
  CC      qobject/qobject.o
  CC      qobject/json-lexer.o
  CC      qobject/json-streamer.o
  CC      qobject/json-parser.o
  CC      trace/control.o
  CC      trace/qmp.o
  CC      util/osdep.o
  CC      util/unicode.o
  CC      util/cutils.o
  CC      util/qemu-timer-common.o
  CC      util/bufferiszero.o
  CC      util/lockcnt.o
  CC      util/aiocb.o
  CC      util/thread-pool.o
  CC      util/async.o
  CC      util/qemu-timer.o
  CC      util/main-loop.o
  CC      util/iohandler.o
  CC      util/aio-posix.o
  CC      util/compatfd.o
  CC      util/event_notifier-posix.o
  CC      util/mmap-alloc.o
  CC      util/oslib-posix.o
  CC      util/qemu-openpty.o
  CC      util/qemu-thread-posix.o
  CC      util/memfd.o
  CC      util/envlist.o
  CC      util/path.o
  CC      util/module.o
  CC      util/host-utils.o
  CC      util/bitmap.o
  CC      util/bitops.o
  CC      util/hbitmap.o
  CC      util/fifo8.o
  CC      util/acl.o
  CC      util/error.o
  CC      util/qemu-error.o
  CC      util/id.o
  CC      util/iov.o
  CC      util/qemu-config.o
  CC      util/qemu-sockets.o
  CC      util/uri.o
  CC      util/notify.o
  CC      util/qemu-option.o
  CC      util/qemu-progress.o
  CC      util/keyval.o
  CC      util/hexdump.o
  CC      util/crc32c.o
  CC      util/uuid.o
  CC      util/throttle.o
  CC      util/getauxval.o
  CC      util/readline.o
  CC      util/rcu.o
  CC      util/qemu-coroutine.o
  CC      util/qemu-coroutine-lock.o
  CC      util/qemu-coroutine-io.o
  CC      util/qemu-coroutine-sleep.o
  CC      util/coroutine-ucontext.o
  CC      util/buffer.o
  CC      util/timed-average.o
  CC      util/base64.o
  CC      util/log.o
  CC      util/qdist.o
  CC      util/range.o
  CC      util/qht.o
  CC      util/systemd.o
  CC      crypto/pbkdf-stub.o
  CC      stubs/arch-query-cpu-def.o
  CC      stubs/arch-query-cpu-model-expansion.o
  CC      stubs/arch-query-cpu-model-comparison.o
  CC      stubs/arch-query-cpu-model-baseline.o
  CC      stubs/bdrv-next-monitor-owned.o
  CC      stubs/blockdev-close-all-bdrv-states.o
  CC      stubs/blk-commit-all.o
  CC      stubs/clock-warp.o
  CC      stubs/cpu-get-clock.o
  CC      stubs/cpu-get-icount.o
  CC      stubs/error-printf.o
  CC      stubs/dump.o
  CC      stubs/fdset.o
  CC      stubs/gdbstub.o
  CC      stubs/get-vm-name.o
  CC      stubs/iothread.o
  CC      stubs/iothread-lock.o
  CC      stubs/is-daemonized.o
  CC      stubs/linux-aio.o
  CC      stubs/machine-init-done.o
  CC      stubs/migr-blocker.o
  CC      stubs/notify-event.o
  CC      stubs/monitor.o
  CC      stubs/qtest.o
  CC      stubs/replay.o
  CC      stubs/runstate-check.o
  CC      stubs/set-fd-handler.o
  CC      stubs/slirp.o
  CC      stubs/sysbus.o
  CC      stubs/trace-control.o
  CC      stubs/uuid.o
  CC      stubs/vm-stop.o
  CC      stubs/vmstate.o
  CC      stubs/qmp_pc_dimm_device_list.o
  CC      stubs/target-monitor-defs.o
  CC      stubs/target-get-monitor-def.o
  CC      stubs/pc_madt_cpu_entry.o
  CC      stubs/vmgenid.o
cd "/var/tmp/patchew-tester-tmp-ayu3niwi/src/block/rust" && CARGO_TARGET_DIR="/var/tmp/patchew-tester-tmp-ayu3niwi/src/build/rust" cargo build
/bin/sh: cargo: command not found
Makefile:373: recipe for target 'rust/debug/libqemu_rust_block_drivers.a' failed
make: *** [rust/debug/libqemu_rust_block_drivers.a] Error 127
make: *** Waiting for unfinished jobs....
=== OUTPUT END ===

Test command exited with code: 2


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@freelists.org

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [RFC for-3.0 0/4] block: Add qcow2-rust block driver
  2017-04-18 15:58 [Qemu-devel] [RFC for-3.0 0/4] block: Add qcow2-rust block driver Max Reitz
                   ` (5 preceding siblings ...)
  2017-04-18 16:08 ` no-reply
@ 2017-04-18 16:09 ` Marc-André Lureau
  2017-04-18 16:12 ` no-reply
  2017-04-21 15:51 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
  8 siblings, 0 replies; 13+ messages in thread
From: Marc-André Lureau @ 2017-04-18 16:09 UTC (permalink / raw)
  To: Max Reitz, qemu-block; +Cc: Kevin Wolf, John Snow, qemu-devel

woot! Happy birthday!

On Tue, Apr 18, 2017 at 7:58 PM Max Reitz <mreitz@redhat.com> wrote:

> The issues of using C are well understood and nobody likes it. Let's use
> a better language. C++ is not a better language, Rust is. Everybody
> loves Rust. Rust is good. Rust is hip. It will attract developers, it
> will improve code quality, it will improve performance, it will even
> improve your marriage. Rust is the future and the future is now.
>
> As the block layer, let's show our commitment to the future by replacing
> one of our core parts, the the LEGACY (Bah! Yuck! Ugh!) qcow2 driver, by
> a shiny (Oooh! Aaah!) Rust driver. Much better. My VMs now run thrice as
> fast. Promise.
>
>
> Max Reitz (4):
>   block: Add Rust interface
>   block/qcow2-rust: Add qcow2-rust block driver
>   block/qcow2-rust: Add partial write support
>   block/qcow2-rust: Register block driver
>
>  configure                                  |    2 +
>  Makefile                                   |    6 +-
>  Makefile.target                            |    2 +-
>  block/Makefile.objs                        |    1 +
>  block/qcow2-rust.c                         |   38 ++
>  block/rust/Cargo.toml                      |   10 +
>  block/rust/src/interface/c_constants.rs    |    8 +
>  block/rust/src/interface/c_functions.rs    |   37 +
>  block/rust/src/interface/c_structs.rs      |  587 ++++++++++++++++
>  block/rust/src/interface/mod.rs            | 1012
> ++++++++++++++++++++++++++++
>  block/rust/src/lib.rs                      |   12 +
>  block/rust/src/qcow2/allocation.rs         |  162 +++++
>  block/rust/src/qcow2/io.rs                 |  439 ++++++++++++
>  block/rust/src/qcow2/mod.rs                |  347 ++++++++++
>  block/rust/src/qcow2/on_disk_structures.rs |   59 ++
>  block/rust/src/qcow2/refcount.rs           |   96 +++
>  16 files changed, 2816 insertions(+), 2 deletions(-)
>  create mode 100644 block/qcow2-rust.c
>  create mode 100644 block/rust/Cargo.toml
>  create mode 100644 block/rust/src/interface/c_constants.rs
>  create mode 100644 block/rust/src/interface/c_functions.rs
>  create mode 100644 block/rust/src/interface/c_structs.rs
>  create mode 100644 block/rust/src/interface/mod.rs
>  create mode 100644 block/rust/src/lib.rs
>  create mode 100644 block/rust/src/qcow2/allocation.rs
>  create mode 100644 block/rust/src/qcow2/io.rs
>  create mode 100644 block/rust/src/qcow2/mod.rs
>  create mode 100644 block/rust/src/qcow2/on_disk_structures.rs
>  create mode 100644 block/rust/src/qcow2/refcount.rs
>
> ---
>
> Yes, I'm late. I thought somebody else would do something but nobody
> did. It's still April, though, so I think I'm all good. Also, it's my
> birthday today so you're not allowed to complain!
>
> I could have waited until next year, but I'm afraid it would no longer
> have been funny by then because we might truly have Rust code in master
> then...
>
> --
> 2.12.2
>
>
> --
Marc-André Lureau

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [RFC for-3.0 0/4] block: Add qcow2-rust block driver
  2017-04-18 15:58 [Qemu-devel] [RFC for-3.0 0/4] block: Add qcow2-rust block driver Max Reitz
                   ` (6 preceding siblings ...)
  2017-04-18 16:09 ` Marc-André Lureau
@ 2017-04-18 16:12 ` no-reply
  2017-04-21 15:51 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
  8 siblings, 0 replies; 13+ messages in thread
From: no-reply @ 2017-04-18 16:12 UTC (permalink / raw)
  To: mreitz; +Cc: famz, qemu-block, kwolf, jsnow, qemu-devel

Hi,

This series failed automatic build test. Please find the testing commands and
their output below. If you have docker installed, you can probably reproduce it
locally.

Type: series
Message-id: 20170401155751.14322-1-mreitz@redhat.com
Subject: [Qemu-devel] [RFC for-3.0 0/4] block: Add qcow2-rust block driver

=== TEST SCRIPT BEGIN ===
#!/bin/bash
set -e
git submodule update --init dtc
# Let docker tests dump environment info
export SHOW_ENV=1
export J=8
make docker-test-quick@centos6
make docker-test-mingw@fedora
make docker-test-build@min-glib
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'
f29e573 block/qcow2-rust: Register block driver
5fb5514 block/qcow2-rust: Add partial write support
a349cfd block/qcow2-rust: Add qcow2-rust block driver
430d32b block: Add Rust interface

=== OUTPUT BEGIN ===
Submodule 'dtc' (git://git.qemu-project.org/dtc.git) registered for path 'dtc'
Cloning into '/var/tmp/patchew-tester-tmp-6wozdt_a/src/dtc'...
Submodule path 'dtc': checked out '558cd81bdd432769b59bff01240c44f82cfb1a9d'
  BUILD   centos6
make[1]: Entering directory '/var/tmp/patchew-tester-tmp-6wozdt_a/src'
  ARCHIVE qemu.tgz
  ARCHIVE dtc.tgz
  COPY    RUNNER
    RUN test-quick in qemu:centos6 
Packages installed:
SDL-devel-1.2.14-7.el6_7.1.x86_64
ccache-3.1.6-2.el6.x86_64
epel-release-6-8.noarch
gcc-4.4.7-17.el6.x86_64
git-1.7.1-4.el6_7.1.x86_64
glib2-devel-2.28.8-5.el6.x86_64
libfdt-devel-1.4.0-1.el6.x86_64
make-3.81-23.el6.x86_64
package g++ is not installed
pixman-devel-0.32.8-1.el6.x86_64
tar-1.23-15.el6_8.x86_64
zlib-devel-1.2.3-29.el6.x86_64

Environment variables:
PACKAGES=libfdt-devel ccache     tar git make gcc g++     zlib-devel glib2-devel SDL-devel pixman-devel     epel-release
HOSTNAME=94826b62f1e6
TERM=xterm
MAKEFLAGS= -j8
HISTSIZE=1000
J=8
USER=root
CCACHE_DIR=/var/tmp/ccache
EXTRA_CONFIGURE_OPTS=
V=
SHOW_ENV=1
MAIL=/var/spool/mail/root
PATH=/usr/lib/ccache:/usr/lib64/ccache:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PWD=/
LANG=en_US.UTF-8
TARGET_LIST=
HISTCONTROL=ignoredups
SHLVL=1
HOME=/root
TEST_DIR=/tmp/qemu-test
LOGNAME=root
LESSOPEN=||/usr/bin/lesspipe.sh %s
FEATURES= dtc
DEBUG=
G_BROKEN_FILENAMES=1
CCACHE_HASHDIR=
_=/usr/bin/env

Configure options:
--enable-werror --target-list=x86_64-softmmu,aarch64-softmmu --prefix=/var/tmp/qemu-build/install
No C++ compiler available; disabling C++ specific optional code
Install prefix    /var/tmp/qemu-build/install
BIOS directory    /var/tmp/qemu-build/install/share/qemu
binary directory  /var/tmp/qemu-build/install/bin
library directory /var/tmp/qemu-build/install/lib
module directory  /var/tmp/qemu-build/install/lib/qemu
libexec directory /var/tmp/qemu-build/install/libexec
include directory /var/tmp/qemu-build/install/include
config directory  /var/tmp/qemu-build/install/etc
local state directory   /var/tmp/qemu-build/install/var
Manual directory  /var/tmp/qemu-build/install/share/man
ELF interp prefix /usr/gnemul/qemu-%M
Source path       /tmp/qemu-test/src
C compiler        cc
Host C compiler   cc
C++ compiler      
Objective-C compiler cc
ARFLAGS           rv
CFLAGS            -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -g 
QEMU_CFLAGS       -I/usr/include/pixman-1   -I$(SRC_PATH)/dtc/libfdt -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include   -fPIE -DPIE -m64 -mcx16 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv  -Wendif-labels -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-all
LDFLAGS           -Wl,--warn-common -Wl,-z,relro -Wl,-z,now -pie -m64 -g 
make              make
install           install
python            python -B
smbd              /usr/sbin/smbd
module support    no
host CPU          x86_64
host big endian   no
target list       x86_64-softmmu aarch64-softmmu
tcg debug enabled no
gprof enabled     no
sparse enabled    no
strip binaries    yes
profiler          no
static build      no
pixman            system
SDL support       yes (1.2.14)
GTK support       no 
GTK GL support    no
VTE support       no 
TLS priority      NORMAL
GNUTLS support    no
GNUTLS rnd        no
libgcrypt         no
libgcrypt kdf     no
nettle            no 
nettle kdf        no
libtasn1          no
curses support    no
virgl support     no
curl support      no
mingw32 support   no
Audio drivers     oss
Block whitelist (rw) 
Block whitelist (ro) 
VirtFS support    no
VNC support       yes
VNC SASL support  no
VNC JPEG support  no
VNC PNG support   no
xen support       no
brlapi support    no
bluez  support    no
Documentation     no
PIE               yes
vde support       no
netmap support    no
Linux AIO support no
ATTR/XATTR support yes
Install blobs     yes
KVM support       yes
HAX support       no
RDMA support      no
TCG interpreter   no
fdt support       yes
preadv support    yes
fdatasync         yes
madvise           yes
posix_madvise     yes
libcap-ng support no
vhost-net support yes
vhost-scsi support yes
vhost-vsock support yes
Trace backends    log
spice support     no 
rbd support       no
xfsctl support    no
smartcard support no
libusb            no
usb net redir     no
OpenGL support    no
OpenGL dmabufs    no
libiscsi support  no
libnfs support    no
build guest agent yes
QGA VSS support   no
QGA w32 disk info no
QGA MSI support   no
seccomp support   no
coroutine backend ucontext
coroutine pool    yes
debug stack usage no
GlusterFS support no
gcov              gcov
gcov enabled      no
TPM support       yes
libssh2 support   no
TPM passthrough   yes
QOM debugging     yes
lzo support       no
snappy support    no
bzip2 support     no
NUMA host support no
tcmalloc support  no
jemalloc support  no
avx2 optimization no
replication support yes
  GEN     x86_64-softmmu/config-devices.mak.tmp
  GEN     aarch64-softmmu/config-devices.mak.tmp
mkdir -p dtc/libfdt
mkdir -p dtc/tests
  GEN     qemu-options.def
  GEN     config-host.h
  GEN     qmp-commands.h
  GEN     qapi-types.h
  GEN     qapi-visit.h
  GEN     qapi-event.h
  GEN     aarch64-softmmu/config-devices.mak
  GEN     x86_64-softmmu/config-devices.mak
  GEN     qmp-marshal.c
  GEN     qapi-types.c
  GEN     qapi-visit.c
  GEN     qapi-event.c
  GEN     qmp-introspect.h
  GEN     qmp-introspect.c
  GEN     trace/generated-tcg-tracers.h
  GEN     trace/generated-helpers-wrappers.h
  GEN     trace/generated-helpers.h
  GEN     trace/generated-helpers.c
  GEN     module_block.h
  GEN     tests/test-qapi-types.h
  GEN     tests/test-qapi-visit.h
  GEN     tests/test-qmp-commands.h
  GEN     tests/test-qapi-event.h
  GEN     tests/test-qmp-introspect.h
  GEN     trace-root.h
  GEN     util/trace.h
  GEN     crypto/trace.h
  GEN     io/trace.h
  GEN     migration/trace.h
  GEN     block/trace.h
  GEN     backends/trace.h
  GEN     hw/block/trace.h
  GEN     hw/block/dataplane/trace.h
  GEN     hw/char/trace.h
  GEN     hw/intc/trace.h
  GEN     hw/net/trace.h
  GEN     hw/virtio/trace.h
  GEN     hw/audio/trace.h
  GEN     hw/misc/trace.h
  GEN     hw/usb/trace.h
  GEN     hw/scsi/trace.h
  GEN     hw/nvram/trace.h
  GEN     hw/display/trace.h
  GEN     hw/input/trace.h
  GEN     hw/timer/trace.h
  GEN     hw/dma/trace.h
  GEN     hw/sparc/trace.h
  GEN     hw/sd/trace.h
  GEN     hw/isa/trace.h
  GEN     hw/mem/trace.h
  GEN     hw/i386/trace.h
  GEN     hw/i386/xen/trace.h
  GEN     hw/9pfs/trace.h
  GEN     hw/ppc/trace.h
  GEN     hw/pci/trace.h
  GEN     hw/s390x/trace.h
  GEN     hw/vfio/trace.h
  GEN     hw/acpi/trace.h
  GEN     hw/arm/trace.h
  GEN     hw/alpha/trace.h
  GEN     hw/xen/trace.h
  GEN     ui/trace.h
  GEN     audio/trace.h
  GEN     net/trace.h
  GEN     target/arm/trace.h
  GEN     target/i386/trace.h
  GEN     target/mips/trace.h
  GEN     target/sparc/trace.h
  GEN     target/s390x/trace.h
  GEN     target/ppc/trace.h
  GEN     qom/trace.h
  GEN     linux-user/trace.h
  GEN     qapi/trace.h
  GEN     trace-root.c
  GEN     util/trace.c
  GEN     crypto/trace.c
  GEN     io/trace.c
  GEN     migration/trace.c
  GEN     block/trace.c
  GEN     backends/trace.c
  GEN     hw/block/trace.c
  GEN     hw/block/dataplane/trace.c
  GEN     hw/char/trace.c
  GEN     hw/intc/trace.c
  GEN     hw/net/trace.c
  GEN     hw/virtio/trace.c
  GEN     hw/audio/trace.c
  GEN     hw/misc/trace.c
  GEN     hw/usb/trace.c
  GEN     hw/scsi/trace.c
  GEN     hw/nvram/trace.c
  GEN     hw/display/trace.c
  GEN     hw/input/trace.c
  GEN     hw/timer/trace.c
  GEN     hw/dma/trace.c
  GEN     hw/sparc/trace.c
  GEN     hw/sd/trace.c
  GEN     hw/isa/trace.c
  GEN     hw/mem/trace.c
  GEN     hw/i386/trace.c
  GEN     hw/i386/xen/trace.c
  GEN     hw/9pfs/trace.c
  GEN     hw/ppc/trace.c
  GEN     hw/pci/trace.c
  GEN     hw/s390x/trace.c
  GEN     hw/vfio/trace.c
  GEN     hw/acpi/trace.c
  GEN     hw/arm/trace.c
  GEN     hw/alpha/trace.c
  GEN     hw/xen/trace.c
  GEN     ui/trace.c
  GEN     audio/trace.c
  GEN     net/trace.c
  GEN     target/arm/trace.c
  GEN     target/i386/trace.c
  GEN     target/mips/trace.c
  GEN     target/sparc/trace.c
  GEN     target/s390x/trace.c
  GEN     target/ppc/trace.c
  GEN     qom/trace.c
  GEN     linux-user/trace.c
  GEN     qapi/trace.c
  GEN     config-all-devices.mak
	 DEP /tmp/qemu-test/src/dtc/tests/dumptrees.c
	 DEP /tmp/qemu-test/src/dtc/tests/trees.S
	 DEP /tmp/qemu-test/src/dtc/tests/testutils.c
	 DEP /tmp/qemu-test/src/dtc/tests/value-labels.c
	 DEP /tmp/qemu-test/src/dtc/tests/asm_tree_dump.c
	 DEP /tmp/qemu-test/src/dtc/tests/truncated_property.c
	 DEP /tmp/qemu-test/src/dtc/tests/check_path.c
	 DEP /tmp/qemu-test/src/dtc/tests/overlay_bad_fixup.c
	 DEP /tmp/qemu-test/src/dtc/tests/overlay.c
	 DEP /tmp/qemu-test/src/dtc/tests/subnode_iterate.c
	 DEP /tmp/qemu-test/src/dtc/tests/property_iterate.c
	 DEP /tmp/qemu-test/src/dtc/tests/integer-expressions.c
	 DEP /tmp/qemu-test/src/dtc/tests/utilfdt_test.c
	 DEP /tmp/qemu-test/src/dtc/tests/path_offset_aliases.c
	 DEP /tmp/qemu-test/src/dtc/tests/add_subnode_with_nops.c
	 DEP /tmp/qemu-test/src/dtc/tests/dtbs_equal_unordered.c
	 DEP /tmp/qemu-test/src/dtc/tests/dtb_reverse.c
	 DEP /tmp/qemu-test/src/dtc/tests/dtbs_equal_ordered.c
	 DEP /tmp/qemu-test/src/dtc/tests/extra-terminating-null.c
	 DEP /tmp/qemu-test/src/dtc/tests/incbin.c
	 DEP /tmp/qemu-test/src/dtc/tests/boot-cpuid.c
	 DEP /tmp/qemu-test/src/dtc/tests/phandle_format.c
	 DEP /tmp/qemu-test/src/dtc/tests/path-references.c
	 DEP /tmp/qemu-test/src/dtc/tests/references.c
	 DEP /tmp/qemu-test/src/dtc/tests/string_escapes.c
	 DEP /tmp/qemu-test/src/dtc/tests/propname_escapes.c
	 DEP /tmp/qemu-test/src/dtc/tests/appendprop2.c
	 DEP /tmp/qemu-test/src/dtc/tests/appendprop1.c
	 DEP /tmp/qemu-test/src/dtc/tests/del_node.c
	 DEP /tmp/qemu-test/src/dtc/tests/del_property.c
	 DEP /tmp/qemu-test/src/dtc/tests/setprop.c
	 DEP /tmp/qemu-test/src/dtc/tests/set_name.c
	 DEP /tmp/qemu-test/src/dtc/tests/rw_tree1.c
	 DEP /tmp/qemu-test/src/dtc/tests/open_pack.c
	 DEP /tmp/qemu-test/src/dtc/tests/nopulate.c
	 DEP /tmp/qemu-test/src/dtc/tests/mangle-layout.c
	 DEP /tmp/qemu-test/src/dtc/tests/move_and_save.c
	 DEP /tmp/qemu-test/src/dtc/tests/sw_tree1.c
	 DEP /tmp/qemu-test/src/dtc/tests/nop_node.c
	 DEP /tmp/qemu-test/src/dtc/tests/nop_property.c
	 DEP /tmp/qemu-test/src/dtc/tests/setprop_inplace.c
	 DEP /tmp/qemu-test/src/dtc/tests/stringlist.c
	 DEP /tmp/qemu-test/src/dtc/tests/addr_size_cells.c
	 DEP /tmp/qemu-test/src/dtc/tests/notfound.c
	 DEP /tmp/qemu-test/src/dtc/tests/sized_cells.c
	 DEP /tmp/qemu-test/src/dtc/tests/char_literal.c
	 DEP /tmp/qemu-test/src/dtc/tests/get_alias.c
	 DEP /tmp/qemu-test/src/dtc/tests/node_offset_by_compatible.c
	 DEP /tmp/qemu-test/src/dtc/tests/node_check_compatible.c
	 DEP /tmp/qemu-test/src/dtc/tests/node_offset_by_phandle.c
	 DEP /tmp/qemu-test/src/dtc/tests/node_offset_by_prop_value.c
	 DEP /tmp/qemu-test/src/dtc/tests/parent_offset.c
	 DEP /tmp/qemu-test/src/dtc/tests/supernode_atdepth_offset.c
	 DEP /tmp/qemu-test/src/dtc/tests/get_path.c
	 DEP /tmp/qemu-test/src/dtc/tests/get_phandle.c
	 DEP /tmp/qemu-test/src/dtc/tests/getprop.c
	 DEP /tmp/qemu-test/src/dtc/tests/get_name.c
	 DEP /tmp/qemu-test/src/dtc/tests/path_offset.c
	 DEP /tmp/qemu-test/src/dtc/tests/subnode_offset.c
	 DEP /tmp/qemu-test/src/dtc/tests/find_property.c
	 DEP /tmp/qemu-test/src/dtc/tests/root_node.c
	 DEP /tmp/qemu-test/src/dtc/tests/get_mem_rsv.c
	 DEP /tmp/qemu-test/src/dtc/libfdt/fdt_overlay.c
	 DEP /tmp/qemu-test/src/dtc/libfdt/fdt_addresses.c
	 DEP /tmp/qemu-test/src/dtc/libfdt/fdt_empty_tree.c
	 DEP /tmp/qemu-test/src/dtc/libfdt/fdt_strerror.c
	 DEP /tmp/qemu-test/src/dtc/libfdt/fdt_rw.c
	 DEP /tmp/qemu-test/src/dtc/libfdt/fdt_wip.c
	 DEP /tmp/qemu-test/src/dtc/libfdt/fdt_sw.c
	 DEP /tmp/qemu-test/src/dtc/libfdt/fdt_ro.c
	 DEP /tmp/qemu-test/src/dtc/libfdt/fdt.c
	 DEP /tmp/qemu-test/src/dtc/util.c
	 DEP /tmp/qemu-test/src/dtc/fdtput.c
	 DEP /tmp/qemu-test/src/dtc/fdtget.c
	 DEP /tmp/qemu-test/src/dtc/fdtdump.c
	 LEX convert-dtsv0-lexer.lex.c
	 DEP /tmp/qemu-test/src/dtc/srcpos.c
make[1]: flex: Command not found
	 BISON dtc-parser.tab.c
make[1]: bison: Command not found
	 LEX dtc-lexer.lex.c
make[1]: flex: Command not found
	 DEP /tmp/qemu-test/src/dtc/treesource.c
	 DEP /tmp/qemu-test/src/dtc/livetree.c
	 DEP /tmp/qemu-test/src/dtc/fstree.c
	 DEP /tmp/qemu-test/src/dtc/flattree.c
	 DEP /tmp/qemu-test/src/dtc/dtc.c
	 DEP /tmp/qemu-test/src/dtc/data.c
	 DEP /tmp/qemu-test/src/dtc/checks.c
	CHK version_gen.h
	 BISON dtc-parser.tab.c
make[1]: bison: Command not found
	 LEX dtc-lexer.lex.c
make[1]: flex: Command not found
	UPD version_gen.h
	 LEX convert-dtsv0-lexer.lex.c
make[1]: flex: Command not found
	 DEP /tmp/qemu-test/src/dtc/util.c
	 LEX convert-dtsv0-lexer.lex.c
make[1]: flex: Command not found
	 BISON dtc-parser.tab.c
	 LEX dtc-lexer.lex.c
make[1]: bison: Command not found
make[1]: flex: Command not found
	 CC libfdt/fdt.o
	 CC libfdt/fdt_ro.o
	 CC libfdt/fdt_wip.o
	 CC libfdt/fdt_sw.o
	 CC libfdt/fdt_rw.o
	 CC libfdt/fdt_strerror.o
	 CC libfdt/fdt_empty_tree.o
	 CC libfdt/fdt_addresses.o
	 CC libfdt/fdt_overlay.o
	 AR libfdt/libfdt.a
ar: creating libfdt/libfdt.a
a - libfdt/fdt.o
a - libfdt/fdt_ro.o
a - libfdt/fdt_wip.o
a - libfdt/fdt_sw.o
a - libfdt/fdt_rw.o
a - libfdt/fdt_strerror.o
a - libfdt/fdt_empty_tree.o
a - libfdt/fdt_addresses.o
a - libfdt/fdt_overlay.o
	 LEX convert-dtsv0-lexer.lex.c
make[1]: flex: Command not found
	 BISON dtc-parser.tab.c
make[1]: bison: Command not found
	 LEX dtc-lexer.lex.c
make[1]: flex: Command not found
  CC      tests/qemu-iotests/socket_scm_helper.o
  GEN     qga/qapi-generated/qga-qapi-types.h
  GEN     qga/qapi-generated/qga-qapi-visit.h
  GEN     qga/qapi-generated/qga-qmp-marshal.c
  GEN     qga/qapi-generated/qga-qapi-visit.c
  GEN     qga/qapi-generated/qga-qmp-commands.h
  CC      trace-root.o
  GEN     qga/qapi-generated/qga-qapi-types.c
  CC      util/trace.o
  CC      crypto/trace.o
  CC      io/trace.o
  CC      migration/trace.o
  CC      block/trace.o
  CC      backends/trace.o
  CC      hw/block/trace.o
  CC      hw/block/dataplane/trace.o
  CC      hw/char/trace.o
  CC      hw/intc/trace.o
  CC      hw/net/trace.o
  CC      hw/virtio/trace.o
  CC      hw/audio/trace.o
  CC      hw/misc/trace.o
  CC      hw/scsi/trace.o
  CC      hw/usb/trace.o
  CC      hw/nvram/trace.o
  CC      hw/display/trace.o
  CC      hw/input/trace.o
  CC      hw/timer/trace.o
  CC      hw/dma/trace.o
  CC      hw/sparc/trace.o
  CC      hw/sd/trace.o
  CC      hw/isa/trace.o
  CC      hw/mem/trace.o
  CC      hw/i386/trace.o
  CC      hw/i386/xen/trace.o
  CC      hw/9pfs/trace.o
  CC      hw/ppc/trace.o
  CC      hw/pci/trace.o
  CC      hw/s390x/trace.o
  CC      hw/vfio/trace.o
  CC      hw/acpi/trace.o
  CC      hw/arm/trace.o
  CC      hw/alpha/trace.o
  CC      hw/xen/trace.o
  CC      ui/trace.o
  CC      audio/trace.o
  CC      net/trace.o
  CC      target/arm/trace.o
  CC      target/i386/trace.o
  CC      target/mips/trace.o
  CC      target/sparc/trace.o
  CC      target/s390x/trace.o
  CC      target/ppc/trace.o
  CC      qom/trace.o
  CC      linux-user/trace.o
  CC      qapi/trace.o
  CC      qmp-introspect.o
  CC      qapi-types.o
  CC      qapi-visit.o
  CC      qapi-event.o
  CC      qapi/qapi-visit-core.o
  CC      qapi/qapi-dealloc-visitor.o
  CC      qapi/qobject-input-visitor.o
  CC      qapi/qobject-output-visitor.o
  CC      qapi/qmp-registry.o
  CC      qapi/qmp-dispatch.o
  CC      qapi/string-input-visitor.o
  CC      qapi/string-output-visitor.o
  CC      qapi/opts-visitor.o
  CC      qapi/qapi-clone-visitor.o
  CC      qapi/qmp-event.o
  CC      qapi/qapi-util.o
  CC      qobject/qnull.o
  CC      qobject/qint.o
  CC      qobject/qstring.o
  CC      qobject/qdict.o
  CC      qobject/qlist.o
  CC      qobject/qfloat.o
  CC      qobject/qbool.o
  CC      qobject/qjson.o
  CC      qobject/qobject.o
  CC      qobject/json-lexer.o
  CC      qobject/json-streamer.o
  CC      qobject/json-parser.o
  CC      trace/control.o
  CC      trace/qmp.o
  CC      util/osdep.o
  CC      util/cutils.o
  CC      util/unicode.o
  CC      util/qemu-timer-common.o
  CC      util/bufferiszero.o
  CC      util/lockcnt.o
  CC      util/aiocb.o
  CC      util/async.o
  CC      util/thread-pool.o
  CC      util/qemu-timer.o
  CC      util/main-loop.o
  CC      util/iohandler.o
  CC      util/aio-posix.o
  CC      util/compatfd.o
  CC      util/event_notifier-posix.o
  CC      util/mmap-alloc.o
  CC      util/oslib-posix.o
  CC      util/qemu-openpty.o
  CC      util/qemu-thread-posix.o
  CC      util/memfd.o
  CC      util/envlist.o
  CC      util/path.o
  CC      util/module.o
  CC      util/host-utils.o
  CC      util/bitmap.o
  CC      util/bitops.o
  CC      util/hbitmap.o
  CC      util/fifo8.o
  CC      util/acl.o
  CC      util/error.o
  CC      util/qemu-error.o
  CC      util/id.o
  CC      util/iov.o
  CC      util/qemu-config.o
  CC      util/qemu-sockets.o
  CC      util/uri.o
  CC      util/notify.o
  CC      util/qemu-option.o
  CC      util/qemu-progress.o
  CC      util/keyval.o
  CC      util/hexdump.o
  CC      util/crc32c.o
  CC      util/uuid.o
  CC      util/throttle.o
  CC      util/getauxval.o
  CC      util/readline.o
  CC      util/rcu.o
  CC      util/qemu-coroutine.o
  CC      util/qemu-coroutine-lock.o
  CC      util/qemu-coroutine-io.o
  CC      util/qemu-coroutine-sleep.o
  CC      util/coroutine-ucontext.o
  CC      util/buffer.o
  CC      util/timed-average.o
  CC      util/base64.o
  CC      util/log.o
  CC      util/qdist.o
  CC      util/qht.o
  CC      util/range.o
  CC      util/systemd.o
  CC      crypto/pbkdf-stub.o
  CC      stubs/arch-query-cpu-def.o
  CC      stubs/arch-query-cpu-model-expansion.o
  CC      stubs/arch-query-cpu-model-comparison.o
  CC      stubs/arch-query-cpu-model-baseline.o
  CC      stubs/bdrv-next-monitor-owned.o
  CC      stubs/blk-commit-all.o
  CC      stubs/blockdev-close-all-bdrv-states.o
  CC      stubs/clock-warp.o
  CC      stubs/cpu-get-clock.o
  CC      stubs/cpu-get-icount.o
  CC      stubs/dump.o
  CC      stubs/error-printf.o
  CC      stubs/fdset.o
  CC      stubs/gdbstub.o
  CC      stubs/get-vm-name.o
  CC      stubs/iothread.o
  CC      stubs/iothread-lock.o
  CC      stubs/is-daemonized.o
  CC      stubs/migr-blocker.o
  CC      stubs/machine-init-done.o
  CC      stubs/monitor.o
  CC      stubs/notify-event.o
  CC      stubs/qtest.o
  CC      stubs/replay.o
  CC      stubs/runstate-check.o
  CC      stubs/set-fd-handler.o
  CC      stubs/slirp.o
  CC      stubs/sysbus.o
  CC      stubs/trace-control.o
  CC      stubs/uuid.o
  CC      stubs/vm-stop.o
  CC      stubs/vmstate.o
  CC      stubs/qmp_pc_dimm_device_list.o
  CC      stubs/target-monitor-defs.o
  CC      stubs/target-get-monitor-def.o
  CC      stubs/pc_madt_cpu_entry.o
cd "/tmp/qemu-test/src/block/rust" && CARGO_TARGET_DIR="/var/tmp/qemu-build/rust" cargo build
  CC      stubs/vmgenid.o
/bin/sh: cargo: command not found
make: *** [rust/debug/libqemu_rust_block_drivers.a] Error 127
make: *** Waiting for unfinished jobs....
tests/docker/Makefile.include:118: recipe for target 'docker-run' failed
make[1]: *** [docker-run] Error 2
make[1]: Leaving directory '/var/tmp/patchew-tester-tmp-6wozdt_a/src'
tests/docker/Makefile.include:149: recipe for target 'docker-run-test-quick@centos6' failed
make: *** [docker-run-test-quick@centos6] Error 2
=== OUTPUT END ===

Test command exited with code: 2


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@freelists.org

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [RFC for-3.0 4/4] block/qcow2-rust: Register block driver
  2017-04-18 15:58 ` [Qemu-devel] [RFC for-3.0 4/4] block/qcow2-rust: Register block driver Max Reitz
@ 2017-04-19 11:28   ` Fam Zheng
  2017-04-19 12:19     ` Max Reitz
  0 siblings, 1 reply; 13+ messages in thread
From: Fam Zheng @ 2017-04-19 11:28 UTC (permalink / raw)
  To: Max Reitz; +Cc: qemu-block, Kevin Wolf, John Snow, qemu-devel

On Sat, 04/01 17:57, Max Reitz wrote:
> +/* This is just for the module loading system to detect this driver */
> +static BlockDriver _ __attribute__((used)) = {
> +    .format_name = "qcow2-rust",
> +};

You see why I didn't like that system in the first place.

Fam

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [RFC for-3.0 4/4] block/qcow2-rust: Register block driver
  2017-04-19 11:28   ` Fam Zheng
@ 2017-04-19 12:19     ` Max Reitz
  0 siblings, 0 replies; 13+ messages in thread
From: Max Reitz @ 2017-04-19 12:19 UTC (permalink / raw)
  To: Fam Zheng; +Cc: qemu-block, Kevin Wolf, John Snow, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 924 bytes --]

On 19.04.2017 13:28, Fam Zheng wrote:
> On Sat, 04/01 17:57, Max Reitz wrote:
>> +/* This is just for the module loading system to detect this driver */
>> +static BlockDriver _ __attribute__((used)) = {
>> +    .format_name = "qcow2-rust",
>> +};
> 
> You see why I didn't like that system in the first place.

Yes. We will have to adjust the module loading system before 3.0, but
I'm confident we can port all block drivers to Rust by then so this will
be a matter of course.

OTOH, why would you ever not load the rust block driver? In the final
version, we'd call it "qcow2", throw the legacy driver out and not even
care about whether the module system detects this one (because it'll be
statically linked anyway).

(Honestly, I think this is just an artifact from beginning of last week
where I wanted to make this driver a module... Beware, my April Fool's
patches may not be polished.)

Max


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 512 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [Qemu-block] [RFC for-3.0 0/4] block: Add qcow2-rust block driver
  2017-04-18 15:58 [Qemu-devel] [RFC for-3.0 0/4] block: Add qcow2-rust block driver Max Reitz
                   ` (7 preceding siblings ...)
  2017-04-18 16:12 ` no-reply
@ 2017-04-21 15:51 ` Stefan Hajnoczi
  2017-04-22 16:42   ` Max Reitz
  8 siblings, 1 reply; 13+ messages in thread
From: Stefan Hajnoczi @ 2017-04-21 15:51 UTC (permalink / raw)
  To: Max Reitz; +Cc: qemu-block, Kevin Wolf, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 856 bytes --]

On Sat, Apr 01, 2017 at 05:57:47PM +0200, Max Reitz wrote:
> The issues of using C are well understood and nobody likes it. Let's use
> a better language. C++ is not a better language, Rust is. Everybody
> loves Rust. Rust is good. Rust is hip. It will attract developers, it
> will improve code quality, it will improve performance, it will even
> improve your marriage. Rust is the future and the future is now.
> 
> As the block layer, let's show our commitment to the future by replacing
> one of our core parts, the the LEGACY (Bah! Yuck! Ugh!) qcow2 driver, by
> a shiny (Oooh! Aaah!) Rust driver. Much better. My VMs now run thrice as
> fast. Promise.

This is actually a good exercise.

Did you feel like there were places where Rust allowed you to express
things better than C?

I like pattern matching, wish C had it.

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [Qemu-block] [RFC for-3.0 0/4] block: Add qcow2-rust block driver
  2017-04-21 15:51 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
@ 2017-04-22 16:42   ` Max Reitz
  0 siblings, 0 replies; 13+ messages in thread
From: Max Reitz @ 2017-04-22 16:42 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: qemu-block, Kevin Wolf, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 3338 bytes --]

On 21.04.2017 17:51, Stefan Hajnoczi wrote:
> On Sat, Apr 01, 2017 at 05:57:47PM +0200, Max Reitz wrote:
>> The issues of using C are well understood and nobody likes it. Let's use
>> a better language. C++ is not a better language, Rust is. Everybody
>> loves Rust. Rust is good. Rust is hip. It will attract developers, it
>> will improve code quality, it will improve performance, it will even
>> improve your marriage. Rust is the future and the future is now.
>>
>> As the block layer, let's show our commitment to the future by replacing
>> one of our core parts, the the LEGACY (Bah! Yuck! Ugh!) qcow2 driver, by
>> a shiny (Oooh! Aaah!) Rust driver. Much better. My VMs now run thrice as
>> fast. Promise.
> 
> This is actually a good exercise.
> 
> Did you feel like there were places where Rust allowed you to express
> things better than C?

Well, I very much like the try!() macro and generally the fact that you
can return both a success and an error value at the same time.

(Which allowed me to represent the Error ** thing we generally use in a
much more natural way.)

> I like pattern matching, wish C had it.

That, including the (Haskell-like (?)) enums, is nice, too, yes.

I would like to say I hate that you have to explicitly cast integers
when converting between different widths, but if we had to do that in C,
it would have probably prevented quite some bugs we had in the past. (It
still is pretty annoying most of the time.)

Something that's not better than C but which surprised me in a really
positive way was how nice Rust's C interface is.


Having said that, there are things that really enrange me every time I
try my hands at Rust; most of which are intentional and probably
familiar to anyone having done so. But there are some things I have
missed for which there are proposed solutions, but they have been in a
"should be done soon" state for some years now.

For instance, when implementing methods for a generic type:

impl<T> BlockDriver<T> { ... }

you cannot test *whether* the type implements a certain trait.
https://github.com/XanClic/qemu/blob/rust-qcow2/block/rust/src/interface/mod.rs#L651
is where I complain.
You can implement functions only if T implements a trait:

impl<T: BlockDriverOpen> BlockDriver<T> {
    pub fn provides_open(&mut self) { ... }
}

But you cannot implement e.g. the same function but with a different
body (e.g. doing nothing) if T does not implement a trait, or provide a
generic implementation that is overwritten by these specialized
implementations. Both have been proposed and especially the first one is
supposed to be added in some form at some point in the future; but it
has been in that proposal state since 2014 or so...

(This is also a good thing, mind you, because it means they don't just
throw anything into the language just because it looks useful to
someone. They really think long and hard about what they add and what
implications it will have so it doesn't end up as a second C++.)


So all in all, Rust is not completely unusable, but of course you swear
a lot (at least I do) and it still feels kind of unfinished. I hate it
very much but at the same time, *for me*, I think it's the best language
for cases where I would have used C or C++ in the past.

Max


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 512 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2017-04-22 16:42 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-18 15:58 [Qemu-devel] [RFC for-3.0 0/4] block: Add qcow2-rust block driver Max Reitz
2017-04-18 15:58 ` [Qemu-devel] [RFC for-3.0 2/4] block/qcow2-rust: " Max Reitz
2017-04-18 15:58 ` [Qemu-devel] [RFC for-3.0 1/4] block: Add Rust interface Max Reitz
2017-04-18 15:58 ` [Qemu-devel] [RFC for-3.0 3/4] block/qcow2-rust: Add partial write support Max Reitz
2017-04-18 15:58 ` [Qemu-devel] [RFC for-3.0 4/4] block/qcow2-rust: Register block driver Max Reitz
2017-04-19 11:28   ` Fam Zheng
2017-04-19 12:19     ` Max Reitz
2017-04-18 16:08 ` [Qemu-devel] [RFC for-3.0 0/4] block: Add qcow2-rust " no-reply
2017-04-18 16:08 ` no-reply
2017-04-18 16:09 ` Marc-André Lureau
2017-04-18 16:12 ` no-reply
2017-04-21 15:51 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2017-04-22 16:42   ` Max Reitz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.