Skip to content

Commit 4237f02

Browse files
committed
Release 8.7.1.K
Signed-off-by: Yunxiang Li <Yunxiang.Li@amd.com>
1 parent a5faf31 commit 4237f02

135 files changed

Lines changed: 27480 additions & 27167 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

gim/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ all:
2828
$(MAKE) -C $(KERNELDIR) M=$(SRC_PATH) modules
2929

3030
clean:
31-
cd $(SRC_PATH)/dkms; rm -rf autom4te.cache aclocal.m4 config.* configure .*.d
31+
cd $(SRC_PATH)/dkms; rm -rf aclocal.m4 configure confdefs.h *.cache build_* config.* .*.d
3232
$(MAKE) -C $(KERNELDIR) M=$(SRC_PATH) clean
3333
find $(SRC_PATH)/../ \( -name '.*.cmd' -o -name '*.o' -o -name '*.ko' \) -delete

gim/amd-vfio-pci/amd-vfio.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,18 @@ static struct vfio_migration_ops amd_vfio_migration_ops = {
117117
.migration_get_data_size = amd_vfio_pci_migration_get_data_size,
118118
};
119119

120+
#if defined(HAVE_VFIO_DMA_UNMAP)
121+
/*
122+
* Dummy dma_unmap callback required by the new VFIO API.
123+
* This replaces the old vfio_register_notifier mechanism.
124+
*/
125+
static void amd_vfio_pci_dma_unmap(struct vfio_device *vdev, u64 iova,
126+
u64 length)
127+
{
128+
/* No action needed - this is a dummy handler to satisfy VFIO core */
129+
}
130+
#endif
131+
120132
static int amd_vfio_pci_open_device(struct vfio_device *vdev)
121133
{
122134
int ret;
@@ -172,6 +184,9 @@ static const struct vfio_device_ops amd_vfio_pci_ops = {
172184
.mmap = vfio_pci_core_mmap,
173185
.request = vfio_pci_core_request,
174186
.match = vfio_pci_core_match,
187+
#if defined(HAVE_VFIO_DMA_UNMAP)
188+
.dma_unmap = amd_vfio_pci_dma_unmap,
189+
#endif
175190
.bind_iommufd = vfio_iommufd_physical_bind,
176191
.unbind_iommufd = vfio_iommufd_physical_unbind,
177192
.attach_ioas = vfio_iommufd_physical_attach_ioas,

gim/dkms/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8.7.0.K
1+
8.7.1.K

gim/dkms/m4/ftrace.m4

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,17 @@ dnl # commit v5.10-rc2-25-gd19ad0775dcd
2525
dnl # ftrace: Have the callbacks receive a struct ftrace_regs instead of pt_regs
2626
dnl #
2727
AC_DEFUN([AC_FTRACE_REGS_OPS], [
28-
AC_KERNEL_TRY_COMPILE([
29-
#include <linux/ftrace.h>
30-
], [
31-
typedef void (*ftrace_func_t)(unsigned long ip, unsigned long parent_ip,
32-
struct ftrace_ops *op, struct ftrace_regs *fregs);
28+
AC_KERNEL_DO_BACKGROUND([
29+
AC_KERNEL_TRY_COMPILE([
30+
#include <linux/ftrace.h>
31+
], [
32+
typedef void (*ftrace_func_t)(unsigned long ip, unsigned long parent_ip,
33+
struct ftrace_ops *op, struct ftrace_regs *fregs);
3334
34-
ftrace_func_t ftrace_ops_get_func(struct ftrace_ops *ops);
35-
], [
36-
37-
AC_DEFINE(HAVE_FTRACE_REGS_OPS, 1,
38-
[struct ftrace_regs is available])
39-
])
40-
])
35+
ftrace_func_t ftrace_ops_get_func(struct ftrace_ops *ops);
36+
], [
37+
AC_DEFINE(HAVE_FTRACE_REGS_OPS, 1,
38+
[struct ftrace_regs is available])
39+
])
40+
])
41+
])

