From 28222ce611a3c40e5f2a7073c509aa73e8060081 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Nov 08 2020 23:53:38 +0000 Subject: Rebase to 5.2.0-rc0 * Drop deprecated targets: moxie, unicore32, lm32, tilegx, ppc64abi32 * Use qemu-pr-helper units from qemu contrib/ * Drop ivshmem-tools package, upstream doesn't install it anymore * New spice device modules Signed-off-by: Cole Robinson --- diff --git a/.gitignore b/.gitignore index 5c959d2..4433409 100644 --- a/.gitignore +++ b/.gitignore @@ -46,3 +46,4 @@ /qemu-5.1.0-rc2.tar.xz /qemu-5.1.0-rc3.tar.xz /qemu-5.1.0.tar.xz +/qemu-5.2.0-rc0.tar.xz diff --git a/0001-configure-Fix-gio-detection.patch b/0001-configure-Fix-gio-detection.patch new file mode 100644 index 0000000..765ece9 --- /dev/null +++ b/0001-configure-Fix-gio-detection.patch @@ -0,0 +1,27 @@ +From 1249e3b862a119bdcba74f8f052222cc28de988d Mon Sep 17 00:00:00 2001 +Message-Id: <1249e3b862a119bdcba74f8f052222cc28de988d.1604591893.git.crobinso@redhat.com> +From: Cole Robinson +Date: Thu, 5 Nov 2020 09:56:53 -0500 +Subject: [PATCH] configure: Fix gio detection + +Signed-off-by: Cole Robinson +--- + configure | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure b/configure +index 2c3c69f118..bc06aa81e5 100755 +--- a/configure ++++ b/configure +@@ -3499,7 +3499,7 @@ if $pkg_config --atleast-version=$glib_req_ver gio-2.0; then + # with pkg-config --static --libs data for gio-2.0 that is missing + # -lblkid and will give a link error. + write_c_skeleton +- if compile_prog "" "gio_libs" ; then ++ if compile_prog "" "$gio_libs" ; then + gio=yes + else + gio=no +-- +2.28.0 + diff --git a/0001-linux-user-fix-implicit-conversion-from-enumeration-.patch b/0001-linux-user-fix-implicit-conversion-from-enumeration-.patch deleted file mode 100644 index 3e53419..0000000 --- a/0001-linux-user-fix-implicit-conversion-from-enumeration-.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 44716867275c9a5cdead2d70e6187b5af4087f07 Mon Sep 17 00:00:00 2001 -From: Laurent Vivier -Date: Thu, 3 Sep 2020 01:26:53 +0200 -Subject: [PATCH 1/9] linux-user: fix implicit conversion from enumeration type - error - -MK_ARRAY(type,size) is used to fill the field_types buffer, and if the -"size" parameter is an enum type, clang [-Werror,-Wenum-conversion] reports -an error when it is assigned to field_types which is also an enum, argtypes. - -To avoid that, convert "size" to "int" in MK_ARRAY(). "int" is the type -used for the size evaluation in thunk_type_size(). - -Signed-off-by: Laurent Vivier -Message-Id: <20200902125752.1033524-1-laurent@vivier.eu> ---- - include/exec/user/thunk.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/include/exec/user/thunk.h b/include/exec/user/thunk.h -index 7992475c9f..2099482cff 100644 ---- a/include/exec/user/thunk.h -+++ b/include/exec/user/thunk.h -@@ -42,7 +42,7 @@ typedef enum argtype { - } argtype; - - #define MK_PTR(type) TYPE_PTR, type --#define MK_ARRAY(type, size) TYPE_ARRAY, size, type -+#define MK_ARRAY(type, size) TYPE_ARRAY, (int)(size), type - #define MK_STRUCT(id) TYPE_STRUCT, id - - #define THUNK_TARGET 0 --- -2.26.2 - diff --git a/0002-linux-user-Add-support-for-a-group-of-btrfs-ioctls-u.patch b/0002-linux-user-Add-support-for-a-group-of-btrfs-ioctls-u.patch deleted file mode 100644 index e8106ed..0000000 --- a/0002-linux-user-Add-support-for-a-group-of-btrfs-ioctls-u.patch +++ /dev/null @@ -1,264 +0,0 @@ -From e0eab99255d34c9dbaac7b73a1a2a79f823a7da9 Mon Sep 17 00:00:00 2001 -From: Filip Bozuta -Date: Thu, 3 Sep 2020 01:26:54 +0200 -Subject: [PATCH 2/9] linux-user: Add support for a group of btrfs ioctls used - for subvolumes -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This patch implements functionality of following ioctls: - -BTRFS_IOC_SUBVOL_CREATE - Creating a btrfs subvolume - - Create a btrfs subvolume. The subvolume is created using the ioctl's - third argument which represents a pointer to a following structure - type: - - struct btrfs_ioctl_vol_args { - __s64 fd; - char name[BTRFS_PATH_NAME_MAX + 1]; - }; - - Before calling this ioctl, the fields of this structure should be filled - with aproppriate values. The fd field represents the file descriptor - value of the subvolume and the name field represents the subvolume - path. - -BTRFS_IOC_SUBVOL_GETFLAGS - Getting subvolume flags - - Read the flags of the btrfs subvolume. The flags are read using - the ioctl's third argument that is a pointer of __u64 (unsigned long). - The third argument represents a bit mask that can be composed of following - values: - BTRFS_SUBVOL_RDONLY (1ULL << 1) - BTRFS_SUBVOL_QGROUP_INHERIT (1ULL << 2) - BTRFS_DEVICE_SPEC_BY_ID (1ULL << 3) - BTRFS_SUBVOL_SPEC_BY_ID (1ULL << 4) - -BTRFS_IOC_SUBVOL_SETFLAGS - Setting subvolume flags - - Set the flags of the btrfs subvolume. The flags are set using the - ioctl's third argument that is a pointer of __u64 (unsigned long). - The third argument represents a bit mask that can be composed of same - values as in the case of previous ioctl (BTRFS_IOC_SUBVOL_GETFLAGS). - -BTRFS_IOC_SUBVOL_GETINFO - Getting subvolume information - - Read information about the subvolume. The subvolume information is - returned in the ioctl's third argument which represents a pointer to - a following structure type: - - struct btrfs_ioctl_get_subvol_info_args { - /* Id of this subvolume */ - __u64 treeid; - - /* Name of this subvolume, used to get the real name at mount point */ - char name[BTRFS_VOL_NAME_MAX + 1]; - - /* - * Id of the subvolume which contains this subvolume. - * Zero for top-level subvolume or a deleted subvolume. - */ - __u64 parent_id; - - /* - * Inode number of the directory which contains this subvolume. - * Zero for top-level subvolume or a deleted subvolume - */ - __u64 dirid; - - /* Latest transaction id of this subvolume */ - __u64 generation; - - /* Flags of this subvolume */ - __u64 flags; - - /* UUID of this subvolume */ - __u8 uuid[BTRFS_UUID_SIZE]; - - /* - * UUID of the subvolume of which this subvolume is a snapshot. - * All zero for a non-snapshot subvolume. - */ - __u8 parent_uuid[BTRFS_UUID_SIZE]; - - /* - * UUID of the subvolume from which this subvolume was received. - * All zero for non-received subvolume. - */ - __u8 received_uuid[BTRFS_UUID_SIZE]; - - /* Transaction id indicating when change/create/send/receive happened */ - __u64 ctransid; - __u64 otransid; - __u64 stransid; - __u64 rtransid; - /* Time corresponding to c/o/s/rtransid */ - struct btrfs_ioctl_timespec ctime; - struct btrfs_ioctl_timespec otime; - struct btrfs_ioctl_timespec stime; - struct btrfs_ioctl_timespec rtime; - - /* Must be zero */ - __u64 reserved[8]; - }; - - All of the fields of this structure are filled after the ioctl call. - -Implementation notes: - - Ioctls BTRFS_IOC_SUBVOL_CREATE and BTRFS_IOC_SUBVOL_GETINFO have structure - types as third arguments. That is the reason why a corresponding definition - are added in file 'linux-user/syscall_types.h'. - - The line '#include ' is added in file 'linux-user/syscall.c' to - recognise preprocessor definitions for these ioctls. Since the file "linux/btrfs.h" - was added in the kernel version 3.9, it is enwrapped in an #ifdef statement - with parameter CONFIG_BTRFS which is defined in 'configure' if the - header file is present. - -Signed-off-by: Filip Bozuta -Tested-by: Daniel P. Berrangé -Message-Id: <20200823195014.116226-2-Filip.Bozuta@syrmia.com> -Signed-off-by: Laurent Vivier ---- - configure | 9 +++++++++ - linux-user/ioctls.h | 15 +++++++++++++++ - linux-user/syscall.c | 3 +++ - linux-user/syscall_defs.h | 8 ++++++++ - linux-user/syscall_types.h | 32 ++++++++++++++++++++++++++++++++ - 5 files changed, 67 insertions(+) - -diff --git a/configure b/configure -index 2acc4d1465..1cba4e0b80 100755 ---- a/configure -+++ b/configure -@@ -5079,6 +5079,12 @@ if check_include sys/kcov.h ; then - kcov=yes - fi - -+# check for btrfs filesystem support (kernel must be 3.9+) -+btrfs=no -+if check_include linux/btrfs.h ; then -+ btrfs=yes -+fi -+ - # If we're making warnings fatal, apply this to Sphinx runs as well - sphinx_werror="" - if test "$werror" = "yes"; then -@@ -7330,6 +7336,9 @@ fi - if test "$kcov" = "yes" ; then - echo "CONFIG_KCOV=y" >> $config_host_mak - fi -+if test "$btrfs" = "yes" ; then -+ echo "CONFIG_BTRFS=y" >> $config_host_mak -+fi - if test "$inotify" = "yes" ; then - echo "CONFIG_INOTIFY=y" >> $config_host_mak - fi -diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h -index 0713ae1311..12d1444224 100644 ---- a/linux-user/ioctls.h -+++ b/linux-user/ioctls.h -@@ -174,6 +174,21 @@ - IOCTL(FS_IOC32_GETVERSION, IOC_R, MK_PTR(TYPE_INT)) - IOCTL(FS_IOC32_SETVERSION, IOC_W, MK_PTR(TYPE_INT)) - -+#ifdef BTRFS_IOC_SUBVOL_CREATE -+ IOCTL(BTRFS_IOC_SUBVOL_CREATE, IOC_W, -+ MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_vol_args))) -+#endif -+#ifdef BTRFS_IOC_SUBVOL_GETFLAGS -+ IOCTL(BTRFS_IOC_SUBVOL_GETFLAGS, IOC_R, MK_PTR(TYPE_ULONGLONG)) -+#endif -+#ifdef BTRFS_IOC_SUBVOL_SETFLAGS -+ IOCTL(BTRFS_IOC_SUBVOL_SETFLAGS, IOC_W, MK_PTR(TYPE_ULONGLONG)) -+#endif -+#ifdef BTRFS_IOC_GET_SUBVOL_INFO -+ IOCTL(BTRFS_IOC_GET_SUBVOL_INFO, IOC_R, -+ MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_get_subvol_info_args))) -+#endif -+ - #ifdef CONFIG_USBFS - /* USB ioctls */ - IOCTL(USBDEVFS_CONTROL, IOC_RW, -diff --git a/linux-user/syscall.c b/linux-user/syscall.c -index 945fc25279..36777c91b0 100644 ---- a/linux-user/syscall.c -+++ b/linux-user/syscall.c -@@ -112,6 +112,9 @@ - #include - #include - #include -+#ifdef CONFIG_BTRFS -+#include -+#endif - #ifdef HAVE_DRM_H - #include - #endif -diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h -index 3c261cff0e..2757956dfa 100644 ---- a/linux-user/syscall_defs.h -+++ b/linux-user/syscall_defs.h -@@ -967,6 +967,14 @@ struct target_rtc_pll_info { - #define TARGET_FS_IOC32_GETVERSION TARGET_IOR('v', 1, int) - #define TARGET_FS_IOC32_SETVERSION TARGET_IOW('v', 2, int) - -+/* btrfs ioctls */ -+#define TARGET_BTRFS_IOC_SUBVOL_CREATE TARGET_IOWU(BTRFS_IOCTL_MAGIC, 14) -+#define TARGET_BTRFS_IOC_SUBVOL_GETFLAGS TARGET_IOR(BTRFS_IOCTL_MAGIC, 25,\ -+ abi_ullong) -+#define TARGET_BTRFS_IOC_SUBVOL_SETFLAGS TARGET_IOW(BTRFS_IOCTL_MAGIC, 26,\ -+ abi_ullong) -+#define TARGET_BTRFS_IOC_GET_SUBVOL_INFO TARGET_IORU(BTRFS_IOCTL_MAGIC, 60) -+ - /* usb ioctls */ - #define TARGET_USBDEVFS_CONTROL TARGET_IOWRU('U', 0) - #define TARGET_USBDEVFS_BULK TARGET_IOWRU('U', 2) -diff --git a/linux-user/syscall_types.h b/linux-user/syscall_types.h -index 3f1f033464..db61dbc1b3 100644 ---- a/linux-user/syscall_types.h -+++ b/linux-user/syscall_types.h -@@ -354,6 +354,38 @@ STRUCT(blkpg_partition, - MK_ARRAY(TYPE_CHAR, BLKPG_DEVNAMELTH), /* devname */ - MK_ARRAY(TYPE_CHAR, BLKPG_VOLNAMELTH)) /* volname */ - -+#ifdef BTRFS_IOC_SUBVOL_CREATE -+STRUCT(btrfs_ioctl_vol_args, -+ TYPE_LONGLONG, /* fd */ -+ MK_ARRAY(TYPE_CHAR, BTRFS_PATH_NAME_MAX + 1)) /* name */ -+#endif -+ -+#ifdef BTRFS_IOC_GET_SUBVOL_INFO -+STRUCT(btrfs_ioctl_timespec, -+ TYPE_ULONGLONG, /* sec */ -+ TYPE_INT) /* nsec */ -+ -+STRUCT(btrfs_ioctl_get_subvol_info_args, -+ TYPE_ULONGLONG, /* treeid */ -+ MK_ARRAY(TYPE_CHAR, BTRFS_VOL_NAME_MAX + 1), -+ TYPE_ULONGLONG, /* parentid */ -+ TYPE_ULONGLONG, /* dirid */ -+ TYPE_ULONGLONG, /* generation */ -+ TYPE_ULONGLONG, /* flags */ -+ MK_ARRAY(TYPE_CHAR, BTRFS_UUID_SIZE), /* uuid */ -+ MK_ARRAY(TYPE_CHAR, BTRFS_UUID_SIZE), /* parent_uuid */ -+ MK_ARRAY(TYPE_CHAR, BTRFS_UUID_SIZE), /* received_uuid */ -+ TYPE_ULONGLONG, /* ctransid */ -+ TYPE_ULONGLONG, /* otransid */ -+ TYPE_ULONGLONG, /* stransid */ -+ TYPE_ULONGLONG, /* rtransid */ -+ MK_STRUCT(STRUCT_btrfs_ioctl_timespec), /* ctime */ -+ MK_STRUCT(STRUCT_btrfs_ioctl_timespec), /* otime */ -+ MK_STRUCT(STRUCT_btrfs_ioctl_timespec), /* stime */ -+ MK_STRUCT(STRUCT_btrfs_ioctl_timespec), /* rtime */ -+ MK_ARRAY(TYPE_ULONGLONG, 8)) /* reserved */ -+#endif -+ - STRUCT(rtc_time, - TYPE_INT, /* tm_sec */ - TYPE_INT, /* tm_min */ --- -2.26.2 - diff --git a/0003-linux-user-Add-support-for-a-group-of-btrfs-ioctls-u.patch b/0003-linux-user-Add-support-for-a-group-of-btrfs-ioctls-u.patch deleted file mode 100644 index 2a6a230..0000000 --- a/0003-linux-user-Add-support-for-a-group-of-btrfs-ioctls-u.patch +++ /dev/null @@ -1,98 +0,0 @@ -From 40fdd783ec707e61c285e081816bd2df54dfede4 Mon Sep 17 00:00:00 2001 -From: Filip Bozuta -Date: Thu, 3 Sep 2020 01:26:55 +0200 -Subject: [PATCH 3/9] linux-user: Add support for a group of btrfs ioctls used - for snapshots -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This patch implements functionality for following ioctls: - -BTRFS_IOC_SNAP_CREATE - Creating a subvolume snapshot - - Create a snapshot of a btrfs subvolume. The snapshot is created using the - ioctl's third argument that is a pointer to a 'struct btrfs_ioctl_vol_args' - (which was mentioned in the previous patch). Before calling this ioctl, - the fields of the structure should be filled with aproppriate values for - the file descriptor and path of the subvolume for which the snapshot is to - be created. - -BTRFS_IOC_SNAP_DESTROY - Removing a subvolume snapshot - - Delete a snapshot of a btrfs subvolume. The snapshot is deleted using the - ioctl's third argument that is a pointer to a 'struct btrfs_ioctl_vol_args' - (which was mentioned in the previous patch). Before calling this ioctl, - the fields of the structure should be filled with aproppriate values for - the file descriptor and path of the subvolume for which the snapshot is to - be deleted. - -Implementation notes: - - Since the thunk type 'struct btrfs_ioctl_vol_args' is defined in the - previous patch, the implementation for these ioctls was straightforward. - -Signed-off-by: Filip Bozuta -Tested-by: Daniel P. Berrangé -Message-Id: <20200823195014.116226-3-Filip.Bozuta@syrmia.com> -Signed-off-by: Laurent Vivier ---- - linux-user/ioctls.h | 8 ++++++++ - linux-user/syscall_defs.h | 2 ++ - linux-user/syscall_types.h | 3 ++- - 3 files changed, 12 insertions(+), 1 deletion(-) - -diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h -index 12d1444224..f33a99f8b6 100644 ---- a/linux-user/ioctls.h -+++ b/linux-user/ioctls.h -@@ -174,10 +174,18 @@ - IOCTL(FS_IOC32_GETVERSION, IOC_R, MK_PTR(TYPE_INT)) - IOCTL(FS_IOC32_SETVERSION, IOC_W, MK_PTR(TYPE_INT)) - -+#ifdef BTRFS_IOC_SNAP_CREATE -+ IOCTL(BTRFS_IOC_SNAP_CREATE, IOC_W, -+ MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_vol_args))) -+#endif - #ifdef BTRFS_IOC_SUBVOL_CREATE - IOCTL(BTRFS_IOC_SUBVOL_CREATE, IOC_W, - MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_vol_args))) - #endif -+#ifdef BTRFS_IOC_SNAP_DESTROY -+ IOCTL(BTRFS_IOC_SNAP_DESTROY, IOC_W, -+ MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_vol_args))) -+#endif - #ifdef BTRFS_IOC_SUBVOL_GETFLAGS - IOCTL(BTRFS_IOC_SUBVOL_GETFLAGS, IOC_R, MK_PTR(TYPE_ULONGLONG)) - #endif -diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h -index 2757956dfa..a945e12547 100644 ---- a/linux-user/syscall_defs.h -+++ b/linux-user/syscall_defs.h -@@ -968,7 +968,9 @@ struct target_rtc_pll_info { - #define TARGET_FS_IOC32_SETVERSION TARGET_IOW('v', 2, int) - - /* btrfs ioctls */ -+#define TARGET_BTRFS_IOC_SNAP_CREATE TARGET_IOWU(BTRFS_IOCTL_MAGIC, 1) - #define TARGET_BTRFS_IOC_SUBVOL_CREATE TARGET_IOWU(BTRFS_IOCTL_MAGIC, 14) -+#define TARGET_BTRFS_IOC_SNAP_DESTROY TARGET_IOWU(BTRFS_IOCTL_MAGIC, 15) - #define TARGET_BTRFS_IOC_SUBVOL_GETFLAGS TARGET_IOR(BTRFS_IOCTL_MAGIC, 25,\ - abi_ullong) - #define TARGET_BTRFS_IOC_SUBVOL_SETFLAGS TARGET_IOW(BTRFS_IOCTL_MAGIC, 26,\ -diff --git a/linux-user/syscall_types.h b/linux-user/syscall_types.h -index db61dbc1b3..038cd7869b 100644 ---- a/linux-user/syscall_types.h -+++ b/linux-user/syscall_types.h -@@ -354,7 +354,8 @@ STRUCT(blkpg_partition, - MK_ARRAY(TYPE_CHAR, BLKPG_DEVNAMELTH), /* devname */ - MK_ARRAY(TYPE_CHAR, BLKPG_VOLNAMELTH)) /* volname */ - --#ifdef BTRFS_IOC_SUBVOL_CREATE -+#if defined(BTRFS_IOC_SUBVOL_CREATE) || defined(BTRFS_IOC_SNAP_CREATE) || \ -+ defined(BTRFS_IOC_SNAP_DESTROY) - STRUCT(btrfs_ioctl_vol_args, - TYPE_LONGLONG, /* fd */ - MK_ARRAY(TYPE_CHAR, BTRFS_PATH_NAME_MAX + 1)) /* name */ --- -2.26.2 - diff --git a/0004-linux-user-Add-support-for-btrfs-ioctls-used-to-mani.patch b/0004-linux-user-Add-support-for-btrfs-ioctls-used-to-mani.patch deleted file mode 100644 index a6a0095..0000000 --- a/0004-linux-user-Add-support-for-btrfs-ioctls-used-to-mani.patch +++ /dev/null @@ -1,222 +0,0 @@ -From ead1cdc1e4bb9fa4d09ca4d8af94c2687e7f5d36 Mon Sep 17 00:00:00 2001 -From: Filip Bozuta -Date: Thu, 3 Sep 2020 01:26:56 +0200 -Subject: [PATCH 4/9] linux-user: Add support for btrfs ioctls used to - manipulate with devices -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This patch implements functionality for following ioctls: - -BTRFS_IOC_SCAN_DEV - Scanning device for a btrfs filesystem - - Scan a device for a btrfs filesystem. The device that is to - be scanned is passed in the ioctl's third argument which - represents a pointer to a 'struct ioc_vol_args' (which was - mentioned in a previous patch). Before calling this ioctl, - the name field of this structure should be filled with the - aproppriate name value which represents a path for the device. - If the device contains a btrfs filesystem, the ioctl returns 0, - otherwise a negative value is returned. - -BTRFS_IOC_ADD_DEV - Adding a device to a btrfs filesystem - - Add a device to a btrfs filesystem. The device that is to be - added is passed in the ioctl's third argument which represents - a pointer to a 'struct ioc_vol_args' (which was mentioned in - a previous patch). Before calling this ioctl, the name field of - this structure should be filled with the aproppriate name value - which represents a path for the device. - -BTRFS_IOC_RM_DEV - Removing a device from a btrfs filesystem - - Remove a device from a btrfs filesystem. The device that is to be - removed is passed in the ioctl's third argument which represents - a pointer to a 'struct ioc_vol_args' (which was mentioned in - a previous patch). Before calling this ioctl, the name field of - this structure should be filled with the aproppriate name value - which represents a path for the device. - -BTRFS_IOC_DEV_INFO - Getting information about a device - - Obtain information for device in a btrfs filesystem. The information - is gathered in the ioctl's third argument which represents a pointer - to a following structure type: - - struct btrfs_ioctl_dev_info_args { - __u64 devid; /* in/out */ - __u8 uuid[BTRFS_UUID_SIZE]; /* in/out */ - __u64 bytes_used; /* out */ - __u64 total_bytes; /* out */ - __u64 unused[379]; /* pad to 4k */ - __u8 path[BTRFS_DEVICE_PATH_NAME_MAX]; /* out */ - }; - - Before calling this ioctl, field "devid" should be set with the id value - for the device for which the information is to be obtained. If this field - is not aproppriately set, the errno ENODEV ("No such device") is returned. - -BTRFS_IOC_GET_DEV_STATS - Getting device statistics - - Obtain stats informatin for device in a btrfs filesystem. The information - is gathered in the ioctl's third argument which represents a pointer to - a following structure type: - - struct btrfs_ioctl_get_dev_stats { - __u64 devid; /* in */ - __u64 nr_items; /* in/out */ - __u64 flags; /* in/out */ - - /* out values: */ - __u64 values[BTRFS_DEV_STAT_VALUES_MAX]; - - /* - * This pads the struct to 1032 bytes. It was originally meant to pad to - * 1024 bytes, but when adding the flags field, the padding calculation - * was not adjusted. - */ - __u64 unused[128 - 2 - BTRFS_DEV_STAT_VALUES_MAX]; - }; - - Before calling this ioctl, field "devid" should be set with the id value - for the device for which the information is to be obtained. If this field - is not aproppriately set, the errno ENODEV ("No such device") is returned. - -BTRFS_IOC_FORGET_DEV - Remove unmounted devices - - Search and remove all stale devices (devices which are not mounted). - The third ioctl argument is a pointer to a 'struct btrfs_ioctl_vol_args'. - The ioctl call will release all unmounted devices which match the path - which is specified in the "name" field of the structure. If an empty - path ("") is specified, all unmounted devices will be released. - -Implementation notes: - - Ioctls BTRFS_IOC_DEV_INFO and BTRFS_IOC_GET_DEV_STATS use types - 'struct btrfs_ioctl_dev_info_args' and ' struct btrfs_ioctl_get_dev_stats' - as third argument types. That is the reason why corresponding structure - definitions were added in file 'linux-user/syscall_types.h'. - Since the thunk type for 'struct ioc_vol_args' was already added in a - previous patch, the rest of the implementation was straightforward. - -Signed-off-by: Filip Bozuta -Tested-by: Daniel P. Berrangé -Message-Id: <20200823195014.116226-4-Filip.Bozuta@syrmia.com> -Signed-off-by: Laurent Vivier ---- - linux-user/ioctls.h | 24 ++++++++++++++++++++++++ - linux-user/syscall_defs.h | 6 ++++++ - linux-user/syscall_types.h | 24 +++++++++++++++++++++++- - 3 files changed, 53 insertions(+), 1 deletion(-) - -diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h -index f33a99f8b6..55a6cbeca5 100644 ---- a/linux-user/ioctls.h -+++ b/linux-user/ioctls.h -@@ -178,6 +178,22 @@ - IOCTL(BTRFS_IOC_SNAP_CREATE, IOC_W, - MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_vol_args))) - #endif -+#ifdef BTRFS_IOC_SCAN_DEV -+ IOCTL(BTRFS_IOC_SCAN_DEV, IOC_W, -+ MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_vol_args))) -+#endif -+#ifdef BTRFS_IOC_FORGET_DEV -+ IOCTL(BTRFS_IOC_FORGET_DEV, IOC_W, -+ MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_vol_args))) -+#endif -+#ifdef BTRFS_IOC_ADD_DEV -+ IOCTL(BTRFS_IOC_ADD_DEV, IOC_W, -+ MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_vol_args))) -+#endif -+#ifdef BTRFS_IOC_RM_DEV -+ IOCTL(BTRFS_IOC_RM_DEV, IOC_W, -+ MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_vol_args))) -+#endif - #ifdef BTRFS_IOC_SUBVOL_CREATE - IOCTL(BTRFS_IOC_SUBVOL_CREATE, IOC_W, - MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_vol_args))) -@@ -192,6 +208,14 @@ - #ifdef BTRFS_IOC_SUBVOL_SETFLAGS - IOCTL(BTRFS_IOC_SUBVOL_SETFLAGS, IOC_W, MK_PTR(TYPE_ULONGLONG)) - #endif -+#ifdef BTRFS_IOC_DEV_INFO -+ IOCTL(BTRFS_IOC_DEV_INFO, IOC_RW, -+ MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_dev_info_args))) -+#endif -+#ifdef BTRFS_IOC_GET_DEV_STATS -+ IOCTL(BTRFS_IOC_GET_DEV_STATS, IOC_RW, -+ MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_get_dev_stats))) -+#endif - #ifdef BTRFS_IOC_GET_SUBVOL_INFO - IOCTL(BTRFS_IOC_GET_SUBVOL_INFO, IOC_R, - MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_get_subvol_info_args))) -diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h -index a945e12547..4c7bfa0391 100644 ---- a/linux-user/syscall_defs.h -+++ b/linux-user/syscall_defs.h -@@ -969,12 +969,18 @@ struct target_rtc_pll_info { - - /* btrfs ioctls */ - #define TARGET_BTRFS_IOC_SNAP_CREATE TARGET_IOWU(BTRFS_IOCTL_MAGIC, 1) -+#define TARGET_BTRFS_IOC_SCAN_DEV TARGET_IOWU(BTRFS_IOCTL_MAGIC, 4) -+#define TARGET_BTRFS_IOC_FORGET_DEV TARGET_IOWU(BTRFS_IOCTL_MAGIC, 5) -+#define TARGET_BTRFS_IOC_ADD_DEV TARGET_IOWU(BTRFS_IOCTL_MAGIC, 10) -+#define TARGET_BTRFS_IOC_RM_DEV TARGET_IOWU(BTRFS_IOCTL_MAGIC, 11) - #define TARGET_BTRFS_IOC_SUBVOL_CREATE TARGET_IOWU(BTRFS_IOCTL_MAGIC, 14) - #define TARGET_BTRFS_IOC_SNAP_DESTROY TARGET_IOWU(BTRFS_IOCTL_MAGIC, 15) - #define TARGET_BTRFS_IOC_SUBVOL_GETFLAGS TARGET_IOR(BTRFS_IOCTL_MAGIC, 25,\ - abi_ullong) - #define TARGET_BTRFS_IOC_SUBVOL_SETFLAGS TARGET_IOW(BTRFS_IOCTL_MAGIC, 26,\ - abi_ullong) -+#define TARGET_BTRFS_IOC_DEV_INFO TARGET_IOWRU(BTRFS_IOCTL_MAGIC, 30) -+#define TARGET_BTRFS_IOC_GET_DEV_STATS TARGET_IOWRU(BTRFS_IOCTL_MAGIC, 52) - #define TARGET_BTRFS_IOC_GET_SUBVOL_INFO TARGET_IORU(BTRFS_IOCTL_MAGIC, 60) - - /* usb ioctls */ -diff --git a/linux-user/syscall_types.h b/linux-user/syscall_types.h -index 038cd7869b..ea6898979b 100644 ---- a/linux-user/syscall_types.h -+++ b/linux-user/syscall_types.h -@@ -355,7 +355,9 @@ STRUCT(blkpg_partition, - MK_ARRAY(TYPE_CHAR, BLKPG_VOLNAMELTH)) /* volname */ - - #if defined(BTRFS_IOC_SUBVOL_CREATE) || defined(BTRFS_IOC_SNAP_CREATE) || \ -- defined(BTRFS_IOC_SNAP_DESTROY) -+ defined(BTRFS_IOC_SNAP_DESTROY) || defined(BTRFS_IOC_SCAN_DEV) || \ -+ defined(BTRFS_IOC_FORGET_DEV) || defined(BTRFS_IOC_ADD_DEV) || \ -+ defined(BTRFS_IOC_RM_DEV) || defined(BTRFS_IOC_DEV_INFO) - STRUCT(btrfs_ioctl_vol_args, - TYPE_LONGLONG, /* fd */ - MK_ARRAY(TYPE_CHAR, BTRFS_PATH_NAME_MAX + 1)) /* name */ -@@ -387,6 +389,26 @@ STRUCT(btrfs_ioctl_get_subvol_info_args, - MK_ARRAY(TYPE_ULONGLONG, 8)) /* reserved */ - #endif - -+#ifdef BTRFS_IOC_DEV_INFO -+STRUCT(btrfs_ioctl_dev_info_args, -+ TYPE_ULONGLONG, /* devid */ -+ MK_ARRAY(TYPE_CHAR, BTRFS_UUID_SIZE), /* uuid */ -+ TYPE_ULONGLONG, /* bytes_used */ -+ TYPE_ULONGLONG, /* total_bytes */ -+ MK_ARRAY(TYPE_ULONGLONG, 379), /* unused */ -+ MK_ARRAY(TYPE_CHAR, BTRFS_DEVICE_PATH_NAME_MAX)) /* path */ -+#endif -+ -+#ifdef BTRFS_IOC_GET_DEV_STATS -+STRUCT(btrfs_ioctl_get_dev_stats, -+ TYPE_ULONGLONG, /* devid */ -+ TYPE_ULONGLONG, /* nr_items */ -+ TYPE_ULONGLONG, /* flags */ -+ MK_ARRAY(TYPE_ULONGLONG, BTRFS_DEV_STAT_VALUES_MAX), /* values */ -+ MK_ARRAY(TYPE_ULONGLONG, -+ 128 - 2 - BTRFS_DEV_STAT_VALUES_MAX)) /* unused */ -+#endif -+ - STRUCT(rtc_time, - TYPE_INT, /* tm_sec */ - TYPE_INT, /* tm_min */ --- -2.26.2 - diff --git a/0005-linux-user-Add-support-for-btrfs-ioctls-used-to-get-.patch b/0005-linux-user-Add-support-for-btrfs-ioctls-used-to-get-.patch deleted file mode 100644 index cfcd47a..0000000 --- a/0005-linux-user-Add-support-for-btrfs-ioctls-used-to-get-.patch +++ /dev/null @@ -1,120 +0,0 @@ -From 5793eb73d4d6d37293c6ca95ed85414fcccb9662 Mon Sep 17 00:00:00 2001 -From: Filip Bozuta -Date: Thu, 3 Sep 2020 01:26:57 +0200 -Subject: [PATCH 5/9] linux-user: Add support for btrfs ioctls used to get/set - features -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This patch implements functionality for following ioctls: - -BTRFS_IOC_GET_FEATURES - Getting feature flags - - Read feature flags for a btrfs filesystem. The feature flags - are returned inside the ioctl's third argument which represents - a pointer to a following structure type: - - struct btrfs_ioctl_feature_flags { - __u64 compat_flags; - __u64 compat_ro_flags; - __u64 incompat_flags; - }; - - All of the structure field represent bit masks that can be composed - of values which can be found on: - https://elixir.bootlin.com/linux/latest/source/fs/btrfs/ctree.h#L282 - -BTRFS_IOC_SET_FEATURES - Setting feature flags - - Set and clear feature flags for a btrfs filesystem. The feature flags - are set using the ioctl's third argument which represents a - 'struct btrfs_ioctl_feature_flags[2]' array. The first element of the - array represent flags which are to be cleared and the second element of - the array represent flags which are to be set. The second element has the - priority over the first, which means that if there are matching flags - in the elements, they will be set in the filesystem. If the flag values - in the third argument aren't correctly set to be composed of the available - predefined flag values, errno ENOPERM ("Operation not permitted") is returned. - -BTRFS_IOC_GET_SUPPORTED_FEATURES - Getting supported feature flags - - Read supported feature flags for a btrfs filesystem. The supported - feature flags are read using the ioctl's third argument which represents - a 'struct btrfs_ioctl_feature_flags[3]' array. The first element of this - array represents all of the supported flags in the btrfs filesystem. - The second element represents flags that can be safely set and third element - represent flags that can be safely clearead. - -Implementation notes: - - All of the implemented ioctls use 'struct btrfs_ioctl_feature_flags' as - third argument. That is the reason why a corresponding defintion was added - in file 'linux-user/syscall_types.h'. - -Signed-off-by: Filip Bozuta -Tested-by: Daniel P. Berrangé -Message-Id: <20200823195014.116226-5-Filip.Bozuta@syrmia.com> -Signed-off-by: Laurent Vivier ---- - linux-user/ioctls.h | 12 ++++++++++++ - linux-user/syscall_defs.h | 3 +++ - linux-user/syscall_types.h | 5 +++++ - 3 files changed, 20 insertions(+) - -diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h -index 55a6cbeca5..50fae1e33b 100644 ---- a/linux-user/ioctls.h -+++ b/linux-user/ioctls.h -@@ -216,6 +216,18 @@ - IOCTL(BTRFS_IOC_GET_DEV_STATS, IOC_RW, - MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_get_dev_stats))) - #endif -+#ifdef BTRFS_IOC_GET_FEATURES -+ IOCTL(BTRFS_IOC_GET_FEATURES, IOC_R, -+ MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_feature_flags))) -+#endif -+#ifdef BTRFS_IOC_SET_FEATURES -+ IOCTL(BTRFS_IOC_SET_FEATURES, IOC_W, -+ MK_PTR(MK_ARRAY(MK_STRUCT(STRUCT_btrfs_ioctl_feature_flags), 2))) -+#endif -+#ifdef BTRFS_IOC_GET_SUPPORTED_FEATURES -+ IOCTL(BTRFS_IOC_GET_SUPPORTED_FEATURES, IOC_R, -+ MK_PTR(MK_ARRAY(MK_STRUCT(STRUCT_btrfs_ioctl_feature_flags), 3))) -+#endif - #ifdef BTRFS_IOC_GET_SUBVOL_INFO - IOCTL(BTRFS_IOC_GET_SUBVOL_INFO, IOC_R, - MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_get_subvol_info_args))) -diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h -index 4c7bfa0391..44811fdcbb 100644 ---- a/linux-user/syscall_defs.h -+++ b/linux-user/syscall_defs.h -@@ -981,6 +981,9 @@ struct target_rtc_pll_info { - abi_ullong) - #define TARGET_BTRFS_IOC_DEV_INFO TARGET_IOWRU(BTRFS_IOCTL_MAGIC, 30) - #define TARGET_BTRFS_IOC_GET_DEV_STATS TARGET_IOWRU(BTRFS_IOCTL_MAGIC, 52) -+#define TARGET_BTRFS_IOC_GET_FEATURES TARGET_IORU(BTRFS_IOCTL_MAGIC, 57) -+#define TARGET_BTRFS_IOC_SET_FEATURES TARGET_IOWU(BTRFS_IOCTL_MAGIC, 57) -+#define TARGET_BTRFS_IOC_GET_SUPPORTED_FEATURES TARGET_IORU(BTRFS_IOCTL_MAGIC, 57) - #define TARGET_BTRFS_IOC_GET_SUBVOL_INFO TARGET_IORU(BTRFS_IOCTL_MAGIC, 60) - - /* usb ioctls */ -diff --git a/linux-user/syscall_types.h b/linux-user/syscall_types.h -index ea6898979b..925054cfd4 100644 ---- a/linux-user/syscall_types.h -+++ b/linux-user/syscall_types.h -@@ -409,6 +409,11 @@ STRUCT(btrfs_ioctl_get_dev_stats, - 128 - 2 - BTRFS_DEV_STAT_VALUES_MAX)) /* unused */ - #endif - -+STRUCT(btrfs_ioctl_feature_flags, -+ TYPE_ULONGLONG, /* compat_flags */ -+ TYPE_ULONGLONG, /* compat_ro_flags */ -+ TYPE_ULONGLONG) /* incompat_flags */ -+ - STRUCT(rtc_time, - TYPE_INT, /* tm_sec */ - TYPE_INT, /* tm_min */ --- -2.26.2 - diff --git a/0006-linux-user-Add-support-for-a-group-of-btrfs-inode-io.patch b/0006-linux-user-Add-support-for-a-group-of-btrfs-inode-io.patch deleted file mode 100644 index a953a23..0000000 --- a/0006-linux-user-Add-support-for-a-group-of-btrfs-inode-io.patch +++ /dev/null @@ -1,236 +0,0 @@ -From 79116330e3eea392dec9a1f38fddf3449ad0195a Mon Sep 17 00:00:00 2001 -From: Filip Bozuta -Date: Thu, 3 Sep 2020 01:26:58 +0200 -Subject: [PATCH 6/9] linux-user: Add support for a group of btrfs inode ioctls -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This patch implements functionality of following ioctls: - -BTRFS_IOC_INO_LOOKUP - Reading tree root id and path - - Read tree root id and path for a given file or directory. - The name and tree root id are returned in an ioctl's third - argument that represents a pointer to a following type: - - struct btrfs_ioctl_ino_lookup_args { - __u64 treeid; - __u64 objectid; - char name[BTRFS_INO_LOOKUP_PATH_MAX]; - }; - - Before calling this ioctl, field 'objectid' should be filled - with the object id value for which the tree id and path are - to be read. Value 'BTRFS_FIRST_FREE_OBJECTID' represents the - object id for the first available btrfs object (directory or - file). - -BTRFS_IOC_INO_PATHS - Reading paths to all files - - Read path to all files with a certain inode number. The paths - are returned in the ioctl's third argument which represents - a pointer to a following type: - - struct btrfs_ioctl_ino_path_args { - __u64 inum; /* in */ - __u64 size; /* in */ - __u64 reserved[4]; - /* struct btrfs_data_container *fspath; out */ - __u64 fspath; /* out */ - }; - - Before calling this ioctl, the 'inum' and 'size' field should - be filled with the aproppriate inode number and size of the - directory where file paths should be looked for. For now, the - paths are returned in an '__u64' (unsigned long long) value - 'fspath'. - -BTRFS_IOC_LOGICAL_INO - Reading inode numbers - - Read inode numbers for files on a certain logical adress. The - inode numbers are returned in the ioctl's third argument which - represents a pointer to a following type: - - struct btrfs_ioctl_logical_ino_args { - __u64 logical; /* in */ - __u64 size; /* in */ - __u64 reserved[3]; /* must be 0 for now */ - __u64 flags; /* in, v2 only */ - /* struct btrfs_data_container *inodes; out */ - __u64 inodes; - }; - - Before calling this ioctl, the 'logical' and 'size' field should - be filled with the aproppriate logical adress and size of where - the inode numbers of files should be looked for. For now, the - inode numbers are returned in an '__u64' (unsigned long long) - value 'inodes'. - -BTRFS_IOC_LOGICAL_INO_V2 - Reading inode numbers - - Same as the above mentioned ioctl except that it allows passing - a flags 'BTRFS_LOGICAL_INO_ARGS_IGNORE_OFFSET'. - -BTRFS_IOC_INO_LOOKUP_USER - Reading subvolume name and path - - Read name and path of a subvolume. The tree root id and - path are read in an ioctl's third argument which represents a - pointer to a following type: - - struct btrfs_ioctl_ino_lookup_user_args { - /* in, inode number containing the subvolume of 'subvolid' */ - __u64 dirid; - /* in */ - __u64 treeid; - /* out, name of the subvolume of 'treeid' */ - char name[BTRFS_VOL_NAME_MAX + 1]; - /* - * out, constructed path from the directory with which the ioctl is - * called to dirid - */ - char path[BTRFS_INO_LOOKUP_USER_PATH_MAX]; - }; - - Before calling this ioctl, the 'dirid' and 'treeid' field should - be filled with aproppriate values which represent the inode number - of the directory that contains the subvolume and treeid of the - subvolume. - -Implementation notes: - - All of the ioctls in this patch use structure types as third arguments. - That is the reason why aproppriate thunk definitions were added in file - 'syscall_types.h'. - -Signed-off-by: Filip Bozuta -Tested-by: Daniel P. Berrangé -Message-Id: <20200823195014.116226-6-Filip.Bozuta@syrmia.com> -Signed-off-by: Laurent Vivier ---- - linux-user/ioctls.h | 20 ++++++++++++++++++++ - linux-user/syscall_defs.h | 5 +++++ - linux-user/syscall_types.h | 32 ++++++++++++++++++++++++++++++++ - 3 files changed, 57 insertions(+) - -diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h -index 50fae1e33b..169f98f7a3 100644 ---- a/linux-user/ioctls.h -+++ b/linux-user/ioctls.h -@@ -202,6 +202,10 @@ - IOCTL(BTRFS_IOC_SNAP_DESTROY, IOC_W, - MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_vol_args))) - #endif -+#ifdef BTRFS_IOC_INO_LOOKUP -+ IOCTL(BTRFS_IOC_INO_LOOKUP, IOC_RW, -+ MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_ino_lookup_args))) -+#endif - #ifdef BTRFS_IOC_SUBVOL_GETFLAGS - IOCTL(BTRFS_IOC_SUBVOL_GETFLAGS, IOC_R, MK_PTR(TYPE_ULONGLONG)) - #endif -@@ -212,6 +216,14 @@ - IOCTL(BTRFS_IOC_DEV_INFO, IOC_RW, - MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_dev_info_args))) - #endif -+#ifdef BTRFS_IOC_INO_PATHS -+ IOCTL(BTRFS_IOC_INO_PATHS, IOC_RW, -+ MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_ino_path_args))) -+#endif -+#ifdef BTRFS_IOC_LOGICAL_INO -+ IOCTL(BTRFS_IOC_LOGICAL_INO, IOC_RW, -+ MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_logical_ino_args))) -+#endif - #ifdef BTRFS_IOC_GET_DEV_STATS - IOCTL(BTRFS_IOC_GET_DEV_STATS, IOC_RW, - MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_get_dev_stats))) -@@ -228,10 +240,18 @@ - IOCTL(BTRFS_IOC_GET_SUPPORTED_FEATURES, IOC_R, - MK_PTR(MK_ARRAY(MK_STRUCT(STRUCT_btrfs_ioctl_feature_flags), 3))) - #endif -+#ifdef BTRFS_IOC_LOGICAL_INO_V2 -+ IOCTL(BTRFS_IOC_LOGICAL_INO_V2, IOC_RW, -+ MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_logical_ino_args))) -+#endif - #ifdef BTRFS_IOC_GET_SUBVOL_INFO - IOCTL(BTRFS_IOC_GET_SUBVOL_INFO, IOC_R, - MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_get_subvol_info_args))) - #endif -+#ifdef BTRFS_IOC_INO_LOOKUP_USER -+ IOCTL(BTRFS_IOC_INO_LOOKUP_USER, IOC_RW, -+ MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_ino_lookup_user_args))) -+#endif - - #ifdef CONFIG_USBFS - /* USB ioctls */ -diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h -index 44811fdcbb..a6a9454b85 100644 ---- a/linux-user/syscall_defs.h -+++ b/linux-user/syscall_defs.h -@@ -975,16 +975,21 @@ struct target_rtc_pll_info { - #define TARGET_BTRFS_IOC_RM_DEV TARGET_IOWU(BTRFS_IOCTL_MAGIC, 11) - #define TARGET_BTRFS_IOC_SUBVOL_CREATE TARGET_IOWU(BTRFS_IOCTL_MAGIC, 14) - #define TARGET_BTRFS_IOC_SNAP_DESTROY TARGET_IOWU(BTRFS_IOCTL_MAGIC, 15) -+#define TARGET_BTRFS_IOC_INO_LOOKUP TARGET_IOWRU(BTRFS_IOCTL_MAGIC, 18) - #define TARGET_BTRFS_IOC_SUBVOL_GETFLAGS TARGET_IOR(BTRFS_IOCTL_MAGIC, 25,\ - abi_ullong) - #define TARGET_BTRFS_IOC_SUBVOL_SETFLAGS TARGET_IOW(BTRFS_IOCTL_MAGIC, 26,\ - abi_ullong) - #define TARGET_BTRFS_IOC_DEV_INFO TARGET_IOWRU(BTRFS_IOCTL_MAGIC, 30) -+#define TARGET_BTRFS_IOC_INO_PATHS TARGET_IOWRU(BTRFS_IOCTL_MAGIC, 35) -+#define TARGET_BTRFS_IOC_LOGICAL_INO TARGET_IOWRU(BTRFS_IOCTL_MAGIC, 36) - #define TARGET_BTRFS_IOC_GET_DEV_STATS TARGET_IOWRU(BTRFS_IOCTL_MAGIC, 52) - #define TARGET_BTRFS_IOC_GET_FEATURES TARGET_IORU(BTRFS_IOCTL_MAGIC, 57) - #define TARGET_BTRFS_IOC_SET_FEATURES TARGET_IOWU(BTRFS_IOCTL_MAGIC, 57) - #define TARGET_BTRFS_IOC_GET_SUPPORTED_FEATURES TARGET_IORU(BTRFS_IOCTL_MAGIC, 57) -+#define TARGET_BTRFS_IOC_LOGICAL_INO_V2 TARGET_IOWRU(BTRFS_IOCTL_MAGIC, 59) - #define TARGET_BTRFS_IOC_GET_SUBVOL_INFO TARGET_IORU(BTRFS_IOCTL_MAGIC, 60) -+#define TARGET_BTRFS_IOC_INO_LOOKUP_USER TARGET_IOWRU(BTRFS_IOCTL_MAGIC, 62) - - /* usb ioctls */ - #define TARGET_USBDEVFS_CONTROL TARGET_IOWRU('U', 0) -diff --git a/linux-user/syscall_types.h b/linux-user/syscall_types.h -index 925054cfd4..b84e14235f 100644 ---- a/linux-user/syscall_types.h -+++ b/linux-user/syscall_types.h -@@ -389,6 +389,38 @@ STRUCT(btrfs_ioctl_get_subvol_info_args, - MK_ARRAY(TYPE_ULONGLONG, 8)) /* reserved */ - #endif - -+#ifdef BTRFS_IOC_INO_LOOKUP -+STRUCT(btrfs_ioctl_ino_lookup_args, -+ TYPE_ULONGLONG, /* treeid */ -+ TYPE_ULONGLONG, /* objectid */ -+ MK_ARRAY(TYPE_CHAR, BTRFS_INO_LOOKUP_PATH_MAX)) /* name */ -+#endif -+ -+#ifdef BTRFS_IOC_INO_PATHS -+STRUCT(btrfs_ioctl_ino_path_args, -+ TYPE_ULONGLONG, /* inum */ -+ TYPE_ULONGLONG, /* size */ -+ MK_ARRAY(TYPE_ULONGLONG, 4), /* reserved */ -+ TYPE_ULONGLONG) /* fspath */ -+#endif -+ -+#if defined(BTRFS_IOC_LOGICAL_INO) || defined(BTRFS_IOC_LOGICAL_INO_V2) -+STRUCT(btrfs_ioctl_logical_ino_args, -+ TYPE_ULONGLONG, /* logical */ -+ TYPE_ULONGLONG, /* size */ -+ MK_ARRAY(TYPE_ULONGLONG, 3), /* reserved */ -+ TYPE_ULONGLONG, /* flags */ -+ TYPE_ULONGLONG) /* inodes */ -+#endif -+ -+#ifdef BTRFS_IOC_INO_LOOKUP_USER -+STRUCT(btrfs_ioctl_ino_lookup_user_args, -+ TYPE_ULONGLONG, /* dirid */ -+ TYPE_ULONGLONG, /* treeid */ -+ MK_ARRAY(TYPE_CHAR, BTRFS_VOL_NAME_MAX + 1), /* name */ -+ MK_ARRAY(TYPE_CHAR, BTRFS_INO_LOOKUP_USER_PATH_MAX)) /* path */ -+#endif -+ - #ifdef BTRFS_IOC_DEV_INFO - STRUCT(btrfs_ioctl_dev_info_args, - TYPE_ULONGLONG, /* devid */ --- -2.26.2 - diff --git a/0007-linux-user-Add-support-for-two-btrfs-ioctls-used-for.patch b/0007-linux-user-Add-support-for-two-btrfs-ioctls-used-for.patch deleted file mode 100644 index e284817..0000000 --- a/0007-linux-user-Add-support-for-two-btrfs-ioctls-used-for.patch +++ /dev/null @@ -1,132 +0,0 @@ -From 58252f756d7fb2a8516c0815034c0bded4697852 Mon Sep 17 00:00:00 2001 -From: Filip Bozuta -Date: Thu, 3 Sep 2020 01:26:59 +0200 -Subject: [PATCH 7/9] linux-user: Add support for two btrfs ioctls used for - subvolume -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This patch implements functionality for following ioctl: - -BTRFS_IOC_DEFAULT_SUBVOL - Setting a default subvolume - - Set a default subvolume for a btrfs filesystem. The third - ioctl's argument is a '__u64' (unsigned long long) which - represents the id of a subvolume that is to be set as - the default. - -BTRFS_IOC_GET_SUBVOL_ROOTREF - Getting tree and directory id of subvolumes - - Read tree and directory id of subvolumes from a btrfs - filesystem. The tree and directory id's are returned in the - ioctl's third argument which represents a pointer to a - following type: - - struct btrfs_ioctl_get_subvol_rootref_args { - /* in/out, minimum id of rootref's treeid to be searched */ - __u64 min_treeid; - - /* out */ - struct { - __u64 treeid; - __u64 dirid; - } rootref[BTRFS_MAX_ROOTREF_BUFFER_NUM]; - - /* out, number of found items */ - __u8 num_items; - __u8 align[7]; - }; - - Before calling this ioctl, 'min_treeid' field should be filled - with value that represent the minimum value for the tree id. - -Implementation notes: - - Ioctl BTRFS_IOC_GET_SUBVOL_ROOTREF uses the above mentioned structure - type as third argument. That is the reason why a aproppriate thunk - structure definition is added in file 'syscall_types.h'. - -Signed-off-by: Filip Bozuta -Tested-by: Daniel P. Berrangé -Message-Id: <20200823195014.116226-7-Filip.Bozuta@syrmia.com> -Signed-off-by: Laurent Vivier ---- - linux-user/ioctls.h | 7 +++++++ - linux-user/syscall_defs.h | 3 +++ - linux-user/syscall_types.h | 13 +++++++++++++ - 3 files changed, 23 insertions(+) - -diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h -index 169f98f7a3..728880b9f3 100644 ---- a/linux-user/ioctls.h -+++ b/linux-user/ioctls.h -@@ -206,6 +206,9 @@ - IOCTL(BTRFS_IOC_INO_LOOKUP, IOC_RW, - MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_ino_lookup_args))) - #endif -+#ifdef BTRFS_IOC_DEFAULT_SUBVOL -+ IOCTL(BTRFS_IOC_DEFAULT_SUBVOL, IOC_W, MK_PTR(TYPE_ULONGLONG)) -+#endif - #ifdef BTRFS_IOC_SUBVOL_GETFLAGS - IOCTL(BTRFS_IOC_SUBVOL_GETFLAGS, IOC_R, MK_PTR(TYPE_ULONGLONG)) - #endif -@@ -248,6 +251,10 @@ - IOCTL(BTRFS_IOC_GET_SUBVOL_INFO, IOC_R, - MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_get_subvol_info_args))) - #endif -+#ifdef BTRFS_IOC_GET_SUBVOL_ROOTREF -+ IOCTL(BTRFS_IOC_GET_SUBVOL_ROOTREF, IOC_RW, -+ MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_get_subvol_rootref_args))) -+#endif - #ifdef BTRFS_IOC_INO_LOOKUP_USER - IOCTL(BTRFS_IOC_INO_LOOKUP_USER, IOC_RW, - MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_ino_lookup_user_args))) -diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h -index a6a9454b85..1d0bfb5479 100644 ---- a/linux-user/syscall_defs.h -+++ b/linux-user/syscall_defs.h -@@ -976,6 +976,8 @@ struct target_rtc_pll_info { - #define TARGET_BTRFS_IOC_SUBVOL_CREATE TARGET_IOWU(BTRFS_IOCTL_MAGIC, 14) - #define TARGET_BTRFS_IOC_SNAP_DESTROY TARGET_IOWU(BTRFS_IOCTL_MAGIC, 15) - #define TARGET_BTRFS_IOC_INO_LOOKUP TARGET_IOWRU(BTRFS_IOCTL_MAGIC, 18) -+#define TARGET_BTRFS_IOC_DEFAULT_SUBVOL TARGET_IOW(BTRFS_IOCTL_MAGIC, 19,\ -+ abi_ullong) - #define TARGET_BTRFS_IOC_SUBVOL_GETFLAGS TARGET_IOR(BTRFS_IOCTL_MAGIC, 25,\ - abi_ullong) - #define TARGET_BTRFS_IOC_SUBVOL_SETFLAGS TARGET_IOW(BTRFS_IOCTL_MAGIC, 26,\ -@@ -989,6 +991,7 @@ struct target_rtc_pll_info { - #define TARGET_BTRFS_IOC_GET_SUPPORTED_FEATURES TARGET_IORU(BTRFS_IOCTL_MAGIC, 57) - #define TARGET_BTRFS_IOC_LOGICAL_INO_V2 TARGET_IOWRU(BTRFS_IOCTL_MAGIC, 59) - #define TARGET_BTRFS_IOC_GET_SUBVOL_INFO TARGET_IORU(BTRFS_IOCTL_MAGIC, 60) -+#define TARGET_BTRFS_IOC_GET_SUBVOL_ROOTREF TARGET_IOWRU(BTRFS_IOCTL_MAGIC, 61) - #define TARGET_BTRFS_IOC_INO_LOOKUP_USER TARGET_IOWRU(BTRFS_IOCTL_MAGIC, 62) - - /* usb ioctls */ -diff --git a/linux-user/syscall_types.h b/linux-user/syscall_types.h -index b84e14235f..5566d101c2 100644 ---- a/linux-user/syscall_types.h -+++ b/linux-user/syscall_types.h -@@ -431,6 +431,19 @@ STRUCT(btrfs_ioctl_dev_info_args, - MK_ARRAY(TYPE_CHAR, BTRFS_DEVICE_PATH_NAME_MAX)) /* path */ - #endif - -+#ifdef BTRFS_IOC_GET_SUBVOL_ROOTREF -+STRUCT(rootref, -+ TYPE_ULONGLONG, /* treeid */ -+ TYPE_ULONGLONG) /* dirid */ -+ -+STRUCT(btrfs_ioctl_get_subvol_rootref_args, -+ TYPE_ULONGLONG, /* min_treeid */ -+ MK_ARRAY(MK_STRUCT(STRUCT_rootref), -+ BTRFS_MAX_ROOTREF_BUFFER_NUM), /* rootref */ -+ TYPE_CHAR, /* num_items */ -+ MK_ARRAY(TYPE_CHAR, 7)) /* align */ -+#endif -+ - #ifdef BTRFS_IOC_GET_DEV_STATS - STRUCT(btrfs_ioctl_get_dev_stats, - TYPE_ULONGLONG, /* devid */ --- -2.26.2 - diff --git a/0008-linux-user-Add-support-for-btrfs-ioctls-used-to-mana.patch b/0008-linux-user-Add-support-for-btrfs-ioctls-used-to-mana.patch deleted file mode 100644 index 4871677..0000000 --- a/0008-linux-user-Add-support-for-btrfs-ioctls-used-to-mana.patch +++ /dev/null @@ -1,235 +0,0 @@ -From d62c16ff35a17743c2a0f8ebfb39f84064afcb3c Mon Sep 17 00:00:00 2001 -From: Filip Bozuta -Date: Thu, 3 Sep 2020 01:27:00 +0200 -Subject: [PATCH 8/9] linux-user: Add support for btrfs ioctls used to manage - quota -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This patch implements functionality for following ioctls: - -BTRFS_IOC_QUOTA_CTL - Enabling/Disabling quota support - - Enable or disable quota support for a btrfs filesystem. Quota - support is enabled or disabled using the ioctls third argument - which represents a pointer to a following type: - - struct btrfs_ioctl_quota_ctl_args { - __u64 cmd; - __u64 status; - }; - - Before calling this ioctl, the 'cmd' field should be filled - with one of the values 'BTRFS_QUOTA_CTL_ENABLE' (enabling quota) - 'BTRFS_QUOTA_CTL_DISABLE' (disabling quota). - -BTRFS_IOC_QGROUP_CREATE - Creating/Removing a subvolume quota group - - Create or remove a subvolume quota group. The subvolume quota - group is created or removed using the ioctl's third argument which - represents a pointer to a following type: - - struct btrfs_ioctl_qgroup_create_args { - __u64 create; - __u64 qgroupid; - }; - - Before calling this ioctl, the 'create' field should be filled - with the aproppriate value depending on if the user wants to - create or remove a quota group (0 for removing, everything else - for creating). Also, the 'qgroupid' field should be filled with - the value for the quota group id that is to be created. - -BTRFS_IOC_QGROUP_ASSIGN - Asigning or removing a quota group as child group - - Asign or remove a quota group as child quota group of another - group in the btrfs filesystem. The asignment is done using the - ioctl's third argument which represents a pointert to a following type: - - struct btrfs_ioctl_qgroup_assign_args { - __u64 assign; - __u64 src; - __u64 dst; - }; - - Before calling this ioctl, the 'assign' field should be filled with - the aproppriate value depending on if the user wants to asign or remove - a quota group as a child quota group of another group (0 for removing, - everythin else for asigning). Also, the 'src' and 'dst' fields should - be filled with the aproppriate quota group id values depending on which - quota group needs to asigned or removed as child quota group of another - group ('src' gets asigned or removed as child group of 'dst'). - -BTRFS_IOC_QGROUP_LIMIT - Limiting the size of a quota group - - Limit the size of a quota group. The size of the quota group is limited - with the ioctls third argument which represents a pointer to a following - type: - - struct btrfs_ioctl_qgroup_limit_args { - __u64 qgroupid; - struct btrfs_qgroup_limit lim; - }; - - Before calling this ioctl, the 'qgroup' id field should be filled with - aproppriate value of the quota group id for which the size is to be - limited. The second field is of following type: - - struct btrfs_qgroup_limit { - __u64 flags; - __u64 max_rfer; - __u64 max_excl; - __u64 rsv_rfer; - __u64 rsv_excl; - }; - - The 'max_rfer' field should be filled with the size to which the quota - group should be limited. The 'flags' field can be used for passing - additional options and can have values which can be found on: - https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/btrfs.h#L67 - -BTRFS_IOC_QUOTA_RESCAN_STATUS - Checking status of running rescan operation - - Check status of a running rescan operation. The status is checked using - the ioctl's third argument which represents a pointer to a following type: - - struct btrfs_ioctl_quota_rescan_args { - __u64 flags; - __u64 progress; - __u64 reserved[6]; - }; - - If there is a rescan operation running, 'flags' field is set to 1, and - 'progress' field is set to aproppriate value which represents the progress - of the operation. - -BTRFS_IOC_QUOTA_RESCAN - Starting a rescan operation - - Start ar rescan operation to Trash all quota groups and scan the metadata - again with the current config. Before calling this ioctl, - BTRFS_IOC_QUOTA_RESCAN_STATUS sould be run to check if there is already a - rescan operation runing. After that ioctl call, the received - 'struct btrfs_ioctl_quota_rescan_args' should be than passed as this ioctls - third argument. - -BTRFS_IOC_QUOTA_RESCAN_WAIT - Waiting for a rescan operation to finish - - Wait until a rescan operation is finished (if there is a rescan operation - running). The third ioctls argument is ignored. - -Implementation notes: - - Almost all of the ioctls in this patch use structure types as third arguments. - That is the reason why aproppriate thunk definitions were added in file - 'syscall_types.h'. - -Signed-off-by: Filip Bozuta -Tested-by: Daniel P. Berrangé -Message-Id: <20200823195014.116226-8-Filip.Bozuta@syrmia.com> -Signed-off-by: Laurent Vivier ---- - linux-user/ioctls.h | 27 +++++++++++++++++++++++++++ - linux-user/syscall_defs.h | 7 +++++++ - linux-user/syscall_types.h | 29 +++++++++++++++++++++++++++++ - 3 files changed, 63 insertions(+) - -diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h -index 728880b9f3..882bfb3e88 100644 ---- a/linux-user/ioctls.h -+++ b/linux-user/ioctls.h -@@ -227,6 +227,33 @@ - IOCTL(BTRFS_IOC_LOGICAL_INO, IOC_RW, - MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_logical_ino_args))) - #endif -+#ifdef BTRFS_IOC_QUOTA_CTL -+ IOCTL(BTRFS_IOC_QUOTA_CTL, IOC_RW, -+ MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_quota_ctl_args))) -+#endif -+#ifdef BTRFS_IOC_QGROUP_ASSIGN -+ IOCTL(BTRFS_IOC_QGROUP_ASSIGN, IOC_W, -+ MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_qgroup_assign_args))) -+#endif -+#ifdef BTRFS_IOC_QGROUP_CREATE -+ IOCTL(BTRFS_IOC_QGROUP_CREATE, IOC_W, -+ MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_qgroup_create_args))) -+#endif -+#ifdef BTRFS_IOC_QGROUP_LIMIT -+ IOCTL(BTRFS_IOC_QGROUP_LIMIT, IOC_R, -+ MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_qgroup_limit_args))) -+#endif -+#ifdef BTRFS_IOC_QUOTA_RESCAN -+ IOCTL(BTRFS_IOC_QUOTA_RESCAN, IOC_W, -+ MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_quota_rescan_args))) -+#endif -+#ifdef BTRFS_IOC_QUOTA_RESCAN_STATUS -+ IOCTL(BTRFS_IOC_QUOTA_RESCAN_STATUS, IOC_R, -+ MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_quota_rescan_args))) -+#endif -+#ifdef BTRFS_IOC_QUOTA_RESCAN_WAIT -+ IOCTL(BTRFS_IOC_QUOTA_RESCAN_WAIT, 0, TYPE_NULL) -+#endif - #ifdef BTRFS_IOC_GET_DEV_STATS - IOCTL(BTRFS_IOC_GET_DEV_STATS, IOC_RW, - MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_get_dev_stats))) -diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h -index 1d0bfb5479..10a7f91016 100644 ---- a/linux-user/syscall_defs.h -+++ b/linux-user/syscall_defs.h -@@ -985,6 +985,13 @@ struct target_rtc_pll_info { - #define TARGET_BTRFS_IOC_DEV_INFO TARGET_IOWRU(BTRFS_IOCTL_MAGIC, 30) - #define TARGET_BTRFS_IOC_INO_PATHS TARGET_IOWRU(BTRFS_IOCTL_MAGIC, 35) - #define TARGET_BTRFS_IOC_LOGICAL_INO TARGET_IOWRU(BTRFS_IOCTL_MAGIC, 36) -+#define TARGET_BTRFS_IOC_QUOTA_CTL TARGET_IOWRU(BTRFS_IOCTL_MAGIC, 40) -+#define TARGET_BTRFS_IOC_QGROUP_ASSIGN TARGET_IOWU(BTRFS_IOCTL_MAGIC, 41) -+#define TARGET_BTRFS_IOC_QGROUP_CREATE TARGET_IOWU(BTRFS_IOCTL_MAGIC, 42) -+#define TARGET_BTRFS_IOC_QGROUP_LIMIT TARGET_IORU(BTRFS_IOCTL_MAGIC, 43) -+#define TARGET_BTRFS_IOC_QUOTA_RESCAN TARGET_IOWU(BTRFS_IOCTL_MAGIC, 44) -+#define TARGET_BTRFS_IOC_QUOTA_RESCAN_STATUS TARGET_IORU(BTRFS_IOCTL_MAGIC, 45) -+#define TARGET_BTRFS_IOC_QUOTA_RESCAN_WAIT TARGET_IO(BTRFS_IOCTL_MAGIC, 46) - #define TARGET_BTRFS_IOC_GET_DEV_STATS TARGET_IOWRU(BTRFS_IOCTL_MAGIC, 52) - #define TARGET_BTRFS_IOC_GET_FEATURES TARGET_IORU(BTRFS_IOCTL_MAGIC, 57) - #define TARGET_BTRFS_IOC_SET_FEATURES TARGET_IOWU(BTRFS_IOCTL_MAGIC, 57) -diff --git a/linux-user/syscall_types.h b/linux-user/syscall_types.h -index 5566d101c2..d9b7106a69 100644 ---- a/linux-user/syscall_types.h -+++ b/linux-user/syscall_types.h -@@ -454,6 +454,35 @@ STRUCT(btrfs_ioctl_get_dev_stats, - 128 - 2 - BTRFS_DEV_STAT_VALUES_MAX)) /* unused */ - #endif - -+STRUCT(btrfs_ioctl_quota_ctl_args, -+ TYPE_ULONGLONG, /* cmd */ -+ TYPE_ULONGLONG) /* status */ -+ -+STRUCT(btrfs_ioctl_quota_rescan_args, -+ TYPE_ULONGLONG, /* flags */ -+ TYPE_ULONGLONG, /* progress */ -+ MK_ARRAY(TYPE_ULONGLONG, 6)) /* reserved */ -+ -+STRUCT(btrfs_ioctl_qgroup_assign_args, -+ TYPE_ULONGLONG, /* assign */ -+ TYPE_ULONGLONG, /* src */ -+ TYPE_ULONGLONG) /* dst */ -+ -+STRUCT(btrfs_ioctl_qgroup_create_args, -+ TYPE_ULONGLONG, /* create */ -+ TYPE_ULONGLONG) /* qgroupid */ -+ -+STRUCT(btrfs_qgroup_limit, -+ TYPE_ULONGLONG, /* flags */ -+ TYPE_ULONGLONG, /* max_rfer */ -+ TYPE_ULONGLONG, /* max_excl */ -+ TYPE_ULONGLONG, /* rsv_rfer */ -+ TYPE_ULONGLONG) /* rsv_excl */ -+ -+STRUCT(btrfs_ioctl_qgroup_limit_args, -+ TYPE_ULONGLONG, /* qgroupid */ -+ MK_STRUCT(STRUCT_btrfs_qgroup_limit)) /* lim */ -+ - STRUCT(btrfs_ioctl_feature_flags, - TYPE_ULONGLONG, /* compat_flags */ - TYPE_ULONGLONG, /* compat_ro_flags */ --- -2.26.2 - diff --git a/0009-linux-user-Add-support-for-btrfs-ioctls-used-to-scru.patch b/0009-linux-user-Add-support-for-btrfs-ioctls-used-to-scru.patch deleted file mode 100644 index c64a48e..0000000 --- a/0009-linux-user-Add-support-for-btrfs-ioctls-used-to-scru.patch +++ /dev/null @@ -1,142 +0,0 @@ -From 5695918e7c599f21fd6913a61160c482a0e41639 Mon Sep 17 00:00:00 2001 -From: Filip Bozuta -Date: Thu, 3 Sep 2020 01:27:01 +0200 -Subject: [PATCH 9/9] linux-user: Add support for btrfs ioctls used to scrub a - filesystem -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This patch implements functionality for following ioctls: - -BTRFS_IOC_SCRUB - Starting a btrfs filesystem scrub - - Start a btrfs filesystem scrub. The third ioctls argument - is a pointer to a following type: - - struct btrfs_ioctl_scrub_args { - __u64 devid; /* in */ - __u64 start; /* in */ - __u64 end; /* in */ - __u64 flags; /* in */ - struct btrfs_scrub_progress progress; /* out */ - /* pad to 1k */ - __u64 unused[(1024-32-sizeof(struct btrfs_scrub_progress))/8]; - }; - - Before calling this ioctl, field 'devid' should be filled - with value that represents the device id of the btrfs filesystem - for which the scrub is to be started. - -BTRFS_IOC_SCRUB_CANCEL - Canceling scrub of a btrfs filesystem - - Cancel a btrfs filesystem scrub if it is running. The third - ioctls argument is ignored. - -BTRFS_IOC_SCRUB_PROGRESS - Getting status of a running scrub - - Read the status of a running btrfs filesystem scrub. The third - ioctls argument is a pointer to the above mentioned - 'struct btrfs_ioctl_scrub_args'. Similarly as with 'BTRFS_IOC_SCRUB', - the 'devid' field should be filled with value that represents the - id of the btrfs device for which the scrub has started. The status - of a running scrub is returned in the field 'progress' which is - of type 'struct btrfs_scrub_progress' and its definition can be - found at: - https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/btrfs.h#L150 - -Implementation nots: - - Ioctls in this patch use type 'struct btrfs_ioctl_scrub_args' as their - third argument. That is the reason why an aproppriate thunk type - definition is added in file 'syscall_types.h'. - -Signed-off-by: Filip Bozuta -Tested-by: Daniel P. Berrangé -Message-Id: <20200823195014.116226-9-Filip.Bozuta@syrmia.com> -Signed-off-by: Laurent Vivier ---- - linux-user/ioctls.h | 11 +++++++++++ - linux-user/syscall_defs.h | 3 +++ - linux-user/syscall_types.h | 29 +++++++++++++++++++++++++++++ - 3 files changed, 43 insertions(+) - -diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h -index 882bfb3e88..e3bfe78774 100644 ---- a/linux-user/ioctls.h -+++ b/linux-user/ioctls.h -@@ -215,6 +215,17 @@ - #ifdef BTRFS_IOC_SUBVOL_SETFLAGS - IOCTL(BTRFS_IOC_SUBVOL_SETFLAGS, IOC_W, MK_PTR(TYPE_ULONGLONG)) - #endif -+#ifdef BTRFS_IOC_SCRUB -+ IOCTL(BTRFS_IOC_SCRUB, IOC_RW, -+ MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_scrub_args))) -+#endif -+#ifdef BTRFS_IOC_SCRUB_CANCEL -+ IOCTL(BTRFS_IOC_SCRUB_CANCEL, 0, TYPE_NULL) -+#endif -+#ifdef BTRFS_IOC_SCRUB_PROGRESS -+ IOCTL(BTRFS_IOC_SCRUB_PROGRESS, IOC_RW, -+ MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_scrub_args))) -+#endif - #ifdef BTRFS_IOC_DEV_INFO - IOCTL(BTRFS_IOC_DEV_INFO, IOC_RW, - MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_dev_info_args))) -diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h -index 10a7f91016..969377d622 100644 ---- a/linux-user/syscall_defs.h -+++ b/linux-user/syscall_defs.h -@@ -982,6 +982,9 @@ struct target_rtc_pll_info { - abi_ullong) - #define TARGET_BTRFS_IOC_SUBVOL_SETFLAGS TARGET_IOW(BTRFS_IOCTL_MAGIC, 26,\ - abi_ullong) -+#define TARGET_BTRFS_IOC_SCRUB TARGET_IOWRU(BTRFS_IOCTL_MAGIC, 27) -+#define TARGET_BTRFS_IOC_SCRUB_CANCEL TARGET_IO(BTRFS_IOCTL_MAGIC, 28) -+#define TARGET_BTRFS_IOC_SCRUB_PROGRESS TARGET_IOWRU(BTRFS_IOCTL_MAGIC, 29) - #define TARGET_BTRFS_IOC_DEV_INFO TARGET_IOWRU(BTRFS_IOCTL_MAGIC, 30) - #define TARGET_BTRFS_IOC_INO_PATHS TARGET_IOWRU(BTRFS_IOCTL_MAGIC, 35) - #define TARGET_BTRFS_IOC_LOGICAL_INO TARGET_IOWRU(BTRFS_IOCTL_MAGIC, 36) -diff --git a/linux-user/syscall_types.h b/linux-user/syscall_types.h -index d9b7106a69..789723cfb9 100644 ---- a/linux-user/syscall_types.h -+++ b/linux-user/syscall_types.h -@@ -421,6 +421,35 @@ STRUCT(btrfs_ioctl_ino_lookup_user_args, - MK_ARRAY(TYPE_CHAR, BTRFS_INO_LOOKUP_USER_PATH_MAX)) /* path */ - #endif - -+#if defined(BTRFS_IOC_SCRUB) || defined(BTRFS_IOC_SCRUB_PROGRESS) -+STRUCT(btrfs_scrub_progress, -+ TYPE_ULONGLONG, /* data_extents_scrubbed */ -+ TYPE_ULONGLONG, /* tree_extents_scrubbed */ -+ TYPE_ULONGLONG, /* data_bytes_scrubbed */ -+ TYPE_ULONGLONG, /* tree_bytes_scrubbed */ -+ TYPE_ULONGLONG, /* read_errors */ -+ TYPE_ULONGLONG, /* csum_errors */ -+ TYPE_ULONGLONG, /* verify_errors */ -+ TYPE_ULONGLONG, /* no_csum */ -+ TYPE_ULONGLONG, /* csum_discards */ -+ TYPE_ULONGLONG, /* super_errors */ -+ TYPE_ULONGLONG, /* malloc_errors */ -+ TYPE_ULONGLONG, /* uncorrectable_errors */ -+ TYPE_ULONGLONG, /* corrected_er */ -+ TYPE_ULONGLONG, /* last_physical */ -+ TYPE_ULONGLONG) /* unverified_errors */ -+ -+STRUCT(btrfs_ioctl_scrub_args, -+ TYPE_ULONGLONG, /* devid */ -+ TYPE_ULONGLONG, /* start */ -+ TYPE_ULONGLONG, /* end */ -+ TYPE_ULONGLONG, /* flags */ -+ MK_STRUCT(STRUCT_btrfs_scrub_progress), /* progress */ -+ MK_ARRAY(TYPE_ULONGLONG, -+ (1024 - 32 - -+ sizeof(struct btrfs_scrub_progress)) / 8)) /* unused */ -+#endif -+ - #ifdef BTRFS_IOC_DEV_INFO - STRUCT(btrfs_ioctl_dev_info_args, - TYPE_ULONGLONG, /* devid */ --- -2.26.2 - diff --git a/qemu-pr-helper.service b/qemu-pr-helper.service deleted file mode 100644 index ac6cda1..0000000 --- a/qemu-pr-helper.service +++ /dev/null @@ -1,15 +0,0 @@ -[Unit] -Description=Persistent Reservation Daemon for QEMU - -[Service] -WorkingDirectory=/tmp -Type=simple -ExecStart=/usr/libexec/qemu-pr-helper -PrivateTmp=yes -ProtectSystem=strict -ReadWritePaths=/var/run -RestrictAddressFamilies=AF_UNIX -Restart=always -RestartSec=0 - -[Install] diff --git a/qemu-pr-helper.socket b/qemu-pr-helper.socket deleted file mode 100644 index 9d7c3e5..0000000 --- a/qemu-pr-helper.socket +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=Persistent Reservation Daemon for QEMU - -[Socket] -ListenStream=/run/qemu-pr-helper.sock -SocketMode=0600 - -[Install] -WantedBy=multi-user.target diff --git a/qemu.spec b/qemu.spec index 8bd2b83..1273930 100644 --- a/qemu.spec +++ b/qemu.spec @@ -148,13 +148,24 @@ %define requires_ui_curses Requires: %{name}-ui-curses = %{evr} %define requires_ui_gtk Requires: %{name}-ui-gtk = %{evr} %define requires_ui_sdl Requires: %{name}-ui-sdl = %{evr} +%define requires_ui_egl_headless Requires: %{name}-ui-egl-headless = %{evr} +%define requires_ui_opengl Requires: %{name}-ui-opengl = %{evr} +%define requires_device_display_virtio_gpu Requires: %{name}-device-display-virtio-gpu = %{evr} +%define requires_device_display_virtio_gpu_pci Requires: %{name}-device-display-virtio-gpu-pci = %{evr} +%define requires_device_display_virtio_vga Requires: %{name}-device-display-virtio-vga = %{evr} %if %{have_spice} %define requires_ui_spice_app Requires: %{name}-ui-spice-app = %{evr} +%define requires_ui_spice_core Requires: %{name}-ui-spice-core = %{evr} %define requires_device_display_qxl Requires: %{name}-device-display-qxl = %{evr} +%define requires_audio_spice Requires: %{name}-audio-spice = %{evr} +%define requires_char_spice Requires: %{name}-char-spice = %{evr} %else %define requires_ui_spice_app %{nil} +%define requires_ui_spice_core %{nil} %define requires_device_display_qxl %{nil} +%define requires_audio_spice %{nil} +%define requires_char_spice %{nil} %endif %global requires_all_modules \ @@ -169,12 +180,20 @@ %{requires_audio_oss} \ %{requires_audio_pa} \ %{requires_audio_sdl} \ +%{requires_audio_spice} \ %{requires_ui_curses} \ %{requires_ui_gtk} \ %{requires_ui_sdl} \ +%{requires_ui_egl_headless} \ +%{requires_ui_opengl} \ %{requires_ui_spice_app} \ +%{requires_ui_spice_core} \ %{requires_char_baum} \ +%{requires_char_spice} \ %{requires_device_display_qxl} \ +%{requires_device_display_virtio_gpu} \ +%{requires_device_display_virtio_gpu_pci} \ +%{requires_device_display_virtio_vga} \ %{requires_device_usb_redirect} \ %{requires_device_usb_smartcard} \ @@ -184,7 +203,7 @@ %{obsoletes_block_rbd} # Release candidate version tracking -# global rcver rc3 +%global rcver rc0 %if 0%{?rcver:1} %global rcrel .%{rcver} %global rcstr -%{rcver} @@ -193,23 +212,14 @@ Summary: QEMU is a FAST! processor emulator Name: qemu -Version: 5.1.0 -Release: 7%{?rcrel}%{?dist} +Version: 5.2.0 +Release: 0.1%{?rcrel}%{?dist} Epoch: 2 License: GPLv2 and BSD and MIT and CC-BY URL: http://www.qemu.org/ Source0: http://wiki.qemu-project.org/download/%{name}-%{version}%{?rcstr}.tar.xz - -Patch1: 0001-linux-user-fix-implicit-conversion-from-enumeration-.patch -Patch2: 0002-linux-user-Add-support-for-a-group-of-btrfs-ioctls-u.patch -Patch3: 0003-linux-user-Add-support-for-a-group-of-btrfs-ioctls-u.patch -Patch4: 0004-linux-user-Add-support-for-btrfs-ioctls-used-to-mani.patch -Patch5: 0005-linux-user-Add-support-for-btrfs-ioctls-used-to-get-.patch -Patch6: 0006-linux-user-Add-support-for-a-group-of-btrfs-inode-io.patch -Patch7: 0007-linux-user-Add-support-for-two-btrfs-ioctls-used-for.patch -Patch8: 0008-linux-user-Add-support-for-btrfs-ioctls-used-to-mana.patch -Patch9: 0009-linux-user-Add-support-for-btrfs-ioctls-used-to-scru.patch +Patch0001: 0001-configure-Fix-gio-detection.patch # guest agent service Source10: qemu-guest-agent.service @@ -220,15 +230,13 @@ Source11: 99-qemu-guest-agent.rules Source12: bridge.conf # qemu-kvm back compat wrapper installed as /usr/bin/qemu-kvm Source13: qemu-kvm.sh -# PR manager service -Source14: qemu-pr-helper.service -Source15: qemu-pr-helper.socket # /etc/modprobe.d/kvm.conf, for x86 Source20: kvm-x86.modprobe.conf # /etc/security/limits.d/95-kvm-ppc64-memlock.conf Source21: 95-kvm-ppc64-memlock.conf +BuildRequires: meson BuildRequires: gcc # documentation deps BuildRequires: texinfo @@ -378,11 +386,9 @@ Requires: %{name}-system-alpha = %{epoch}:%{version}-%{release} Requires: %{name}-system-arm = %{epoch}:%{version}-%{release} Requires: %{name}-system-avr = %{epoch}:%{version}-%{release} Requires: %{name}-system-cris = %{epoch}:%{version}-%{release} -Requires: %{name}-system-lm32 = %{epoch}:%{version}-%{release} Requires: %{name}-system-m68k = %{epoch}:%{version}-%{release} Requires: %{name}-system-microblaze = %{epoch}:%{version}-%{release} Requires: %{name}-system-mips = %{epoch}:%{version}-%{release} -Requires: %{name}-system-moxie = %{epoch}:%{version}-%{release} Requires: %{name}-system-nios2 = %{epoch}:%{version}-%{release} Requires: %{name}-system-or1k = %{epoch}:%{version}-%{release} Requires: %{name}-system-ppc = %{epoch}:%{version}-%{release} @@ -392,7 +398,6 @@ Requires: %{name}-system-s390x = %{epoch}:%{version}-%{release} Requires: %{name}-system-sh4 = %{epoch}:%{version}-%{release} Requires: %{name}-system-sparc = %{epoch}:%{version}-%{release} Requires: %{name}-system-tricore = %{epoch}:%{version}-%{release} -Requires: %{name}-system-unicore32 = %{epoch}:%{version}-%{release} Requires: %{name}-system-x86 = %{epoch}:%{version}-%{release} Requires: %{name}-system-xtensa = %{epoch}:%{version}-%{release} Requires: %{name}-img = %{epoch}:%{version}-%{release} @@ -421,6 +426,9 @@ Requires(post): /usr/sbin/useradd Requires(post): systemd-units Requires(preun): systemd-units Requires(postun): systemd-units +Obsoletes: %{name}-system-lm32 <= %{epoch}:%{version}-%{release} +Obsoletes: %{name}-system-moxie <= %{epoch}:%{version}-%{release} +Obsoletes: %{name}-system-unicore32 <= %{epoch}:%{version}-%{release} %{obsoletes_some_modules} %description common This package provides the common files needed by all QEMU targets @@ -444,12 +452,6 @@ Summary: QEMU command line tool for manipulating disk images This package provides a command line tool for manipulating disk images -%package -n ivshmem-tools -Summary: Client and server for QEMU ivshmem device -%description -n ivshmem-tools -This package provides client and server tools for QEMU's ivshmem device. - - %package block-curl Summary: QEMU CURL block driver Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release} @@ -563,13 +565,17 @@ Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release} %description ui-sdl This package provides the additional SDL UI for QEMU. -%if %{have_spice} -%package ui-spice-app -Summary: QEMU spice-app UI driver +%package ui-egl-headless +Summary: QEMU EGL headless driver Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release} -%description ui-spice-app -This package provides the additional spice-app UI for QEMU. -%endif +%description ui-egl-headless +This package provides the additional egl-headless UI for QEMU. + +%package ui-opengl +Summary: QEMU OpenGL driver +Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release} +%description ui-opengl +This package provides the additional opengl UI for QEMU. %package char-baum @@ -579,13 +585,21 @@ Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release} This package provides the Baum chardev driver for QEMU. -%if %{have_spice} -%package device-display-qxl -Summary: QEMU QXL display device +%package device-display-virtio-gpu +Summary: QEMU virtio-gpu display device Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release} -%description device-display-qxl -This package provides the QXL display device for QEMU. -%endif +%description device-display-virtio-gpu +This package provides the virtio-gpu display device for QEMU. +%package device-display-virtio-gpu-pci +Summary: QEMU virtio-gpu-pci display device +Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release} +%description device-display-virtio-gpu-pci +This package provides the virtio-gpu-pci display device for QEMU. +%package device-display-virtio-vga +Summary: QEMU virtio-vga display device +Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release} +%description device-display-virtio-vga +This package provides the virtio-vga display device for QEMU. %package device-usb-redirect Summary: QEMU usbredir device @@ -600,6 +614,39 @@ Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release} This package provides the USB smartcard device for QEMU. +%if %{have_spice} +%package ui-spice-core +Summary: QEMU spice-core UI driver +Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release} +%description ui-spice-core +This package provides the additional spice-core UI for QEMU. + +%package ui-spice-app +Summary: QEMU spice-app UI driver +Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release} +%description ui-spice-app +This package provides the additional spice-app UI for QEMU. + +%package device-display-qxl +Summary: QEMU QXL display device +Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release} +%description device-display-qxl +This package provides the QXL display device for QEMU. + +%package char-spice +Summary: QEMU spice chardev driver +Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release} +%description char-spice +This package provides the spice chardev driver for QEMU. + +%package audio-spice +Summary: QEMU spice audio driver +Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release} +%description audio-spice +This package provides the spice audio driver for QEMU. +%endif + + %if %{have_kvm} %package kvm Summary: QEMU metapackage for KVM support @@ -743,20 +790,6 @@ Requires: %{name}-common = %{epoch}:%{version}-%{release} This package provides the QEMU system emulator for HPPA. -%package system-lm32 -Summary: QEMU system emulator for LatticeMico32 -Requires: %{name}-system-lm32-core = %{epoch}:%{version}-%{release} -%{requires_all_modules} -%description system-lm32 -This package provides the QEMU system emulator for LatticeMico32 boards. - -%package system-lm32-core -Summary: QEMU system emulator for LatticsMico32 -Requires: %{name}-common = %{epoch}:%{version}-%{release} -%description system-lm32-core -This package provides the QEMU system emulator for LatticeMico32 boards. - - %package system-m68k Summary: QEMU system emulator for ColdFire (m68k) Requires: %{name}-system-m68k-core = %{epoch}:%{version}-%{release} @@ -799,20 +832,6 @@ Requires: %{name}-common = %{epoch}:%{version}-%{release} This package provides the QEMU system emulator for MIPS systems. -%package system-moxie -Summary: QEMU system emulator for Moxie -Requires: %{name}-system-moxie-core = %{epoch}:%{version}-%{release} -%{requires_all_modules} -%description system-moxie -This package provides the QEMU system emulator for Moxie boards. - -%package system-moxie-core -Summary: QEMU system emulator for Moxie -Requires: %{name}-common = %{epoch}:%{version}-%{release} -%description system-moxie-core -This package provides the QEMU system emulator for Moxie boards. - - %package system-nios2 Summary: QEMU system emulator for nios2 Requires: %{name}-system-nios2-core = %{epoch}:%{version}-%{release} @@ -945,20 +964,6 @@ Requires: %{name}-common = %{epoch}:%{version}-%{release} This package provides the QEMU system emulator for Tricore. -%package system-unicore32 -Summary: QEMU system emulator for Unicore32 -Requires: %{name}-system-unicore32-core = %{epoch}:%{version}-%{release} -%{requires_all_modules} -%description system-unicore32 -This package provides the QEMU system emulator for Unicore32 boards. - -%package system-unicore32-core -Summary: QEMU system emulator for Unicore32 -Requires: %{name}-common = %{epoch}:%{version}-%{release} -%description system-unicore32-core -This package provides the QEMU system emulator for Unicore32 boards. - - %package system-x86 Summary: QEMU system emulator for x86 Requires: %{name}-system-x86-core = %{epoch}:%{version}-%{release} @@ -1202,6 +1207,7 @@ run_configure \ --audio-drv-list=pa,sdl,alsa,oss \ --enable-kvm \ --enable-system \ + --target-list-exclude=moxie-softmmu \ --enable-tcg \ --enable-linux-user \ --enable-pie \ @@ -1247,8 +1253,8 @@ touch %{buildroot}%{_localstatedir}/log/qga-fsfreeze-hook.log # Install qemu-pr-helper service -install -m 0644 %{_sourcedir}/qemu-pr-helper.service %{buildroot}%{_unitdir} -install -m 0644 %{_sourcedir}/qemu-pr-helper.socket %{buildroot}%{_unitdir} +install -m 0644 ./contrib/systemd/qemu-pr-helper.service %{buildroot}%{_unitdir} +install -m 0644 ./contrib/systemd/qemu-pr-helper.socket %{buildroot}%{_unitdir} # Install ppc64 memlock @@ -1290,7 +1296,7 @@ popd # Copy some static data into place -install -D -p -m 0644 -t %{buildroot}%{qemudocdir} Changelog README.rst COPYING COPYING.LIB LICENSE +install -D -p -m 0644 -t %{buildroot}%{qemudocdir} README.rst COPYING COPYING.LIB LICENSE install -D -p -m 0644 qemu.sasl %{buildroot}%{_sysconfdir}/sasl2/qemu.conf @@ -1461,7 +1467,6 @@ getent passwd qemu >/dev/null || \ %files common -f %{name}.lang %dir %{qemudocdir} -%doc %{qemudocdir}/Changelog %doc %{qemudocdir}/README.rst %doc %{qemudocdir}/index.html %doc %{qemudocdir}/interop @@ -1515,12 +1520,12 @@ getent passwd qemu >/dev/null || \ %{_bindir}/elf2dmp %{_bindir}/qemu-edid %{_bindir}/qemu-keymap +%{_bindir}/qemu-pr-helper %{_bindir}/qemu-storage-daemon #{_bindir}/qemu-trace-stap %{_unitdir}/qemu-pr-helper.service %{_unitdir}/qemu-pr-helper.socket %attr(4755, root, root) %{_libexecdir}/qemu-bridge-helper -%{_libexecdir}/qemu-pr-helper %{_libexecdir}/virtfs-proxy-helper %{_libexecdir}/virtiofsd %config(noreplace) %{_sysconfdir}/sasl2/qemu.conf @@ -1587,27 +1592,39 @@ getent passwd qemu >/dev/null || \ %{_libdir}/qemu/ui-gtk.so %files ui-sdl %{_libdir}/qemu/ui-sdl.so -%if %{have_spice} -%files ui-spice-app -%{_libdir}/qemu/ui-spice-app.so -%endif +%files ui-egl-headless +%{_libdir}/qemu/ui-egl-headless.so +%files ui-opengl +%{_libdir}/qemu/ui-opengl.so %files char-baum %{_libdir}/qemu/chardev-baum.so -%if %{have_spice} -%files device-display-qxl -%{_libdir}/qemu/hw-display-qxl.so -%endif + +%files device-display-virtio-gpu +%{_libdir}/qemu/hw-display-virtio-gpu.so +%files device-display-virtio-gpu-pci +%{_libdir}/qemu/hw-display-virtio-gpu-pci.so +%files device-display-virtio-vga +%{_libdir}/qemu/hw-display-virtio-vga.so %files device-usb-redirect %{_libdir}/qemu/hw-usb-redirect.so %files device-usb-smartcard %{_libdir}/qemu/hw-usb-smartcard.so -%files -n ivshmem-tools -%{_bindir}/ivshmem-client -%{_bindir}/ivshmem-server +%if %{have_spice} +%files audio-spice +%{_libdir}/qemu/audio-spice.so +%files char-spice +%{_libdir}/qemu/chardev-spice.so +%files device-display-qxl +%{_libdir}/qemu/hw-display-qxl.so +%files ui-spice-core +%{_libdir}/qemu/ui-spice-core.so +%files ui-spice-app +%{_libdir}/qemu/ui-spice-app.so +%endif %if %{have_kvm} @@ -1642,7 +1659,6 @@ getent passwd qemu >/dev/null || \ %{_bindir}/qemu-or1k %{_bindir}/qemu-ppc %{_bindir}/qemu-ppc64 -%{_bindir}/qemu-ppc64abi32 %{_bindir}/qemu-ppc64le %{_bindir}/qemu-riscv32 %{_bindir}/qemu-riscv64 @@ -1652,7 +1668,6 @@ getent passwd qemu >/dev/null || \ %{_bindir}/qemu-sparc %{_bindir}/qemu-sparc32plus %{_bindir}/qemu-sparc64 -%{_bindir}/qemu-tilegx %{_bindir}/qemu-xtensa %{_bindir}/qemu-xtensaeb @@ -1673,7 +1688,6 @@ getent passwd qemu >/dev/null || \ #{_datadir}/systemtap/tapset/qemu-s390x*.stp #{_datadir}/systemtap/tapset/qemu-sh4*.stp #{_datadir}/systemtap/tapset/qemu-sparc*.stp -#{_datadir}/systemtap/tapset/qemu-tilegx*.stp #{_datadir}/systemtap/tapset/qemu-xtensa*.stp @@ -1708,6 +1722,7 @@ getent passwd qemu >/dev/null || \ %files system-arm %files system-arm-core %{_bindir}/qemu-system-arm +%{_datadir}/%{name}/npcm7xx_bootrom.bin #{_datadir}/systemtap/tapset/qemu-system-arm*.stp %{_mandir}/man1/qemu-system-arm.1* @@ -1734,13 +1749,6 @@ getent passwd qemu >/dev/null || \ %{_datadir}/%{name}/hppa-firmware.img -%files system-lm32 -%files system-lm32-core -%{_bindir}/qemu-system-lm32 -#{_datadir}/systemtap/tapset/qemu-system-lm32*.stp -%{_mandir}/man1/qemu-system-lm32.1* - - %files system-m68k %files system-m68k-core %{_bindir}/qemu-system-m68k @@ -1771,13 +1779,6 @@ getent passwd qemu >/dev/null || \ %{_mandir}/man1/qemu-system-mips64.1* -%files system-moxie -%files system-moxie-core -%{_bindir}/qemu-system-moxie -#{_datadir}/systemtap/tapset/qemu-system-moxie*.stp -%{_mandir}/man1/qemu-system-moxie.1* - - %files system-nios2 %files system-nios2-core %{_bindir}/qemu-system-nios2 @@ -1815,6 +1816,7 @@ getent passwd qemu >/dev/null || \ %{_bindir}/qemu-system-riscv32 %{_bindir}/qemu-system-riscv64 %{_datadir}/%{name}/opensbi-riscv*.bin +%{_datadir}/%{name}/opensbi-riscv*.elf #{_datadir}/systemtap/tapset/qemu-system-riscv*.stp %{_mandir}/man1/qemu-system-riscv*.1* @@ -1862,13 +1864,6 @@ getent passwd qemu >/dev/null || \ %{_mandir}/man1/qemu-system-tricore.1* -%files system-unicore32 -%files system-unicore32-core -%{_bindir}/qemu-system-unicore32 -#{_datadir}/systemtap/tapset/qemu-system-unicore32*.stp -%{_mandir}/man1/qemu-system-unicore32.1* - - %files system-x86 %files system-x86-core %{_bindir}/qemu-system-i386 @@ -1885,6 +1880,7 @@ getent passwd qemu >/dev/null || \ %{_datadir}/%{name}/linuxboot_dma.bin %{_datadir}/%{name}/multiboot.bin %{_datadir}/%{name}/pvh.bin +%{_datadir}/%{name}/qboot.rom %{_datadir}/%{name}/sgabios.bin %if 0%{?need_qemu_kvm} %{_bindir}/qemu-kvm @@ -1903,6 +1899,9 @@ getent passwd qemu >/dev/null || \ %changelog +* Sun Nov 08 2020 Cole Robinson - 5.2.0-0.1.rc0 +- Rebase to qemu-5.2.0-rc0 + * Thu Nov 5 2020 Daniel P. Berrangé - 5.1.0-7 - Disable LTO again. Tests were not passing, we were ignoring failures. diff --git a/sources b/sources index eae2427..9fa9fb4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (qemu-5.1.0.tar.xz) = e213edb71d93d5167ddce7546220ecb7b52a7778586a4f476f65bd1e510c9cfc6d1876238a7b501d9cc3fd31cc2ae4b7fb9e753bc3f12cc17cd16dfce2a96ba3 +SHA512 (qemu-5.2.0-rc0.tar.xz) = ef209ce8fa659d199f95e3d2d9df23169c1c4aad4cc5ddf7757dfce2b3237b9694a3267be61d802e242b7ca09d321fc83cefd913af2dea59022e0b6b87c686ca