gim/dkms/m4/get_user_pages_remote.m4

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ dnl #
6868
dnl # commit v5.8-12463-g64019a2e467a
6969
dnl # mm/gup: remove task_struct pointer for all gup code
7070
dnl #
71-
7271
AC_DEFUN([AC_GET_USER_PAGES_REMOTE_8_ARG], [
7372
AC_KERNEL_DO_BACKGROUND([
7473
AC_KERNEL_TRY_COMPILE([

gim/dkms/m4/kernel.m4

Lines changed: 13 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ AC_DEFUN([AC_CONFIG_KERNEL], [
3636
AC_SHASH_DESC_FLAGS
3737
AC_DCORE_IOVA_VM_CTX_VFIO_DEVICE
3838
AC_DCORE_IOVA_VM_CTX_PAGE_ARRAY
39+
AC_VFIO_DMA_UNMAP
3940
AC_VPRINTK_EMIT_5_ARG
4041
AC_FTRACE_REGS_OPS
4142
AC_DEVNODE_CONST
@@ -45,16 +46,12 @@ AC_DEFUN([AC_CONFIG_KERNEL], [
4546
AC_KFREE_SENSITIVE
4647
AC_GET_USER_PAGES_REMOTE_6_ARG
4748
AC_GET_USER_PAGES_REMOTE_7_ARG
49+
AC_GET_USER_PAGES_REMOTE_8_ARG
4850
AC_UP_DOWN_READ
4951
AC_MAX_PAGE_ORDER
5052
AC_SUPPORT_LIVE_MIGRATION
5153
AC_HRTIMER_SETUP
5254
AC_KERNEL_WAIT
53-
AS_IF([test "$LINUX_OBJ" != "$LINUX"], [
54-
KERNEL_MAKE="$KERNEL_MAKE O=$LINUX_OBJ"
55-
])
56-
57-
AC_SUBST(KERNEL_MAKE)
5855
])
5956

6057
dnl #
@@ -271,7 +268,14 @@ AC_DEFUN([AC_KERNEL_TMP_BUILD_DIR], [
271268
cd $build_dir
272269
$1
273270
AS_IF([test -s confdefs.h], [
274-
cat confdefs.h >>$build_dir_root/confdefs.h
271+
# Multiple background jobs may try to append to the shared confdefs.h.
272+
# Take a simple lock to avoid interleaved writes.
273+
confdefs_lockdir="$build_dir_root/.confdefs.lockdir"
274+
while ! mkdir "$confdefs_lockdir" 2>/dev/null; do
275+
sleep 0.05
276+
done
277+
cat confdefs.h >>"$build_dir_root/confdefs.h"
278+
rmdir "$confdefs_lockdir"
275279
])
276280
cd $build_dir_root
277281
rm -rf $build_dir
@@ -293,23 +297,6 @@ AC_DEFUN([AC_KERNEL_TRY_COMPILE_MODULE],
293297
[$3], [$4])
294298
])
295299

296-
dnl #
297-
dnl # AC_KERNEL_COMPILE_IFELSE / like AC_COMPILE_IFELSE
298-
dnl # $1: contents to be filled in conftest.c
299-
dnl # $2: user defined commands. It "AND" the make command to check the result. If true, expands to $4. Otherwise $5.
300-
dnl # $3: run it if make & $3 pass.
301-
dnl # $4: run it if make & $3 fail.
302-
dnl # $5: contents to be filled in conftest.h. Could be null.
303-
dnl #
304-
AC_DEFUN([AC_KERNEL_COMPILE_IFELSE], [
305-
m4_ifvaln([$1], [AC_KERNEL_CONFTEST_C([$1])])
306-
m4_ifvaln([$5], [AC_KERNEL_CONFTEST_H([$5])], [AC_KERNEL_CONFTEST_H([])])
307-
AS_IF(
308-
[AC_TRY_COMMAND(eval $CC $CFLAGS) > /dev/null && AC_TRY_COMMAND([$2])],
309-
[$3],
310-
[_AC_MSG_LOG_CONFTEST m4_ifvaln([$4],[$4])]
311-
)
312-
])
313300
dnl #
314301
dnl # AC_KERNEL_TRY_COMPILE like AC_TRY_COMPILE
315302
dnl # $1: Prologue for conftest.c. including header files, extends, etc
@@ -318,8 +305,10 @@ dnl # $3: run it if compile pass.
318305
dnl # $4: run it if compile fail.
319306
dnl #
320307
AC_DEFUN([AC_KERNEL_TRY_COMPILE],
321-
[AC_KERNEL_COMPILE_IFELSE(
308+
target='conftest.o'
309+
[AC_KERNEL_COMPILE_MODULE_IFELSE(
322310
[AC_LANG_SOURCE([AC_KERNEL_LANG_PROGRAM([[$1]], [[$2]])])],
311+
[$target],
323312
[test -s conftest.o || test -s .tmp_conftest.o],
324313
[$3], [$4])
325314
])
@@ -423,15 +412,6 @@ AC_DEFUN([AC_KERNEL_TEST_HEADER_FILE_EXIST], [
423412
])
424413
])
425414

426-
dnl #
427-
dnl # AC_KERNEL_CHECK_HEADERS
428-
dnl # check whether header file(s) is(are) present
429-
dnl # $1: header filei(s) to check
430-
dnl #
431-
AC_DEFUN([AC_KERNEL_CHECK_HEADERS], [
432-
AC_CHECK_HEADERS([$1],[AS_TR_CPP([HAVE_$1])=1],,[-])
433-
])
434-
435415
dnl #
436416
dnl # AC_KERNEL_DO_BACKGROUND
437417
dnl # $1: contents to be executed

gim/dkms/m4/kernel_single_target.m4

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -20,49 +20,6 @@ dnl * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2020
dnl * THE SOFTWARE
2121
dnl *
2222

23-
dnl #
24-
dnl # extract cc, cflags, cppflags
25-
dnl #
26-
AC_DEFUN([AC_KERNEL_SINGLE_TARGET_CFLAGS], [
27-
AS_IF([test -s .conftest.o.cmd], [
28-
_conftest_cmd=$(head -1 .conftest.o.cmd)
29-
30-
CC=$(echo $_conftest_cmd | awk -F ' ' '{print $[3]}')
31-
32-
CFLAGS=$(echo $_conftest_cmd | \
33-
cut -d ' ' -f 4- | \
34-
sed -e "s|\./|${LINUX_OBJ}/|g" \
35-
-e "s|-I\([[[a-z]]]*\)|-I${LINUX_OBJ}/\1|g" \
36-
-e "s|-include \([[[a-z]]]*\)|-include ${LINUX_OBJ}/\1|g" \
37-
-e "s|$PWD|\${PWD}|g")
38-
39-
CPPFLAGS=$(echo $CFLAGS | \
40-
cut -d ';' -f 1 | \
41-
sed 's| -|\n&|g' | \
42-
sed -n -e '/conftest/d' \
43-
-e '/KBUILD/d' \
44-
-e '/-I/p; /-include/p; /-isystem/p; /-D/p' | \
45-
xargs)
46-
47-
AC_SUBST(CC)
48-
AC_SUBST(CFLAGS)
49-
AC_SUBST(CPPFLAGS)
50-
], [
51-
AC_MSG_ERROR([cannot detect CFLAGS...])
52-
])
53-
])
54-
55-
dnl #
56-
dnl # v5.3-rc4-54-g54b8ae66ae1a
57-
dnl # kbuild: change *FLAGS_<basetarget>.o to take the path relative to $(obj)
58-
dnl #
59-
AC_DEFUN([AC_KERNEL_FLAGS_TAKE_PATH], [
60-
AS_IF([grep -qsm 1 "target-stem" ${LINUX}/scripts/Makefile.lib], [
61-
AC_DEFINE(HAVE_AMDKCL_FLAGS_TAKE_PATH, 1,
62-
[*FLAGS_<basetarget>.o support to take the path relative to $(obj)])
63-
])
64-
])
65-
6623
dnl #
6724
dnl # v4.20-rc2-10-ge07db28eea38
6825
dnl # kbuild: fix single target build for external module
@@ -77,7 +34,5 @@ AC_DEFUN([AC_KERNEL_SINGLE_TARGET], [
7734
AC_MSG_WARN([compile single target fail expectedly])
7835
])
7936
])
80-
AC_KERNEL_SINGLE_TARGET_CFLAGS
81-
AC_KERNEL_FLAGS_TAKE_PATH
8237
])
8338
])

gim/dkms/m4/kfree_sensitive.m4

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,14 @@ dnl # v5.8-9635-g453431a54934
2525
dnl # mm, treewide: rename kzfree() to kfree_sensitive()
2626
dnl #
2727
AC_DEFUN([AC_KFREE_SENSITIVE], [
28-
AC_KERNEL_TRY_COMPILE([
29-
#include <linux/slab.h>
30-
], [
31-
kfree_sensitive(NULL);
32-
], [
33-
34-
AC_DEFINE(HAVE_KFREE_SENSITIVE, 1,
35-
[kfree_sensitive is available])
36-
])
37-
])
28+
AC_KERNEL_DO_BACKGROUND([
29+
AC_KERNEL_TRY_COMPILE([
30+
#include <linux/slab.h>
31+
], [
32+
kfree_sensitive(NULL);
33+
], [
34+
AC_DEFINE(HAVE_KFREE_SENSITIVE, 1,
35+
[kfree_sensitive is available])
36+
])
37+
])
38+
])

gim/dkms/m4/linux-headers.m4

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,24 +27,36 @@ dnl #
2727

2828
AC_DEFUN([AC_GIM_LINUX_HEADERS], [
2929
30-
AC_KERNEL_CHECK_HEADERS([asm/set_memory.h])
30+
AC_KERNEL_TEST_HEADER_FILE_EXIST([asm/set_memory.h], [
31+
AC_DEFINE(HAVE_ASM_SET_MEMORY_H, 1,
32+
[header <asm/set_memory.h> is available])
33+
])
3134
3235
dnl #
3336
dnl # commit v5.17-14089-g63d12cc30574
3437
dnl # PCI: Remove the deprecated "pci-dma-compat.h" API
3538
dnl #
36-
AC_KERNEL_CHECK_HEADERS([linux/pci-dma-compat.h])
39+
AC_KERNEL_TEST_HEADER_FILE_EXIST([linux/pci-dma-compat.h], [
40+
AC_DEFINE(HAVE_LINUX_PCI_DMA_COMPAT_H, 1,
41+
[header <linux/pci-dma-compat.h> is available])
42+
])
3743
3844
dnl #
3945
dnl # v4.15-rc7-12-gea8c64ace866
4046
dnl # dma-mapping: move swiotlb arch helpers to a new header
4147
dnl #
42-
AC_KERNEL_CHECK_HEADERS([linux/dma-direct.h])
48+
AC_KERNEL_TEST_HEADER_FILE_EXIST([linux/dma-direct.h], [
49+
AC_DEFINE(HAVE_LINUX_DMA_DIRECT_H, 1,
50+
[header <linux/dma-direct.h> is available])
51+
])
4352
4453
dnl #
4554
dnl # v5.14-rc5-11-gc0891ac15f04
4655
dnl # isystem: ship and use stdarg.h
4756
dnl #
48-
AC_KERNEL_CHECK_HEADERS([linux/stdarg.h])
57+
AC_KERNEL_TEST_HEADER_FILE_EXIST([linux/stdarg.h], [
58+
AC_DEFINE(HAVE_LINUX_STDARG_H, 1,
59+
[header <linux/stdarg.h> is available])
60+
])
4961
5062
])

gim/dkms/m4/loff_t_variable.m4

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,16 @@ dnl # commit v4.13-rc7-5-gbdd1d2d3d251
2525
dnl # fs: fix kernel_read prototype
2626
dnl #
2727
AC_DEFUN([AC_LOFF_T_VARIABLE], [
28-
AC_KERNEL_TRY_COMPILE([
29-
#include <linux/version.h>
30-
#include <linux/fs.h>
31-
], [
32-
loff_t loff_t;
33-
kernel_read(NULL, NULL, 0, &loff_t);
34-
], [
35-
36-
AC_DEFINE(HAVE_LOFF_T_VARIABLE, 1,
37-
[variable loff_t is available])
38-
])
39-
])
28+
AC_KERNEL_DO_BACKGROUND([
29+
AC_KERNEL_TRY_COMPILE([
30+
#include <linux/version.h>
31+
#include <linux/fs.h>
32+
], [
33+
loff_t loff_t;
34+
kernel_read(NULL, NULL, 0, &loff_t);
35+
], [
36+
AC_DEFINE(HAVE_LOFF_T_VARIABLE, 1,
37+
[variable loff_t is available])
38+
])
39+
])
40+
])

0 commit comments

Comments
 (0)