Compare commits
506 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3d4f3c6a24 | |||
| 1a0a722a6b | |||
| fa0c83e432 | |||
| 4514dcd67d | |||
| 45b7fc9080 | |||
| 2c824a5e7e | |||
| 272659029d | |||
| e2963e6cc7 | |||
| 1fd221805f | |||
| c588c66897 | |||
| dcb887c2c5 | |||
| d7de6e6e73 | |||
| a8bae8aa72 | |||
| 71041494f8 | |||
| 9f1d723ebd | |||
| 2052f312a5 | |||
| 1c369eca63 | |||
| 9efb073fd8 | |||
| 37677d8bb5 | |||
| 680c0ca559 | |||
| a73877a5f9 | |||
| 5754e79c6c | |||
| fb7fef1095 | |||
| 501d739518 | |||
| 5979e3a827 | |||
| dcbc11ff68 | |||
| a75b088f66 | |||
| dec49aeaec | |||
| 9926a46d5e | |||
| 262409de1f | |||
| de08dee85b | |||
| 68cfd2a11c | |||
| 689d5e3eb2 | |||
| 65409d8b4f | |||
| e08cd8b881 | |||
| 7552e7acfe | |||
| 3bf225e636 | |||
| 8c992dd41c | |||
| 067446a439 | |||
| c70fc5f9bb | |||
| 0c37b18017 | |||
| 06844ff615 | |||
| 0f9bca9cf7 | |||
| 90bee66e85 | |||
| 237da8e53e | |||
| 2914b5a244 | |||
| 873b9ad148 | |||
| 7af7a135d4 | |||
| 46f53dd76c | |||
| 6f85177a4f | |||
| 97585a6faf | |||
| 3ac9042330 | |||
| 8f874b75fb | |||
| 5134a37d2f | |||
| 601f4bbffd | |||
| 3a41693627 | |||
| 9f9078be64 | |||
| 22f515872d | |||
| 91ea919ee0 | |||
| af277c0560 | |||
| 061182c7ed | |||
| ae4a75cb51 | |||
| a0620f611a | |||
| 3fd27e5117 | |||
| 19b148a675 | |||
| 4ffe95f116 | |||
| 6f9c016305 | |||
| cac56ffc02 | |||
| 3d06789d88 | |||
| 8b70203497 | |||
| 0b45be4e3b | |||
| ea78e7fd12 | |||
| 548f585b45 | |||
| 767a61c034 | |||
| 31b8a08725 | |||
| 58523253dd | |||
| c1caadf9e8 | |||
| 9beed8f7a5 | |||
| 7330912018 | |||
| d87c01a486 | |||
| ed663201d5 | |||
| f40c4306ce | |||
| 3917b25d81 | |||
| 4ca240afd7 | |||
| b77e6230c9 | |||
| f20a494e2f | |||
| c7b4bf7ee3 | |||
| 870570ed57 | |||
| b6923c3e69 | |||
| 2fdc4b1945 | |||
| 96806b77db | |||
| b4d245a339 | |||
| 6ae4f00696 | |||
| 31a56fc647 | |||
| 84439439ae | |||
| a1ea671261 | |||
| d0141aeccb | |||
| 7a2d40e00e | |||
| bc7e7ceec6 | |||
| 87dbf2e0af | |||
| 90d69926e3 | |||
| e80508c506 | |||
| 3cf1727216 | |||
| 1de3bb1f40 | |||
| 81e07e4618 | |||
| 561d6d8499 | |||
| 671ee57b9d | |||
| 7d86cd88c7 | |||
| 3da8ec8523 | |||
| 95d22b9bec | |||
| f324af0a73 | |||
| d893aeed50 | |||
| 04ce24a7b8 | |||
| 58ca301430 | |||
| 9f481060ed | |||
| baec1f8715 | |||
| 8c702bb389 | |||
| 92d3915d3b | |||
| 9b4c3df463 | |||
| 176be3a33d | |||
| dcf4761c93 | |||
| 542f4bf33f | |||
| bb7155fd8f | |||
| 96f7973c9b | |||
| 5453b9a966 | |||
| 81d8ba874e | |||
| 832507353a | |||
| c441cab322 | |||
| 35fd42877f | |||
| 81dd154811 | |||
| f6df304f26 | |||
| aa04318f19 | |||
| da0f51338f | |||
| 6e8f6ca9a5 | |||
| f663b7d85c | |||
| db4c7dbbba | |||
| e2197b715c | |||
| f85cb245b4 | |||
| f09c6fa2b2 | |||
| 4af054d560 | |||
| 8f995224af | |||
| 9932c8650b | |||
| ce418f2f12 | |||
| 28be8fe9f4 | |||
| 0594faab65 | |||
| c2793ff7ec | |||
| 37e459b0b2 | |||
| ad0a766ee2 | |||
| 4a8e848f62 | |||
| b8b75b2ff6 | |||
| c8298fb299 | |||
| c1964433a1 | |||
| 044c70fd78 | |||
| b321611251 | |||
| c9fb416fa5 | |||
| eea5de8e26 | |||
| f483bc2cf3 | |||
| f722fe4712 | |||
| bd84eca209 | |||
| 6ef2b41a1e | |||
| ce41152248 | |||
| c406c352b8 | |||
| 842d7097a9 | |||
| f03e2d42b8 | |||
| c9275e3a2e | |||
| fe53f932a0 | |||
| 73e4912f3d | |||
| 16268bafdb | |||
| 3ee3114846 | |||
| 1615b3ee92 | |||
| d74cf6e596 | |||
| 3b601a2ab5 | |||
| b2e8d482c2 | |||
| d03ea6b3bd | |||
| 77d9581228 | |||
| fab03f123b | |||
| 629d8797f9 | |||
| f641ad1603 | |||
| 40f544e7f5 | |||
| 3697562564 | |||
| 74eb34c8f9 | |||
| 78d3164c4f | |||
| d016128d1f | |||
| 15d1081010 | |||
| 09d62646a4 | |||
| 525ea48834 | |||
| 3dd8e02d2d | |||
| 90723103d8 | |||
| 23de619687 | |||
| 3611ac5c5b | |||
| 0185292098 | |||
| 0380f07491 | |||
| 55227d53ae | |||
| 6a9017af4b | |||
| 512f455615 | |||
| fc0472a18f | |||
| 60e804189a | |||
| f75dea1c0d | |||
| e3c945b9dd | |||
| b15c05bd57 | |||
| dc95ab3ddd | |||
| 9e9ee77277 | |||
| 76ce1e5017 | |||
| 290da2bec6 | |||
| 75d6cb4562 | |||
| 51eaefb494 | |||
| 0a77aa18e1 | |||
| ef7f6d2402 | |||
| 818dfceac5 | |||
| 51eb9bd351 | |||
| 71e32d4690 | |||
| 7ffd90ef3e | |||
| dd539d4154 | |||
| bc1d191389 | |||
| 7c4bae5665 | |||
| 892a5d3219 | |||
| f6163ca84c | |||
| 4be20d430b | |||
| 74962917c2 | |||
| 6c95b2e31c | |||
| 899fd8d0aa | |||
| 3ea6393f63 | |||
| dbe708a919 | |||
| fda70d3865 | |||
| 92e753f360 | |||
| 25aba572ca | |||
| 43414bd219 | |||
| 38c898a1b6 | |||
| db84324aab | |||
| 1f9eca1c7a | |||
| 4e5a919c13 | |||
| 46951972bc | |||
| 23caf6a578 | |||
| 7956d7d5b2 | |||
| 7d04290406 | |||
| 4fce12053e | |||
| 7ceb3b1224 | |||
| 68145b3f84 | |||
| fb9edd57ac | |||
| 68481eb746 | |||
| 5d60271071 | |||
| 5e8e351552 | |||
| aaf2b2c31b | |||
| c8bbfe0d9f | |||
| 58d428de99 | |||
| 9ac8d8ec39 | |||
| 3edc172ef3 | |||
| df6168ebe5 | |||
| 2445fd0873 | |||
| 4f243ed063 | |||
| 112453be49 | |||
| b77e82cce8 | |||
| d6a491197c | |||
| 84a5f7dcd9 | |||
| 6d33e79b29 | |||
| 88ca3a12ab | |||
| 85fafb9d66 | |||
| c058ed8e33 | |||
| 92518c5228 | |||
| a7de27ff7d | |||
| f4ddb1493e | |||
| 3ae5a3f4e0 | |||
| a7073f6bff | |||
| 6714a74b67 | |||
| 437b51a73b | |||
| 2c3b526416 | |||
| 60e9d4de34 | |||
| 1a9e23ff03 | |||
| 04f7144d55 | |||
| f778e4031d | |||
| bf5098de79 | |||
| 23ab73881f | |||
| 183324dafb | |||
| 97b871128f | |||
| 1686139dd1 | |||
| cd82d39c46 | |||
| e7e100bf21 | |||
| 5674564755 | |||
| f442b165ed | |||
| a79b3b7061 | |||
| 9f5490e501 | |||
| fe68383060 | |||
| 53dd604743 | |||
| 3cd48d75bf | |||
| 8992eff60c | |||
| e9850bee3f | |||
| 37739de2c6 | |||
| 592cd63c16 | |||
| be7e04a3d7 | |||
| f235762658 | |||
| 50953e9e4c | |||
| 2819784679 | |||
| 5ca6d78da6 | |||
| b5dd2682ff | |||
| 6677d2a3ac | |||
| 3636c8611a | |||
| a32d7b9646 | |||
| bec104985e | |||
| bd5718c55a | |||
| 8364a90004 | |||
| 8cf3a6eda0 | |||
| c1f0c39ad5 | |||
| e52ececa8e | |||
| 293e14e3a2 | |||
| 014e3bf944 | |||
| ad95515783 | |||
| 56ae0a75e1 | |||
| eb9388390e | |||
| 816870b58f | |||
| c1d6854dc5 | |||
| 0e269e9043 | |||
| 21a902ae7e | |||
| 63bf12370e | |||
| 881c970df8 | |||
| 58837dc27b | |||
| 774eba4be8 | |||
| bf23bcb74e | |||
| 68996764bb | |||
| b9aab0288c | |||
| 1deaf0f816 | |||
| 0e1345d112 | |||
| d11d748b48 | |||
| ae9e9fbb4f | |||
| 091f9c3554 | |||
| 4c5bb10a8b | |||
| 41cf1104e2 | |||
| b65123988c | |||
| 4a78268a29 | |||
| d0915bc806 | |||
| dd717c04b0 | |||
| 2aab2d3e49 | |||
| 951e9fcda6 | |||
| 2d22bb871a | |||
| 2501fb7b84 | |||
| f732534e11 | |||
| f40acde333 | |||
| aa81f09ac6 | |||
| d0d3f7ded0 | |||
| d678647dbd | |||
| 8af30a16d3 | |||
| 2b8feab40a | |||
| 11ed605e92 | |||
| 74eaf7a3f8 | |||
| d8b5f42796 | |||
| 09ceb5a3e4 | |||
| 58931a1928 | |||
| 12c27d6cf6 | |||
| aca38cac89 | |||
| ceee458b9c | |||
| 861cb4ecb1 | |||
| 181693ca72 | |||
| 818e45a59e | |||
| 055216bb0b | |||
| 0054ae0629 | |||
| 161a0ba764 | |||
| 168e325f9b | |||
| 6b8a71588f | |||
| 86cec553af | |||
| 6b841d38be | |||
| e799b5ec0d | |||
| 082251fdd3 | |||
| 7834356e90 | |||
| 0ced22e49e | |||
| f6d3198e5d | |||
| 3507a8ec4c | |||
| ded6b646c4 | |||
| a52ae538c3 | |||
| 228045bab3 | |||
| 924ae54c14 | |||
| ee4a13eac3 | |||
| 9904c0733b | |||
| 27bcf33c13 | |||
| 161bea4e83 | |||
| 6865b4eac1 | |||
| f0a45531c7 | |||
| 502cef0d4f | |||
| f285872083 | |||
| bdeaa74c3a | |||
| 80c08de2e4 | |||
| 9cb1be298d | |||
| a77e6edf3c | |||
| f98cede53d | |||
| 9522496954 | |||
| f5aae73de4 | |||
| 1f8e25b6af | |||
| f279776b54 | |||
| 8386f638e6 | |||
| 9f9b41276c | |||
| 2215cf6c68 | |||
| 67b5430430 | |||
| 06d6b63229 | |||
| 3378a6b319 | |||
| 9e78c7995a | |||
| 7417477abc | |||
| 1018e229e0 | |||
| 59766fae05 | |||
| a80f88c1be | |||
| d7a688db9c | |||
| 43a41d9d4c | |||
| 135fba2e4b | |||
| 625b5c77e0 | |||
| 9100f5656d | |||
| 7ad9f21880 | |||
| 17f964317d | |||
| d6bd2e83bb | |||
| 8ad7749d68 | |||
| 36834dde41 | |||
| 82fdafa01e | |||
| 6ad155377d | |||
| 41e87bf3f0 | |||
| 22f2d89162 | |||
| de6f4b1d95 | |||
| d8fae28c33 | |||
| bc70610eee | |||
| 7284a6db39 | |||
| 84ddf4b5b5 | |||
| ac9edb6c1b | |||
| 34fce89fd4 | |||
| 9538cc28e9 | |||
| e9238df788 | |||
| 8106a5e4a8 | |||
| 6985f5cc9e | |||
| 5a46549b69 | |||
| 8028e2a26b | |||
| fe2c4a352d | |||
| 0b28899e57 | |||
| 8d0ce71c45 | |||
| 2a95288ea7 | |||
| b481f89770 | |||
| eb6667c98c | |||
| b78a79fb68 | |||
| 986cc9a3c0 | |||
| bbccfa9d97 | |||
| a7939a9abe | |||
| da4976cd41 | |||
| f009a61d86 | |||
| 225abd65e1 | |||
| b4f180c4f4 | |||
| e5ce949a2f | |||
| 17a7756228 | |||
| d21ca1b5f8 | |||
| c19442a8de | |||
| 847a60dd01 | |||
| ba68212d64 | |||
| cdc3f700b8 | |||
| 9e3f73d7fb | |||
| 532c58c01e | |||
| a488f3834b | |||
| 2ad9e087e8 | |||
| e92f137375 | |||
| 03b3ea56ff | |||
| fee072e1ea | |||
| 0fc737248b | |||
| 0570f90d28 | |||
| 97f24aae50 | |||
| c4856cd4a3 | |||
| ef257cb1b2 | |||
| 0bf2deceb0 | |||
| 4b576962e5 | |||
| b671e62ef8 | |||
| c412f57484 | |||
| 9a85bc6293 | |||
| 5e0f6930cb | |||
| e735a4f61a | |||
| b9200da0c5 | |||
| 034edf65bb | |||
| 0a42c11516 | |||
| 118616fd5f | |||
| 19f71b9581 | |||
| e8791ba811 | |||
| 81a5bd500f | |||
| 72fa067b74 | |||
| 91ad2b4323 | |||
| 77b2009b13 | |||
| a48f12d308 | |||
| 65bbbdd0ae | |||
| f4beb2f868 | |||
| a895eba453 | |||
| 225d38f866 | |||
| 6c6eb8b0dd | |||
| de6fe5c8ff | |||
| feed9783c5 | |||
| d036f79625 | |||
| a5002bb04e | |||
| d74786f737 | |||
| 4daae19966 | |||
| ff93581f3f | |||
| 93ed037e39 | |||
| 8caa9b27c3 | |||
| 6ac09c547c | |||
| faed21722c | |||
| fdf82cf531 | |||
| b76c223cac | |||
| 3c4b3fd82f | |||
| 1de1353133 | |||
| 5fa6b6aee2 | |||
| 2552aa9d09 | |||
| 2135c72329 | |||
| b8e09c3c69 | |||
| 3f2c044fbf | |||
| a8f81bcf2b | |||
| d6d2efea0c | |||
| d7b1c00b9d | |||
| 1e51973430 | |||
| ff71f8b949 | |||
| 117c2cd60c |
+3
-3
@@ -1,6 +1,6 @@
|
||||
[submodule "submodules/zfsonlinux"]
|
||||
path = submodules/zfsonlinux
|
||||
url = ../zfsonlinux
|
||||
[submodule "submodules/ubuntu-bionic"]
|
||||
path = submodules/ubuntu-bionic
|
||||
url = ../mirror_ubuntu-bionic-kernel
|
||||
[submodule "submodules/ubuntu-kernel"]
|
||||
path = submodules/ubuntu-kernel
|
||||
url = ../mirror_ubuntu-kernels
|
||||
|
||||
@@ -1,146 +1,127 @@
|
||||
include /usr/share/dpkg/pkg-info.mk
|
||||
|
||||
# also bump pve-kernel-meta if either of MAJ.MIN, PATCHLEVEL or KREL change
|
||||
KERNEL_MAJ=4
|
||||
KERNEL_MAJ=5
|
||||
KERNEL_MIN=15
|
||||
KERNEL_PATCHLEVEL=18
|
||||
KERNEL_PATCHLEVEL=158
|
||||
# increment KREL if the ABI changes (abicheck target in debian/rules)
|
||||
# rebuild packages with new KREL and run 'make abiupdate'
|
||||
KREL=15
|
||||
KREL=1
|
||||
|
||||
PKGREL=40
|
||||
PKGREL=1
|
||||
|
||||
KERNEL_MAJMIN=$(KERNEL_MAJ).$(KERNEL_MIN)
|
||||
KERNEL_VER=$(KERNEL_MAJMIN).$(KERNEL_PATCHLEVEL)
|
||||
|
||||
EXTRAVERSION=-${KREL}-pve
|
||||
KVNAME=${KERNEL_VER}${EXTRAVERSION}
|
||||
PACKAGE=pve-kernel-${KVNAME}
|
||||
HDRPACKAGE=pve-headers-${KVNAME}
|
||||
EXTRAVERSION=-$(KREL)-pve
|
||||
KVNAME=$(KERNEL_VER)$(EXTRAVERSION)
|
||||
PACKAGE=pve-kernel-$(KVNAME)
|
||||
HDRPACKAGE=pve-headers-$(KVNAME)
|
||||
|
||||
ARCH=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
|
||||
|
||||
# amd64/x86_64/x86 share the arch subdirectory in the kernel, 'x86' so we need
|
||||
# a mapping
|
||||
KERNEL_ARCH=x86
|
||||
ifneq (${ARCH}, amd64)
|
||||
KERNEL_ARCH=${ARCH}
|
||||
ifneq ($(ARCH), amd64)
|
||||
KERNEL_ARCH=$(ARCH)
|
||||
endif
|
||||
|
||||
GITVERSION:=$(shell git rev-parse HEAD)
|
||||
|
||||
SKIPABI=0
|
||||
|
||||
ifeq ($(CC), cc)
|
||||
GCC=gcc
|
||||
else
|
||||
GCC=$(CC)
|
||||
endif
|
||||
BUILD_DIR=pve-kernel-$(KERNEL_VER)
|
||||
|
||||
BUILD_DIR=build
|
||||
|
||||
KERNEL_SRC=ubuntu-bionic
|
||||
KERNEL_SRC=ubuntu-kernel
|
||||
KERNEL_SRC_SUBMODULE=submodules/$(KERNEL_SRC)
|
||||
KERNEL_CFG_ORG=config-${KERNEL_VER}.org
|
||||
|
||||
E1000EDIR=e1000e-3.4.1.1
|
||||
E1000ESRC=${E1000EDIR}.tar.gz
|
||||
|
||||
IGBDIR=igb-5.3.5.18
|
||||
IGBSRC=${IGBDIR}.tar.gz
|
||||
KERNEL_CFG_ORG=config-$(KERNEL_VER).org
|
||||
|
||||
ZFSONLINUX_SUBMODULE=submodules/zfsonlinux
|
||||
SPLDIR=pkg-spl
|
||||
ZFSDIR=pkg-zfs
|
||||
|
||||
MODULES=modules
|
||||
MODULE_DIRS=${E1000EDIR} ${IGBDIR} ${SPLDIR} ${ZFSDIR}
|
||||
MODULE_DIRS=$(ZFSDIR)
|
||||
|
||||
# exported to debian/rules via debian/rules.d/dirs.mk
|
||||
DIRS=KERNEL_SRC E1000EDIR IGBDIR SPLDIR ZFSDIR MODULES
|
||||
DIRS=KERNEL_SRC ZFSDIR MODULES
|
||||
|
||||
DST_DEB=${PACKAGE}_${KERNEL_VER}-${PKGREL}_${ARCH}.deb
|
||||
HDR_DEB=${HDRPACKAGE}_${KERNEL_VER}-${PKGREL}_${ARCH}.deb
|
||||
LINUX_TOOLS_DEB=linux-tools-$(KERNEL_MAJMIN)_${KERNEL_VER}-${PKGREL}_${ARCH}.deb
|
||||
DSC=pve-kernel_$(KERNEL_VER)-$(PKGREL).dsc
|
||||
DST_DEB=$(PACKAGE)_$(KERNEL_VER)-$(PKGREL)_$(ARCH).deb
|
||||
HDR_DEB=$(HDRPACKAGE)_$(KERNEL_VER)-$(PKGREL)_$(ARCH).deb
|
||||
USR_HDR_DEB=pve-kernel-libc-dev_$(KERNEL_VER)-$(PKGREL)_$(ARCH).deb
|
||||
LINUX_TOOLS_DEB=linux-tools-$(KERNEL_MAJMIN)_$(KERNEL_VER)-$(PKGREL)_$(ARCH).deb
|
||||
LINUX_TOOLS_DBG_DEB=linux-tools-$(KERNEL_MAJMIN)-dbgsym_$(KERNEL_VER)-$(PKGREL)_$(ARCH).deb
|
||||
|
||||
DEBS=${DST_DEB} ${HDR_DEB} ${LINUX_TOOLS_DEB}
|
||||
DEBS=$(DST_DEB) $(HDR_DEB) $(USR_HDR_DEB) $(LINUX_TOOLS_DEB) $(LINUX_TOOLS_DBG_DEB)
|
||||
UPLOAD_DEBS=$(DST_DEB) $(HDR_DEB) $(LINUX_TOOLS_DEB) $(LINUX_TOOLS_DBG_DEB)
|
||||
|
||||
all: check_gcc deb
|
||||
deb: ${DEBS}
|
||||
all: deb
|
||||
deb: $(DEBS)
|
||||
|
||||
check_gcc:
|
||||
$(GCC) --version|grep "6\.3" || false
|
||||
@$(GCC) -Werror -mindirect-branch=thunk-extern -mindirect-branch-register -c -x c /dev/null -o check_gcc.o \
|
||||
|| ( rm -f check_gcc.o; \
|
||||
echo "Please install gcc-6 packages with indirect thunk / RETPOLINE support"; \
|
||||
false)
|
||||
@rm -f check_gcc.o
|
||||
$(LINUX_TOOLS_DEB) $(HDR_DEB) $(USR_HDR_DEB) $(LINUX_TOOLS_DBG_DEB): $(DST_DEB)
|
||||
$(DST_DEB): $(BUILD_DIR).prepared
|
||||
cd $(BUILD_DIR); dpkg-buildpackage --jobs=auto -b -uc -us
|
||||
lintian $(DST_DEB)
|
||||
#lintian $(HDR_DEB)
|
||||
lintian $(LINUX_TOOLS_DEB)
|
||||
|
||||
${LINUX_TOOLS_DEB} ${HDR_DEB}: ${DST_DEB}
|
||||
${DST_DEB}: ${BUILD_DIR}.prepared
|
||||
cd ${BUILD_DIR}; dpkg-buildpackage --jobs=auto -b -uc -us
|
||||
lintian ${DST_DEB}
|
||||
#lintian ${HDR_DEB}
|
||||
lintian ${LINUX_TOOLS_DEB}
|
||||
dsc: $(DSC)
|
||||
$(DSC): $(BUILD_DIR).prepared
|
||||
cd $(BUILD_DIR); dpkg-buildpackage -S -uc -us -d
|
||||
lintian $(DSC)
|
||||
|
||||
${BUILD_DIR}.prepared: $(addsuffix .prepared,${KERNEL_SRC} ${MODULES} debian)
|
||||
cp -a fwlist-previous ${BUILD_DIR}/
|
||||
cp -a abi-prev-* ${BUILD_DIR}/
|
||||
cp -a abi-blacklist ${BUILD_DIR}/
|
||||
sbuild: $(DSC)
|
||||
sbuild $(DSC)
|
||||
|
||||
$(BUILD_DIR).prepared: $(addsuffix .prepared,$(KERNEL_SRC) $(MODULES) debian)
|
||||
cp -a fwlist-previous $(BUILD_DIR)/
|
||||
cp -a abi-prev-* $(BUILD_DIR)/
|
||||
cp -a abi-blacklist $(BUILD_DIR)/
|
||||
touch $@
|
||||
|
||||
debian.prepared: debian
|
||||
rm -rf ${BUILD_DIR}/debian
|
||||
mkdir -p ${BUILD_DIR}
|
||||
cp -a debian ${BUILD_DIR}/debian
|
||||
echo "git clone git://git.proxmox.com/git/pve-kernel.git\\ngit checkout ${GITVERSION}" > ${BUILD_DIR}/debian/SOURCE
|
||||
@$(foreach dir, ${DIRS},echo "${dir}=${${dir}}" >> ${BUILD_DIR}/debian/rules.d/env.mk;)
|
||||
echo "KVNAME=${KVNAME}" >> ${BUILD_DIR}/debian/rules.d/env.mk
|
||||
echo "KERNEL_MAJMIN=${KERNEL_MAJMIN}" >> ${BUILD_DIR}/debian/rules.d/env.mk
|
||||
cd ${BUILD_DIR}; debian/rules debian/control
|
||||
rm -rf $(BUILD_DIR)/debian
|
||||
mkdir -p $(BUILD_DIR)
|
||||
cp -a debian $(BUILD_DIR)/debian
|
||||
echo "git clone git://git.proxmox.com/git/pve-kernel.git\\ngit checkout $(GITVERSION)" > $(BUILD_DIR)/debian/SOURCE
|
||||
@$(foreach dir, $(DIRS),echo "$(dir)=$($(dir))" >> $(BUILD_DIR)/debian/rules.d/env.mk;)
|
||||
echo "KVNAME=$(KVNAME)" >> $(BUILD_DIR)/debian/rules.d/env.mk
|
||||
echo "KERNEL_MAJMIN=$(KERNEL_MAJMIN)" >> $(BUILD_DIR)/debian/rules.d/env.mk
|
||||
cd $(BUILD_DIR); debian/rules debian/control
|
||||
touch $@
|
||||
|
||||
${KERNEL_SRC}.prepared: ${KERNEL_SRC_SUBMODULE} | submodule
|
||||
rm -rf ${BUILD_DIR}/${KERNEL_SRC} $@
|
||||
mkdir -p ${BUILD_DIR}
|
||||
cp -a ${KERNEL_SRC_SUBMODULE} ${BUILD_DIR}/${KERNEL_SRC}
|
||||
$(KERNEL_SRC).prepared: $(KERNEL_SRC_SUBMODULE) | submodule
|
||||
rm -rf $(BUILD_DIR)/$(KERNEL_SRC) $@
|
||||
mkdir -p $(BUILD_DIR)
|
||||
cp -a $(KERNEL_SRC_SUBMODULE) $(BUILD_DIR)/$(KERNEL_SRC)
|
||||
# TODO: split for archs, track and diff in our repository?
|
||||
cat ${BUILD_DIR}/${KERNEL_SRC}/debian.master/config/config.common.ubuntu ${BUILD_DIR}/${KERNEL_SRC}/debian.master/config/${ARCH}/config.common.${ARCH} ${BUILD_DIR}/${KERNEL_SRC}/debian.master/config/${ARCH}/config.flavour.generic > ${KERNEL_CFG_ORG}
|
||||
cp ${KERNEL_CFG_ORG} ${BUILD_DIR}/${KERNEL_SRC}/.config
|
||||
sed -i ${BUILD_DIR}/${KERNEL_SRC}/Makefile -e 's/^EXTRAVERSION.*$$/EXTRAVERSION=${EXTRAVERSION}/'
|
||||
rm -rf ${BUILD_DIR}/${KERNEL_SRC}/debian ${BUILD_DIR}/${KERNEL_SRC}/debian.master
|
||||
set -e; cd ${BUILD_DIR}/${KERNEL_SRC}; for patch in ../../patches/kernel/*.patch; do echo "applying patch '$$patch'" && patch -p1 < $${patch}; done
|
||||
cd $(BUILD_DIR)/$(KERNEL_SRC); python3 debian/scripts/misc/annotations --arch amd64 --export >../../$(KERNEL_CFG_ORG)
|
||||
cp $(KERNEL_CFG_ORG) $(BUILD_DIR)/$(KERNEL_SRC)/.config
|
||||
sed -i $(BUILD_DIR)/$(KERNEL_SRC)/Makefile -e 's/^EXTRAVERSION.*$$/EXTRAVERSION=$(EXTRAVERSION)/'
|
||||
rm -rf $(BUILD_DIR)/$(KERNEL_SRC)/debian $(BUILD_DIR)/$(KERNEL_SRC)/debian.master
|
||||
set -e; cd $(BUILD_DIR)/$(KERNEL_SRC); \
|
||||
for patch in ../../patches/kernel/*.patch; do \
|
||||
echo "applying patch '$$patch'"; \
|
||||
patch --batch -p1 < "$${patch}"; \
|
||||
done
|
||||
touch $@
|
||||
|
||||
${MODULES}.prepared: $(addsuffix .prepared,${MODULE_DIRS})
|
||||
$(MODULES).prepared: $(addsuffix .prepared,$(MODULE_DIRS))
|
||||
touch $@
|
||||
|
||||
${E1000EDIR}.prepared: ${E1000ESRC}
|
||||
rm -rf ${BUILD_DIR}/${MODULES}/${E1000EDIR} $@
|
||||
mkdir -p ${BUILD_DIR}/${MODULES}/${E1000EDIR}
|
||||
tar --strip-components=1 -C ${BUILD_DIR}/${MODULES}/${E1000EDIR} -xf ${E1000ESRC}
|
||||
cd ${BUILD_DIR}/${MODULES}/${E1000EDIR}; patch -p1 < ../../../patches/intel/intel-module-gcc6-compat.patch
|
||||
cd ${BUILD_DIR}/${MODULES}/${E1000EDIR}; patch -p1 < ../../../patches/intel/e1000e/e1000e_4.10_max-mtu.patch
|
||||
cd ${BUILD_DIR}/${MODULES}/${E1000EDIR}; patch -p1 < ../../../patches/intel/e1000e/e1000e_4.15-new-timer.patch
|
||||
touch $@
|
||||
|
||||
${IGBDIR}.prepared: ${IGBSRC}
|
||||
rm -rf ${BUILD_DIR}/${MODULES}/${IGBDIR} $@
|
||||
mkdir -p ${BUILD_DIR}/${MODULES}/${IGBDIR}
|
||||
tar --strip-components=1 -C ${BUILD_DIR}/${MODULES}/${IGBDIR} -xf ${IGBSRC}
|
||||
cd ${BUILD_DIR}/${MODULES}/${IGBDIR}; patch -p1 < ../../../patches/intel/igb/igb_4.15_mtu.patch
|
||||
touch $@
|
||||
|
||||
${SPLDIR}.prepared: ${ZFSDIR}.prepared
|
||||
${ZFSDIR}.prepared: ${ZFSONLINUX_SUBMODULE}
|
||||
rm -rf ${BUILD_DIR}/${MODULES}/${SPLDIR} ${BUILD_DIR}/${MODULES}/${ZFSDIR} ${BUILD_DIR}/${MODULES}/tmp $@
|
||||
mkdir -p ${BUILD_DIR}/${MODULES}/tmp
|
||||
cp -a ${ZFSONLINUX_SUBMODULE}/* ${BUILD_DIR}/${MODULES}/tmp
|
||||
cd ${BUILD_DIR}/${MODULES}/tmp; make kernel
|
||||
rm -rf ${BUILD_DIR}/${MODULES}/tmp
|
||||
touch ${ZFSDIR}.prepared ${SPLDIR}.prepared
|
||||
$(ZFSDIR).prepared: $(ZFSONLINUX_SUBMODULE)
|
||||
rm -rf $(BUILD_DIR)/$(MODULES)/$(ZFSDIR) $(BUILD_DIR)/$(MODULES)/tmp $@
|
||||
mkdir -p $(BUILD_DIR)/$(MODULES)/tmp
|
||||
cp -a $(ZFSONLINUX_SUBMODULE)/* $(BUILD_DIR)/$(MODULES)/tmp
|
||||
cd $(BUILD_DIR)/$(MODULES)/tmp; make kernel
|
||||
rm -rf $(BUILD_DIR)/$(MODULES)/tmp
|
||||
touch $(ZFSDIR).prepared
|
||||
|
||||
.PHONY: upload
|
||||
upload: ${DEBS}
|
||||
tar cf - ${DEBS}|ssh -X repoman@repo.proxmox.com -- upload --product pve,pmg --dist stretch --arch ${ARCH}
|
||||
upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION)
|
||||
upload: $(UPLOAD_DEBS)
|
||||
tar cf - $(UPLOAD_DEBS)|ssh -X repoman@repo.proxmox.com -- upload --product pve,pmg,pbs --dist $(UPLOAD_DIST) --arch $(ARCH)
|
||||
|
||||
.PHONY: distclean
|
||||
distclean: clean
|
||||
@@ -150,19 +131,18 @@ distclean: clean
|
||||
.PHONY: update_modules
|
||||
update_modules: submodule
|
||||
git submodule foreach 'git pull --ff-only origin master'
|
||||
cd ${ZFSONLINUX_SUBMODULE}; git pull --ff-only origin master
|
||||
cd $(ZFSONLINUX_SUBMODULE); git pull --ff-only origin master
|
||||
|
||||
# make sure submodules were initialized
|
||||
.PHONY: submodule
|
||||
submodule:
|
||||
test -f "${KERNEL_SRC_SUBMODULE}/README" || git submodule update --init ${KERNEL_SRC_SUBMODULE}
|
||||
test -f "${ZFSONLINUX_SUBMODULE}/Makefile" || git submodule update --init ${ZFSONLINUX_SUBMODULE}
|
||||
(test -f "${ZFSONLINUX_SUBMODULE}/zfs/upstream/README.markdown" && test -f "${ZFSONLINUX_SUBMODULE}/spl/upstream/README.markdown") || (cd ${ZFSONLINUX_SUBMODULE}; git submodule update --init)
|
||||
test -f "$(KERNEL_SRC_SUBMODULE)/README" || git submodule update --init $(KERNEL_SRC_SUBMODULE)
|
||||
test -f "$(ZFSONLINUX_SUBMODULE)/Makefile" || git submodule update --init --recursive $(ZFSONLINUX_SUBMODULE)
|
||||
|
||||
# call after ABI bump with header deb in working directory
|
||||
.PHONY: abiupdate
|
||||
abiupdate: abi-prev-${KVNAME}
|
||||
abi-prev-${KVNAME}: abi-tmp-${KVNAME}
|
||||
abiupdate: abi-prev-$(KVNAME)
|
||||
abi-prev-$(KVNAME): abi-tmp-$(KVNAME)
|
||||
ifneq ($(strip $(shell git status --untracked-files=no --porcelain -z)),)
|
||||
@echo "working directory unclean, aborting!"
|
||||
@false
|
||||
@@ -170,15 +150,15 @@ else
|
||||
git rm "abi-prev-*"
|
||||
mv $< $@
|
||||
git add $@
|
||||
git commit -s -m "update ABI file for ${KVNAME}" -m "(generated with debian/scripts/abi-generate)"
|
||||
@echo "update abi-prev-${KVNAME} committed!"
|
||||
git commit -s -m "update ABI file for $(KVNAME)" -m "(generated with debian/scripts/abi-generate)"
|
||||
@echo "update abi-prev-$(KVNAME) committed!"
|
||||
endif
|
||||
|
||||
abi-tmp-${KVNAME}:
|
||||
@ test -e ${HDR_DEB} || (echo "need ${HDR_DEB} to extract ABI data!" && false)
|
||||
debian/scripts/abi-generate ${HDR_DEB} $@ ${KVNAME} 1
|
||||
abi-tmp-$(KVNAME):
|
||||
@ test -e $(HDR_DEB) || (echo "need $(HDR_DEB) to extract ABI data!" && false)
|
||||
debian/scripts/abi-generate $(HDR_DEB) $@ $(KVNAME) 1
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf *~ build *.prepared ${KERNEL_CFG_ORG}
|
||||
rm -f *.deb *.changes *.buildinfo
|
||||
rm -rf *~ pve-kernel-[0-9]*/ *.prepared $(KERNEL_CFG_ORG)
|
||||
rm -f *.deb *.dsc *.changes *.buildinfo *.build pve-kernel*.tar.*
|
||||
|
||||
@@ -3,20 +3,20 @@ KERNEL SOURCE:
|
||||
|
||||
We currently use the Ubuntu kernel sources, available from:
|
||||
|
||||
http://kernel.ubuntu.com/git/ubuntu/ubuntu-bionic.git/
|
||||
http://kernel.ubuntu.com/git/ubuntu/ubuntu-jammy.git/
|
||||
|
||||
Ubuntu will maintain those kernels till:
|
||||
|
||||
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
|
||||
or
|
||||
https://pve.proxmox.com/pve-docs/chapter-pve-faq.html#faq-support-table
|
||||
|
||||
whatever happens to be earlier.
|
||||
|
||||
|
||||
Additional/Updated Modules:
|
||||
---------------------------
|
||||
|
||||
- include latest e1000e driver from intel/sourceforge
|
||||
|
||||
- include latest igb driver from intel/sourceforge
|
||||
|
||||
- include native OpenZFS filesystem kernel modules for Linux
|
||||
|
||||
* https://github.com/zfsonlinux/
|
||||
@@ -35,7 +35,7 @@ get applied with the `patch` tool. From a git point-of-view, the copied
|
||||
directory remains clean even with extra patches applied since it does not
|
||||
contain a .git directory, but a reference to the (still pristine) submodule:
|
||||
|
||||
$ cat build/ubuntu-bionic/.git
|
||||
$ cat build/ubuntu-jammy/.git
|
||||
|
||||
If you mistakenly cloned the upstream repo as "normal" clone (not via the
|
||||
submodule mechanics) this means that you have a real .git directory with its
|
||||
@@ -64,7 +64,7 @@ pve-kernel-meta
|
||||
---------------
|
||||
|
||||
depends on latest kernel and header package within a certain kernel series,
|
||||
e.g., pve-kernel-4.15 / pve-headers-4.15
|
||||
e.g., pve-kernel-5.15 / pve-headers-5.15
|
||||
|
||||
git clone git://git.proxmox.com/git/pve-kernel-meta.git
|
||||
|
||||
@@ -102,6 +102,18 @@ which device is actually used for /dev/watchdog.
|
||||
We ship this list in /lib/modprobe.d/blacklist_pve-kernel-<VERSION>.conf
|
||||
The user typically edit /etc/modules to enable a specific watchdog device.
|
||||
|
||||
Debug kernel and modules
|
||||
------------------------
|
||||
|
||||
In order to build a -dbgsym package containing an unstripped copy of the kernel
|
||||
image and modules, enable the 'pkg.pve-kernel.debug' build profile (e.g. by
|
||||
exporting DEB_BUILD_PROFILES='pkg.pve-kernel.debug'). The resulting package can
|
||||
be used together with 'crash'/'kdump-tools' to debug kernel crashes.
|
||||
|
||||
Note: the -dbgsym package is only valid for the pve-kernel packages produced by
|
||||
the same build. A kernel/module from a different build will likely not match,
|
||||
even if both builds are of the same kernel and package version.
|
||||
|
||||
Additional information
|
||||
----------------------
|
||||
|
||||
@@ -125,55 +137,39 @@ NOTE: For the exact and current list see debian/rules (PVE_CONFIG_OPTS)
|
||||
CONFIG_BLK_DEV_SR=y
|
||||
CONFIG_BLK_DEV_DM=y
|
||||
|
||||
- add workaround for Debian bug #807000 (see
|
||||
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=807000)
|
||||
|
||||
CONFIG_BLK_DEV_NVME=y
|
||||
|
||||
- compile NBD and RBD modules
|
||||
CONFIG_BLK_DEV_NBD=m
|
||||
CONFIG_BLK_DEV_RBD=m
|
||||
|
||||
- enable IBM JFS file system as module
|
||||
|
||||
enable it as requested by users (bug #64)
|
||||
requested by users (bug #64)
|
||||
|
||||
- enable apple HFS and HFSPLUS as module
|
||||
|
||||
enable it as requested by users
|
||||
requested by users
|
||||
|
||||
- enable CONFIG_BCACHE=m (requested by user)
|
||||
|
||||
- enable CONFIG_BRIDGE=y
|
||||
|
||||
Else we get warnings on boot, that
|
||||
net.bridge.bridge-nf-call-iptables is an unknown key
|
||||
to avoid warnings on boot, e.g. that net.bridge.bridge-nf-call-iptables is an unknown key
|
||||
|
||||
- enable CONFIG_DEFAULT_SECURITY_APPARMOR
|
||||
|
||||
We need this for lxc
|
||||
|
||||
- set CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
|
||||
|
||||
because if not set, it can give some dynamic memory or cpu frequencies
|
||||
change, and vms can crash (mainly windows guest).
|
||||
|
||||
see http://forum.proxmox.com/threads/18238-Windows-7-x64-VMs-crashing-randomly-during-process-termination?p=93273#post93273
|
||||
|
||||
- use 'deadline' as default scheduler
|
||||
|
||||
This is the suggested setting for KVM. We also measure bad fsync
|
||||
performance with ext4 and cfq.
|
||||
This is the suggested setting for KVM. We also measure bad fsync performance with ext4 and cfq.
|
||||
|
||||
- disable CONFIG_INPUT_EVBUG
|
||||
|
||||
Module evbug is not blacklisted on debian, so we simply disable it
|
||||
to avoid key-event logs (which is a big security problem)
|
||||
Module evbug is not blacklisted on debian, so we simply disable it to avoid
|
||||
key-event logs (which is a big security problem)
|
||||
|
||||
- enable CONFIG_MODVERSIONS (needed for ABI tracking)
|
||||
|
||||
- switch default UNWINDER to FRAME_POINTER
|
||||
|
||||
the recently introduced ORC_UNWINDER is not 100% stable yet, especially in combination with ZFS
|
||||
|
||||
- enable CONFIG_PAGE_TABLE_ISOLATION (Meltdown mitigation)
|
||||
|
||||
-22756
File diff suppressed because it is too large
Load Diff
+26350
File diff suppressed because it is too large
Load Diff
Vendored
+814
@@ -1,3 +1,817 @@
|
||||
pve-kernel (5.15.158-1) bullseye; urgency=medium
|
||||
|
||||
* update sources to Ubuntu-5.15.0-115.125, based on 5.15.158
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Mon, 10 Jun 2024 16:56:16 +0200
|
||||
|
||||
pve-kernel (5.15.152-1) bullseye; urgency=medium
|
||||
|
||||
* update to Ubuntu-5.15.0-111.121, based on 5.15.152
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Mon, 29 Apr 2024 09:31:55 +0200
|
||||
|
||||
pve-kernel (5.15.149-1) bullseye; urgency=medium
|
||||
|
||||
* update to Ubuntu-5.15.0-104.114 basing of 5.15.149
|
||||
|
||||
* update ZFS to 2.1.15
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Fri, 29 Mar 2024 15:24:01 +0100
|
||||
|
||||
pve-kernel (5.15.143-1) bullseye; urgency=medium
|
||||
|
||||
* update to Ubuntu-5.15.0-100.110 basing of 5.15.143
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Thu, 08 Feb 2024 19:12:26 +0100
|
||||
|
||||
pve-kernel (5.15.136-1) bullseye; urgency=medium
|
||||
|
||||
* update to Ubuntu-5.15.0-94.104 basing of 5.15.136
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Tue, 23 Jan 2024 12:10:07 +0100
|
||||
|
||||
pve-kernel (5.15.131-3) bullseye; urgency=medium
|
||||
|
||||
* updates ZFS to 2.1.14
|
||||
|
||||
* bump ABI to 5.15.131-2
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Fri, 01 Dec 2023 14:42:42 +0100
|
||||
|
||||
pve-kernel (5.15.131-2) bullseye; urgency=medium
|
||||
|
||||
* update to Ubuntu-5.15.0-91.101 fixing an issue with enumerating USB
|
||||
devices
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Tue, 14 Nov 2023 12:32:55 +0100
|
||||
|
||||
pve-kernel (5.15.131-1) bullseye; urgency=medium
|
||||
|
||||
* update to Ubuntu-5.15.0-90.100 basing of the 5.15.131 stable release
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Thu, 09 Nov 2023 10:29:57 +0100
|
||||
|
||||
pve-kernel (5.15.126-1) bullseye; urgency=medium
|
||||
|
||||
* update to Ubuntu-5.15.0-88.98 basing of 5.15.126
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Tue, 03 Oct 2023 19:24:13 +0200
|
||||
|
||||
pve-kernel (5.15.116-1) bullseye; urgency=medium
|
||||
|
||||
* disable CONFIG_GDS_FORCE_MITIGATION again to avoid software breakage with
|
||||
older intel-microcode versions
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Tue, 29 Aug 2023 15:46:21 +0200
|
||||
|
||||
pve-kernel (5.15.111-1) bullseye; urgency=medium
|
||||
|
||||
* update to Ubuntu-5.15.0-82.91
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Fri, 18 Aug 2023 10:57:15 +0200
|
||||
|
||||
pve-kernel (5.15.108-2) bullseye; urgency=medium
|
||||
|
||||
* backport Zenbleed stop-gap workaround for CVE-2023-20593, the actual fix
|
||||
is the amd64-microcode update.
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Thu, 20 Jul 2023 12:06:18 +0200
|
||||
|
||||
pve-kernel (5.15.108-1) bullseye; urgency=medium
|
||||
|
||||
* update to Ubuntu-5.15.0-77.84, based on 5.15.108
|
||||
|
||||
* bump ABI to 5.15.108-1
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Sat, 17 Jun 2023 11:41:53 +0200
|
||||
|
||||
pve-kernel (5.15.107-2) bullseye; urgency=medium
|
||||
|
||||
* backport "netfilter: nf_tables: deactivate anonymous set from preparation
|
||||
phase"
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 10 May 2023 11:10:23 +0200
|
||||
|
||||
pve-kernel (5.15.107-1) bullseye; urgency=medium
|
||||
|
||||
* update to Proxmox-5.15.107-1
|
||||
|
||||
* update ZFS to 2.1.11
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Thu, 20 Apr 2023 12:05:46 +0200
|
||||
|
||||
pve-kernel (5.15.104-2) bullseye; urgency=medium
|
||||
|
||||
* backport "igb: revert rtnl_lock() that causes deadlock"
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 12 Apr 2023 13:23:09 +0200
|
||||
|
||||
pve-kernel (5.15.104-1) bullseye; urgency=medium
|
||||
|
||||
* update to upstream ubuntu and stable tree's v5.15.104
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 29 Mar 2023 17:51:33 +0200
|
||||
|
||||
pve-kernel (5.15.102-1) bullseye; urgency=medium
|
||||
|
||||
* update to upstream ubuntu and stable tree's v5.15.102
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Tue, 14 Mar 2023 14:48:39 +0100
|
||||
|
||||
pve-kernel (5.15.85-1) bullseye; urgency=medium
|
||||
|
||||
* update to Ubuntu-5.15.0-65.72 based on v5.15.85
|
||||
|
||||
* update ZFS to 2.1.9
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 01 Feb 2023 16:07:18 +0100
|
||||
|
||||
pve-kernel (5.15.83-1) bullseye; urgency=medium
|
||||
|
||||
* update ZFS to 2.1.7
|
||||
|
||||
* update to upstream stable v5.15.83
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 14 Dec 2022 14:09:09 +0100
|
||||
|
||||
pve-kernel (5.15.74-1) bullseye; urgency=medium
|
||||
|
||||
* update to Ubuntu-5.15.0-54.60
|
||||
|
||||
* bump ABI to 5.15.74-1
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Mon, 14 Nov 2022 20:17:15 +0100
|
||||
|
||||
pve-kernel (5.15.64-1) bullseye; urgency=medium
|
||||
|
||||
* update to Ubuntu-5.15.0-51.57
|
||||
|
||||
* bump ABI to 5.15.64-1
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Thu, 13 Oct 2022 10:30:34 +0200
|
||||
|
||||
pve-kernel (5.15.60-2) bullseye; urgency=medium
|
||||
|
||||
* update ZFS to 2.1.6
|
||||
|
||||
* update to Ubuntu-5.15.0-50.56
|
||||
|
||||
* bump ABI to 5.15.60-2
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Tue, 04 Oct 2022 16:52:28 +0200
|
||||
|
||||
pve-kernel (5.15.60-1) bullseye; urgency=medium
|
||||
|
||||
* update to Ubuntu-5.15.0-49.55
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Mon, 19 Sep 2022 17:53:17 +0200
|
||||
|
||||
pve-kernel (5.15.53-1) bullseye; urgency=medium
|
||||
|
||||
* update to Ubuntu-5.15.0-48.54
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Fri, 26 Aug 2022 16:53:52 +0200
|
||||
|
||||
pve-kernel (5.15.39-4) bullseye; urgency=medium
|
||||
|
||||
* update "SMM emulation and interrupt shadow fixes" to v3
|
||||
|
||||
* bump ABI to 5.15.35-4
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Mon, 08 Aug 2022 15:11:15 +0200
|
||||
|
||||
pve-kernel (5.15.39-3) bullseye; urgency=medium
|
||||
|
||||
* backport "SMM emulation and interrupt shadow fixes"
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 27 Jul 2022 13:45:39 +0200
|
||||
|
||||
pve-kernel (5.15.39-2) bullseye; urgency=medium
|
||||
|
||||
* update to Ubuntu-5.15.0-45.48
|
||||
|
||||
* update ZFS to 2.1.5
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 20 Jul 2022 17:22:19 +0200
|
||||
|
||||
pve-kernel (5.15.39-1) bullseye; urgency=medium
|
||||
|
||||
* update to Ubuntu-5.15.0-41.44
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 22 Jun 2022 17:22:00 +0200
|
||||
|
||||
pve-kernel (5.15.35-6) bullseye; urgency=medium
|
||||
|
||||
* update to Ubuntu-5.15.0-40.43
|
||||
|
||||
* bump ABI to 5.15.35-3
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Fri, 17 Jun 2022 13:42:35 +0200
|
||||
|
||||
pve-kernel (5.15.35-5) bullseye; urgency=medium
|
||||
|
||||
* backport netfilter nf_table sanitiation fixes
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 08 Jun 2022 15:02:51 +0200
|
||||
|
||||
pve-kernel (5.15.35-4) bullseye; urgency=medium
|
||||
|
||||
* update to Ubuntu-5.15.0-36.37
|
||||
|
||||
* fix #4083: backport "EDAC/amd64: Add PCI device IDs for family 19h
|
||||
model 50h"
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Thu, 02 Jun 2022 13:48:41 +0200
|
||||
|
||||
pve-kernel (5.15.35-3) bullseye; urgency=medium
|
||||
|
||||
* fix #4039: backport aquantia atlantic NIC fixes
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 11 May 2022 07:57:51 +0200
|
||||
|
||||
pve-kernel (5.15.35-2) bullseye; urgency=medium
|
||||
|
||||
* cherry pick "NFSv4.1 provide mount option to toggle trunking discovery"
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Thu, 05 May 2022 13:54:35 +0200
|
||||
|
||||
pve-kernel (5.15.35-1) bullseye; urgency=medium
|
||||
|
||||
* update to Ubuntu-5.15.0-29.30
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 04 May 2022 12:32:49 +0200
|
||||
|
||||
pve-kernel (5.15.30-3) bullseye; urgency=medium
|
||||
|
||||
* backport "io_uring: fix race between timeout flush and removal"
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Fri, 22 Apr 2022 18:08:27 +0200
|
||||
|
||||
pve-kernel (5.15.30-2) bullseye; urgency=medium
|
||||
|
||||
* update sources to Ubuntu-5.15.0-27.28
|
||||
|
||||
* bump ABI to 5.15.30-2
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Fri, 22 Apr 2022 11:15:56 +0200
|
||||
|
||||
pve-kernel (5.15.30-1) bullseye; urgency=medium
|
||||
|
||||
* update sources to Ubuntu-5.15.0-24.24 based on 5.15.30
|
||||
|
||||
* update ZFS to 2.1.4
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Tue, 29 Mar 2022 10:36:02 +0200
|
||||
|
||||
pve-kernel (5.15.27-1) bullseye; urgency=medium
|
||||
|
||||
* update sources to Ubuntu-5.15.0-23.23 based on 5.15.27
|
||||
|
||||
* update ZFS to 2.1.3
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Sat, 12 Mar 2022 15:16:17 +0100
|
||||
|
||||
pve-kernel (5.15.19-3) bullseye; urgency=medium
|
||||
|
||||
* backport "lib/iov_iter: initialize "flags" in new pipe_buffer"
|
||||
fixing CVE-2022-0847 "dirty pipe"
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Mon, 07 Mar 2022 16:23:02 +0100
|
||||
|
||||
pve-kernel (5.15.19-2) bullseye; urgency=medium
|
||||
|
||||
* backport fbdev memory region release improvements
|
||||
|
||||
* ensure 'simpledrm' module gets build, allowing it to take over any system
|
||||
VGA/VBE/EFI framebuffer directly
|
||||
|
||||
* bump ABI to 5.15.19-2
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Tue, 08 Feb 2022 11:19:02 +0100
|
||||
|
||||
pve-kernel (5.15.19-1) bullseye; urgency=medium
|
||||
|
||||
* update sources to Ubuntu-5.15.0-20.20 based on 5.15.19
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Fri, 04 Feb 2022 06:09:14 +0100
|
||||
|
||||
pve-kernel (5.15.17-1) bullseye; urgency=medium
|
||||
|
||||
* update sources to Ubuntu-5.15.0-19.19 based on 5.15.17
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Mon, 31 Jan 2022 09:41:30 +0100
|
||||
|
||||
pve-kernel (5.15.12-3) bullseye; urgency=medium
|
||||
|
||||
* backport "vfs: fs_context: fix up param length parsing in
|
||||
legacy_parse_param"
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Thu, 20 Jan 2022 16:36:44 +0100
|
||||
|
||||
pve-kernel (5.15.12-2) bullseye; urgency=medium
|
||||
|
||||
* update sources to Ubuntu-5.15.0-16.16 based on 5.15.12
|
||||
|
||||
* update ZFS to 2.1.2
|
||||
|
||||
* ZFS: cherry-pick lock-inversion patch for zvol_open
|
||||
|
||||
* cherry-pick "blk-cgroup: always terminate io.stat lines"
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Tue, 11 Jan 2022 16:43:18 +0100
|
||||
|
||||
pve-kernel (5.15.7-1) bullseye; urgency=medium
|
||||
|
||||
* update to Ubuntu-5.15.0-14.14
|
||||
|
||||
* bump ABI to 5.15.7-1
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Tue, 14 Dec 2021 16:42:34 +0100
|
||||
|
||||
pve-kernel (5.15.5-1) bullseye; urgency=medium
|
||||
|
||||
* update to upcomming Ubuntu 22.04, Jammy Jellyfish kernel
|
||||
|
||||
* bump ABI to 5.15.5-1
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Mon, 29 Nov 2021 18:49:57 +0100
|
||||
|
||||
pve-kernel (5.13.19-4) bullseye; urgency=medium
|
||||
|
||||
* update sources to Ubuntu-5.13.0-23.23
|
||||
|
||||
* bump ABI to 5.13.19-2
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Mon, 29 Nov 2021 12:10:09 +0100
|
||||
|
||||
pve-kernel (5.13.19-3) bullseye; urgency=medium
|
||||
|
||||
* backport two io-wq fixes relevant for io_uring
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Tue, 23 Nov 2021 13:31:19 +0100
|
||||
|
||||
pve-kernel (5.13.19-2) bullseye; urgency=medium
|
||||
|
||||
* re-enable retrying to get a blockdev on ERESTARTSYS to work around
|
||||
ZFS still depending on that
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Tue, 09 Nov 2021 12:59:38 +0100
|
||||
|
||||
pve-kernel (5.13.19-1) bullseye; urgency=medium
|
||||
|
||||
* update sources to Ubuntu-5.13.0-22.22
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Sat, 06 Nov 2021 13:08:30 +0100
|
||||
|
||||
pve-kernel (5.13.18-1) bullseye; urgency=medium
|
||||
|
||||
* update sources to Ubuntu-5.13.0-21.21
|
||||
|
||||
* bump ABI to 5.13.18-1
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Tue, 19 Oct 2021 13:42:26 +0200
|
||||
|
||||
pve-kernel (5.13.14-1) bullseye; urgency=medium
|
||||
|
||||
* update kernel-base to Ubuntu 21.10 Impish kernel
|
||||
|
||||
* update ZFS to 2.1.1
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Tue, 28 Sep 2021 06:16:44 +0200
|
||||
|
||||
pve-kernel (5.11.22-9) bullseye; urgency=medium
|
||||
|
||||
* backport "blk-mq: fix kernel panic during iterating over flush
|
||||
request"
|
||||
|
||||
* d/rules: kconfig: enable SQUASHFS_DECOMP_MULTI_PERCPU to speed up
|
||||
decompression of mounted squashfs images
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 22 Sep 2021 10:11:11 +0200
|
||||
|
||||
pve-kernel (5.11.22-8) bullseye; urgency=medium
|
||||
|
||||
* update to Ubuntu-5.11.0-34.36
|
||||
|
||||
* fix #3552: cherry-pick PCI probe fixes
|
||||
|
||||
* build nvme as a module again to satisfy some inflexible (mellanox) modules
|
||||
insisting in being able to load the nvme-core module as dependency
|
||||
|
||||
* bump ABI to 5.11.22-4
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Fri, 27 Aug 2021 11:51:34 +0200
|
||||
|
||||
pve-kernel (5.11.22-7) bullseye; urgency=medium
|
||||
|
||||
* cherry-pick fixes for CVE-2021-3656 and CVE-2021-3653
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 18 Aug 2021 15:06:12 +0200
|
||||
|
||||
pve-kernel (5.11.22-6) bullseye; urgency=medium
|
||||
|
||||
* io_uring: don't block level reissue off completion path
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 28 Jul 2021 10:51:12 +0200
|
||||
|
||||
pve-kernel (5.11.22-5) bullseye; urgency=medium
|
||||
|
||||
* import Ubuntu-5.11.0-26.28
|
||||
|
||||
* pull in upstream stable releases from v5.10.44, v5.12.11
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 21 Jul 2021 18:25:44 +0200
|
||||
|
||||
pve-kernel (5.11.22-4) bullseye; urgency=medium
|
||||
|
||||
* fix CVE-2021-33909: seq_file: disallow extremely large seq buffer
|
||||
allocations
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Tue, 20 Jul 2021 21:40:02 +0200
|
||||
|
||||
pve-kernel (5.11.22-3) bullseye; urgency=medium
|
||||
|
||||
* update ZFS to 2.0.5
|
||||
|
||||
* pull in upstream stable releases from v5.10.43, v5.12.10
|
||||
|
||||
* ensure 'performance' is the default frequency CPU governor again, as
|
||||
schedutil seems to cause still some issues in with a few VM workloads
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Sun, 11 Jul 2021 13:45:15 +0200
|
||||
|
||||
pve-kernel (5.11.22-2) bullseye; urgency=medium
|
||||
|
||||
* net: bridge: sync fdb to new unicast-filtering ports
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Fri, 02 Jul 2021 16:22:45 +0200
|
||||
|
||||
pve-kernel (5.11.22-1) bullseye; urgency=medium
|
||||
|
||||
* update sources to stable release 5.11.22 with Ubuntu-5.11.0-23.24
|
||||
|
||||
* pve-kernel-libc-dev: add version to Provides dependency field for
|
||||
linux-libc-dev to satisfy versioned dependencies from other packages
|
||||
|
||||
* build perf with python3
|
||||
|
||||
* fixes #3465: keep unstripped kernel and module files, allowing one to use
|
||||
kdump-tools
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 23 Jun 2021 08:53:17 +0200
|
||||
|
||||
pve-kernel (5.11.21-1) bullseye; urgency=medium
|
||||
|
||||
* update sources to stable release 5.11.21 with Ubuntu-5.11.0-19.20
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Tue, 01 Jun 2021 16:38:57 +0200
|
||||
|
||||
pve-kernel (5.11.17-1) bullseye; urgency=medium
|
||||
|
||||
* update sources to stable release 5.11.17 with Ubuntu-5.11.0-18.19
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 12 May 2021 12:45:37 +0200
|
||||
|
||||
pve-kernel (5.11.12-1) bullseye; urgency=medium
|
||||
|
||||
* update sources to Ubuntu-5.11.0-14.15
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Fri, 09 Apr 2021 10:31:19 +0200
|
||||
|
||||
pve-kernel (5.11.7-1) pve pmg; urgency=medium
|
||||
|
||||
* update sources to Ubuntu-5.11.0-12.13
|
||||
|
||||
* update ZFS to 2.0.4
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Thu, 18 Mar 2021 14:07:05 +0100
|
||||
|
||||
pve-kernel (5.11.0-1) pve pmg; urgency=medium
|
||||
|
||||
* update sources to Ubuntu-5.11.0-11.12
|
||||
|
||||
* update ZFS to 2.0.3
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Tue, 02 Mar 2021 13:36:01 +0100
|
||||
|
||||
pve-kernel (5.10.6-1) pve pmg; urgency=medium
|
||||
|
||||
* update sources to Ubuntu-5.10.0-12.13
|
||||
|
||||
* update ZFS to 2.0.1
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Thu, 14 Jan 2021 14:27:01 +0100
|
||||
|
||||
pve-kernel (5.4.78-2) pve pmg; urgency=medium
|
||||
|
||||
* revert commit 552b270b5784dc3 "scsi: be2iscsi: Fix a theoretical leak in
|
||||
beiscsi_create_eqs()" to avoid hangs and kernel oopses on module load
|
||||
|
||||
* cherry-pick patch to allow unprivileged whiteout device creation
|
||||
|
||||
* bump ABI to 5.4.78-2
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Thu, 03 Dec 2020 14:26:17 +0100
|
||||
|
||||
pve-kernel (5.4.78-1) pve pmg; urgency=medium
|
||||
|
||||
* update sources to Ubuntu-5.4.0-57.63
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Mon, 30 Nov 2020 10:57:47 +0100
|
||||
|
||||
pve-kernel (5.4.73-1) pve pmg; urgency=medium
|
||||
|
||||
* update sources to Ubuntu-5.4.0-55.61
|
||||
|
||||
* update ZFS to 0.8.5
|
||||
|
||||
* downgrade unregister_netdev waiting to become free error from emergency to
|
||||
error log
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Mon, 16 Nov 2020 10:52:16 +0100
|
||||
|
||||
pve-kernel (5.4.65-1) pve pmg; urgency=medium
|
||||
|
||||
* update sources to Ubuntu-5.4.0-49.53
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Mon, 21 Sep 2020 15:40:22 +0200
|
||||
|
||||
pve-kernel (5.4.60-2) pve pmg; urgency=medium
|
||||
|
||||
* improve guards against a packet offset calculation overflow for certain raw
|
||||
packet sockets
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Fri, 04 Sep 2020 10:24:50 +0200
|
||||
|
||||
pve-kernel (5.4.60-1) pve pmg; urgency=medium
|
||||
|
||||
* update sources to Ubuntu-5.4.0-46.50
|
||||
|
||||
* bump ABI to 5.4.60-1
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Mon, 31 Aug 2020 10:36:22 +0200
|
||||
|
||||
pve-kernel (5.4.55-1) pve pmg; urgency=medium
|
||||
|
||||
* update sources to Ubuntu-5.4.0-43.47
|
||||
|
||||
* bump ABI to 5.4.55-1
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Mon, 10 Aug 2020 10:26:27 +0200
|
||||
|
||||
pve-kernel (5.4.44-2) pve pmg; urgency=medium
|
||||
|
||||
* fix #2814: config: disable lockdown
|
||||
|
||||
* backport: cgroup: fix cgroup_sk_alloc() for sk_clone_lock()
|
||||
|
||||
* bump ABI to 5.4.44-2
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 01 Jul 2020 16:37:57 +0200
|
||||
|
||||
pve-kernel (5.4.44-1) pve pmg; urgency=medium
|
||||
|
||||
* update sources to Ubuntu-5.4.0-38.42
|
||||
|
||||
* bump ABI to 5.4.44-1
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Fri, 12 Jun 2020 08:18:46 +0200
|
||||
|
||||
pve-kernel (5.4.41-1) pve pmg; urgency=medium
|
||||
|
||||
* update sources to Ubuntu-5.4.0-32.36
|
||||
|
||||
* update ZFS to 0.8.4
|
||||
|
||||
* Revert "scsi: lpfc: Fix broken Credit Recovery after driver load" as a
|
||||
workaround for some LP Fibre Channel SCSI boxes.
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Fri, 15 May 2020 15:06:08 +0200
|
||||
|
||||
pve-kernel (5.4.34-2) pve pmg; urgency=medium
|
||||
|
||||
* backport fix for overlayfs
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Thu, 07 May 2020 10:02:02 +0200
|
||||
|
||||
pve-kernel (5.4.34-1) pve pmg; urgency=medium
|
||||
|
||||
* update to Ubuntu-5.4.0-30.34
|
||||
|
||||
* bump ABI to 5.4.34-1
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 06 May 2020 10:16:59 +0200
|
||||
|
||||
pve-kernel (5.4.30-1) pve pmg; urgency=medium
|
||||
|
||||
* update to Ubuntu-5.4.0-24.28
|
||||
|
||||
* bump ABI to 5.4.30-1
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Fri, 10 Apr 2020 09:12:42 +0200
|
||||
|
||||
pve-kernel (5.4.27-1) pve pmg; urgency=medium
|
||||
|
||||
* update to Ubuntu-5.4.0-19.23
|
||||
|
||||
* bump ABI to 5.4.27-1
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Mon, 23 Mar 2020 15:02:22 +0100
|
||||
|
||||
pve-kernel (5.4.24-1) pve pmg; urgency=medium
|
||||
|
||||
* update to Ubuntu-5.4.0-18.22
|
||||
|
||||
* bump ABI to 5.4.24-1
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Mon, 09 Mar 2020 12:59:46 +0100
|
||||
|
||||
pve-kernel (5.4.22-1) pve pmg; urgency=medium
|
||||
|
||||
* Initial Ubuntu Focal Kernel build, based on 5.4
|
||||
|
||||
* update sources to Ubuntu-5.4.0-17.21
|
||||
|
||||
* bump ABI to 5.4.22-1
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Mon, 02 Mar 2020 15:49:45 +0100
|
||||
|
||||
pve-kernel (5.3.18-2) pve pmg; urgency=medium
|
||||
|
||||
* bump ABI to 5.3.18-2
|
||||
|
||||
* update to Ubuntu-5.3.0-41.33
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Sat, 15 Feb 2020 15:11:52 +0100
|
||||
|
||||
pve-kernel (5.3.18-1) pve pmg; urgency=medium
|
||||
|
||||
* bump ABI to 5.3.18-1
|
||||
|
||||
* update sources to Ubuntu-5.3.0-40.32
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 05 Feb 2020 11:49:10 +0100
|
||||
|
||||
pve-kernel (5.3.13-3) pve pmg; urgency=medium
|
||||
|
||||
* backport fixes for information leak within a KVM guest
|
||||
|
||||
* bump ABI to 5.3.13-3
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Fri, 31 Jan 2020 08:17:11 +0100
|
||||
|
||||
pve-kernel (5.3.13-2) pve pmg; urgency=medium
|
||||
|
||||
* update sources to Ubuntu-5.3.0-29.31
|
||||
|
||||
* update ZFS to 0.8.3
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Fri, 24 Jan 2020 09:49:36 +0100
|
||||
|
||||
pve-kernel (5.3.13-1) pve pmg; urgency=medium
|
||||
|
||||
* bump ABI to 5.3.13-1
|
||||
|
||||
* update sources to Ubuntu-5.3.0-25.27
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Thu, 05 Dec 2019 07:18:14 +0100
|
||||
|
||||
pve-kernel (5.3.10-1) pve pmg; urgency=medium
|
||||
|
||||
* bump ABI to 5.3.10-1
|
||||
|
||||
* update sources to Ubuntu-5.3.0-24.26
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Thu, 14 Nov 2019 10:43:13 +0100
|
||||
|
||||
pve-kernel (5.3.7-1) pve pmg; urgency=medium
|
||||
|
||||
* update sources to Ubuntu-5.3.0-20.21
|
||||
|
||||
* bump ABI to 5.3.7-1
|
||||
|
||||
* update ZFS submodule to include FPU/SIMD fixes
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 23 Oct 2019 19:00:21 +0200
|
||||
|
||||
pve-kernel (5.3.1-1) pve pmg; urgency=medium
|
||||
|
||||
* Initial Ubuntu Eoan Kernel build, based on 5.3
|
||||
|
||||
* update sources to Ubuntu-5.3.0-16.17
|
||||
|
||||
* bump ABI to 5.3.0-1
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Tue, 01 Oct 2019 18:57:21 +0200
|
||||
|
||||
pve-kernel (5.0.21-7) pve pmg; urgency=medium
|
||||
|
||||
* update ZFS to 0.8.2
|
||||
|
||||
* bump ABI to 5.0.21-3
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Mon, 30 Sep 2019 09:11:02 +0200
|
||||
|
||||
pve-kernel (5.0.21-6) pve pmg; urgency=medium
|
||||
|
||||
* backport new FPU register copy helpers
|
||||
|
||||
* ZFS SIMD: FPU register save/restore is also required on 5.0 kernels
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Fri, 27 Sep 2019 17:17:02 +0200
|
||||
|
||||
pve-kernel (5.0.21-4) pve pmg; urgency=medium
|
||||
|
||||
* update to Ubuntu-5.0.0-30.32
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Fri, 20 Sep 2019 11:55:17 +0200
|
||||
|
||||
pve-kernel (5.0.21-3) pve pmg; urgency=medium
|
||||
|
||||
* update sources to Ubuntu-5.0.0-28.30
|
||||
|
||||
* bump ABI to 5.0.21-2
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Thu, 05 Sep 2019 13:56:01 +0200
|
||||
|
||||
pve-kernel (5.0.21-2) pve pmg; urgency=medium
|
||||
|
||||
* update sources to Ubuntu-5.0.0-27.28
|
||||
|
||||
* backport vhost_net: disable zerocopy by default
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 28 Aug 2019 15:12:18 +0200
|
||||
|
||||
pve-kernel (5.0.21-1) pve pmg; urgency=medium
|
||||
|
||||
* update sources to Ubuntu-5.0.0-26.27
|
||||
|
||||
* update ZFS to include SIMD compat patch for newer Kernel
|
||||
|
||||
* bump ABI to 5.0.21-1
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Tue, 20 Aug 2019 17:16:32 +0200
|
||||
|
||||
pve-kernel (5.0.18-3) pve pmg; urgency=medium
|
||||
|
||||
* update sources to Ubuntu-5.0.0-25.26
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Thu, 8 Aug 2019 09:05:29 +0200
|
||||
|
||||
pve-kernel (5.0.18-2) pve pmg; urgency=medium
|
||||
|
||||
* update sources to Ubuntu-5.0.0-24.25
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Fri, 2 Aug 2019 14:51:00 +0200
|
||||
|
||||
pve-kernel (5.0.18-1) pve pmg; urgency=medium
|
||||
|
||||
* update sources to Ubuntu-5.0.0-22.23
|
||||
|
||||
* bump ABI to 5.0.18-1
|
||||
|
||||
* backport "rbd: don't assert on writes to snapshots" to fix issues with
|
||||
DISCARD operations on Ceph RBD backed block devices during a snapshot
|
||||
operation.
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 24 Jul 2019 08:13:30 +0200
|
||||
|
||||
pve-kernel (5.0.15-1) pve pmg; urgency=medium
|
||||
|
||||
* update to Ubuntu-5.0.0-21.22
|
||||
|
||||
* bump ABI to 5.0.15-1
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 03 Jul 2019 10:51:57 +0200
|
||||
|
||||
pve-kernel (5.0.12-1) pve pmg; urgency=medium
|
||||
|
||||
* update sources to Ubuntu-5.0.0-18.19
|
||||
|
||||
* update to ZFS 0.8.1
|
||||
|
||||
* revert KVM nested option default back to off
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Sat, 15 Jun 2019 11:39:18 +0200
|
||||
|
||||
pve-kernel (5.0.8-2) pve pmg; urgency=medium
|
||||
|
||||
* update to ZFS 0.8.0
|
||||
|
||||
* bump ABI to 5.0.8-2
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Fri, 24 May 2019 20:38:04 +0200
|
||||
|
||||
pve-kernel (5.0.8-1) pve pmg; urgency=medium
|
||||
|
||||
* update to Ubuntu-5.0.0-16.17
|
||||
|
||||
* bump ABI to 5.0.8-1
|
||||
|
||||
* build for Debian Buster / PVE/PMG 6
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 22 May 2019 14:06:59 +0200
|
||||
|
||||
pve-kernel (4.15.18-40) unstable; urgency=medium
|
||||
|
||||
* update to Ubuntu-4.15.0-51.55
|
||||
|
||||
Vendored
+43
-18
@@ -8,9 +8,11 @@ Build-Depends: asciidoc-base,
|
||||
bison,
|
||||
cpio,
|
||||
debhelper (>= 10~),
|
||||
dh-python,
|
||||
dwarves,
|
||||
file,
|
||||
flex,
|
||||
gcc-6 (>= 6.3.0-18+deb9u1),
|
||||
gcc (>= 8.3.0-6),
|
||||
git,
|
||||
kmod,
|
||||
libdw-dev,
|
||||
@@ -22,14 +24,16 @@ Build-Depends: asciidoc-base,
|
||||
libssl-dev,
|
||||
libtool,
|
||||
lintian,
|
||||
perl-modules,
|
||||
python-minimal,
|
||||
lz4,
|
||||
python3-dev,
|
||||
python3-minimal,
|
||||
rsync,
|
||||
sed,
|
||||
tar,
|
||||
sphinx-common,
|
||||
xmlto,
|
||||
zlib1g-dev,
|
||||
zstd,
|
||||
Build-Conflicts: pve-headers-@KVNAME@,
|
||||
Standards-Version: 4.6.2
|
||||
Vcs-Git: git://git.proxmox.com/git/pve-kernel
|
||||
Vcs-Browser: https://git.proxmox.com/?p=pve-kernel.git
|
||||
|
||||
@@ -37,9 +41,7 @@ Package: linux-tools-@KVMAJMIN@
|
||||
Architecture: any
|
||||
Section: devel
|
||||
Priority: optional
|
||||
Depends: linux-base,
|
||||
${misc:Depends},
|
||||
${shlibs:Depends},
|
||||
Depends: linux-base, ${misc:Depends}, ${shlibs:Depends},
|
||||
Description: Linux kernel version specific tools for version @KVMAJMIN@
|
||||
This package provides the architecture dependent parts for kernel
|
||||
version locked tools (such as perf and x86_energy_perf_policy)
|
||||
@@ -48,21 +50,44 @@ Package: pve-headers-@KVNAME@
|
||||
Section: devel
|
||||
Priority: optional
|
||||
Architecture: any
|
||||
Provides: linux-headers,
|
||||
linux-headers-2.6,
|
||||
Depends: coreutils | fileutils (>= 4.0),
|
||||
Description: The Proxmox PVE Kernel Headers
|
||||
Provides: linux-headers-@KVNAME@-amd64,
|
||||
Depends: ${misc:Depends},
|
||||
Description: Proxmox Kernel Headers
|
||||
This package contains the linux kernel headers
|
||||
|
||||
Package: pve-kernel-@KVNAME@
|
||||
Section: admin
|
||||
Priority: optional
|
||||
Architecture: any
|
||||
Provides: linux-image,
|
||||
linux-image-2.6,
|
||||
Provides: linux-image-@KVNAME@-amd64,
|
||||
Suggests: pve-firmware,
|
||||
Depends: busybox,
|
||||
grub-pc | grub-efi-amd64 | grub-efi-ia32 | grub-efi-arm64,
|
||||
initramfs-tools,
|
||||
Description: The Proxmox PVE Kernel Image
|
||||
Depends: busybox, initramfs-tools | linux-initramfs-tool, ${misc:Depends},
|
||||
Recommends: grub-pc | grub-efi-amd64 | grub-efi-ia32 | grub-efi-arm64,
|
||||
Description: Proxmox Kernel Image
|
||||
This package contains the linux kernel and initial ramdisk used for booting
|
||||
|
||||
Package: pve-kernel-@KVNAME@-dbgsym
|
||||
Architecture: any
|
||||
Provides: linux-debug,
|
||||
Section: devel
|
||||
Priority: optional
|
||||
Build-Profiles: <pkg.pve-kernel.debug>
|
||||
Depends: ${misc:Depends},
|
||||
Description: Proxmox Kernel debug image
|
||||
This package provides the kernel debug image for version @KVNAME@. The debug
|
||||
kernel image contained in this package is NOT meant to boot from - it is
|
||||
uncompressed, and unstripped, and suitable for use with crash/kdump-tools/..
|
||||
to analyze kernel crashes. This package also contains the pve-kernel modules
|
||||
in their unstripped version.
|
||||
|
||||
Package: pve-kernel-libc-dev
|
||||
Section: devel
|
||||
Priority: optional
|
||||
Architecture: any
|
||||
Provides: linux-libc-dev (=${binary:Version}),
|
||||
Conflicts: linux-libc-dev,
|
||||
Replaces: linux-libc-dev,
|
||||
Depends: ${misc:Depends},
|
||||
Description: Linux support headers for userspace development
|
||||
This package provides userspaces headers from the Linux kernel. These headers
|
||||
are used by the installed headers for GNU libc and other system libraries.
|
||||
|
||||
Vendored
+3
-6
@@ -1,11 +1,8 @@
|
||||
This is a prepackaged version of the Linux kernel binary image.
|
||||
|
||||
This package was put together by Proxmox Server
|
||||
Solutions GmbH <support@proxmox.com>.
|
||||
|
||||
We use the RHEL7 kernel sources, available from:
|
||||
|
||||
ftp://ftp.redhat.com/redhat/rhel/
|
||||
For the packaging and all files in the debian/ folder consider:
|
||||
Copyright (C) 2007-2022 Proxmox Server Solutions GmbH
|
||||
Licensed under the AGPL-3.0-or-later
|
||||
|
||||
Linux is copyrighted by Linus Torvalds and others.
|
||||
|
||||
|
||||
Vendored
+160
-112
@@ -9,17 +9,23 @@ BUILD_DIR=$(shell pwd)
|
||||
|
||||
include /usr/share/dpkg/default.mk
|
||||
include debian/rules.d/env.mk
|
||||
include debian/rules.d/${DEB_BUILD_ARCH}.mk
|
||||
include debian/rules.d/$(DEB_BUILD_ARCH).mk
|
||||
|
||||
MAKEFLAGS += $(subst parallel=,-j,$(filter parallel=%,${DEB_BUILD_OPTIONS}))
|
||||
|
||||
CHANGELOG_DATE:=$(shell dpkg-parsechangelog -SDate)
|
||||
CHANGELOG_DATE_UTC_ISO := $(shell date -u -d '$(CHANGELOG_DATE)' +%Y-%m-%dT%H:%MZ)
|
||||
|
||||
PVE_KERNEL_PKG=pve-kernel-${KVNAME}
|
||||
PVE_HEADER_PKG=pve-headers-${KVNAME}
|
||||
LINUX_TOOLS_PKG=linux-tools-${KERNEL_MAJMIN}
|
||||
KERNEL_SRC_COPY=${KERNEL_SRC}_tmp
|
||||
PVE_KERNEL_PKG=pve-kernel-$(KVNAME)
|
||||
PVE_DEBUG_KERNEL_PKG=pve-kernel-$(KVNAME)-dbgsym
|
||||
PVE_HEADER_PKG=pve-headers-$(KVNAME)
|
||||
PVE_USR_HEADER_PKG=pve-kernel-libc-dev
|
||||
LINUX_TOOLS_PKG=linux-tools-$(KERNEL_MAJMIN)
|
||||
KERNEL_SRC_COPY=$(KERNEL_SRC)_tmp
|
||||
|
||||
# TODO: split for archs, move to files?
|
||||
PVE_CONFIG_OPTS= \
|
||||
--set-val INET_TABLE_PERTURB_ORDER 16 \
|
||||
-m INTEL_MEI_WDT \
|
||||
-d CONFIG_SND_PCM_OSS \
|
||||
-e CONFIG_TRANSPARENT_HUGEPAGE_MADVISE \
|
||||
@@ -27,22 +33,45 @@ PVE_CONFIG_OPTS= \
|
||||
-m CONFIG_CEPH_FS \
|
||||
-m CONFIG_BLK_DEV_NBD \
|
||||
-m CONFIG_BLK_DEV_RBD \
|
||||
-d CONFIG_SND_PCSP \
|
||||
-m CONFIG_BCACHE \
|
||||
-m CONFIG_JFS_FS \
|
||||
-m CONFIG_HFS_FS \
|
||||
-m CONFIG_HFSPLUS_FS \
|
||||
-e CIFS_SMB_DIRECT \
|
||||
-e CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU \
|
||||
-e CONFIG_BRIDGE \
|
||||
-e CONFIG_BRIDGE_NETFILTER \
|
||||
-e CONFIG_BLK_DEV_SD \
|
||||
-e CONFIG_BLK_DEV_SR \
|
||||
-e CONFIG_BLK_DEV_DM \
|
||||
-e CONFIG_BLK_DEV_NVME \
|
||||
-m CONFIG_BLK_DEV_NVME \
|
||||
-e CONFIG_NLS_ISO8859_1 \
|
||||
-d CONFIG_INPUT_EVBUG \
|
||||
-d CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND \
|
||||
-d CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL \
|
||||
-e CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE \
|
||||
-e CONFIG_SYSFB_SIMPLEFB \
|
||||
-e CONFIG_DRM_SIMPLEDRM \
|
||||
-d CONFIG_MODULE_SIG \
|
||||
-d CONFIG_MEMCG_DISABLED \
|
||||
-e CONFIG_MEMCG_SWAP_ENABLED \
|
||||
-e CONFIG_HYPERV \
|
||||
-m CONFIG_VFIO_IOMMU_TYPE1 \
|
||||
-m CONFIG_VFIO_VIRQFD \
|
||||
-m CONFIG_VFIO \
|
||||
-m CONFIG_VFIO_PCI \
|
||||
-m CONFIG_USB_XHCI_HCD \
|
||||
-m CONFIG_USB_XHCI_PCI \
|
||||
-m CONFIG_USB_EHCI_HCD \
|
||||
-m CONFIG_USB_EHCI_PCI \
|
||||
-m CONFIG_USB_EHCI_HCD_PLATFORM \
|
||||
-m CONFIG_USB_OHCI_HCD \
|
||||
-m CONFIG_USB_OHCI_HCD_PCI \
|
||||
-m CONFIG_USB_OHCI_HCD_PLATFORM \
|
||||
-d CONFIG_USB_OHCI_HCD_SSB \
|
||||
-m CONFIG_USB_UHCI_HCD \
|
||||
-d CONFIG_USB_SL811_HCD_ISO \
|
||||
-e CONFIG_MEMCG_KMEM \
|
||||
-d CONFIG_DEFAULT_CFQ \
|
||||
-e CONFIG_DEFAULT_DEADLINE \
|
||||
@@ -53,22 +82,28 @@ PVE_CONFIG_OPTS= \
|
||||
-d CONFIG_UNWINDER_ORC \
|
||||
-d CONFIG_UNWINDER_GUESS \
|
||||
-e CONFIG_UNWINDER_FRAME_POINTER \
|
||||
--set-str CONFIG_SYSTEM_TRUSTED_KEYS ""\
|
||||
--set-str CONFIG_SYSTEM_REVOCATION_KEYS ""\
|
||||
-d CONFIG_SECURITY_LOCKDOWN_LSM \
|
||||
-d CONFIG_SECURITY_LOCKDOWN_LSM_EARLY \
|
||||
--set-str CONFIG_LSM yama,integrity,apparmor \
|
||||
-d MICROCODE_LATE_LOADING \
|
||||
-e CONFIG_PAGE_TABLE_ISOLATION
|
||||
|
||||
debian/control: $(wildcard debian/*.in)
|
||||
sed -e 's/@@KVNAME@@/${KVNAME}/g' < debian/pve-kernel.prerm.in > debian/${PVE_KERNEL_PKG}.prerm
|
||||
sed -e 's/@@KVNAME@@/${KVNAME}/g' < debian/pve-kernel.postrm.in > debian/${PVE_KERNEL_PKG}.postrm
|
||||
sed -e 's/@@KVNAME@@/${KVNAME}/g' < debian/pve-kernel.postinst.in > debian/${PVE_KERNEL_PKG}.postinst
|
||||
sed -e 's/@@KVNAME@@/${KVNAME}/g' < debian/pve-headers.postinst.in > debian/${PVE_HEADER_PKG}.postinst
|
||||
chmod +x debian/${PVE_KERNEL_PKG}.prerm
|
||||
chmod +x debian/${PVE_KERNEL_PKG}.postrm
|
||||
chmod +x debian/${PVE_KERNEL_PKG}.postinst
|
||||
chmod +x debian/${PVE_HEADER_PKG}.postinst
|
||||
sed -e 's/@KVNAME@/${KVNAME}/g' -e 's/@KVMAJMIN@/${KERNEL_MAJMIN}/g' < debian/control.in > debian/control
|
||||
sed -e 's/@@KVNAME@@/$(KVNAME)/g' < debian/pve-kernel.prerm.in > debian/$(PVE_KERNEL_PKG).prerm
|
||||
sed -e 's/@@KVNAME@@/$(KVNAME)/g' < debian/pve-kernel.postrm.in > debian/$(PVE_KERNEL_PKG).postrm
|
||||
sed -e 's/@@KVNAME@@/$(KVNAME)/g' < debian/pve-kernel.postinst.in > debian/$(PVE_KERNEL_PKG).postinst
|
||||
sed -e 's/@@KVNAME@@/$(KVNAME)/g' < debian/pve-headers.postinst.in > debian/$(PVE_HEADER_PKG).postinst
|
||||
chmod +x debian/$(PVE_KERNEL_PKG).prerm
|
||||
chmod +x debian/$(PVE_KERNEL_PKG).postrm
|
||||
chmod +x debian/$(PVE_KERNEL_PKG).postinst
|
||||
chmod +x debian/$(PVE_HEADER_PKG).postinst
|
||||
sed -e 's/@KVNAME@/$(KVNAME)/g' -e 's/@KVMAJMIN@/$(KERNEL_MAJMIN)/g' < debian/control.in > debian/control
|
||||
|
||||
build: .compile_mark .tools_compile_mark .modules_compile_mark
|
||||
|
||||
install: .install_mark .tools_install_mark .headers_install_mark
|
||||
install: .install_mark .tools_install_mark .headers_install_mark .usr_headers_install_mark
|
||||
dh_installdocs -A debian/copyright debian/SOURCE
|
||||
dh_installchangelogs
|
||||
dh_installman
|
||||
@@ -78,7 +113,7 @@ install: .install_mark .tools_install_mark .headers_install_mark
|
||||
|
||||
binary: install
|
||||
debian/rules fwcheck abicheck
|
||||
dh_strip -N${PVE_HEADER_PKG}
|
||||
dh_strip -N$(PVE_HEADER_PKG) -N$(PVE_USR_HEADER_PKG)
|
||||
dh_makeshlibs
|
||||
dh_shlibdeps
|
||||
dh_installdeb
|
||||
@@ -87,72 +122,82 @@ binary: install
|
||||
dh_builddeb
|
||||
|
||||
.config_mark:
|
||||
cd ${KERNEL_SRC}; scripts/config ${PVE_CONFIG_OPTS}
|
||||
${MAKE} -C ${KERNEL_SRC} oldconfig
|
||||
cd $(KERNEL_SRC); scripts/config $(PVE_CONFIG_OPTS)
|
||||
$(MAKE) -C $(KERNEL_SRC) oldconfig
|
||||
# copy to allow building in parallel to kernel/module compilation without interference
|
||||
rm -rf $(KERNEL_SRC_COPY)
|
||||
cp -ar $(KERNEL_SRC) $(KERNEL_SRC_COPY)
|
||||
touch $@
|
||||
|
||||
.compile_mark: .config_mark
|
||||
${MAKE} -C ${KERNEL_SRC} KBUILD_BUILD_VERSION_TIMESTAMP="PVE ${DEB_VERSION} (${CHANGELOG_DATE})"
|
||||
$(MAKE) -C $(KERNEL_SRC) KBUILD_BUILD_VERSION_TIMESTAMP="PVE $(DEB_VERSION) ($(CHANGELOG_DATE_UTC_ISO))"
|
||||
touch $@
|
||||
|
||||
.install_mark: .compile_mark .modules_compile_mark
|
||||
rm -rf debian/${PVE_KERNEL_PKG}
|
||||
mkdir -p debian/${PVE_KERNEL_PKG}/lib/modules/${KVNAME}
|
||||
mkdir debian/${PVE_KERNEL_PKG}/boot
|
||||
install -m 644 ${KERNEL_SRC}/.config debian/${PVE_KERNEL_PKG}/boot/config-${KVNAME}
|
||||
install -m 644 ${KERNEL_SRC}/System.map debian/${PVE_KERNEL_PKG}/boot/System.map-${KVNAME}
|
||||
install -m 644 ${KERNEL_SRC}/${KERNEL_IMAGE_PATH} debian/${PVE_KERNEL_PKG}/boot/${KERNEL_INSTALL_FILE}-${KVNAME}
|
||||
${MAKE} -C ${KERNEL_SRC} INSTALL_MOD_PATH=${BUILD_DIR}/debian/${PVE_KERNEL_PKG}/ modules_install
|
||||
## install latest ibg driver
|
||||
install -m 644 ${MODULES}/igb.ko debian/${PVE_KERNEL_PKG}/lib/modules/${KVNAME}/kernel/drivers/net/ethernet/intel/igb/
|
||||
# install latest e1000e driver
|
||||
install -m 644 ${MODULES}/e1000e.ko debian/${PVE_KERNEL_PKG}/lib/modules/${KVNAME}/kernel/drivers/net/ethernet/intel/e1000e/
|
||||
rm -rf debian/$(PVE_KERNEL_PKG)
|
||||
mkdir -p debian/$(PVE_KERNEL_PKG)/lib/modules/$(KVNAME)
|
||||
mkdir debian/$(PVE_KERNEL_PKG)/boot
|
||||
install -m 644 $(KERNEL_SRC)/.config debian/$(PVE_KERNEL_PKG)/boot/config-$(KVNAME)
|
||||
install -m 644 $(KERNEL_SRC)/System.map debian/$(PVE_KERNEL_PKG)/boot/System.map-$(KVNAME)
|
||||
install -m 644 $(KERNEL_SRC)/$(KERNEL_IMAGE_PATH) debian/$(PVE_KERNEL_PKG)/boot/$(KERNEL_INSTALL_FILE)-$(KVNAME)
|
||||
$(MAKE) -C $(KERNEL_SRC) INSTALL_MOD_PATH=$(BUILD_DIR)/debian/$(PVE_KERNEL_PKG)/ modules_install
|
||||
# install zfs drivers
|
||||
install -d -m 0755 debian/${PVE_KERNEL_PKG}/lib/modules/${KVNAME}/zfs
|
||||
install -m 644 $(addprefix ${MODULES}/,spl.ko splat.ko zfs.ko zavl.ko znvpair.ko zunicode.ko zcommon.ko zpios.ko icp.ko) debian/${PVE_KERNEL_PKG}/lib/modules/${KVNAME}/zfs
|
||||
install -d -m 0755 debian/$(PVE_KERNEL_PKG)/lib/modules/$(KVNAME)/zfs
|
||||
install -m 644 $(addprefix $(MODULES)/,zfs.ko zavl.ko znvpair.ko zunicode.ko zcommon.ko icp.ko zlua.ko spl.ko zzstd.ko) debian/$(PVE_KERNEL_PKG)/lib/modules/$(KVNAME)/zfs
|
||||
# remove firmware
|
||||
rm -rf debian/${PVE_KERNEL_PKG}/lib/firmware
|
||||
rm -rf debian/$(PVE_KERNEL_PKG)/lib/firmware
|
||||
|
||||
ifeq ($(filter pkg.pve-kernel.debug,$(DEB_BUILD_PROFILES)),)
|
||||
echo "'pkg.pve-kernel.debug' build profile disabled, skipping -dbgsym creation"
|
||||
else
|
||||
echo "'pkg.pve-kernel.debug' build profile enabled, creating -dbgsym contents"
|
||||
mkdir -p debian/$(PVE_DEBUG_KERNEL_PKG)/usr/lib/debug/lib/modules/$(KVNAME)
|
||||
mkdir debian/$(PVE_DEBUG_KERNEL_PKG)/usr/lib/debug/boot
|
||||
install -m 644 $(KERNEL_SRC)/vmlinux debian/$(PVE_DEBUG_KERNEL_PKG)/usr/lib/debug/boot/vmlinux-$(KVNAME)
|
||||
cp -r debian/$(PVE_KERNEL_PKG)/lib/modules/$(KVNAME) debian/$(PVE_DEBUG_KERNEL_PKG)/usr/lib/debug/lib/modules/
|
||||
rm -f debian/$(PVE_DEBUG_KERNEL_PKG)/usr/lib/debug/lib/modules/$(KVNAME)/source
|
||||
rm -f debian/$(PVE_DEBUG_KERNEL_PKG)/usr/lib/debug/lib/modules/$(KVNAME)/build
|
||||
rm -f debian/$(PVE_DEBUG_KERNEL_PKG)/usr/lib/debug/lib/modules/$(KVNAME)/modules.*
|
||||
endif
|
||||
|
||||
# strip debug info
|
||||
find debian/${PVE_KERNEL_PKG}/lib/modules -name \*.ko -print | while read f ; do strip --strip-debug "$$f"; done
|
||||
find debian/$(PVE_KERNEL_PKG)/lib/modules -name \*.ko -print | while read f ; do strip --strip-debug "$$f"; done
|
||||
# finalize
|
||||
/sbin/depmod -b debian/${PVE_KERNEL_PKG}/ ${KVNAME}
|
||||
/sbin/depmod -b debian/$(PVE_KERNEL_PKG)/ $(KVNAME)
|
||||
# Autogenerate blacklist for watchdog devices (see README)
|
||||
install -m 0755 -d debian/${PVE_KERNEL_PKG}/lib/modprobe.d
|
||||
ls debian/${PVE_KERNEL_PKG}/lib/modules/${KVNAME}/kernel/drivers/watchdog/ > watchdog-blacklist.tmp
|
||||
install -m 0755 -d debian/$(PVE_KERNEL_PKG)/lib/modprobe.d
|
||||
ls debian/$(PVE_KERNEL_PKG)/lib/modules/$(KVNAME)/kernel/drivers/watchdog/ > watchdog-blacklist.tmp
|
||||
echo ipmi_watchdog.ko >> watchdog-blacklist.tmp
|
||||
cat watchdog-blacklist.tmp|sed -e 's/^/blacklist /' -e 's/.ko$$//'|sort -u > debian/${PVE_KERNEL_PKG}/lib/modprobe.d/blacklist_${PVE_KERNEL_PKG}.conf
|
||||
rm -f debian/${PVE_KERNEL_PKG}/lib/modules/${KVNAME}/source
|
||||
rm -f debian/${PVE_KERNEL_PKG}/lib/modules/${KVNAME}/build
|
||||
cat watchdog-blacklist.tmp|sed -e 's/^/blacklist /' -e 's/.ko$$//'|sort -u > debian/$(PVE_KERNEL_PKG)/lib/modprobe.d/blacklist_$(PVE_KERNEL_PKG).conf
|
||||
rm -f debian/$(PVE_KERNEL_PKG)/lib/modules/$(KVNAME)/source
|
||||
rm -f debian/$(PVE_KERNEL_PKG)/lib/modules/$(KVNAME)/build
|
||||
touch $@
|
||||
|
||||
.tools_compile_mark: .compile_mark
|
||||
${MAKE} -C ${KERNEL_SRC}/tools/perf prefix=/usr HAVE_NO_LIBBFD=1 HAVE_CPLUS_DEMANGLE_SUPPORT=1 NO_LIBPYTHON=1 NO_LIBPERL=1 NO_LIBCRYPTO=1 PYTHON=python2.7
|
||||
$(MAKE) -C $(KERNEL_SRC)/tools/perf prefix=/usr HAVE_NO_LIBBFD=1 HAVE_CPLUS_DEMANGLE_SUPPORT=1 NO_LIBPYTHON=1 NO_LIBPERL=1 NO_LIBCRYPTO=1 PYTHON=python3
|
||||
echo "checking GPL-2 only perf binary for library linkage with incompatible licenses.."
|
||||
! ldd ${KERNEL_SRC}/tools/perf/perf | grep -q -E '\blibbfd'
|
||||
! ldd ${KERNEL_SRC}/tools/perf/perf | grep -q -E '\blibcrypto'
|
||||
${MAKE} -C ${KERNEL_SRC}/tools/perf man
|
||||
! ldd $(KERNEL_SRC)/tools/perf/perf | grep -q -E '\blibbfd'
|
||||
! ldd $(KERNEL_SRC)/tools/perf/perf | grep -q -E '\blibcrypto'
|
||||
$(MAKE) -C $(KERNEL_SRC)/tools/perf man
|
||||
touch $@
|
||||
|
||||
.tools_install_mark: .tools_compile_mark
|
||||
rm -rf debian/${LINUX_TOOLS_PKG}
|
||||
mkdir -p debian/${LINUX_TOOLS_PKG}/usr/bin
|
||||
mkdir -p debian/${LINUX_TOOLS_PKG}/usr/share/man/man1
|
||||
install -m 755 ${BUILD_DIR}/${KERNEL_SRC}/tools/perf/perf debian/${LINUX_TOOLS_PKG}/usr/bin/perf_$(KERNEL_MAJMIN)
|
||||
for i in ${BUILD_DIR}/${KERNEL_SRC}/tools/perf/Documentation/*.1; do \
|
||||
rm -rf debian/$(LINUX_TOOLS_PKG)
|
||||
mkdir -p debian/$(LINUX_TOOLS_PKG)/usr/bin
|
||||
mkdir -p debian/$(LINUX_TOOLS_PKG)/usr/share/man/man1
|
||||
install -m 755 $(BUILD_DIR)/$(KERNEL_SRC)/tools/perf/perf debian/$(LINUX_TOOLS_PKG)/usr/bin/perf_$(KERNEL_MAJMIN)
|
||||
for i in $(BUILD_DIR)/$(KERNEL_SRC)/tools/perf/Documentation/*.1; do \
|
||||
fname="$${i##*/}"; manname="$${fname%.1}"; \
|
||||
install -m644 "$$i" "debian/${LINUX_TOOLS_PKG}/usr/share/man/man1/$${manname}_$(KERNEL_MAJMIN).1"; \
|
||||
install -m644 "$$i" "debian/$(LINUX_TOOLS_PKG)/usr/share/man/man1/$${manname}_$(KERNEL_MAJMIN).1"; \
|
||||
done
|
||||
touch $@
|
||||
|
||||
.headers_prepare_mark: .config_mark
|
||||
rm -rf debian/${PVE_HEADER_PKG}
|
||||
mkdir -p debian/${PVE_HEADER_PKG}/usr/src/linux-headers-${KVNAME}
|
||||
install -m 0644 ${KERNEL_SRC}/.config debian/${PVE_HEADER_PKG}/usr/src/linux-headers-${KVNAME}
|
||||
# copy to allow building in parallel to kernel/module compilation without interference
|
||||
rm -rf ${KERNEL_SRC_COPY}
|
||||
cp -ar ${KERNEL_SRC} ${KERNEL_SRC_COPY}
|
||||
make -C ${KERNEL_SRC_COPY} mrproper
|
||||
cd ${KERNEL_SRC_COPY}; find . -path './debian/*' -prune \
|
||||
rm -rf debian/$(PVE_HEADER_PKG)
|
||||
mkdir -p debian/$(PVE_HEADER_PKG)/usr/src/linux-headers-$(KVNAME)
|
||||
install -m 0644 $(KERNEL_SRC)/.config debian/$(PVE_HEADER_PKG)/usr/src/linux-headers-$(KVNAME)
|
||||
make -C $(KERNEL_SRC_COPY) mrproper
|
||||
cd $(KERNEL_SRC_COPY); find . -path './debian/*' -prune \
|
||||
-o -path './include/*' -prune \
|
||||
-o -path './Documentation' -prune \
|
||||
-o -path './scripts' -prune \
|
||||
@@ -164,84 +209,87 @@ binary: install
|
||||
-o -name '*.sh' \
|
||||
-o -name '*.pl' \
|
||||
\) \
|
||||
-print | cpio -pd --preserve-modification-time ${BUILD_DIR}/debian/${PVE_HEADER_PKG}/usr/src/linux-headers-${KVNAME}
|
||||
cd ${KERNEL_SRC_COPY}; cp -a include scripts ${BUILD_DIR}/debian/${PVE_HEADER_PKG}/usr/src/linux-headers-${KVNAME}
|
||||
cd ${KERNEL_SRC_COPY}; \
|
||||
-print | cpio -pd --preserve-modification-time $(BUILD_DIR)/debian/$(PVE_HEADER_PKG)/usr/src/linux-headers-$(KVNAME)
|
||||
cd $(KERNEL_SRC_COPY); \
|
||||
( \
|
||||
find arch/${KERNEL_HEADER_ARCH} -name include -type d -print | \
|
||||
find arch/$(KERNEL_HEADER_ARCH) -name include -type d -print | \
|
||||
xargs -n1 -i: find : -type f \
|
||||
) | \
|
||||
cpio -pd --preserve-modification-time ${BUILD_DIR}/debian/${PVE_HEADER_PKG}/usr/src/linux-headers-${KVNAME}
|
||||
cpio -pd --preserve-modification-time $(BUILD_DIR)/debian/$(PVE_HEADER_PKG)/usr/src/linux-headers-$(KVNAME)
|
||||
touch $@
|
||||
|
||||
.headers_compile_mark: .headers_prepare_mark
|
||||
# set output to subdir of source to reduce number of hardcoded paths in output files
|
||||
rm -rf ${BUILD_DIR}/${KERNEL_SRC_COPY}/${PVE_HEADER_PKG}
|
||||
mkdir -p ${BUILD_DIR}/${KERNEL_SRC_COPY}/${PVE_HEADER_PKG}
|
||||
cp ${KERNEL_SRC}/.config ${BUILD_DIR}/${KERNEL_SRC_COPY}/${PVE_HEADER_PKG}/.config
|
||||
${MAKE} -C ${KERNEL_SRC_COPY} O=${BUILD_DIR}/${KERNEL_SRC_COPY}/${PVE_HEADER_PKG} -j1 silentoldconfig prepare scripts
|
||||
find ${BUILD_DIR}/${KERNEL_SRC_COPY}/${PVE_HEADER_PKG} -name \*.o.ur-\* | xargs rm -f
|
||||
rsync --ignore-existing -r -v -a $(addprefix ${BUILD_DIR}/${KERNEL_SRC_COPY}/${PVE_HEADER_PKG}/,arch include kernel scripts tools) ${BUILD_DIR}/debian/${PVE_HEADER_PKG}/usr/src/linux-headers-${KVNAME}/
|
||||
rm -rf ${BUILD_DIR}/${KERNEL_SRC_COPY}
|
||||
rm -rf $(BUILD_DIR)/$(KERNEL_SRC_COPY)/$(PVE_HEADER_PKG)
|
||||
mkdir -p $(BUILD_DIR)/$(KERNEL_SRC_COPY)/$(PVE_HEADER_PKG)
|
||||
cp $(KERNEL_SRC)/.config $(BUILD_DIR)/$(KERNEL_SRC_COPY)/$(PVE_HEADER_PKG)/.config
|
||||
$(MAKE) -C $(KERNEL_SRC_COPY) O=$(BUILD_DIR)/$(KERNEL_SRC_COPY)/$(PVE_HEADER_PKG) -j1 syncconfig modules_prepare prepare scripts
|
||||
cd $(KERNEL_SRC_COPY); cp -a include scripts $(BUILD_DIR)/debian/$(PVE_HEADER_PKG)/usr/src/linux-headers-$(KVNAME)
|
||||
find $(BUILD_DIR)/$(KERNEL_SRC_COPY)/$(PVE_HEADER_PKG) -name \*.o.ur-\* -o -name '*.cmd' | xargs rm -f
|
||||
rsync --ignore-existing -r -v -a $(addprefix $(BUILD_DIR)/$(KERNEL_SRC_COPY)/$(PVE_HEADER_PKG)/,arch include kernel scripts tools) $(BUILD_DIR)/debian/$(PVE_HEADER_PKG)/usr/src/linux-headers-$(KVNAME)/
|
||||
rm -rf $(BUILD_DIR)/$(KERNEL_SRC_COPY)
|
||||
touch $@
|
||||
|
||||
.headers_install_mark: .compile_mark .modules_compile_mark .headers_compile_mark
|
||||
cp ${KERNEL_SRC}/include/generated/compile.h debian/${PVE_HEADER_PKG}/usr/src/linux-headers-${KVNAME}/include/generated/compile.h
|
||||
install -m 0644 ${KERNEL_SRC}/Module.symvers debian/${PVE_HEADER_PKG}/usr/src/linux-headers-${KVNAME}
|
||||
mkdir -p debian/${PVE_HEADER_PKG}/lib/modules/${KVNAME}
|
||||
ln -sf /usr/src/linux-headers-${KVNAME} debian/${PVE_HEADER_PKG}/lib/modules/${KVNAME}/build
|
||||
cp $(KERNEL_SRC)/include/generated/compile.h debian/$(PVE_HEADER_PKG)/usr/src/linux-headers-$(KVNAME)/include/generated/compile.h
|
||||
install -m 0644 $(KERNEL_SRC)/Module.symvers debian/$(PVE_HEADER_PKG)/usr/src/linux-headers-$(KVNAME)
|
||||
mkdir -p debian/$(PVE_HEADER_PKG)/lib/modules/$(KVNAME)
|
||||
ln -sf /usr/src/linux-headers-$(KVNAME) debian/$(PVE_HEADER_PKG)/lib/modules/$(KVNAME)/build
|
||||
touch $@
|
||||
|
||||
.modules_compile_mark: $(addprefix ${MODULES}/,igb.ko e1000e.ko spl.ko zfs.ko)
|
||||
.usr_headers_install_mark: PKG_DIR = debian/$(PVE_USR_HEADER_PKG)
|
||||
.usr_headers_install_mark: OUT_DIR = $(PKG_DIR)/usr
|
||||
.usr_headers_install_mark: .config_mark
|
||||
rm -rf '$(PKG_DIR)'
|
||||
mkdir -p '$(PKG_DIR)'
|
||||
$(MAKE) -C $(KERNEL_SRC) headers_install ARCH=$(KERNEL_HEADER_ARCH) INSTALL_HDR_PATH='$(CURDIR)'/$(OUT_DIR)
|
||||
rm -rf $(OUT_DIR)/include/drm $(OUT_DIR)/include/scsi
|
||||
find $(OUT_DIR)/include \( -name .install -o -name ..install.cmd \) -execdir rm {} +
|
||||
|
||||
# Move include/asm to arch-specific directory
|
||||
mkdir -p $(OUT_DIR)/include/$(DEB_HOST_MULTIARCH)
|
||||
mv $(OUT_DIR)/include/asm $(OUT_DIR)/include/$(DEB_HOST_MULTIARCH)/
|
||||
test ! -d $(OUT_DIR)/include/arch || \
|
||||
mv $(OUT_DIR)/include/arch $(OUT_DIR)/include/$(DEB_HOST_MULTIARCH)/
|
||||
touch $@
|
||||
|
||||
${MODULES}/spl.ko: .compile_mark
|
||||
cd ${MODULES}/${SPLDIR}; ./autogen.sh
|
||||
cd ${MODULES}/${SPLDIR}; ./configure --with-config=kernel --with-linux=${BUILD_DIR}/${KERNEL_SRC} --with-linux-obj=${BUILD_DIR}/${KERNEL_SRC}
|
||||
${MAKE} -C ${MODULES}/${SPLDIR}
|
||||
cp ${MODULES}/${SPLDIR}/module/splat/splat.ko ${MODULES}/
|
||||
cp ${MODULES}/${SPLDIR}/module/spl/spl.ko ${MODULES}/
|
||||
.modules_compile_mark: $(MODULES)/zfs.ko
|
||||
touch $@
|
||||
|
||||
${MODULES}/zfs.ko: .compile_mark ${MODULES}/spl.ko
|
||||
cd ${MODULES}/${ZFSDIR}; ./autogen.sh
|
||||
cd ${MODULES}/${ZFSDIR}; ./configure --with-spl=${BUILD_DIR}/${MODULES}/${SPLDIR} --with-spl-obj=${BUILD_DIR}/${MODULES}/${SPLDIR} --with-config=kernel --with-linux=${BUILD_DIR}/${KERNEL_SRC} --with-linux-obj=${BUILD_DIR}/${KERNEL_SRC}
|
||||
${MAKE} -C ${MODULES}/${ZFSDIR}
|
||||
cp ${MODULES}/${ZFSDIR}/module/avl/zavl.ko ${MODULES}/
|
||||
cp ${MODULES}/${ZFSDIR}/module/nvpair/znvpair.ko ${MODULES}/
|
||||
cp ${MODULES}/${ZFSDIR}/module/unicode/zunicode.ko ${MODULES}/
|
||||
cp ${MODULES}/${ZFSDIR}/module/zcommon/zcommon.ko ${MODULES}/
|
||||
cp ${MODULES}/${ZFSDIR}/module/zpios/zpios.ko ${MODULES}/
|
||||
cp ${MODULES}/${ZFSDIR}/module/icp/icp.ko ${MODULES}/
|
||||
cp ${MODULES}/${ZFSDIR}/module/zfs/zfs.ko ${MODULES}/
|
||||
$(MODULES)/zfs.ko: .compile_mark
|
||||
cd $(MODULES)/$(ZFSDIR); ./autogen.sh
|
||||
cd $(MODULES)/$(ZFSDIR); ./configure --with-config=kernel --with-linux=$(BUILD_DIR)/$(KERNEL_SRC) --with-linux-obj=$(BUILD_DIR)/$(KERNEL_SRC)
|
||||
$(MAKE) -C $(MODULES)/$(ZFSDIR)
|
||||
cp $(MODULES)/$(ZFSDIR)/module/avl/zavl.ko $(MODULES)/
|
||||
cp $(MODULES)/$(ZFSDIR)/module/nvpair/znvpair.ko $(MODULES)/
|
||||
cp $(MODULES)/$(ZFSDIR)/module/unicode/zunicode.ko $(MODULES)/
|
||||
cp $(MODULES)/$(ZFSDIR)/module/zcommon/zcommon.ko $(MODULES)/
|
||||
cp $(MODULES)/$(ZFSDIR)/module/icp/icp.ko $(MODULES)/
|
||||
cp $(MODULES)/$(ZFSDIR)/module/zfs/zfs.ko $(MODULES)/
|
||||
cp $(MODULES)/$(ZFSDIR)/module/lua/zlua.ko $(MODULES)/
|
||||
cp $(MODULES)/$(ZFSDIR)/module/spl/spl.ko $(MODULES)/
|
||||
cp $(MODULES)/$(ZFSDIR)/module/zstd/zzstd.ko $(MODULES)/
|
||||
|
||||
${MODULES}/igb.ko: .compile_mark
|
||||
${MAKE} -C ${MODULES}/${IGBDIR}/src BUILD_KERNEL=${KVNAME} KSRC=${BUILD_DIR}/${KERNEL_SRC}
|
||||
cp ${MODULES}/${IGBDIR}/src/igb.ko ${MODULES}/
|
||||
|
||||
${MODULES}/e1000e.ko: .compile_mark
|
||||
${MAKE} -C ${MODULES}/${E1000EDIR}/src BUILD_KERNEL=${KVNAME} KSRC=${BUILD_DIR}/${KERNEL_SRC}
|
||||
cp ${MODULES}/${E1000EDIR}/src/e1000e.ko ${MODULES}/
|
||||
|
||||
fwlist-${KVNAME}: .compile_mark .modules_compile_mark
|
||||
debian/scripts/find-firmware.pl debian/${PVE_KERNEL_PKG}/lib/modules/${KVNAME} >fwlist.tmp
|
||||
fwlist-$(KVNAME): .compile_mark .modules_compile_mark
|
||||
debian/scripts/find-firmware.pl debian/$(PVE_KERNEL_PKG)/lib/modules/$(KVNAME) >fwlist.tmp
|
||||
mv fwlist.tmp $@
|
||||
|
||||
.PHONY: fwcheck
|
||||
fwcheck: fwlist-${KVNAME} fwlist-previous
|
||||
fwcheck: fwlist-$(KVNAME) fwlist-previous
|
||||
@echo "checking fwlist for changes since last built firmware package.."
|
||||
@echo "if this check fails, add fwlist-${KVNAME} to the pve-firmware repository and upload a new firmware package together with the ${KVNAME} kernel"
|
||||
@echo "if this check fails, add fwlist-$(KVNAME) to the pve-firmware repository and upload a new firmware package together with the $(KVNAME) kernel"
|
||||
sort fwlist-previous | uniq > fwlist-previous.sorted
|
||||
sort fwlist-${KVNAME} | uniq > fwlist-${KVNAME}.sorted
|
||||
diff -up -N fwlist-previous.sorted fwlist-${KVNAME}.sorted > fwlist.diff
|
||||
rm fwlist.diff fwlist-previous.sorted fwlist-${KVNAME}.sorted
|
||||
sort fwlist-$(KVNAME) | uniq > fwlist-$(KVNAME).sorted
|
||||
diff -up -N fwlist-previous.sorted fwlist-$(KVNAME).sorted > fwlist.diff
|
||||
rm fwlist.diff fwlist-previous.sorted fwlist-$(KVNAME).sorted
|
||||
@echo "done, no need to rebuild pve-firmware"
|
||||
|
||||
|
||||
abi-${KVNAME}: .compile_mark
|
||||
debian/scripts/abi-generate debian/${PVE_HEADER_PKG}/usr/src/linux-headers-${KVNAME}/Module.symvers abi-${KVNAME} ${KVNAME}
|
||||
abi-$(KVNAME): .compile_mark
|
||||
debian/scripts/abi-generate debian/$(PVE_HEADER_PKG)/usr/src/linux-headers-$(KVNAME)/Module.symvers abi-$(KVNAME) $(KVNAME)
|
||||
|
||||
.PHONY: abicheck
|
||||
abicheck: debian/scripts/abi-check abi-${KVNAME} abi-prev-* abi-blacklist
|
||||
debian/scripts/abi-check abi-${KVNAME} abi-prev-* ${SKIPABI}
|
||||
abicheck: debian/scripts/abi-check abi-$(KVNAME) abi-prev-* abi-blacklist
|
||||
debian/scripts/abi-check abi-$(KVNAME) abi-prev-* $(SKIPABI)
|
||||
|
||||
.PHONY: clean
|
||||
|
||||
Vendored
+1
-2
@@ -5,8 +5,7 @@ my $abiold = shift;
|
||||
my $skipabi = shift;
|
||||
|
||||
# to catch multiple abi-prev-* files being passed in
|
||||
die "invalid value for skipabi parameter\n"
|
||||
if (defined($skipabi) && $skipabi !~ /^[01]$/);
|
||||
die "invalid value '$skipabi' for skipabi parameter\n" if defined($skipabi) && $skipabi !~ /^[01]$/;
|
||||
|
||||
$abinew =~ /abi-(.*)/;
|
||||
my $abistr = $1;
|
||||
|
||||
Vendored
+4
-4
@@ -6,7 +6,7 @@ top=$(pwd)
|
||||
|
||||
if [ "$#" -ne 3 ]; then
|
||||
echo "USAGE: $0 repo patchdir ref"
|
||||
echo "\t exports patches from 'repo' to 'patchdir' based on 'ref'"
|
||||
printf "\t exports patches from 'repo' to 'patchdir' based on 'ref'\n"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -25,10 +25,10 @@ git format-patch \
|
||||
--no-cover-letter \
|
||||
--zero-commit \
|
||||
--no-signature \
|
||||
--output-dir \
|
||||
"${top}/${kernel_patchdir}" \
|
||||
--diff-algorithm=myers \
|
||||
--output-directory="${top}/${kernel_patchdir}" \
|
||||
"${base_ref}.."
|
||||
|
||||
git checkout ${base_ref}
|
||||
git checkout "${base_ref}"
|
||||
|
||||
cd "${top}"
|
||||
|
||||
Vendored
+1
-1
@@ -8,7 +8,7 @@ die "no directory to scan" if !$dir;
|
||||
|
||||
die "no such directory" if ! -d $dir;
|
||||
|
||||
die "strange directory name" if $dir !~ m|^(.*/)?(4.15.\d+\-\d+\-pve)(/+)?$|;
|
||||
warn "\n\nNOTE: strange directory name: $dir\n\n" if $dir !~ m|^(.*/)?(\d+.\d+.\d+\-\d+\-pve)(/+)?$|;
|
||||
|
||||
my $apiver = $2;
|
||||
|
||||
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
pve-kernel source: debian-control-has-dbgsym-package (in section for pve-kernel-*-pve-dbgsym) Package [debian/control:*]
|
||||
pve-kernel source: license-problem-gfdl-invariants invariant part is: with the :ref:`invariant sections <fdl-invariant>` being list their titles, with the :ref:`front-cover texts <fdl-cover-texts>` being list, and with the :ref:`back-cover texts <fdl-cover-texts>` being list [ubuntu-kernel/Documentation/userspace-api/media/fdl-appendix.rst]
|
||||
Binary file not shown.
+714
-169
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -1,37 +0,0 @@
|
||||
diff --git a/src/netdev.c b/src/netdev.c
|
||||
index 73b0f9a..aef1bc2 100644
|
||||
--- a/src/netdev.c
|
||||
+++ b/src/netdev.c
|
||||
@@ -6724,19 +6724,12 @@ static int e1000_change_mtu(struct net_device *netdev, int new_mtu)
|
||||
int max_frame = new_mtu + VLAN_ETH_HLEN + ETH_FCS_LEN;
|
||||
|
||||
/* Jumbo frame support */
|
||||
- if ((max_frame > (VLAN_ETH_FRAME_LEN + ETH_FCS_LEN)) &&
|
||||
+ if ((new_mtu > ETH_DATA_LEN) &&
|
||||
!(adapter->flags & FLAG_HAS_JUMBO_FRAMES)) {
|
||||
e_err("Jumbo Frames not supported.\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
- /* Supported frame sizes */
|
||||
- if ((new_mtu < (VLAN_ETH_ZLEN + ETH_FCS_LEN)) ||
|
||||
- (max_frame > adapter->max_hw_frame_size)) {
|
||||
- e_err("Unsupported MTU setting\n");
|
||||
- return -EINVAL;
|
||||
- }
|
||||
-
|
||||
/* Jumbo frame workaround on 82579 and newer requires CRC be stripped */
|
||||
if ((adapter->hw.mac.type >= e1000_pch2lan) &&
|
||||
!(adapter->flags2 & FLAG2_CRC_STRIPPING) &&
|
||||
@@ -8262,6 +8255,11 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
#endif /* HAVE_NETDEV_VLAN_FEATURES */
|
||||
}
|
||||
|
||||
+ /* MTU range: 68 - max_hw_frame_size */
|
||||
+ netdev->min_mtu = ETH_MIN_MTU;
|
||||
+ netdev->max_mtu = adapter->max_hw_frame_size -
|
||||
+ (VLAN_ETH_HLEN + ETH_FCS_LEN);
|
||||
+
|
||||
if (e1000e_enable_mng_pass_thru(&adapter->hw))
|
||||
adapter->flags |= FLAG_MNG_PT_ENABLED;
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
Date: Tue, 5 Jun 2018 11:16:29 +0200
|
||||
Subject: [PATCH] port to new internal kernel timer API
|
||||
|
||||
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
---
|
||||
diff --git a/src/netdev.c b/src/netdev.c
|
||||
--- a/src/netdev.c
|
||||
+++ b/src/netdev.c
|
||||
@@ -5389,9 +5389,10 @@
|
||||
* Need to wait a few seconds after link up to get diagnostic information from
|
||||
* the phy
|
||||
**/
|
||||
-static void e1000_update_phy_info(unsigned long data)
|
||||
+static void e1000_update_phy_info(struct timer_list *t)
|
||||
{
|
||||
- struct e1000_adapter *adapter = (struct e1000_adapter *)data;
|
||||
+ struct e1000_adapter *adapter;
|
||||
+ adapter = from_timer(adapter, t, phy_info_timer);
|
||||
|
||||
if (test_bit(__E1000_DOWN, &adapter->state))
|
||||
return;
|
||||
@@ -5774,9 +5775,10 @@
|
||||
* e1000_watchdog - Timer Call-back
|
||||
* @data: pointer to adapter cast into an unsigned long
|
||||
**/
|
||||
-static void e1000_watchdog(unsigned long data)
|
||||
+static void e1000_watchdog(struct timer_list *t)
|
||||
{
|
||||
- struct e1000_adapter *adapter = (struct e1000_adapter *)data;
|
||||
+ struct e1000_adapter *adapter;
|
||||
+ adapter = from_timer(adapter, t, watchdog_timer);
|
||||
|
||||
/* Do the rest outside of interrupt context */
|
||||
schedule_work(&adapter->watchdog_task);
|
||||
@@ -8348,13 +8348,9 @@
|
||||
goto err_eeprom;
|
||||
}
|
||||
|
||||
- init_timer(&adapter->watchdog_timer);
|
||||
- adapter->watchdog_timer.function = e1000_watchdog;
|
||||
- adapter->watchdog_timer.data = (unsigned long)adapter;
|
||||
-
|
||||
- init_timer(&adapter->phy_info_timer);
|
||||
- adapter->phy_info_timer.function = e1000_update_phy_info;
|
||||
- adapter->phy_info_timer.data = (unsigned long)adapter;
|
||||
+ timer_setup(&adapter->watchdog_timer, e1000_watchdog, 0);
|
||||
+
|
||||
+ timer_setup(&adapter->phy_info_timer, e1000_update_phy_info, 0);
|
||||
|
||||
INIT_WORK(&adapter->reset_task, e1000_reset_task);
|
||||
INIT_WORK(&adapter->watchdog_task, e1000_watchdog_task);
|
||||
@@ -1,15 +0,0 @@
|
||||
diff --git a/src/igb_main.c.orig b/src/igb_main.c
|
||||
index 3ee1ec7..c8adf04 100644
|
||||
--- a/src/igb_main.c.orig
|
||||
+++ b/src/igb_main.c
|
||||
@@ -5888,10 +5888,8 @@ static int igb_change_mtu(struct net_dev
|
||||
while (test_and_set_bit(__IGB_RESETTING, &adapter->state))
|
||||
usleep_range(1000, 2000);
|
||||
|
||||
-#ifndef HAVE_NETDEVICE_MIN_MAX_MTU
|
||||
/* igb_down has a dependency on max_frame_size */
|
||||
adapter->max_frame_size = max_frame;
|
||||
-#endif
|
||||
|
||||
if (netif_running(netdev))
|
||||
igb_down(adapter);
|
||||
@@ -1,18 +0,0 @@
|
||||
diff --git a/src/Makefile.orig b/src/Makefile
|
||||
index 8e962f7..50bcdcc 100644
|
||||
--- a/src/Makefile.orig
|
||||
+++ b/src/Makefile
|
||||
@@ -123,6 +123,13 @@ ifeq (,$(CC))
|
||||
$(error Compiler not found)
|
||||
endif
|
||||
|
||||
+# workaround for GCC6's default PIE
|
||||
+ifeq ($(CC),gcc)
|
||||
+ PIE_TEST = [ -z "`$(CC) -fno-PIE -no-pie -x c -c /dev/null -o /dev/null 2>&1`" ]
|
||||
+ PIE_FLAGS := $(shell $(PIE_TEST) && echo '-fno-PIE -no-pie')
|
||||
+ EXTRA_CFLAGS += $(PIE_FLAGS)
|
||||
+endif
|
||||
+
|
||||
# we need to know what platform the driver is being built on
|
||||
# some additional features are only built on Intel platforms
|
||||
ARCH := $(shell uname -m | sed 's/i.86/i386/')
|
||||
@@ -15,15 +15,16 @@ Make mkcompile_h use $KBUILD_BUILD_VERSION_TIMESTAMP in preference to
|
||||
$KBUILD_BUILD_TIMESTAMP.
|
||||
|
||||
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
|
||||
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
---
|
||||
scripts/mkcompile_h | 10 +++++++---
|
||||
1 file changed, 7 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h
|
||||
index 87f1fc9801d7..4ef868f1f244 100755
|
||||
index 6a2a04d92f42..6c9430ee1a09 100755
|
||||
--- a/scripts/mkcompile_h
|
||||
+++ b/scripts/mkcompile_h
|
||||
@@ -33,10 +33,14 @@ else
|
||||
@@ -22,10 +22,14 @@ else
|
||||
VERSION=$KBUILD_BUILD_VERSION
|
||||
fi
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+3
-2
@@ -13,15 +13,16 @@ connected ports (for no real reason). To avoid problems with ARP
|
||||
we simply use the MAC of the first connected port.
|
||||
|
||||
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
|
||||
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
---
|
||||
net/bridge/br_stp_if.c | 5 +----
|
||||
1 file changed, 1 insertion(+), 4 deletions(-)
|
||||
|
||||
diff --git a/net/bridge/br_stp_if.c b/net/bridge/br_stp_if.c
|
||||
index 808e2b914015..b0ad54384826 100644
|
||||
index 3326dfced68a..3f1604948ace 100644
|
||||
--- a/net/bridge/br_stp_if.c
|
||||
+++ b/net/bridge/br_stp_if.c
|
||||
@@ -259,10 +259,7 @@ bool br_stp_recalculate_bridge_id(struct net_bridge *br)
|
||||
@@ -268,10 +268,7 @@ bool br_stp_recalculate_bridge_id(struct net_bridge *br)
|
||||
return false;
|
||||
|
||||
list_for_each_entry(p, &br->port_list, list) {
|
||||
+16
-14
@@ -48,16 +48,17 @@ capability. Please contact me to have your devices added and save
|
||||
your customers the hassle of this boot option.
|
||||
|
||||
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
|
||||
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
---
|
||||
.../admin-guide/kernel-parameters.txt | 9 ++
|
||||
drivers/pci/quirks.c | 101 ++++++++++++++++++
|
||||
2 files changed, 110 insertions(+)
|
||||
drivers/pci/quirks.c | 102 ++++++++++++++++++
|
||||
2 files changed, 111 insertions(+)
|
||||
|
||||
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
|
||||
index 2970a6bcf858..935a805afe60 100644
|
||||
index 6c1254a22225..91c091c0f2c9 100644
|
||||
--- a/Documentation/admin-guide/kernel-parameters.txt
|
||||
+++ b/Documentation/admin-guide/kernel-parameters.txt
|
||||
@@ -3125,6 +3125,15 @@
|
||||
@@ -4035,6 +4035,15 @@
|
||||
Also, it enforces the PCI Local Bus spec
|
||||
rule that those bits should be 0 in system reset
|
||||
events (useful for kexec/kdump cases).
|
||||
@@ -74,11 +75,11 @@ index 2970a6bcf858..935a805afe60 100644
|
||||
Safety option to keep boot IRQs enabled. This
|
||||
should never be necessary.
|
||||
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
|
||||
index 2956ebbd83dc..8dceb0838970 100644
|
||||
index bc680bdcbbed..faa53ccc9b69 100644
|
||||
--- a/drivers/pci/quirks.c
|
||||
+++ b/drivers/pci/quirks.c
|
||||
@@ -3705,6 +3705,106 @@ static int __init pci_apply_final_quirks(void)
|
||||
|
||||
@@ -194,6 +194,106 @@ static int __init pci_apply_final_quirks(void)
|
||||
}
|
||||
fs_initcall_sync(pci_apply_final_quirks);
|
||||
|
||||
+static bool acs_on_downstream;
|
||||
@@ -182,13 +183,14 @@ index 2956ebbd83dc..8dceb0838970 100644
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* Following are device-specific reset methods which can be used to
|
||||
* reset a single function if other methods (e.g. FLR, PM D0->D3) are
|
||||
@@ -4558,6 +4658,7 @@ static const struct pci_dev_acs_enabled {
|
||||
{ PCI_VENDOR_ID_CAVIUM, PCI_ANY_ID, pci_quirk_cavium_acs },
|
||||
* Decoding should be disabled for a PCI device during BAR sizing to avoid
|
||||
* conflict. But doing so may cause problems on host bridge and perhaps other
|
||||
@@ -4972,6 +5072,8 @@ static const struct pci_dev_acs_enabled {
|
||||
{ PCI_VENDOR_ID_CAVIUM, 0xA060, pci_quirk_mf_endpoint_acs },
|
||||
/* APM X-Gene */
|
||||
{ PCI_VENDOR_ID_AMCC, 0xE004, pci_quirk_xgene_acs },
|
||||
+ /* Enable overrides for missing ACS capabilities */
|
||||
+ { PCI_ANY_ID, PCI_ANY_ID, pcie_acs_overrides },
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
/* Ampere Computing */
|
||||
{ PCI_VENDOR_ID_AMPERE, 0xE005, pci_quirk_xgene_acs },
|
||||
{ PCI_VENDOR_ID_AMPERE, 0xE006, pci_quirk_xgene_acs },
|
||||
+3
-2
@@ -7,15 +7,16 @@ Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
|
||||
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
---
|
||||
virt/kvm/kvm_main.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
|
||||
index 238ddbc127e1..d7a24fd29144 100644
|
||||
index d11c581ce9b9..0b0ce6979370 100644
|
||||
--- a/virt/kvm/kvm_main.c
|
||||
+++ b/virt/kvm/kvm_main.c
|
||||
@@ -77,7 +77,7 @@ module_param(halt_poll_ns, uint, 0644);
|
||||
@@ -79,7 +79,7 @@ module_param(halt_poll_ns, uint, 0644);
|
||||
EXPORT_SYMBOL_GPL(halt_poll_ns);
|
||||
|
||||
/* Default doubles per-vcpu halt_poll_ns. */
|
||||
@@ -1,58 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Changwei Ge <ge.changwei@h3c.com>
|
||||
Date: Wed, 31 Jan 2018 16:15:02 -0800
|
||||
Subject: [PATCH] ocfs2: make metadata estimation accurate and clear
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Current code assume that ::w_unwritten_list always has only one item on.
|
||||
This is not right and hard to get understood. So improve how to count
|
||||
unwritten item.
|
||||
|
||||
Link: http://lkml.kernel.org/r/1515479070-32653-1-git-send-email-ge.changwei@h3c.com
|
||||
Signed-off-by: Changwei Ge <ge.changwei@h3c.com>
|
||||
Reported-by: John Lightsey <john@nixnuts.net>
|
||||
Tested-by: John Lightsey <john@nixnuts.net>
|
||||
Cc: Mark Fasheh <mfasheh@versity.com>
|
||||
Cc: Joseph Qi <jiangqi903@gmail.com>
|
||||
Cc: Junxiao Bi <junxiao.bi@oracle.com>
|
||||
Cc: Joel Becker <jlbec@evilplan.org>
|
||||
Cc: Changwei Ge <ge.changwei@h3c.com>
|
||||
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
||||
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
||||
(cherry picked from commit 63de8bd9328bf2a778fc277503da163ae3defa3c)
|
||||
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
|
||||
---
|
||||
fs/ocfs2/aops.c | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c
|
||||
index d1516327b787..256986aca8df 100644
|
||||
--- a/fs/ocfs2/aops.c
|
||||
+++ b/fs/ocfs2/aops.c
|
||||
@@ -797,6 +797,7 @@ struct ocfs2_write_ctxt {
|
||||
struct ocfs2_cached_dealloc_ctxt w_dealloc;
|
||||
|
||||
struct list_head w_unwritten_list;
|
||||
+ unsigned int w_unwritten_count;
|
||||
};
|
||||
|
||||
void ocfs2_unlock_and_free_pages(struct page **pages, int num_pages)
|
||||
@@ -1386,6 +1387,7 @@ static int ocfs2_unwritten_check(struct inode *inode,
|
||||
desc->c_clear_unwritten = 0;
|
||||
list_add_tail(&new->ue_ip_node, &oi->ip_unwritten_list);
|
||||
list_add_tail(&new->ue_node, &wc->w_unwritten_list);
|
||||
+ wc->w_unwritten_count++;
|
||||
new = NULL;
|
||||
unlock:
|
||||
spin_unlock(&oi->ip_lock);
|
||||
@@ -2256,7 +2258,7 @@ static int ocfs2_dio_wr_get_block(struct inode *inode, sector_t iblock,
|
||||
ue->ue_phys = desc->c_phys;
|
||||
|
||||
list_splice_tail_init(&wc->w_unwritten_list, &dwc->dw_zero_list);
|
||||
- dwc->dw_zero_count++;
|
||||
+ dwc->dw_zero_count += wc->w_unwritten_count;
|
||||
}
|
||||
|
||||
ret = ocfs2_write_end_nolock(inode->i_mapping, pos, len, len, wc);
|
||||
@@ -0,0 +1,24 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
Date: Wed, 7 Oct 2020 17:18:28 +0200
|
||||
Subject: [PATCH] net: core: downgrade unregister_netdevice refcount leak from
|
||||
emergency to error
|
||||
|
||||
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
---
|
||||
net/core/dev.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/net/core/dev.c b/net/core/dev.c
|
||||
index f80bc2ca888a..6ca7a4b8a8f4 100644
|
||||
--- a/net/core/dev.c
|
||||
+++ b/net/core/dev.c
|
||||
@@ -10562,7 +10562,7 @@ static void netdev_wait_allrefs(struct net_device *dev)
|
||||
if (refcnt != 1 &&
|
||||
time_after(jiffies, warning_time +
|
||||
netdev_unregister_timeout_secs * HZ)) {
|
||||
- pr_emerg("unregister_netdevice: waiting for %s to become free. Usage count = %d\n",
|
||||
+ pr_err("unregister_netdevice: waiting for %s to become free. Usage count = %d\n",
|
||||
dev->name, refcnt);
|
||||
warning_time = jiffies;
|
||||
}
|
||||
@@ -1,367 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Changwei Ge <ge.changwei@h3c.com>
|
||||
Date: Wed, 31 Jan 2018 16:15:06 -0800
|
||||
Subject: [PATCH] ocfs2: try to reuse extent block in dealloc without
|
||||
meta_alloc
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
A crash issue was reported by John Lightsey with a call trace as follows:
|
||||
|
||||
ocfs2_split_extent+0x1ad3/0x1b40 [ocfs2]
|
||||
ocfs2_change_extent_flag+0x33a/0x470 [ocfs2]
|
||||
ocfs2_mark_extent_written+0x172/0x220 [ocfs2]
|
||||
ocfs2_dio_end_io+0x62d/0x910 [ocfs2]
|
||||
dio_complete+0x19a/0x1a0
|
||||
do_blockdev_direct_IO+0x19dd/0x1eb0
|
||||
__blockdev_direct_IO+0x43/0x50
|
||||
ocfs2_direct_IO+0x8f/0xa0 [ocfs2]
|
||||
generic_file_direct_write+0xb2/0x170
|
||||
__generic_file_write_iter+0xc3/0x1b0
|
||||
ocfs2_file_write_iter+0x4bb/0xca0 [ocfs2]
|
||||
__vfs_write+0xae/0xf0
|
||||
vfs_write+0xb8/0x1b0
|
||||
SyS_write+0x4f/0xb0
|
||||
system_call_fastpath+0x16/0x75
|
||||
|
||||
The BUG code told that extent tree wants to grow but no metadata was
|
||||
reserved ahead of time. From my investigation into this issue, the root
|
||||
cause it that although enough metadata is not reserved, there should be
|
||||
enough for following use. Rightmost extent is merged into its left one
|
||||
due to a certain times of marking extent written. Because during
|
||||
marking extent written, we got many physically continuous extents. At
|
||||
last, an empty extent showed up and the rightmost path is removed from
|
||||
extent tree.
|
||||
|
||||
Add a new mechanism to reuse extent block cached in dealloc which were
|
||||
just unlinked from extent tree to solve this crash issue.
|
||||
|
||||
Criteria is that during marking extents *written*, if extent rotation
|
||||
and merging results in unlinking extent with growing extent tree later
|
||||
without any metadata reserved ahead of time, try to reuse those extents
|
||||
in dealloc in which deleted extents are cached.
|
||||
|
||||
Also, this patch addresses the issue John reported that ::dw_zero_count
|
||||
is not calculated properly.
|
||||
|
||||
After applying this patch, the issue John reported was gone. Thanks for
|
||||
the reproducer provided by John. And this patch has passed
|
||||
ocfs2-test(29 cases) suite running by New H3C Group.
|
||||
|
||||
[ge.changwei@h3c.com: fix static checker warnning]
|
||||
Link: http://lkml.kernel.org/r/63ADC13FD55D6546B7DECE290D39E373F29196AE@H3CMLB12-EX.srv.huawei-3com.com
|
||||
[akpm@linux-foundation.org: brelse(NULL) is legal]
|
||||
Link: http://lkml.kernel.org/r/1515479070-32653-2-git-send-email-ge.changwei@h3c.com
|
||||
Signed-off-by: Changwei Ge <ge.changwei@h3c.com>
|
||||
Reported-by: John Lightsey <john@nixnuts.net>
|
||||
Tested-by: John Lightsey <john@nixnuts.net>
|
||||
Cc: Joel Becker <jlbec@evilplan.org>
|
||||
Cc: Joseph Qi <jiangqi903@gmail.com>
|
||||
Cc: Junxiao Bi <junxiao.bi@oracle.com>
|
||||
Cc: Dan Carpenter <dan.carpenter@oracle.com>
|
||||
Cc: Mark Fasheh <mfasheh@versity.com>
|
||||
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
||||
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
||||
(cherry picked from commit 71a36944042b7d9dd71f6a5d1c5ea1c2353b5d42)
|
||||
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
|
||||
---
|
||||
fs/ocfs2/alloc.c | 206 ++++++++++++++++++++++++++++++++++++++++++++---
|
||||
fs/ocfs2/alloc.h | 1 +
|
||||
fs/ocfs2/aops.c | 6 ++
|
||||
3 files changed, 203 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c
|
||||
index ab5105f9767e..2f2c76193f54 100644
|
||||
--- a/fs/ocfs2/alloc.c
|
||||
+++ b/fs/ocfs2/alloc.c
|
||||
@@ -165,6 +165,13 @@ static int ocfs2_dinode_insert_check(struct ocfs2_extent_tree *et,
|
||||
struct ocfs2_extent_rec *rec);
|
||||
static int ocfs2_dinode_sanity_check(struct ocfs2_extent_tree *et);
|
||||
static void ocfs2_dinode_fill_root_el(struct ocfs2_extent_tree *et);
|
||||
+
|
||||
+static int ocfs2_reuse_blk_from_dealloc(handle_t *handle,
|
||||
+ struct ocfs2_extent_tree *et,
|
||||
+ struct buffer_head **new_eb_bh,
|
||||
+ int blk_wanted, int *blk_given);
|
||||
+static int ocfs2_is_dealloc_empty(struct ocfs2_extent_tree *et);
|
||||
+
|
||||
static const struct ocfs2_extent_tree_operations ocfs2_dinode_et_ops = {
|
||||
.eo_set_last_eb_blk = ocfs2_dinode_set_last_eb_blk,
|
||||
.eo_get_last_eb_blk = ocfs2_dinode_get_last_eb_blk,
|
||||
@@ -448,6 +455,7 @@ static void __ocfs2_init_extent_tree(struct ocfs2_extent_tree *et,
|
||||
if (!obj)
|
||||
obj = (void *)bh->b_data;
|
||||
et->et_object = obj;
|
||||
+ et->et_dealloc = NULL;
|
||||
|
||||
et->et_ops->eo_fill_root_el(et);
|
||||
if (!et->et_ops->eo_fill_max_leaf_clusters)
|
||||
@@ -1158,7 +1166,7 @@ static int ocfs2_add_branch(handle_t *handle,
|
||||
struct buffer_head **last_eb_bh,
|
||||
struct ocfs2_alloc_context *meta_ac)
|
||||
{
|
||||
- int status, new_blocks, i;
|
||||
+ int status, new_blocks, i, block_given = 0;
|
||||
u64 next_blkno, new_last_eb_blk;
|
||||
struct buffer_head *bh;
|
||||
struct buffer_head **new_eb_bhs = NULL;
|
||||
@@ -1213,11 +1221,31 @@ static int ocfs2_add_branch(handle_t *handle,
|
||||
goto bail;
|
||||
}
|
||||
|
||||
- status = ocfs2_create_new_meta_bhs(handle, et, new_blocks,
|
||||
- meta_ac, new_eb_bhs);
|
||||
- if (status < 0) {
|
||||
- mlog_errno(status);
|
||||
- goto bail;
|
||||
+ /* Firstyly, try to reuse dealloc since we have already estimated how
|
||||
+ * many extent blocks we may use.
|
||||
+ */
|
||||
+ if (!ocfs2_is_dealloc_empty(et)) {
|
||||
+ status = ocfs2_reuse_blk_from_dealloc(handle, et,
|
||||
+ new_eb_bhs, new_blocks,
|
||||
+ &block_given);
|
||||
+ if (status < 0) {
|
||||
+ mlog_errno(status);
|
||||
+ goto bail;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ BUG_ON(block_given > new_blocks);
|
||||
+
|
||||
+ if (block_given < new_blocks) {
|
||||
+ BUG_ON(!meta_ac);
|
||||
+ status = ocfs2_create_new_meta_bhs(handle, et,
|
||||
+ new_blocks - block_given,
|
||||
+ meta_ac,
|
||||
+ &new_eb_bhs[block_given]);
|
||||
+ if (status < 0) {
|
||||
+ mlog_errno(status);
|
||||
+ goto bail;
|
||||
+ }
|
||||
}
|
||||
|
||||
/* Note: new_eb_bhs[new_blocks - 1] is the guy which will be
|
||||
@@ -1340,15 +1368,25 @@ static int ocfs2_shift_tree_depth(handle_t *handle,
|
||||
struct ocfs2_alloc_context *meta_ac,
|
||||
struct buffer_head **ret_new_eb_bh)
|
||||
{
|
||||
- int status, i;
|
||||
+ int status, i, block_given = 0;
|
||||
u32 new_clusters;
|
||||
struct buffer_head *new_eb_bh = NULL;
|
||||
struct ocfs2_extent_block *eb;
|
||||
struct ocfs2_extent_list *root_el;
|
||||
struct ocfs2_extent_list *eb_el;
|
||||
|
||||
- status = ocfs2_create_new_meta_bhs(handle, et, 1, meta_ac,
|
||||
- &new_eb_bh);
|
||||
+ if (!ocfs2_is_dealloc_empty(et)) {
|
||||
+ status = ocfs2_reuse_blk_from_dealloc(handle, et,
|
||||
+ &new_eb_bh, 1,
|
||||
+ &block_given);
|
||||
+ } else if (meta_ac) {
|
||||
+ status = ocfs2_create_new_meta_bhs(handle, et, 1, meta_ac,
|
||||
+ &new_eb_bh);
|
||||
+
|
||||
+ } else {
|
||||
+ BUG();
|
||||
+ }
|
||||
+
|
||||
if (status < 0) {
|
||||
mlog_errno(status);
|
||||
goto bail;
|
||||
@@ -1511,7 +1549,7 @@ static int ocfs2_grow_tree(handle_t *handle, struct ocfs2_extent_tree *et,
|
||||
int depth = le16_to_cpu(el->l_tree_depth);
|
||||
struct buffer_head *bh = NULL;
|
||||
|
||||
- BUG_ON(meta_ac == NULL);
|
||||
+ BUG_ON(meta_ac == NULL && ocfs2_is_dealloc_empty(et));
|
||||
|
||||
shift = ocfs2_find_branch_target(et, &bh);
|
||||
if (shift < 0) {
|
||||
@@ -6585,6 +6623,154 @@ ocfs2_find_per_slot_free_list(int type,
|
||||
return fl;
|
||||
}
|
||||
|
||||
+static struct ocfs2_per_slot_free_list *
|
||||
+ocfs2_find_preferred_free_list(int type,
|
||||
+ int preferred_slot,
|
||||
+ int *real_slot,
|
||||
+ struct ocfs2_cached_dealloc_ctxt *ctxt)
|
||||
+{
|
||||
+ struct ocfs2_per_slot_free_list *fl = ctxt->c_first_suballocator;
|
||||
+
|
||||
+ while (fl) {
|
||||
+ if (fl->f_inode_type == type && fl->f_slot == preferred_slot) {
|
||||
+ *real_slot = fl->f_slot;
|
||||
+ return fl;
|
||||
+ }
|
||||
+
|
||||
+ fl = fl->f_next_suballocator;
|
||||
+ }
|
||||
+
|
||||
+ /* If we can't find any free list matching preferred slot, just use
|
||||
+ * the first one.
|
||||
+ */
|
||||
+ fl = ctxt->c_first_suballocator;
|
||||
+ *real_slot = fl->f_slot;
|
||||
+
|
||||
+ return fl;
|
||||
+}
|
||||
+
|
||||
+/* Return Value 1 indicates empty */
|
||||
+static int ocfs2_is_dealloc_empty(struct ocfs2_extent_tree *et)
|
||||
+{
|
||||
+ struct ocfs2_per_slot_free_list *fl = NULL;
|
||||
+
|
||||
+ if (!et->et_dealloc)
|
||||
+ return 1;
|
||||
+
|
||||
+ fl = et->et_dealloc->c_first_suballocator;
|
||||
+ if (!fl)
|
||||
+ return 1;
|
||||
+
|
||||
+ if (!fl->f_first)
|
||||
+ return 1;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+/* If extent was deleted from tree due to extent rotation and merging, and
|
||||
+ * no metadata is reserved ahead of time. Try to reuse some extents
|
||||
+ * just deleted. This is only used to reuse extent blocks.
|
||||
+ * It is supposed to find enough extent blocks in dealloc if our estimation
|
||||
+ * on metadata is accurate.
|
||||
+ */
|
||||
+static int ocfs2_reuse_blk_from_dealloc(handle_t *handle,
|
||||
+ struct ocfs2_extent_tree *et,
|
||||
+ struct buffer_head **new_eb_bh,
|
||||
+ int blk_wanted, int *blk_given)
|
||||
+{
|
||||
+ int i, status = 0, real_slot;
|
||||
+ struct ocfs2_cached_dealloc_ctxt *dealloc;
|
||||
+ struct ocfs2_per_slot_free_list *fl;
|
||||
+ struct ocfs2_cached_block_free *bf;
|
||||
+ struct ocfs2_extent_block *eb;
|
||||
+ struct ocfs2_super *osb =
|
||||
+ OCFS2_SB(ocfs2_metadata_cache_get_super(et->et_ci));
|
||||
+
|
||||
+ *blk_given = 0;
|
||||
+
|
||||
+ /* If extent tree doesn't have a dealloc, this is not faulty. Just
|
||||
+ * tell upper caller dealloc can't provide any block and it should
|
||||
+ * ask for alloc to claim more space.
|
||||
+ */
|
||||
+ dealloc = et->et_dealloc;
|
||||
+ if (!dealloc)
|
||||
+ goto bail;
|
||||
+
|
||||
+ for (i = 0; i < blk_wanted; i++) {
|
||||
+ /* Prefer to use local slot */
|
||||
+ fl = ocfs2_find_preferred_free_list(EXTENT_ALLOC_SYSTEM_INODE,
|
||||
+ osb->slot_num, &real_slot,
|
||||
+ dealloc);
|
||||
+ /* If no more block can be reused, we should claim more
|
||||
+ * from alloc. Just return here normally.
|
||||
+ */
|
||||
+ if (!fl) {
|
||||
+ status = 0;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ bf = fl->f_first;
|
||||
+ fl->f_first = bf->free_next;
|
||||
+
|
||||
+ new_eb_bh[i] = sb_getblk(osb->sb, bf->free_blk);
|
||||
+ if (new_eb_bh[i] == NULL) {
|
||||
+ status = -ENOMEM;
|
||||
+ mlog_errno(status);
|
||||
+ goto bail;
|
||||
+ }
|
||||
+
|
||||
+ mlog(0, "Reusing block(%llu) from "
|
||||
+ "dealloc(local slot:%d, real slot:%d)\n",
|
||||
+ bf->free_blk, osb->slot_num, real_slot);
|
||||
+
|
||||
+ ocfs2_set_new_buffer_uptodate(et->et_ci, new_eb_bh[i]);
|
||||
+
|
||||
+ status = ocfs2_journal_access_eb(handle, et->et_ci,
|
||||
+ new_eb_bh[i],
|
||||
+ OCFS2_JOURNAL_ACCESS_CREATE);
|
||||
+ if (status < 0) {
|
||||
+ mlog_errno(status);
|
||||
+ goto bail;
|
||||
+ }
|
||||
+
|
||||
+ memset(new_eb_bh[i]->b_data, 0, osb->sb->s_blocksize);
|
||||
+ eb = (struct ocfs2_extent_block *) new_eb_bh[i]->b_data;
|
||||
+
|
||||
+ /* We can't guarantee that buffer head is still cached, so
|
||||
+ * polutlate the extent block again.
|
||||
+ */
|
||||
+ strcpy(eb->h_signature, OCFS2_EXTENT_BLOCK_SIGNATURE);
|
||||
+ eb->h_blkno = cpu_to_le64(bf->free_blk);
|
||||
+ eb->h_fs_generation = cpu_to_le32(osb->fs_generation);
|
||||
+ eb->h_suballoc_slot = cpu_to_le16(real_slot);
|
||||
+ eb->h_suballoc_loc = cpu_to_le64(bf->free_bg);
|
||||
+ eb->h_suballoc_bit = cpu_to_le16(bf->free_bit);
|
||||
+ eb->h_list.l_count =
|
||||
+ cpu_to_le16(ocfs2_extent_recs_per_eb(osb->sb));
|
||||
+
|
||||
+ /* We'll also be dirtied by the caller, so
|
||||
+ * this isn't absolutely necessary.
|
||||
+ */
|
||||
+ ocfs2_journal_dirty(handle, new_eb_bh[i]);
|
||||
+
|
||||
+ if (!fl->f_first) {
|
||||
+ dealloc->c_first_suballocator = fl->f_next_suballocator;
|
||||
+ kfree(fl);
|
||||
+ }
|
||||
+ kfree(bf);
|
||||
+ }
|
||||
+
|
||||
+ *blk_given = i;
|
||||
+
|
||||
+bail:
|
||||
+ if (unlikely(status < 0)) {
|
||||
+ for (i = 0; i < blk_wanted; i++)
|
||||
+ brelse(new_eb_bh[i]);
|
||||
+ }
|
||||
+
|
||||
+ return status;
|
||||
+}
|
||||
+
|
||||
int ocfs2_cache_block_dealloc(struct ocfs2_cached_dealloc_ctxt *ctxt,
|
||||
int type, int slot, u64 suballoc,
|
||||
u64 blkno, unsigned int bit)
|
||||
diff --git a/fs/ocfs2/alloc.h b/fs/ocfs2/alloc.h
|
||||
index 27b75cf32cfa..250bcacdf9e9 100644
|
||||
--- a/fs/ocfs2/alloc.h
|
||||
+++ b/fs/ocfs2/alloc.h
|
||||
@@ -61,6 +61,7 @@ struct ocfs2_extent_tree {
|
||||
ocfs2_journal_access_func et_root_journal_access;
|
||||
void *et_object;
|
||||
unsigned int et_max_leaf_clusters;
|
||||
+ struct ocfs2_cached_dealloc_ctxt *et_dealloc;
|
||||
};
|
||||
|
||||
/*
|
||||
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c
|
||||
index 256986aca8df..e8e205bf2e41 100644
|
||||
--- a/fs/ocfs2/aops.c
|
||||
+++ b/fs/ocfs2/aops.c
|
||||
@@ -2332,6 +2332,12 @@ static int ocfs2_dio_end_io_write(struct inode *inode,
|
||||
|
||||
ocfs2_init_dinode_extent_tree(&et, INODE_CACHE(inode), di_bh);
|
||||
|
||||
+ /* Attach dealloc with extent tree in case that we may reuse extents
|
||||
+ * which are already unlinked from current extent tree due to extent
|
||||
+ * rotation and merging.
|
||||
+ */
|
||||
+ et.et_dealloc = &dealloc;
|
||||
+
|
||||
ret = ocfs2_lock_allocators(inode, &et, 0, dwc->dw_zero_count*2,
|
||||
&data_ac, &meta_ac);
|
||||
if (ret) {
|
||||
@@ -0,0 +1,104 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
Date: Mon, 27 Sep 2021 11:28:39 +0200
|
||||
Subject: [PATCH] Revert "PCI: Coalesce host bridge contiguous apertures"
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This reverts commit ab20e43b20b60f5cc8e2ea3763ffa388158469ac.
|
||||
|
||||
was reverted upstream because of reports similar to
|
||||
|
||||
Link: https://bugzilla.proxmox.com/show_bug.cgi?id=3552
|
||||
Link: https://lore.kernel.org/r/20210709231529.GA3270116@roeck-us.net
|
||||
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
|
||||
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
---
|
||||
drivers/pci/probe.c | 50 ++++-----------------------------------------
|
||||
1 file changed, 4 insertions(+), 46 deletions(-)
|
||||
|
||||
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
|
||||
index 103ee42f6717..6b73e9179111 100644
|
||||
--- a/drivers/pci/probe.c
|
||||
+++ b/drivers/pci/probe.c
|
||||
@@ -20,7 +20,6 @@
|
||||
#include <linux/irqdomain.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/bitfield.h>
|
||||
-#include <linux/list_sort.h>
|
||||
#include "pci.h"
|
||||
|
||||
#define CARDBUS_LATENCY_TIMER 176 /* secondary latency timer */
|
||||
@@ -881,31 +880,14 @@ static void pci_set_bus_msi_domain(struct pci_bus *bus)
|
||||
dev_set_msi_domain(&bus->dev, d);
|
||||
}
|
||||
|
||||
-static int res_cmp(void *priv, const struct list_head *a,
|
||||
- const struct list_head *b)
|
||||
-{
|
||||
- struct resource_entry *entry1, *entry2;
|
||||
-
|
||||
- entry1 = container_of(a, struct resource_entry, node);
|
||||
- entry2 = container_of(b, struct resource_entry, node);
|
||||
-
|
||||
- if (entry1->res->flags != entry2->res->flags)
|
||||
- return entry1->res->flags > entry2->res->flags;
|
||||
-
|
||||
- if (entry1->offset != entry2->offset)
|
||||
- return entry1->offset > entry2->offset;
|
||||
-
|
||||
- return entry1->res->start > entry2->res->start;
|
||||
-}
|
||||
-
|
||||
static int pci_register_host_bridge(struct pci_host_bridge *bridge)
|
||||
{
|
||||
struct device *parent = bridge->dev.parent;
|
||||
- struct resource_entry *window, *next, *n;
|
||||
+ struct resource_entry *window, *n;
|
||||
struct pci_bus *bus, *b;
|
||||
- resource_size_t offset, next_offset;
|
||||
+ resource_size_t offset;
|
||||
LIST_HEAD(resources);
|
||||
- struct resource *res, *next_res;
|
||||
+ struct resource *res;
|
||||
char addr[64], *fmt;
|
||||
const char *name;
|
||||
int err;
|
||||
@@ -988,35 +970,11 @@ static int pci_register_host_bridge(struct pci_host_bridge *bridge)
|
||||
if (nr_node_ids > 1 && pcibus_to_node(bus) == NUMA_NO_NODE)
|
||||
dev_warn(&bus->dev, "Unknown NUMA node; performance will be reduced\n");
|
||||
|
||||
- /* Sort and coalesce contiguous windows */
|
||||
- list_sort(NULL, &resources, res_cmp);
|
||||
- resource_list_for_each_entry_safe(window, n, &resources) {
|
||||
- if (list_is_last(&window->node, &resources))
|
||||
- break;
|
||||
-
|
||||
- next = list_next_entry(window, node);
|
||||
- offset = window->offset;
|
||||
- res = window->res;
|
||||
- next_offset = next->offset;
|
||||
- next_res = next->res;
|
||||
-
|
||||
- if (res->flags != next_res->flags || offset != next_offset)
|
||||
- continue;
|
||||
-
|
||||
- if (res->end + 1 == next_res->start) {
|
||||
- next_res->start = res->start;
|
||||
- res->flags = res->start = res->end = 0;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
/* Add initial resources to the bus */
|
||||
resource_list_for_each_entry_safe(window, n, &resources) {
|
||||
+ list_move_tail(&window->node, &bridge->windows);
|
||||
offset = window->offset;
|
||||
res = window->res;
|
||||
- if (!res->end)
|
||||
- continue;
|
||||
-
|
||||
- list_move_tail(&window->node, &bridge->windows);
|
||||
|
||||
if (res->flags & IORESOURCE_BUS)
|
||||
pci_bus_insert_busn_res(bus, bus->number, res->end);
|
||||
@@ -1,53 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
|
||||
Date: Tue, 3 Apr 2018 14:59:26 +0200
|
||||
Subject: [PATCH] Revert "UBUNTU: [Packaging] retpoline -- add safe usage hint
|
||||
support"
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This (partially) reverts commit 1e39020902132b3065bedf0a0c33031e89f9f57a.
|
||||
|
||||
this modifies the upstream kernel build to call an Ubuntu script which
|
||||
we remove before building. it would also be required by any module
|
||||
builds afterwards and is not shipped by Ubuntu's kernel packages either.
|
||||
|
||||
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
|
||||
---
|
||||
scripts/Makefile.build | 10 +---------
|
||||
1 file changed, 1 insertion(+), 9 deletions(-)
|
||||
|
||||
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
|
||||
index 1b07341eda2c..419fe6fdad17 100644
|
||||
--- a/scripts/Makefile.build
|
||||
+++ b/scripts/Makefile.build
|
||||
@@ -295,27 +295,19 @@ objtool_dep = $(objtool_obj) \
|
||||
$(wildcard include/config/orc/unwinder.h \
|
||||
include/config/stack/validation.h)
|
||||
|
||||
-ifdef CONFIG_RETPOLINE
|
||||
-cmd_ubuntu_retpoline = $(CONFIG_SHELL) $(srctree)/scripts/ubuntu-retpoline-extract-one $(@) $(<) "$(filter -m16 %code16gcc.h,$(a_flags))";
|
||||
-else
|
||||
-cmd_ubuntu_retpoline =
|
||||
-endif
|
||||
-
|
||||
define rule_cc_o_c
|
||||
$(call echo-cmd,checksrc) $(cmd_checksrc) \
|
||||
$(call cmd_and_fixdep,cc_o_c) \
|
||||
$(cmd_checkdoc) \
|
||||
$(call echo-cmd,objtool) $(cmd_objtool) \
|
||||
$(cmd_modversions_c) \
|
||||
- $(call echo-cmd,ubuntu-retpoline) $(cmd_ubuntu_retpoline) \
|
||||
$(call echo-cmd,record_mcount) $(cmd_record_mcount)
|
||||
endef
|
||||
|
||||
define rule_as_o_S
|
||||
$(call cmd_and_fixdep,as_o_S) \
|
||||
$(call echo-cmd,objtool) $(cmd_objtool) \
|
||||
- $(cmd_modversions_S) \
|
||||
- $(call echo-cmd,ubuntu-retpoline) $(cmd_ubuntu_retpoline)
|
||||
+ $(cmd_modversions_S)
|
||||
endef
|
||||
|
||||
# List module undefined symbols (or empty line if not enabled)
|
||||
@@ -0,0 +1,112 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Kai-Heng Feng <kai.heng.feng@canonical.com>
|
||||
Date: Tue, 13 Jul 2021 20:50:07 +0800
|
||||
Subject: [PATCH] PCI: Reinstate "PCI: Coalesce host bridge contiguous
|
||||
apertures"
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Built-in graphics on HP EliteDesk 805 G6 doesn't work because graphics
|
||||
can't get the BAR it needs:
|
||||
pci_bus 0000:00: root bus resource [mem 0x10020200000-0x100303fffff window]
|
||||
pci_bus 0000:00: root bus resource [mem 0x10030400000-0x100401fffff window]
|
||||
|
||||
pci 0000:00:08.1: bridge window [mem 0xd2000000-0xd23fffff]
|
||||
pci 0000:00:08.1: bridge window [mem 0x10030000000-0x100401fffff 64bit pref]
|
||||
pci 0000:00:08.1: can't claim BAR 15 [mem 0x10030000000-0x100401fffff 64bit pref]: no compatible bridge window
|
||||
pci 0000:00:08.1: [mem 0x10030000000-0x100401fffff 64bit pref] clipped to [mem 0x10030000000-0x100303fffff 64bit pref]
|
||||
pci 0000:00:08.1: bridge window [mem 0x10030000000-0x100303fffff 64bit pref]
|
||||
pci 0000:07:00.0: can't claim BAR 0 [mem 0x10030000000-0x1003fffffff 64bit pref]: no compatible bridge window
|
||||
pci 0000:07:00.0: can't claim BAR 2 [mem 0x10040000000-0x100401fffff 64bit pref]: no compatible bridge window
|
||||
|
||||
However, the root bus has two contiguous apertures that can contain the
|
||||
child resource requested.
|
||||
|
||||
Coalesce contiguous apertures so we can allocate from the entire contiguous
|
||||
region.
|
||||
|
||||
This is the second take of commit 65db04053efe ("PCI: Coalesce host
|
||||
bridge contiguous apertures"). The original approach sorts the apertures
|
||||
by address, but that makes NVMe stop working on QEMU ppc:sam460ex:
|
||||
PCI host bridge to bus 0002:00
|
||||
pci_bus 0002:00: root bus resource [io 0x0000-0xffff]
|
||||
pci_bus 0002:00: root bus resource [mem 0xd80000000-0xdffffffff] (bus address [0x80000000-0xffffffff])
|
||||
pci_bus 0002:00: root bus resource [mem 0xc0ee00000-0xc0eefffff] (bus address [0x00000000-0x000fffff])
|
||||
|
||||
After the offending commit:
|
||||
PCI host bridge to bus 0002:00
|
||||
pci_bus 0002:00: root bus resource [io 0x0000-0xffff]
|
||||
pci_bus 0002:00: root bus resource [mem 0xc0ee00000-0xc0eefffff] (bus address [0x00000000-0x000fffff])
|
||||
pci_bus 0002:00: root bus resource [mem 0xd80000000-0xdffffffff] (bus address [0x80000000-0xffffffff])
|
||||
|
||||
Since the apertures on HP EliteDesk 805 G6 are already in ascending
|
||||
order, doing a precautious sorting is not necessary.
|
||||
|
||||
Remove the sorting part to avoid the regression on ppc:sam460ex.
|
||||
|
||||
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=212013
|
||||
Cc: Guenter Roeck <linux@roeck-us.net>
|
||||
Suggested-by: Bjorn Helgaas <bhelgaas@google.com>
|
||||
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
|
||||
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
|
||||
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
---
|
||||
drivers/pci/probe.c | 31 +++++++++++++++++++++++++++----
|
||||
1 file changed, 27 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
|
||||
index 6b73e9179111..50eef5b211f4 100644
|
||||
--- a/drivers/pci/probe.c
|
||||
+++ b/drivers/pci/probe.c
|
||||
@@ -883,11 +883,11 @@ static void pci_set_bus_msi_domain(struct pci_bus *bus)
|
||||
static int pci_register_host_bridge(struct pci_host_bridge *bridge)
|
||||
{
|
||||
struct device *parent = bridge->dev.parent;
|
||||
- struct resource_entry *window, *n;
|
||||
+ struct resource_entry *window, *next, *n;
|
||||
struct pci_bus *bus, *b;
|
||||
- resource_size_t offset;
|
||||
+ resource_size_t offset, next_offset;
|
||||
LIST_HEAD(resources);
|
||||
- struct resource *res;
|
||||
+ struct resource *res, *next_res;
|
||||
char addr[64], *fmt;
|
||||
const char *name;
|
||||
int err;
|
||||
@@ -970,11 +970,34 @@ static int pci_register_host_bridge(struct pci_host_bridge *bridge)
|
||||
if (nr_node_ids > 1 && pcibus_to_node(bus) == NUMA_NO_NODE)
|
||||
dev_warn(&bus->dev, "Unknown NUMA node; performance will be reduced\n");
|
||||
|
||||
+ /* Coalesce contiguous windows */
|
||||
+ resource_list_for_each_entry_safe(window, n, &resources) {
|
||||
+ if (list_is_last(&window->node, &resources))
|
||||
+ break;
|
||||
+
|
||||
+ next = list_next_entry(window, node);
|
||||
+ offset = window->offset;
|
||||
+ res = window->res;
|
||||
+ next_offset = next->offset;
|
||||
+ next_res = next->res;
|
||||
+
|
||||
+ if (res->flags != next_res->flags || offset != next_offset)
|
||||
+ continue;
|
||||
+
|
||||
+ if (res->end + 1 == next_res->start) {
|
||||
+ next_res->start = res->start;
|
||||
+ res->flags = res->start = res->end = 0;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
/* Add initial resources to the bus */
|
||||
resource_list_for_each_entry_safe(window, n, &resources) {
|
||||
- list_move_tail(&window->node, &bridge->windows);
|
||||
offset = window->offset;
|
||||
res = window->res;
|
||||
+ if (!res->end)
|
||||
+ continue;
|
||||
+
|
||||
+ list_move_tail(&window->node, &bridge->windows);
|
||||
|
||||
if (res->flags & IORESOURCE_BUS)
|
||||
pci_bus_insert_busn_res(bus, bus->number, res->end);
|
||||
@@ -1,55 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Eduardo Habkost <ehabkost@redhat.com>
|
||||
Date: Mon, 17 Dec 2018 22:34:18 -0200
|
||||
Subject: [PATCH] kvm: x86: Add AMD's EX_CFG to the list of ignored MSRs
|
||||
|
||||
Some guests OSes (including Windows 10) write to MSR 0xc001102c
|
||||
on some cases (possibly while trying to apply a CPU errata).
|
||||
Make KVM ignore reads and writes to that MSR, so the guest won't
|
||||
crash.
|
||||
|
||||
The MSR is documented as "Execution Unit Configuration (EX_CFG)",
|
||||
at AMD's "BIOS and Kernel Developer's Guide (BKDG) for AMD Family
|
||||
15h Models 00h-0Fh Processors".
|
||||
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
|
||||
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
||||
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
---
|
||||
arch/x86/include/asm/msr-index.h | 1 +
|
||||
arch/x86/kvm/x86.c | 2 ++
|
||||
2 files changed, 3 insertions(+)
|
||||
|
||||
diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h
|
||||
index 7ca92f9b5eae..4eb78a908544 100644
|
||||
--- a/arch/x86/include/asm/msr-index.h
|
||||
+++ b/arch/x86/include/asm/msr-index.h
|
||||
@@ -382,6 +382,7 @@
|
||||
#define MSR_F15H_NB_PERF_CTR 0xc0010241
|
||||
#define MSR_F15H_PTSC 0xc0010280
|
||||
#define MSR_F15H_IC_CFG 0xc0011021
|
||||
+#define MSR_F15H_EX_CFG 0xc001102c
|
||||
|
||||
/* Fam 10h MSRs */
|
||||
#define MSR_FAM10H_MMIO_CONF_BASE 0xc0010058
|
||||
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
|
||||
index ac17f53812af..1154795459de 100644
|
||||
--- a/arch/x86/kvm/x86.c
|
||||
+++ b/arch/x86/kvm/x86.c
|
||||
@@ -2240,6 +2240,7 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
|
||||
case MSR_AMD64_PATCH_LOADER:
|
||||
case MSR_AMD64_BU_CFG2:
|
||||
case MSR_AMD64_DC_CFG:
|
||||
+ case MSR_F15H_EX_CFG:
|
||||
break;
|
||||
|
||||
case MSR_IA32_UCODE_REV:
|
||||
@@ -2528,6 +2529,7 @@ int kvm_get_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
|
||||
case MSR_AMD64_BU_CFG2:
|
||||
case MSR_IA32_PERF_CTL:
|
||||
case MSR_AMD64_DC_CFG:
|
||||
+ case MSR_F15H_EX_CFG:
|
||||
msr_info->data = 0;
|
||||
break;
|
||||
case MSR_K7_EVNTSEL0 ... MSR_K7_EVNTSEL3:
|
||||
@@ -0,0 +1,28 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
|
||||
Date: Thu, 14 Sep 2017 11:09:58 +0200
|
||||
Subject: [PATCH] do not generate split BTF type info per default
|
||||
|
||||
This reverts commit a8ed1a0607cfa5478ff6009539f44790c4d0956d.
|
||||
|
||||
It breaks ZFS sometimes:
|
||||
https://github.com/openzfs/zfs/issues/12301#issuecomment-873303739
|
||||
|
||||
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
---
|
||||
lib/Kconfig.debug | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
|
||||
index 28faea9b5da6..9cfb8a026adb 100644
|
||||
--- a/lib/Kconfig.debug
|
||||
+++ b/lib/Kconfig.debug
|
||||
@@ -331,7 +331,7 @@ config PAHOLE_HAS_SPLIT_BTF
|
||||
def_bool PAHOLE_VERSION >= 119
|
||||
|
||||
config DEBUG_INFO_BTF_MODULES
|
||||
- def_bool y
|
||||
+ def_bool n
|
||||
depends on DEBUG_INFO_BTF && MODULES && PAHOLE_HAS_SPLIT_BTF
|
||||
help
|
||||
Generate compact split BTF type information for kernel modules.
|
||||
@@ -0,0 +1,147 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Wolfgang Bumiller <w.bumiller@proxmox.com>
|
||||
Date: Tue, 11 Jan 2022 09:31:59 +0100
|
||||
Subject: [PATCH] blk-cgroup: always terminate io.stat lines
|
||||
|
||||
With the removal of seq_get_buf in blkcg_print_one_stat, we
|
||||
cannot make adding the newline conditional on there being
|
||||
relevant stats because the name was already written out
|
||||
unconditionally.
|
||||
Otherwise we may end up with multiple device names in one
|
||||
line which is confusing and doesn't follow the nested-keyed
|
||||
file format.
|
||||
|
||||
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
|
||||
Fixes: 252c651a4c85 ("blk-cgroup: stop using seq_get_buf")
|
||||
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
---
|
||||
block/blk-cgroup.c | 9 ++-------
|
||||
block/blk-iocost.c | 5 ++---
|
||||
block/blk-iolatency.c | 8 +++-----
|
||||
include/linux/blk-cgroup.h | 2 +-
|
||||
4 files changed, 8 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
|
||||
index fd81a7370864..4677829e4ae3 100644
|
||||
--- a/block/blk-cgroup.c
|
||||
+++ b/block/blk-cgroup.c
|
||||
@@ -900,7 +900,6 @@ static void blkcg_print_one_stat(struct blkcg_gq *blkg, struct seq_file *s)
|
||||
{
|
||||
struct blkg_iostat_set *bis = &blkg->iostat;
|
||||
u64 rbytes, wbytes, rios, wios, dbytes, dios;
|
||||
- bool has_stats = false;
|
||||
const char *dname;
|
||||
unsigned seq;
|
||||
int i;
|
||||
@@ -926,14 +925,12 @@ static void blkcg_print_one_stat(struct blkcg_gq *blkg, struct seq_file *s)
|
||||
} while (u64_stats_fetch_retry(&bis->sync, seq));
|
||||
|
||||
if (rbytes || wbytes || rios || wios) {
|
||||
- has_stats = true;
|
||||
seq_printf(s, "rbytes=%llu wbytes=%llu rios=%llu wios=%llu dbytes=%llu dios=%llu",
|
||||
rbytes, wbytes, rios, wios,
|
||||
dbytes, dios);
|
||||
}
|
||||
|
||||
if (blkcg_debug_stats && atomic_read(&blkg->use_delay)) {
|
||||
- has_stats = true;
|
||||
seq_printf(s, " use_delay=%d delay_nsec=%llu",
|
||||
atomic_read(&blkg->use_delay),
|
||||
atomic64_read(&blkg->delay_nsec));
|
||||
@@ -945,12 +942,10 @@ static void blkcg_print_one_stat(struct blkcg_gq *blkg, struct seq_file *s)
|
||||
if (!blkg->pd[i] || !pol->pd_stat_fn)
|
||||
continue;
|
||||
|
||||
- if (pol->pd_stat_fn(blkg->pd[i], s))
|
||||
- has_stats = true;
|
||||
+ pol->pd_stat_fn(blkg->pd[i], s);
|
||||
}
|
||||
|
||||
- if (has_stats)
|
||||
- seq_printf(s, "\n");
|
||||
+ seq_puts(s, "\n");
|
||||
}
|
||||
|
||||
static int blkcg_print_stat(struct seq_file *sf, void *v)
|
||||
diff --git a/block/blk-iocost.c b/block/blk-iocost.c
|
||||
index 645a589edda8..b0846da38eda 100644
|
||||
--- a/block/blk-iocost.c
|
||||
+++ b/block/blk-iocost.c
|
||||
@@ -3028,13 +3028,13 @@ static void ioc_pd_free(struct blkg_policy_data *pd)
|
||||
kfree(iocg);
|
||||
}
|
||||
|
||||
-static bool ioc_pd_stat(struct blkg_policy_data *pd, struct seq_file *s)
|
||||
+static void ioc_pd_stat(struct blkg_policy_data *pd, struct seq_file *s)
|
||||
{
|
||||
struct ioc_gq *iocg = pd_to_iocg(pd);
|
||||
struct ioc *ioc = iocg->ioc;
|
||||
|
||||
if (!ioc->enabled)
|
||||
- return false;
|
||||
+ return;
|
||||
|
||||
if (iocg->level == 0) {
|
||||
unsigned vp10k = DIV64_U64_ROUND_CLOSEST(
|
||||
@@ -3050,7 +3050,6 @@ static bool ioc_pd_stat(struct blkg_policy_data *pd, struct seq_file *s)
|
||||
iocg->last_stat.wait_us,
|
||||
iocg->last_stat.indebt_us,
|
||||
iocg->last_stat.indelay_us);
|
||||
- return true;
|
||||
}
|
||||
|
||||
static u64 ioc_weight_prfill(struct seq_file *sf, struct blkg_policy_data *pd,
|
||||
diff --git a/block/blk-iolatency.c b/block/blk-iolatency.c
|
||||
index bdef8395af6e..a5f13743a280 100644
|
||||
--- a/block/blk-iolatency.c
|
||||
+++ b/block/blk-iolatency.c
|
||||
@@ -906,7 +906,7 @@ static int iolatency_print_limit(struct seq_file *sf, void *v)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static bool iolatency_ssd_stat(struct iolatency_grp *iolat, struct seq_file *s)
|
||||
+static void iolatency_ssd_stat(struct iolatency_grp *iolat, struct seq_file *s)
|
||||
{
|
||||
struct latency_stat stat;
|
||||
int cpu;
|
||||
@@ -929,17 +929,16 @@ static bool iolatency_ssd_stat(struct iolatency_grp *iolat, struct seq_file *s)
|
||||
(unsigned long long)stat.ps.missed,
|
||||
(unsigned long long)stat.ps.total,
|
||||
iolat->rq_depth.max_depth);
|
||||
- return true;
|
||||
}
|
||||
|
||||
-static bool iolatency_pd_stat(struct blkg_policy_data *pd, struct seq_file *s)
|
||||
+static void iolatency_pd_stat(struct blkg_policy_data *pd, struct seq_file *s)
|
||||
{
|
||||
struct iolatency_grp *iolat = pd_to_lat(pd);
|
||||
unsigned long long avg_lat;
|
||||
unsigned long long cur_win;
|
||||
|
||||
if (!blkcg_debug_stats)
|
||||
- return false;
|
||||
+ return;
|
||||
|
||||
if (iolat->ssd)
|
||||
return iolatency_ssd_stat(iolat, s);
|
||||
@@ -952,7 +951,6 @@ static bool iolatency_pd_stat(struct blkg_policy_data *pd, struct seq_file *s)
|
||||
else
|
||||
seq_printf(s, " depth=%u avg_lat=%llu win=%llu",
|
||||
iolat->rq_depth.max_depth, avg_lat, cur_win);
|
||||
- return true;
|
||||
}
|
||||
|
||||
static struct blkg_policy_data *iolatency_pd_alloc(gfp_t gfp,
|
||||
diff --git a/include/linux/blk-cgroup.h b/include/linux/blk-cgroup.h
|
||||
index bc5c04d711bb..618359e3beca 100644
|
||||
--- a/include/linux/blk-cgroup.h
|
||||
+++ b/include/linux/blk-cgroup.h
|
||||
@@ -153,7 +153,7 @@ typedef void (blkcg_pol_online_pd_fn)(struct blkg_policy_data *pd);
|
||||
typedef void (blkcg_pol_offline_pd_fn)(struct blkg_policy_data *pd);
|
||||
typedef void (blkcg_pol_free_pd_fn)(struct blkg_policy_data *pd);
|
||||
typedef void (blkcg_pol_reset_pd_stats_fn)(struct blkg_policy_data *pd);
|
||||
-typedef bool (blkcg_pol_stat_pd_fn)(struct blkg_policy_data *pd,
|
||||
+typedef void (blkcg_pol_stat_pd_fn)(struct blkg_policy_data *pd,
|
||||
struct seq_file *s);
|
||||
|
||||
struct blkcg_policy {
|
||||
@@ -0,0 +1,34 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Javier Martinez Canillas <javierm@redhat.com>
|
||||
Date: Tue, 25 Jan 2022 10:12:19 +0100
|
||||
Subject: [PATCH] drivers/firmware: Don't mark as busy the simple-framebuffer
|
||||
IO resource
|
||||
|
||||
The sysfb_create_simplefb() function requests a IO memory resource for the
|
||||
simple-framebuffer platform device, but it also marks it as busy which can
|
||||
lead to drivers requesting the same memory resource to fail.
|
||||
|
||||
Let's drop the IORESOURCE_BUSY flag and let drivers to request it as busy
|
||||
instead.
|
||||
|
||||
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
|
||||
Reviewed-by: Zack Rusin <zackr@vmware.com>
|
||||
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
|
||||
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
---
|
||||
drivers/firmware/sysfb_simplefb.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/firmware/sysfb_simplefb.c b/drivers/firmware/sysfb_simplefb.c
|
||||
index fd4fa923088a..ca907f7e76c6 100644
|
||||
--- a/drivers/firmware/sysfb_simplefb.c
|
||||
+++ b/drivers/firmware/sysfb_simplefb.c
|
||||
@@ -99,7 +99,7 @@ __init struct platform_device *sysfb_create_simplefb(const struct screen_info *s
|
||||
|
||||
/* setup IORESOURCE_MEM as framebuffer memory */
|
||||
memset(&res, 0, sizeof(res));
|
||||
- res.flags = IORESOURCE_MEM | IORESOURCE_BUSY;
|
||||
+ res.flags = IORESOURCE_MEM;
|
||||
res.name = simplefb_resname;
|
||||
res.start = base;
|
||||
res.end = res.start + length - 1;
|
||||
@@ -0,0 +1,63 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Zimmermann <tzimmermann@suse.de>
|
||||
Date: Tue, 25 Jan 2022 10:12:20 +0100
|
||||
Subject: [PATCH] drm/simpledrm: Request memory region in driver
|
||||
|
||||
Requesting the framebuffer memory in simpledrm marks the memory
|
||||
range as busy. This used to be done by the firmware sysfb code,
|
||||
but the driver is the correct place.
|
||||
|
||||
v2:
|
||||
* use I/O memory if request_mem_region() fails (Jocelyn)
|
||||
|
||||
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
|
||||
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
|
||||
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
|
||||
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
---
|
||||
drivers/gpu/drm/tiny/simpledrm.c | 22 +++++++++++++++++-----
|
||||
1 file changed, 17 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/tiny/simpledrm.c b/drivers/gpu/drm/tiny/simpledrm.c
|
||||
index f3c2c173ca4b..da58c0d0f44d 100644
|
||||
--- a/drivers/gpu/drm/tiny/simpledrm.c
|
||||
+++ b/drivers/gpu/drm/tiny/simpledrm.c
|
||||
@@ -525,21 +525,33 @@ static int simpledrm_device_init_mm(struct simpledrm_device *sdev)
|
||||
{
|
||||
struct drm_device *dev = &sdev->dev;
|
||||
struct platform_device *pdev = sdev->pdev;
|
||||
- struct resource *mem;
|
||||
+ struct resource *res, *mem;
|
||||
void __iomem *screen_base;
|
||||
int ret;
|
||||
|
||||
- mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
- if (!mem)
|
||||
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
+ if (!res)
|
||||
return -EINVAL;
|
||||
|
||||
- ret = devm_aperture_acquire_from_firmware(dev, mem->start, resource_size(mem));
|
||||
+ ret = devm_aperture_acquire_from_firmware(dev, res->start, resource_size(res));
|
||||
if (ret) {
|
||||
drm_err(dev, "could not acquire memory range %pr: error %d\n",
|
||||
- mem, ret);
|
||||
+ res, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
+ mem = devm_request_mem_region(&pdev->dev, res->start, resource_size(res),
|
||||
+ sdev->dev.driver->name);
|
||||
+ if (!mem) {
|
||||
+ /*
|
||||
+ * We cannot make this fatal. Sometimes this comes from magic
|
||||
+ * spaces our resource handlers simply don't know about. Use
|
||||
+ * the I/O-memory resource as-is and try to map that instead.
|
||||
+ */
|
||||
+ drm_warn(dev, "could not acquire memory region %pr\n", res);
|
||||
+ mem = res;
|
||||
+ }
|
||||
+
|
||||
screen_base = devm_ioremap_wc(&pdev->dev, mem->start,
|
||||
resource_size(mem));
|
||||
if (!screen_base)
|
||||
@@ -0,0 +1,148 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Zimmermann <tzimmermann@suse.de>
|
||||
Date: Tue, 25 Jan 2022 10:12:21 +0100
|
||||
Subject: [PATCH] fbdev/simplefb: Request memory region in driver
|
||||
|
||||
Requesting the framebuffer memory in simpledrm marks the memory
|
||||
range as busy. This used to be done by the firmware sysfb code,
|
||||
but the driver is the correct place.
|
||||
|
||||
v2:
|
||||
* store memory region in struct for later cleanup (Javier)
|
||||
|
||||
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
|
||||
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
|
||||
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
---
|
||||
drivers/video/fbdev/simplefb.c | 65 +++++++++++++++++++++++-----------
|
||||
1 file changed, 45 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/drivers/video/fbdev/simplefb.c b/drivers/video/fbdev/simplefb.c
|
||||
index a2e3a4690025..8acfb12abfee 100644
|
||||
--- a/drivers/video/fbdev/simplefb.c
|
||||
+++ b/drivers/video/fbdev/simplefb.c
|
||||
@@ -66,7 +66,21 @@ static int simplefb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
|
||||
return 0;
|
||||
}
|
||||
|
||||
-struct simplefb_par;
|
||||
+struct simplefb_par {
|
||||
+ u32 palette[PSEUDO_PALETTE_SIZE];
|
||||
+ struct resource *mem;
|
||||
+#if defined CONFIG_OF && defined CONFIG_COMMON_CLK
|
||||
+ bool clks_enabled;
|
||||
+ unsigned int clk_count;
|
||||
+ struct clk **clks;
|
||||
+#endif
|
||||
+#if defined CONFIG_OF && defined CONFIG_REGULATOR
|
||||
+ bool regulators_enabled;
|
||||
+ u32 regulator_count;
|
||||
+ struct regulator **regulators;
|
||||
+#endif
|
||||
+};
|
||||
+
|
||||
static void simplefb_clocks_destroy(struct simplefb_par *par);
|
||||
static void simplefb_regulators_destroy(struct simplefb_par *par);
|
||||
|
||||
@@ -76,12 +90,18 @@ static void simplefb_regulators_destroy(struct simplefb_par *par);
|
||||
*/
|
||||
static void simplefb_destroy(struct fb_info *info)
|
||||
{
|
||||
+ struct simplefb_par *par = info->par;
|
||||
+ struct resource *mem = par->mem;
|
||||
+
|
||||
simplefb_regulators_destroy(info->par);
|
||||
simplefb_clocks_destroy(info->par);
|
||||
if (info->screen_base)
|
||||
iounmap(info->screen_base);
|
||||
|
||||
framebuffer_release(info);
|
||||
+
|
||||
+ if (mem)
|
||||
+ release_mem_region(mem->start, resource_size(mem));
|
||||
}
|
||||
|
||||
static const struct fb_ops simplefb_ops = {
|
||||
@@ -175,20 +195,6 @@ static int simplefb_parse_pd(struct platform_device *pdev,
|
||||
return 0;
|
||||
}
|
||||
|
||||
-struct simplefb_par {
|
||||
- u32 palette[PSEUDO_PALETTE_SIZE];
|
||||
-#if defined CONFIG_OF && defined CONFIG_COMMON_CLK
|
||||
- bool clks_enabled;
|
||||
- unsigned int clk_count;
|
||||
- struct clk **clks;
|
||||
-#endif
|
||||
-#if defined CONFIG_OF && defined CONFIG_REGULATOR
|
||||
- bool regulators_enabled;
|
||||
- u32 regulator_count;
|
||||
- struct regulator **regulators;
|
||||
-#endif
|
||||
-};
|
||||
-
|
||||
#if defined CONFIG_OF && defined CONFIG_COMMON_CLK
|
||||
/*
|
||||
* Clock handling code.
|
||||
@@ -411,7 +417,7 @@ static int simplefb_probe(struct platform_device *pdev)
|
||||
struct simplefb_params params;
|
||||
struct fb_info *info;
|
||||
struct simplefb_par *par;
|
||||
- struct resource *mem;
|
||||
+ struct resource *res, *mem;
|
||||
|
||||
/*
|
||||
* Generic drivers must not be registered if a framebuffer exists.
|
||||
@@ -436,15 +442,28 @@ static int simplefb_probe(struct platform_device *pdev)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
- mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
- if (!mem) {
|
||||
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
+ if (!res) {
|
||||
dev_err(&pdev->dev, "No memory resource\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
+ mem = request_mem_region(res->start, resource_size(res), "simplefb");
|
||||
+ if (!mem) {
|
||||
+ /*
|
||||
+ * We cannot make this fatal. Sometimes this comes from magic
|
||||
+ * spaces our resource handlers simply don't know about. Use
|
||||
+ * the I/O-memory resource as-is and try to map that instead.
|
||||
+ */
|
||||
+ dev_warn(&pdev->dev, "simplefb: cannot reserve video memory at %pR\n", res);
|
||||
+ mem = res;
|
||||
+ }
|
||||
+
|
||||
info = framebuffer_alloc(sizeof(struct simplefb_par), &pdev->dev);
|
||||
- if (!info)
|
||||
- return -ENOMEM;
|
||||
+ if (!info) {
|
||||
+ ret = -ENOMEM;
|
||||
+ goto error_release_mem_region;
|
||||
+ }
|
||||
platform_set_drvdata(pdev, info);
|
||||
|
||||
par = info->par;
|
||||
@@ -501,6 +520,9 @@ static int simplefb_probe(struct platform_device *pdev)
|
||||
info->var.xres, info->var.yres,
|
||||
info->var.bits_per_pixel, info->fix.line_length);
|
||||
|
||||
+ if (mem != res)
|
||||
+ par->mem = mem; /* release in clean-up handler */
|
||||
+
|
||||
ret = register_framebuffer(info);
|
||||
if (ret < 0) {
|
||||
dev_err(&pdev->dev, "Unable to register simplefb: %d\n", ret);
|
||||
@@ -519,6 +541,9 @@ static int simplefb_probe(struct platform_device *pdev)
|
||||
iounmap(info->screen_base);
|
||||
error_fb_release:
|
||||
framebuffer_release(info);
|
||||
+error_release_mem_region:
|
||||
+ if (mem != res)
|
||||
+ release_mem_region(mem->start, resource_size(mem));
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Olga Kornievskaia <kolga@netapp.com>
|
||||
Date: Wed, 16 Mar 2022 18:24:26 -0400
|
||||
Subject: [PATCH] NFSv4.1 provide mount option to toggle trunking discovery
|
||||
|
||||
Introduce a new mount option -- trunkdiscovery,notrunkdiscovery -- to
|
||||
toggle whether or not the client will engage in actively discovery
|
||||
of trunking locations.
|
||||
|
||||
v2 make notrunkdiscovery default
|
||||
|
||||
Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
|
||||
Fixes: 1976b2b31462 ("NFSv4.1 query for fs_location attr on a new file system")
|
||||
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
|
||||
(cherry picked from commit a43bf604446414103b7535f38e739b65601c4fb2)
|
||||
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
---
|
||||
fs/nfs/client.c | 3 ++-
|
||||
fs/nfs/fs_context.c | 8 ++++++++
|
||||
include/linux/nfs_fs_sb.h | 1 +
|
||||
3 files changed, 11 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
|
||||
index 090b16890e3d..f303e96ce165 100644
|
||||
--- a/fs/nfs/client.c
|
||||
+++ b/fs/nfs/client.c
|
||||
@@ -861,7 +861,8 @@ int nfs_probe_fsinfo(struct nfs_server *server, struct nfs_fh *mntfh, struct nfs
|
||||
}
|
||||
|
||||
if (clp->rpc_ops->discover_trunking != NULL &&
|
||||
- (server->caps & NFS_CAP_FS_LOCATIONS)) {
|
||||
+ (server->caps & NFS_CAP_FS_LOCATIONS &&
|
||||
+ (server->flags & NFS_MOUNT_TRUNK_DISCOVERY))) {
|
||||
error = clp->rpc_ops->discover_trunking(server, mntfh);
|
||||
if (error < 0)
|
||||
return error;
|
||||
diff --git a/fs/nfs/fs_context.c b/fs/nfs/fs_context.c
|
||||
index fb3cad38b149..0166370f088e 100644
|
||||
--- a/fs/nfs/fs_context.c
|
||||
+++ b/fs/nfs/fs_context.c
|
||||
@@ -79,6 +79,7 @@ enum nfs_param {
|
||||
Opt_source,
|
||||
Opt_tcp,
|
||||
Opt_timeo,
|
||||
+ Opt_trunkdiscovery,
|
||||
Opt_udp,
|
||||
Opt_v,
|
||||
Opt_vers,
|
||||
@@ -179,6 +180,7 @@ static const struct fs_parameter_spec nfs_fs_parameters[] = {
|
||||
fsparam_string("source", Opt_source),
|
||||
fsparam_flag ("tcp", Opt_tcp),
|
||||
fsparam_u32 ("timeo", Opt_timeo),
|
||||
+ fsparam_flag_no("trunkdiscovery", Opt_trunkdiscovery),
|
||||
fsparam_flag ("udp", Opt_udp),
|
||||
fsparam_flag ("v2", Opt_v),
|
||||
fsparam_flag ("v3", Opt_v),
|
||||
@@ -528,6 +530,12 @@ static int nfs_fs_context_parse_param(struct fs_context *fc,
|
||||
else
|
||||
ctx->flags &= ~NFS_MOUNT_NOCTO;
|
||||
break;
|
||||
+ case Opt_trunkdiscovery:
|
||||
+ if (result.negated)
|
||||
+ ctx->flags &= ~NFS_MOUNT_TRUNK_DISCOVERY;
|
||||
+ else
|
||||
+ ctx->flags |= NFS_MOUNT_TRUNK_DISCOVERY;
|
||||
+ break;
|
||||
case Opt_ac:
|
||||
if (result.negated)
|
||||
ctx->flags |= NFS_MOUNT_NOAC;
|
||||
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h
|
||||
index 5e065f16d061..324bdd653ad4 100644
|
||||
--- a/include/linux/nfs_fs_sb.h
|
||||
+++ b/include/linux/nfs_fs_sb.h
|
||||
@@ -157,6 +157,7 @@ struct nfs_server {
|
||||
#define NFS_MOUNT_SOFTREVAL 0x800000
|
||||
#define NFS_MOUNT_WRITE_EAGER 0x01000000
|
||||
#define NFS_MOUNT_WRITE_WAIT 0x02000000
|
||||
+#define NFS_MOUNT_TRUNK_DISCOVERY 0x04000000
|
||||
|
||||
unsigned int fattr_valid; /* Valid attributes */
|
||||
unsigned int caps; /* server capabilities */
|
||||
@@ -0,0 +1,69 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Marc Bevand <m@zorinaq.com>
|
||||
Date: Tue, 21 Dec 2021 15:31:12 -0800
|
||||
Subject: [PATCH] EDAC/amd64: Add PCI device IDs for family 19h model 50h
|
||||
|
||||
Add the new family 19h model 50h PCI IDs (device 18h functions 0 and 6)
|
||||
to support Ryzen 5000 APUs ("Cezanne").
|
||||
|
||||
Signed-off-by: Marc Bevand <m@zorinaq.com>
|
||||
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
---
|
||||
drivers/edac/amd64_edac.c | 15 +++++++++++++++
|
||||
drivers/edac/amd64_edac.h | 3 +++
|
||||
2 files changed, 18 insertions(+)
|
||||
|
||||
diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
|
||||
index c6c58f01067f..f8ef2edf8abf 100644
|
||||
--- a/drivers/edac/amd64_edac.c
|
||||
+++ b/drivers/edac/amd64_edac.c
|
||||
@@ -2660,6 +2660,16 @@ static struct amd64_family_type family_types[] = {
|
||||
.dbam_to_cs = f17_addr_mask_to_cs_size,
|
||||
}
|
||||
},
|
||||
+ [F19_M50H_CPUS] = {
|
||||
+ .ctl_name = "F19h_M50h",
|
||||
+ .f0_id = PCI_DEVICE_ID_AMD_19H_M50H_DF_F0,
|
||||
+ .f6_id = PCI_DEVICE_ID_AMD_19H_M50H_DF_F6,
|
||||
+ .max_mcs = 2,
|
||||
+ .ops = {
|
||||
+ .early_channel_count = f17_early_channel_count,
|
||||
+ .dbam_to_cs = f17_addr_mask_to_cs_size,
|
||||
+ }
|
||||
+ },
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -3706,6 +3716,11 @@ static struct amd64_family_type *per_family_init(struct amd64_pvt *pvt)
|
||||
pvt->ops = &family_types[F17_M70H_CPUS].ops;
|
||||
fam_type->ctl_name = "F19h_M20h";
|
||||
break;
|
||||
+ } else if (pvt->model >= 0x50 && pvt->model <= 0x5f) {
|
||||
+ fam_type = &family_types[F19_M50H_CPUS];
|
||||
+ pvt->ops = &family_types[F19_M50H_CPUS].ops;
|
||||
+ fam_type->ctl_name = "F19h_M50h";
|
||||
+ break;
|
||||
} else if (pvt->model >= 0xa0 && pvt->model <= 0xaf) {
|
||||
fam_type = &family_types[F19_M10H_CPUS];
|
||||
pvt->ops = &family_types[F19_M10H_CPUS].ops;
|
||||
diff --git a/drivers/edac/amd64_edac.h b/drivers/edac/amd64_edac.h
|
||||
index 650cab401e21..352bda9803f6 100644
|
||||
--- a/drivers/edac/amd64_edac.h
|
||||
+++ b/drivers/edac/amd64_edac.h
|
||||
@@ -128,6 +128,8 @@
|
||||
#define PCI_DEVICE_ID_AMD_19H_DF_F6 0x1656
|
||||
#define PCI_DEVICE_ID_AMD_19H_M10H_DF_F0 0x14ad
|
||||
#define PCI_DEVICE_ID_AMD_19H_M10H_DF_F6 0x14b3
|
||||
+#define PCI_DEVICE_ID_AMD_19H_M50H_DF_F0 0x166a
|
||||
+#define PCI_DEVICE_ID_AMD_19H_M50H_DF_F6 0x1670
|
||||
|
||||
/*
|
||||
* Function 1 - Address Map
|
||||
@@ -301,6 +303,7 @@ enum amd_families {
|
||||
F17_M70H_CPUS,
|
||||
F19_CPUS,
|
||||
F19_M10H_CPUS,
|
||||
+ F19_M50H_CPUS,
|
||||
NUM_FAMILIES,
|
||||
};
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Maxim Levitsky <mlevitsk@redhat.com>
|
||||
Date: Wed, 3 Aug 2022 18:49:59 +0300
|
||||
Subject: [PATCH] bug: introduce ASSERT_STRUCT_OFFSET
|
||||
|
||||
ASSERT_STRUCT_OFFSET allows to assert during the build of
|
||||
the kernel that a field in a struct have an expected offset.
|
||||
|
||||
KVM used to have such macro, but there is almost nothing KVM specific
|
||||
in it so move it to build_bug.h, so that it can be used in other
|
||||
places in KVM.
|
||||
|
||||
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
|
||||
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
---
|
||||
arch/x86/kvm/vmx/vmcs12.h | 5 ++---
|
||||
include/linux/build_bug.h | 9 +++++++++
|
||||
2 files changed, 11 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/arch/x86/kvm/vmx/vmcs12.h b/arch/x86/kvm/vmx/vmcs12.h
|
||||
index 2a45f026ee11..ba8617964982 100644
|
||||
--- a/arch/x86/kvm/vmx/vmcs12.h
|
||||
+++ b/arch/x86/kvm/vmx/vmcs12.h
|
||||
@@ -208,9 +208,8 @@ struct __packed vmcs12 {
|
||||
/*
|
||||
* For save/restore compatibility, the vmcs12 field offsets must not change.
|
||||
*/
|
||||
-#define CHECK_OFFSET(field, loc) \
|
||||
- BUILD_BUG_ON_MSG(offsetof(struct vmcs12, field) != (loc), \
|
||||
- "Offset of " #field " in struct vmcs12 has changed.")
|
||||
+#define CHECK_OFFSET(field, loc) \
|
||||
+ ASSERT_STRUCT_OFFSET(struct vmcs12, field, loc)
|
||||
|
||||
static inline void vmx_check_vmcs12_offsets(void)
|
||||
{
|
||||
diff --git a/include/linux/build_bug.h b/include/linux/build_bug.h
|
||||
index e3a0be2c90ad..3aa3640f8c18 100644
|
||||
--- a/include/linux/build_bug.h
|
||||
+++ b/include/linux/build_bug.h
|
||||
@@ -77,4 +77,13 @@
|
||||
#define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
|
||||
#define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
|
||||
|
||||
+
|
||||
+/*
|
||||
+ * Compile time check that field has an expected offset
|
||||
+ */
|
||||
+#define ASSERT_STRUCT_OFFSET(type, field, expected_offset) \
|
||||
+ BUILD_BUG_ON_MSG(offsetof(type, field) != (expected_offset), \
|
||||
+ "Offset of " #field " in " #type " has changed.")
|
||||
+
|
||||
+
|
||||
#endif /* _LINUX_BUILD_BUG_H */
|
||||
@@ -0,0 +1,34 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Maxim Levitsky <mlevitsk@redhat.com>
|
||||
Date: Wed, 3 Aug 2022 18:50:02 +0300
|
||||
Subject: [PATCH] KVM: x86: emulator: update the emulation mode after rsm
|
||||
|
||||
This ensures that RIP will be correctly written back,
|
||||
because the RSM instruction can switch the CPU mode from
|
||||
32 bit (or less) to 64 bit.
|
||||
|
||||
This fixes a guest crash in case the #SMI is received
|
||||
while the guest runs a code from an address > 32 bit.
|
||||
|
||||
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
|
||||
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
---
|
||||
arch/x86/kvm/emulate.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
|
||||
index 98b25a7af8ce..0616ee9cd977 100644
|
||||
--- a/arch/x86/kvm/emulate.c
|
||||
+++ b/arch/x86/kvm/emulate.c
|
||||
@@ -2638,6 +2638,11 @@ static int em_rsm(struct x86_emulate_ctxt *ctxt)
|
||||
if (ret != X86EMUL_CONTINUE)
|
||||
goto emulate_shutdown;
|
||||
|
||||
+
|
||||
+ ret = emulator_recalc_and_set_mode(ctxt);
|
||||
+ if (ret != X86EMUL_CONTINUE)
|
||||
+ goto emulate_shutdown;
|
||||
+
|
||||
/*
|
||||
* Note, the ctxt->ops callbacks are responsible for handling side
|
||||
* effects when writing MSRs and CRs, e.g. MMU context resets, CPUID
|
||||
@@ -0,0 +1,280 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Maxim Levitsky <mlevitsk@redhat.com>
|
||||
Date: Wed, 3 Aug 2022 18:50:05 +0300
|
||||
Subject: [PATCH] KVM: x86: emulator/smm: add structs for KVM's smram layout
|
||||
|
||||
Those structs will be used to read/write the smram state image.
|
||||
|
||||
Also document the differences between KVM's SMRAM layout and SMRAM
|
||||
layout that is used by real Intel/AMD cpus.
|
||||
|
||||
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
|
||||
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
---
|
||||
arch/x86/kvm/emulate.c | 6 +
|
||||
arch/x86/kvm/kvm_emulate.h | 218 +++++++++++++++++++++++++++++++++++++
|
||||
arch/x86/kvm/x86.c | 1 +
|
||||
3 files changed, 225 insertions(+)
|
||||
|
||||
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
|
||||
index 0616ee9cd977..6866f09a5b53 100644
|
||||
--- a/arch/x86/kvm/emulate.c
|
||||
+++ b/arch/x86/kvm/emulate.c
|
||||
@@ -5829,3 +5829,9 @@ bool emulator_can_use_gpa(struct x86_emulate_ctxt *ctxt)
|
||||
|
||||
return true;
|
||||
}
|
||||
+
|
||||
+void __init kvm_emulator_init(void)
|
||||
+{
|
||||
+ __check_smram32_offsets();
|
||||
+ __check_smram64_offsets();
|
||||
+}
|
||||
diff --git a/arch/x86/kvm/kvm_emulate.h b/arch/x86/kvm/kvm_emulate.h
|
||||
index fb09cd22cb7f..0b2bbcce321a 100644
|
||||
--- a/arch/x86/kvm/kvm_emulate.h
|
||||
+++ b/arch/x86/kvm/kvm_emulate.h
|
||||
@@ -13,6 +13,7 @@
|
||||
#define _ASM_X86_KVM_X86_EMULATE_H
|
||||
|
||||
#include <asm/desc_defs.h>
|
||||
+#include <linux/build_bug.h>
|
||||
#include "fpu.h"
|
||||
|
||||
struct x86_emulate_ctxt;
|
||||
@@ -482,6 +483,223 @@ enum x86_intercept {
|
||||
nr_x86_intercepts
|
||||
};
|
||||
|
||||
+
|
||||
+/* 32 bit KVM's emulated SMM layout. Loosely based on Intel's layout */
|
||||
+
|
||||
+struct kvm_smm_seg_state_32 {
|
||||
+ u32 flags;
|
||||
+ u32 limit;
|
||||
+ u32 base;
|
||||
+} __packed;
|
||||
+
|
||||
+struct kvm_smram_state_32 {
|
||||
+ u32 reserved1[62];
|
||||
+ u32 smbase;
|
||||
+ u32 smm_revision;
|
||||
+ u32 reserved2[5];
|
||||
+ u32 cr4; /* CR4 is not present in Intel/AMD SMRAM image */
|
||||
+ u32 reserved3[5];
|
||||
+
|
||||
+ /*
|
||||
+ * Segment state is not present/documented in the Intel/AMD SMRAM image
|
||||
+ * Instead this area on Intel/AMD contains IO/HLT restart flags.
|
||||
+ */
|
||||
+ struct kvm_smm_seg_state_32 ds;
|
||||
+ struct kvm_smm_seg_state_32 fs;
|
||||
+ struct kvm_smm_seg_state_32 gs;
|
||||
+ struct kvm_smm_seg_state_32 idtr; /* IDTR has only base and limit */
|
||||
+ struct kvm_smm_seg_state_32 tr;
|
||||
+ u32 reserved;
|
||||
+ struct kvm_smm_seg_state_32 gdtr; /* GDTR has only base and limit */
|
||||
+ struct kvm_smm_seg_state_32 ldtr;
|
||||
+ struct kvm_smm_seg_state_32 es;
|
||||
+ struct kvm_smm_seg_state_32 cs;
|
||||
+ struct kvm_smm_seg_state_32 ss;
|
||||
+
|
||||
+ u32 es_sel;
|
||||
+ u32 cs_sel;
|
||||
+ u32 ss_sel;
|
||||
+ u32 ds_sel;
|
||||
+ u32 fs_sel;
|
||||
+ u32 gs_sel;
|
||||
+ u32 ldtr_sel;
|
||||
+ u32 tr_sel;
|
||||
+
|
||||
+ u32 dr7;
|
||||
+ u32 dr6;
|
||||
+ u32 gprs[8]; /* GPRS in the "natural" X86 order (EAX/ECX/EDX.../EDI) */
|
||||
+ u32 eip;
|
||||
+ u32 eflags;
|
||||
+ u32 cr3;
|
||||
+ u32 cr0;
|
||||
+} __packed;
|
||||
+
|
||||
+
|
||||
+static inline void __check_smram32_offsets(void)
|
||||
+{
|
||||
+#define __CHECK_SMRAM32_OFFSET(field, offset) \
|
||||
+ ASSERT_STRUCT_OFFSET(struct kvm_smram_state_32, field, offset - 0xFE00)
|
||||
+
|
||||
+ __CHECK_SMRAM32_OFFSET(reserved1, 0xFE00);
|
||||
+ __CHECK_SMRAM32_OFFSET(smbase, 0xFEF8);
|
||||
+ __CHECK_SMRAM32_OFFSET(smm_revision, 0xFEFC);
|
||||
+ __CHECK_SMRAM32_OFFSET(reserved2, 0xFF00);
|
||||
+ __CHECK_SMRAM32_OFFSET(cr4, 0xFF14);
|
||||
+ __CHECK_SMRAM32_OFFSET(reserved3, 0xFF18);
|
||||
+ __CHECK_SMRAM32_OFFSET(ds, 0xFF2C);
|
||||
+ __CHECK_SMRAM32_OFFSET(fs, 0xFF38);
|
||||
+ __CHECK_SMRAM32_OFFSET(gs, 0xFF44);
|
||||
+ __CHECK_SMRAM32_OFFSET(idtr, 0xFF50);
|
||||
+ __CHECK_SMRAM32_OFFSET(tr, 0xFF5C);
|
||||
+ __CHECK_SMRAM32_OFFSET(gdtr, 0xFF6C);
|
||||
+ __CHECK_SMRAM32_OFFSET(ldtr, 0xFF78);
|
||||
+ __CHECK_SMRAM32_OFFSET(es, 0xFF84);
|
||||
+ __CHECK_SMRAM32_OFFSET(cs, 0xFF90);
|
||||
+ __CHECK_SMRAM32_OFFSET(ss, 0xFF9C);
|
||||
+ __CHECK_SMRAM32_OFFSET(es_sel, 0xFFA8);
|
||||
+ __CHECK_SMRAM32_OFFSET(cs_sel, 0xFFAC);
|
||||
+ __CHECK_SMRAM32_OFFSET(ss_sel, 0xFFB0);
|
||||
+ __CHECK_SMRAM32_OFFSET(ds_sel, 0xFFB4);
|
||||
+ __CHECK_SMRAM32_OFFSET(fs_sel, 0xFFB8);
|
||||
+ __CHECK_SMRAM32_OFFSET(gs_sel, 0xFFBC);
|
||||
+ __CHECK_SMRAM32_OFFSET(ldtr_sel, 0xFFC0);
|
||||
+ __CHECK_SMRAM32_OFFSET(tr_sel, 0xFFC4);
|
||||
+ __CHECK_SMRAM32_OFFSET(dr7, 0xFFC8);
|
||||
+ __CHECK_SMRAM32_OFFSET(dr6, 0xFFCC);
|
||||
+ __CHECK_SMRAM32_OFFSET(gprs, 0xFFD0);
|
||||
+ __CHECK_SMRAM32_OFFSET(eip, 0xFFF0);
|
||||
+ __CHECK_SMRAM32_OFFSET(eflags, 0xFFF4);
|
||||
+ __CHECK_SMRAM32_OFFSET(cr3, 0xFFF8);
|
||||
+ __CHECK_SMRAM32_OFFSET(cr0, 0xFFFC);
|
||||
+#undef __CHECK_SMRAM32_OFFSET
|
||||
+}
|
||||
+
|
||||
+
|
||||
+/* 64 bit KVM's emulated SMM layout. Based on AMD64 layout */
|
||||
+
|
||||
+struct kvm_smm_seg_state_64 {
|
||||
+ u16 selector;
|
||||
+ u16 attributes;
|
||||
+ u32 limit;
|
||||
+ u64 base;
|
||||
+};
|
||||
+
|
||||
+struct kvm_smram_state_64 {
|
||||
+
|
||||
+ struct kvm_smm_seg_state_64 es;
|
||||
+ struct kvm_smm_seg_state_64 cs;
|
||||
+ struct kvm_smm_seg_state_64 ss;
|
||||
+ struct kvm_smm_seg_state_64 ds;
|
||||
+ struct kvm_smm_seg_state_64 fs;
|
||||
+ struct kvm_smm_seg_state_64 gs;
|
||||
+ struct kvm_smm_seg_state_64 gdtr; /* GDTR has only base and limit*/
|
||||
+ struct kvm_smm_seg_state_64 ldtr;
|
||||
+ struct kvm_smm_seg_state_64 idtr; /* IDTR has only base and limit*/
|
||||
+ struct kvm_smm_seg_state_64 tr;
|
||||
+
|
||||
+ /* I/O restart and auto halt restart are not implemented by KVM */
|
||||
+ u64 io_restart_rip;
|
||||
+ u64 io_restart_rcx;
|
||||
+ u64 io_restart_rsi;
|
||||
+ u64 io_restart_rdi;
|
||||
+ u32 io_restart_dword;
|
||||
+ u32 reserved1;
|
||||
+ u8 io_inst_restart;
|
||||
+ u8 auto_hlt_restart;
|
||||
+ u8 reserved2[6];
|
||||
+
|
||||
+ u64 efer;
|
||||
+
|
||||
+ /*
|
||||
+ * Two fields below are implemented on AMD only, to store
|
||||
+ * SVM guest vmcb address if the #SMI was received while in the guest mode.
|
||||
+ */
|
||||
+ u64 svm_guest_flag;
|
||||
+ u64 svm_guest_vmcb_gpa;
|
||||
+ u64 svm_guest_virtual_int; /* unknown purpose, not implemented */
|
||||
+
|
||||
+ u32 reserved3[3];
|
||||
+ u32 smm_revison;
|
||||
+ u32 smbase;
|
||||
+ u32 reserved4[5];
|
||||
+
|
||||
+ /* ssp and svm_* fields below are not implemented by KVM */
|
||||
+ u64 ssp;
|
||||
+ u64 svm_guest_pat;
|
||||
+ u64 svm_host_efer;
|
||||
+ u64 svm_host_cr4;
|
||||
+ u64 svm_host_cr3;
|
||||
+ u64 svm_host_cr0;
|
||||
+
|
||||
+ u64 cr4;
|
||||
+ u64 cr3;
|
||||
+ u64 cr0;
|
||||
+ u64 dr7;
|
||||
+ u64 dr6;
|
||||
+ u64 rflags;
|
||||
+ u64 rip;
|
||||
+ u64 gprs[16]; /* GPRS in a reversed "natural" X86 order (R15/R14/../RCX/RAX.) */
|
||||
+};
|
||||
+
|
||||
+
|
||||
+static inline void __check_smram64_offsets(void)
|
||||
+{
|
||||
+#define __CHECK_SMRAM64_OFFSET(field, offset) \
|
||||
+ ASSERT_STRUCT_OFFSET(struct kvm_smram_state_64, field, offset - 0xFE00)
|
||||
+
|
||||
+ __CHECK_SMRAM64_OFFSET(es, 0xFE00);
|
||||
+ __CHECK_SMRAM64_OFFSET(cs, 0xFE10);
|
||||
+ __CHECK_SMRAM64_OFFSET(ss, 0xFE20);
|
||||
+ __CHECK_SMRAM64_OFFSET(ds, 0xFE30);
|
||||
+ __CHECK_SMRAM64_OFFSET(fs, 0xFE40);
|
||||
+ __CHECK_SMRAM64_OFFSET(gs, 0xFE50);
|
||||
+ __CHECK_SMRAM64_OFFSET(gdtr, 0xFE60);
|
||||
+ __CHECK_SMRAM64_OFFSET(ldtr, 0xFE70);
|
||||
+ __CHECK_SMRAM64_OFFSET(idtr, 0xFE80);
|
||||
+ __CHECK_SMRAM64_OFFSET(tr, 0xFE90);
|
||||
+ __CHECK_SMRAM64_OFFSET(io_restart_rip, 0xFEA0);
|
||||
+ __CHECK_SMRAM64_OFFSET(io_restart_rcx, 0xFEA8);
|
||||
+ __CHECK_SMRAM64_OFFSET(io_restart_rsi, 0xFEB0);
|
||||
+ __CHECK_SMRAM64_OFFSET(io_restart_rdi, 0xFEB8);
|
||||
+ __CHECK_SMRAM64_OFFSET(io_restart_dword, 0xFEC0);
|
||||
+ __CHECK_SMRAM64_OFFSET(reserved1, 0xFEC4);
|
||||
+ __CHECK_SMRAM64_OFFSET(io_inst_restart, 0xFEC8);
|
||||
+ __CHECK_SMRAM64_OFFSET(auto_hlt_restart, 0xFEC9);
|
||||
+ __CHECK_SMRAM64_OFFSET(reserved2, 0xFECA);
|
||||
+ __CHECK_SMRAM64_OFFSET(efer, 0xFED0);
|
||||
+ __CHECK_SMRAM64_OFFSET(svm_guest_flag, 0xFED8);
|
||||
+ __CHECK_SMRAM64_OFFSET(svm_guest_vmcb_gpa, 0xFEE0);
|
||||
+ __CHECK_SMRAM64_OFFSET(svm_guest_virtual_int, 0xFEE8);
|
||||
+ __CHECK_SMRAM64_OFFSET(reserved3, 0xFEF0);
|
||||
+ __CHECK_SMRAM64_OFFSET(smm_revison, 0xFEFC);
|
||||
+ __CHECK_SMRAM64_OFFSET(smbase, 0xFF00);
|
||||
+ __CHECK_SMRAM64_OFFSET(reserved4, 0xFF04);
|
||||
+ __CHECK_SMRAM64_OFFSET(ssp, 0xFF18);
|
||||
+ __CHECK_SMRAM64_OFFSET(svm_guest_pat, 0xFF20);
|
||||
+ __CHECK_SMRAM64_OFFSET(svm_host_efer, 0xFF28);
|
||||
+ __CHECK_SMRAM64_OFFSET(svm_host_cr4, 0xFF30);
|
||||
+ __CHECK_SMRAM64_OFFSET(svm_host_cr3, 0xFF38);
|
||||
+ __CHECK_SMRAM64_OFFSET(svm_host_cr0, 0xFF40);
|
||||
+ __CHECK_SMRAM64_OFFSET(cr4, 0xFF48);
|
||||
+ __CHECK_SMRAM64_OFFSET(cr3, 0xFF50);
|
||||
+ __CHECK_SMRAM64_OFFSET(cr0, 0xFF58);
|
||||
+ __CHECK_SMRAM64_OFFSET(dr7, 0xFF60);
|
||||
+ __CHECK_SMRAM64_OFFSET(dr6, 0xFF68);
|
||||
+ __CHECK_SMRAM64_OFFSET(rflags, 0xFF70);
|
||||
+ __CHECK_SMRAM64_OFFSET(rip, 0xFF78);
|
||||
+ __CHECK_SMRAM64_OFFSET(gprs, 0xFF80);
|
||||
+#undef __CHECK_SMRAM64_OFFSET
|
||||
+}
|
||||
+
|
||||
+union kvm_smram {
|
||||
+ struct kvm_smram_state_64 smram64;
|
||||
+ struct kvm_smram_state_32 smram32;
|
||||
+ u8 bytes[512];
|
||||
+};
|
||||
+
|
||||
+void __init kvm_emulator_init(void);
|
||||
+
|
||||
+
|
||||
/* Host execution mode. */
|
||||
#if defined(CONFIG_X86_32)
|
||||
#define X86EMUL_MODE_HOST X86EMUL_MODE_PROT32
|
||||
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
|
||||
index 7e817493667d..f62bce0a74f0 100644
|
||||
--- a/arch/x86/kvm/x86.c
|
||||
+++ b/arch/x86/kvm/x86.c
|
||||
@@ -12695,6 +12695,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(kvm_vmgexit_msr_protocol_exit);
|
||||
static int __init kvm_x86_init(void)
|
||||
{
|
||||
kvm_mmu_x86_module_init();
|
||||
+ kvm_emulator_init();
|
||||
mitigate_smt_rsb &= boot_cpu_has_bug(X86_BUG_SMT_RSB) && cpu_smt_possible();
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,214 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Maxim Levitsky <mlevitsk@redhat.com>
|
||||
Date: Wed, 3 Aug 2022 18:50:06 +0300
|
||||
Subject: [PATCH] KVM: x86: emulator/smm: use smram structs in the common code
|
||||
|
||||
Switch from using a raw array to 'union kvm_smram'.
|
||||
|
||||
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
|
||||
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
---
|
||||
arch/x86/include/asm/kvm_host.h | 5 +++--
|
||||
arch/x86/kvm/emulate.c | 12 +++++++-----
|
||||
arch/x86/kvm/kvm_emulate.h | 3 ++-
|
||||
arch/x86/kvm/svm/svm.c | 8 ++++++--
|
||||
arch/x86/kvm/vmx/vmx.c | 4 ++--
|
||||
arch/x86/kvm/x86.c | 16 ++++++++--------
|
||||
6 files changed, 28 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
|
||||
index b2a98914a63c..4b1514a174b0 100644
|
||||
--- a/arch/x86/include/asm/kvm_host.h
|
||||
+++ b/arch/x86/include/asm/kvm_host.h
|
||||
@@ -200,6 +200,7 @@ typedef enum exit_fastpath_completion fastpath_t;
|
||||
|
||||
struct x86_emulate_ctxt;
|
||||
struct x86_exception;
|
||||
+union kvm_smram;
|
||||
enum x86_intercept;
|
||||
enum x86_intercept_stage;
|
||||
|
||||
@@ -1464,8 +1465,8 @@ struct kvm_x86_ops {
|
||||
void (*setup_mce)(struct kvm_vcpu *vcpu);
|
||||
|
||||
int (*smi_allowed)(struct kvm_vcpu *vcpu, bool for_injection);
|
||||
- int (*enter_smm)(struct kvm_vcpu *vcpu, char *smstate);
|
||||
- int (*leave_smm)(struct kvm_vcpu *vcpu, const char *smstate);
|
||||
+ int (*enter_smm)(struct kvm_vcpu *vcpu, union kvm_smram *smram);
|
||||
+ int (*leave_smm)(struct kvm_vcpu *vcpu, const union kvm_smram *smram);
|
||||
void (*enable_smi_window)(struct kvm_vcpu *vcpu);
|
||||
|
||||
int (*mem_enc_op)(struct kvm *kvm, void __user *argp);
|
||||
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
|
||||
index 6866f09a5b53..ae6f89b79ef2 100644
|
||||
--- a/arch/x86/kvm/emulate.c
|
||||
+++ b/arch/x86/kvm/emulate.c
|
||||
@@ -2566,16 +2566,18 @@ static int rsm_load_state_64(struct x86_emulate_ctxt *ctxt,
|
||||
static int em_rsm(struct x86_emulate_ctxt *ctxt)
|
||||
{
|
||||
unsigned long cr0, cr4, efer;
|
||||
- char buf[512];
|
||||
+ const union kvm_smram smram;
|
||||
u64 smbase;
|
||||
int ret;
|
||||
|
||||
+ BUILD_BUG_ON(sizeof(smram) != 512);
|
||||
+
|
||||
if ((ctxt->ops->get_hflags(ctxt) & X86EMUL_SMM_MASK) == 0)
|
||||
return emulate_ud(ctxt);
|
||||
|
||||
smbase = ctxt->ops->get_smbase(ctxt);
|
||||
|
||||
- ret = ctxt->ops->read_phys(ctxt, smbase + 0xfe00, buf, sizeof(buf));
|
||||
+ ret = ctxt->ops->read_phys(ctxt, smbase + 0xfe00, (void *)&smram, sizeof(smram));
|
||||
if (ret != X86EMUL_CONTINUE)
|
||||
return X86EMUL_UNHANDLEABLE;
|
||||
|
||||
@@ -2625,15 +2627,15 @@ static int em_rsm(struct x86_emulate_ctxt *ctxt)
|
||||
* state (e.g. enter guest mode) before loading state from the SMM
|
||||
* state-save area.
|
||||
*/
|
||||
- if (ctxt->ops->leave_smm(ctxt, buf))
|
||||
+ if (ctxt->ops->leave_smm(ctxt, &smram))
|
||||
goto emulate_shutdown;
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
if (emulator_has_longmode(ctxt))
|
||||
- ret = rsm_load_state_64(ctxt, buf);
|
||||
+ ret = rsm_load_state_64(ctxt, (const char *)&smram);
|
||||
else
|
||||
#endif
|
||||
- ret = rsm_load_state_32(ctxt, buf);
|
||||
+ ret = rsm_load_state_32(ctxt, (const char *)&smram);
|
||||
|
||||
if (ret != X86EMUL_CONTINUE)
|
||||
goto emulate_shutdown;
|
||||
diff --git a/arch/x86/kvm/kvm_emulate.h b/arch/x86/kvm/kvm_emulate.h
|
||||
index 0b2bbcce321a..3b37b3e17379 100644
|
||||
--- a/arch/x86/kvm/kvm_emulate.h
|
||||
+++ b/arch/x86/kvm/kvm_emulate.h
|
||||
@@ -19,6 +19,7 @@
|
||||
struct x86_emulate_ctxt;
|
||||
enum x86_intercept;
|
||||
enum x86_intercept_stage;
|
||||
+union kvm_smram;
|
||||
|
||||
struct x86_exception {
|
||||
u8 vector;
|
||||
@@ -233,7 +234,7 @@ struct x86_emulate_ops {
|
||||
|
||||
unsigned (*get_hflags)(struct x86_emulate_ctxt *ctxt);
|
||||
void (*exiting_smm)(struct x86_emulate_ctxt *ctxt);
|
||||
- int (*leave_smm)(struct x86_emulate_ctxt *ctxt, const char *smstate);
|
||||
+ int (*leave_smm)(struct x86_emulate_ctxt *ctxt, const union kvm_smram *smram);
|
||||
void (*triple_fault)(struct x86_emulate_ctxt *ctxt);
|
||||
int (*set_xcr)(struct x86_emulate_ctxt *ctxt, u32 index, u64 xcr);
|
||||
};
|
||||
diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
|
||||
index af33aafcb410..76a35d939b9f 100644
|
||||
--- a/arch/x86/kvm/svm/svm.c
|
||||
+++ b/arch/x86/kvm/svm/svm.c
|
||||
@@ -4328,12 +4328,14 @@ static int svm_smi_allowed(struct kvm_vcpu *vcpu, bool for_injection)
|
||||
return !svm_smi_blocked(vcpu);
|
||||
}
|
||||
|
||||
-static int svm_enter_smm(struct kvm_vcpu *vcpu, char *smstate)
|
||||
+static int svm_enter_smm(struct kvm_vcpu *vcpu, union kvm_smram *smram)
|
||||
{
|
||||
struct vcpu_svm *svm = to_svm(vcpu);
|
||||
struct kvm_host_map map_save;
|
||||
int ret;
|
||||
|
||||
+ char *smstate = (char *)smram;
|
||||
+
|
||||
if (!is_guest_mode(vcpu))
|
||||
return 0;
|
||||
|
||||
@@ -4375,7 +4377,7 @@ static int svm_enter_smm(struct kvm_vcpu *vcpu, char *smstate)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static int svm_leave_smm(struct kvm_vcpu *vcpu, const char *smstate)
|
||||
+static int svm_leave_smm(struct kvm_vcpu *vcpu, const union kvm_smram *smram)
|
||||
{
|
||||
struct vcpu_svm *svm = to_svm(vcpu);
|
||||
struct kvm_host_map map, map_save;
|
||||
@@ -4383,6 +4385,8 @@ static int svm_leave_smm(struct kvm_vcpu *vcpu, const char *smstate)
|
||||
struct vmcb *vmcb12;
|
||||
int ret;
|
||||
|
||||
+ const char *smstate = (const char *)smram;
|
||||
+
|
||||
if (!guest_cpuid_has(vcpu, X86_FEATURE_LM))
|
||||
return 0;
|
||||
|
||||
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
|
||||
index ab7141c1def4..f844864b5763 100644
|
||||
--- a/arch/x86/kvm/vmx/vmx.c
|
||||
+++ b/arch/x86/kvm/vmx/vmx.c
|
||||
@@ -7652,7 +7652,7 @@ static int vmx_smi_allowed(struct kvm_vcpu *vcpu, bool for_injection)
|
||||
return !is_smm(vcpu);
|
||||
}
|
||||
|
||||
-static int vmx_enter_smm(struct kvm_vcpu *vcpu, char *smstate)
|
||||
+static int vmx_enter_smm(struct kvm_vcpu *vcpu, union kvm_smram *smram)
|
||||
{
|
||||
struct vcpu_vmx *vmx = to_vmx(vcpu);
|
||||
|
||||
@@ -7666,7 +7666,7 @@ static int vmx_enter_smm(struct kvm_vcpu *vcpu, char *smstate)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static int vmx_leave_smm(struct kvm_vcpu *vcpu, const char *smstate)
|
||||
+static int vmx_leave_smm(struct kvm_vcpu *vcpu, const union kvm_smram *smram)
|
||||
{
|
||||
struct vcpu_vmx *vmx = to_vmx(vcpu);
|
||||
int ret;
|
||||
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
|
||||
index f62bce0a74f0..3d282bcce9ef 100644
|
||||
--- a/arch/x86/kvm/x86.c
|
||||
+++ b/arch/x86/kvm/x86.c
|
||||
@@ -7489,9 +7489,9 @@ static void emulator_exiting_smm(struct x86_emulate_ctxt *ctxt)
|
||||
}
|
||||
|
||||
static int emulator_leave_smm(struct x86_emulate_ctxt *ctxt,
|
||||
- const char *smstate)
|
||||
+ const union kvm_smram *smram)
|
||||
{
|
||||
- return static_call(kvm_x86_leave_smm)(emul_to_vcpu(ctxt), smstate);
|
||||
+ return static_call(kvm_x86_leave_smm)(emul_to_vcpu(ctxt), smram);
|
||||
}
|
||||
|
||||
static void emulator_triple_fault(struct x86_emulate_ctxt *ctxt)
|
||||
@@ -9370,25 +9370,25 @@ static void enter_smm(struct kvm_vcpu *vcpu)
|
||||
struct kvm_segment cs, ds;
|
||||
struct desc_ptr dt;
|
||||
unsigned long cr0;
|
||||
- char buf[512];
|
||||
+ union kvm_smram smram;
|
||||
|
||||
- memset(buf, 0, 512);
|
||||
+ memset(smram.bytes, 0, sizeof(smram.bytes));
|
||||
#ifdef CONFIG_X86_64
|
||||
if (guest_cpuid_has(vcpu, X86_FEATURE_LM))
|
||||
- enter_smm_save_state_64(vcpu, buf);
|
||||
+ enter_smm_save_state_64(vcpu, (char *)&smram);
|
||||
else
|
||||
#endif
|
||||
- enter_smm_save_state_32(vcpu, buf);
|
||||
+ enter_smm_save_state_32(vcpu, (char *)&smram);
|
||||
|
||||
/*
|
||||
* Give enter_smm() a chance to make ISA-specific changes to the vCPU
|
||||
* state (e.g. leave guest mode) after we've saved the state into the
|
||||
* SMM state-save area.
|
||||
*/
|
||||
- static_call(kvm_x86_enter_smm)(vcpu, buf);
|
||||
+ static_call(kvm_x86_enter_smm)(vcpu, &smram);
|
||||
|
||||
kvm_smm_changed(vcpu, true);
|
||||
- kvm_vcpu_write_guest(vcpu, vcpu->arch.smbase + 0xfe00, buf, sizeof(buf));
|
||||
+ kvm_vcpu_write_guest(vcpu, vcpu->arch.smbase + 0xfe00, &smram, sizeof(smram));
|
||||
|
||||
if (static_call(kvm_x86_get_nmi_mask)(vcpu))
|
||||
vcpu->arch.hflags |= HF_SMM_INSIDE_NMI_MASK;
|
||||
@@ -0,0 +1,268 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Maxim Levitsky <mlevitsk@redhat.com>
|
||||
Date: Wed, 3 Aug 2022 18:50:07 +0300
|
||||
Subject: [PATCH] KVM: x86: emulator/smm: use smram struct for 32 bit smram
|
||||
load/restore
|
||||
|
||||
Use kvm_smram_state_32 struct to save/restore 32 bit SMM state
|
||||
(used when X86_FEATURE_LM is not present in the guest CPUID).
|
||||
|
||||
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
|
||||
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
---
|
||||
arch/x86/kvm/emulate.c | 81 +++++++++++++++---------------------------
|
||||
arch/x86/kvm/x86.c | 75 +++++++++++++++++---------------------
|
||||
2 files changed, 60 insertions(+), 96 deletions(-)
|
||||
|
||||
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
|
||||
index ae6f89b79ef2..36c45c89563c 100644
|
||||
--- a/arch/x86/kvm/emulate.c
|
||||
+++ b/arch/x86/kvm/emulate.c
|
||||
@@ -2343,25 +2343,17 @@ static void rsm_set_desc_flags(struct desc_struct *desc, u32 flags)
|
||||
desc->type = (flags >> 8) & 15;
|
||||
}
|
||||
|
||||
-static int rsm_load_seg_32(struct x86_emulate_ctxt *ctxt, const char *smstate,
|
||||
+static void rsm_load_seg_32(struct x86_emulate_ctxt *ctxt,
|
||||
+ const struct kvm_smm_seg_state_32 *state,
|
||||
+ u16 selector,
|
||||
int n)
|
||||
{
|
||||
struct desc_struct desc;
|
||||
- int offset;
|
||||
- u16 selector;
|
||||
-
|
||||
- selector = GET_SMSTATE(u32, smstate, 0x7fa8 + n * 4);
|
||||
-
|
||||
- if (n < 3)
|
||||
- offset = 0x7f84 + n * 12;
|
||||
- else
|
||||
- offset = 0x7f2c + (n - 3) * 12;
|
||||
|
||||
- set_desc_base(&desc, GET_SMSTATE(u32, smstate, offset + 8));
|
||||
- set_desc_limit(&desc, GET_SMSTATE(u32, smstate, offset + 4));
|
||||
- rsm_set_desc_flags(&desc, GET_SMSTATE(u32, smstate, offset));
|
||||
+ set_desc_base(&desc, state->base);
|
||||
+ set_desc_limit(&desc, state->limit);
|
||||
+ rsm_set_desc_flags(&desc, state->flags);
|
||||
ctxt->ops->set_segment(ctxt, selector, &desc, 0, n);
|
||||
- return X86EMUL_CONTINUE;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
@@ -2432,63 +2424,46 @@ static int rsm_enter_protected_mode(struct x86_emulate_ctxt *ctxt,
|
||||
}
|
||||
|
||||
static int rsm_load_state_32(struct x86_emulate_ctxt *ctxt,
|
||||
- const char *smstate)
|
||||
+ const struct kvm_smram_state_32 *smstate)
|
||||
{
|
||||
- struct desc_struct desc;
|
||||
struct desc_ptr dt;
|
||||
- u16 selector;
|
||||
- u32 val, cr0, cr3, cr4;
|
||||
int i;
|
||||
|
||||
- cr0 = GET_SMSTATE(u32, smstate, 0x7ffc);
|
||||
- cr3 = GET_SMSTATE(u32, smstate, 0x7ff8);
|
||||
- ctxt->eflags = GET_SMSTATE(u32, smstate, 0x7ff4) | X86_EFLAGS_FIXED;
|
||||
- ctxt->_eip = GET_SMSTATE(u32, smstate, 0x7ff0);
|
||||
+ ctxt->eflags = smstate->eflags | X86_EFLAGS_FIXED;
|
||||
+ ctxt->_eip = smstate->eip;
|
||||
|
||||
for (i = 0; i < 8; i++)
|
||||
- *reg_write(ctxt, i) = GET_SMSTATE(u32, smstate, 0x7fd0 + i * 4);
|
||||
-
|
||||
- val = GET_SMSTATE(u32, smstate, 0x7fcc);
|
||||
+ *reg_write(ctxt, i) = smstate->gprs[i];
|
||||
|
||||
- if (ctxt->ops->set_dr(ctxt, 6, val))
|
||||
+ if (ctxt->ops->set_dr(ctxt, 6, smstate->dr6))
|
||||
return X86EMUL_UNHANDLEABLE;
|
||||
-
|
||||
- val = GET_SMSTATE(u32, smstate, 0x7fc8);
|
||||
-
|
||||
- if (ctxt->ops->set_dr(ctxt, 7, val))
|
||||
+ if (ctxt->ops->set_dr(ctxt, 7, smstate->dr7))
|
||||
return X86EMUL_UNHANDLEABLE;
|
||||
|
||||
- selector = GET_SMSTATE(u32, smstate, 0x7fc4);
|
||||
- set_desc_base(&desc, GET_SMSTATE(u32, smstate, 0x7f64));
|
||||
- set_desc_limit(&desc, GET_SMSTATE(u32, smstate, 0x7f60));
|
||||
- rsm_set_desc_flags(&desc, GET_SMSTATE(u32, smstate, 0x7f5c));
|
||||
- ctxt->ops->set_segment(ctxt, selector, &desc, 0, VCPU_SREG_TR);
|
||||
+ rsm_load_seg_32(ctxt, &smstate->tr, smstate->tr_sel, VCPU_SREG_TR);
|
||||
+ rsm_load_seg_32(ctxt, &smstate->ldtr, smstate->ldtr_sel, VCPU_SREG_LDTR);
|
||||
|
||||
- selector = GET_SMSTATE(u32, smstate, 0x7fc0);
|
||||
- set_desc_base(&desc, GET_SMSTATE(u32, smstate, 0x7f80));
|
||||
- set_desc_limit(&desc, GET_SMSTATE(u32, smstate, 0x7f7c));
|
||||
- rsm_set_desc_flags(&desc, GET_SMSTATE(u32, smstate, 0x7f78));
|
||||
- ctxt->ops->set_segment(ctxt, selector, &desc, 0, VCPU_SREG_LDTR);
|
||||
|
||||
- dt.address = GET_SMSTATE(u32, smstate, 0x7f74);
|
||||
- dt.size = GET_SMSTATE(u32, smstate, 0x7f70);
|
||||
+ dt.address = smstate->gdtr.base;
|
||||
+ dt.size = smstate->gdtr.limit;
|
||||
ctxt->ops->set_gdt(ctxt, &dt);
|
||||
|
||||
- dt.address = GET_SMSTATE(u32, smstate, 0x7f58);
|
||||
- dt.size = GET_SMSTATE(u32, smstate, 0x7f54);
|
||||
+ dt.address = smstate->idtr.base;
|
||||
+ dt.size = smstate->idtr.limit;
|
||||
ctxt->ops->set_idt(ctxt, &dt);
|
||||
|
||||
- for (i = 0; i < 6; i++) {
|
||||
- int r = rsm_load_seg_32(ctxt, smstate, i);
|
||||
- if (r != X86EMUL_CONTINUE)
|
||||
- return r;
|
||||
- }
|
||||
+ rsm_load_seg_32(ctxt, &smstate->es, smstate->es_sel, VCPU_SREG_ES);
|
||||
+ rsm_load_seg_32(ctxt, &smstate->cs, smstate->cs_sel, VCPU_SREG_CS);
|
||||
+ rsm_load_seg_32(ctxt, &smstate->ss, smstate->ss_sel, VCPU_SREG_SS);
|
||||
|
||||
- cr4 = GET_SMSTATE(u32, smstate, 0x7f14);
|
||||
+ rsm_load_seg_32(ctxt, &smstate->ds, smstate->ds_sel, VCPU_SREG_DS);
|
||||
+ rsm_load_seg_32(ctxt, &smstate->fs, smstate->fs_sel, VCPU_SREG_FS);
|
||||
+ rsm_load_seg_32(ctxt, &smstate->gs, smstate->gs_sel, VCPU_SREG_GS);
|
||||
|
||||
- ctxt->ops->set_smbase(ctxt, GET_SMSTATE(u32, smstate, 0x7ef8));
|
||||
+ ctxt->ops->set_smbase(ctxt, smstate->smbase);
|
||||
|
||||
- return rsm_enter_protected_mode(ctxt, cr0, cr3, cr4);
|
||||
+ return rsm_enter_protected_mode(ctxt, smstate->cr0,
|
||||
+ smstate->cr3, smstate->cr4);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
@@ -2635,7 +2610,7 @@ static int em_rsm(struct x86_emulate_ctxt *ctxt)
|
||||
ret = rsm_load_state_64(ctxt, (const char *)&smram);
|
||||
else
|
||||
#endif
|
||||
- ret = rsm_load_state_32(ctxt, (const char *)&smram);
|
||||
+ ret = rsm_load_state_32(ctxt, &smram.smram32);
|
||||
|
||||
if (ret != X86EMUL_CONTINUE)
|
||||
goto emulate_shutdown;
|
||||
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
|
||||
index 3d282bcce9ef..c6b5c0543931 100644
|
||||
--- a/arch/x86/kvm/x86.c
|
||||
+++ b/arch/x86/kvm/x86.c
|
||||
@@ -9224,22 +9224,18 @@ static u32 enter_smm_get_segment_flags(struct kvm_segment *seg)
|
||||
return flags;
|
||||
}
|
||||
|
||||
-static void enter_smm_save_seg_32(struct kvm_vcpu *vcpu, char *buf, int n)
|
||||
+static void enter_smm_save_seg_32(struct kvm_vcpu *vcpu,
|
||||
+ struct kvm_smm_seg_state_32 *state,
|
||||
+ u32 *selector,
|
||||
+ int n)
|
||||
{
|
||||
struct kvm_segment seg;
|
||||
- int offset;
|
||||
|
||||
kvm_get_segment(vcpu, &seg, n);
|
||||
- put_smstate(u32, buf, 0x7fa8 + n * 4, seg.selector);
|
||||
-
|
||||
- if (n < 3)
|
||||
- offset = 0x7f84 + n * 12;
|
||||
- else
|
||||
- offset = 0x7f2c + (n - 3) * 12;
|
||||
-
|
||||
- put_smstate(u32, buf, offset + 8, seg.base);
|
||||
- put_smstate(u32, buf, offset + 4, seg.limit);
|
||||
- put_smstate(u32, buf, offset, enter_smm_get_segment_flags(&seg));
|
||||
+ *selector = seg.selector;
|
||||
+ state->base = seg.base;
|
||||
+ state->limit = seg.limit;
|
||||
+ state->flags = enter_smm_get_segment_flags(&seg);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
@@ -9260,54 +9256,47 @@ static void enter_smm_save_seg_64(struct kvm_vcpu *vcpu, char *buf, int n)
|
||||
}
|
||||
#endif
|
||||
|
||||
-static void enter_smm_save_state_32(struct kvm_vcpu *vcpu, char *buf)
|
||||
+static void enter_smm_save_state_32(struct kvm_vcpu *vcpu, struct kvm_smram_state_32 *smram)
|
||||
{
|
||||
struct desc_ptr dt;
|
||||
- struct kvm_segment seg;
|
||||
unsigned long val;
|
||||
int i;
|
||||
|
||||
- put_smstate(u32, buf, 0x7ffc, kvm_read_cr0(vcpu));
|
||||
- put_smstate(u32, buf, 0x7ff8, kvm_read_cr3(vcpu));
|
||||
- put_smstate(u32, buf, 0x7ff4, kvm_get_rflags(vcpu));
|
||||
- put_smstate(u32, buf, 0x7ff0, kvm_rip_read(vcpu));
|
||||
+ smram->cr0 = kvm_read_cr0(vcpu);
|
||||
+ smram->cr3 = kvm_read_cr3(vcpu);
|
||||
+ smram->eflags = kvm_get_rflags(vcpu);
|
||||
+ smram->eip = kvm_rip_read(vcpu);
|
||||
|
||||
for (i = 0; i < 8; i++)
|
||||
- put_smstate(u32, buf, 0x7fd0 + i * 4, kvm_register_read_raw(vcpu, i));
|
||||
+ smram->gprs[i] = kvm_register_read_raw(vcpu, i);
|
||||
|
||||
kvm_get_dr(vcpu, 6, &val);
|
||||
- put_smstate(u32, buf, 0x7fcc, (u32)val);
|
||||
+ smram->dr6 = (u32)val;
|
||||
kvm_get_dr(vcpu, 7, &val);
|
||||
- put_smstate(u32, buf, 0x7fc8, (u32)val);
|
||||
+ smram->dr7 = (u32)val;
|
||||
|
||||
- kvm_get_segment(vcpu, &seg, VCPU_SREG_TR);
|
||||
- put_smstate(u32, buf, 0x7fc4, seg.selector);
|
||||
- put_smstate(u32, buf, 0x7f64, seg.base);
|
||||
- put_smstate(u32, buf, 0x7f60, seg.limit);
|
||||
- put_smstate(u32, buf, 0x7f5c, enter_smm_get_segment_flags(&seg));
|
||||
-
|
||||
- kvm_get_segment(vcpu, &seg, VCPU_SREG_LDTR);
|
||||
- put_smstate(u32, buf, 0x7fc0, seg.selector);
|
||||
- put_smstate(u32, buf, 0x7f80, seg.base);
|
||||
- put_smstate(u32, buf, 0x7f7c, seg.limit);
|
||||
- put_smstate(u32, buf, 0x7f78, enter_smm_get_segment_flags(&seg));
|
||||
+ enter_smm_save_seg_32(vcpu, &smram->tr, &smram->tr_sel, VCPU_SREG_TR);
|
||||
+ enter_smm_save_seg_32(vcpu, &smram->ldtr, &smram->ldtr_sel, VCPU_SREG_LDTR);
|
||||
|
||||
static_call(kvm_x86_get_gdt)(vcpu, &dt);
|
||||
- put_smstate(u32, buf, 0x7f74, dt.address);
|
||||
- put_smstate(u32, buf, 0x7f70, dt.size);
|
||||
+ smram->gdtr.base = dt.address;
|
||||
+ smram->gdtr.limit = dt.size;
|
||||
|
||||
static_call(kvm_x86_get_idt)(vcpu, &dt);
|
||||
- put_smstate(u32, buf, 0x7f58, dt.address);
|
||||
- put_smstate(u32, buf, 0x7f54, dt.size);
|
||||
+ smram->idtr.base = dt.address;
|
||||
+ smram->idtr.limit = dt.size;
|
||||
|
||||
- for (i = 0; i < 6; i++)
|
||||
- enter_smm_save_seg_32(vcpu, buf, i);
|
||||
+ enter_smm_save_seg_32(vcpu, &smram->es, &smram->es_sel, VCPU_SREG_ES);
|
||||
+ enter_smm_save_seg_32(vcpu, &smram->cs, &smram->cs_sel, VCPU_SREG_CS);
|
||||
+ enter_smm_save_seg_32(vcpu, &smram->ss, &smram->ss_sel, VCPU_SREG_SS);
|
||||
|
||||
- put_smstate(u32, buf, 0x7f14, kvm_read_cr4(vcpu));
|
||||
+ enter_smm_save_seg_32(vcpu, &smram->ds, &smram->ds_sel, VCPU_SREG_DS);
|
||||
+ enter_smm_save_seg_32(vcpu, &smram->fs, &smram->fs_sel, VCPU_SREG_FS);
|
||||
+ enter_smm_save_seg_32(vcpu, &smram->gs, &smram->gs_sel, VCPU_SREG_GS);
|
||||
|
||||
- /* revision id */
|
||||
- put_smstate(u32, buf, 0x7efc, 0x00020000);
|
||||
- put_smstate(u32, buf, 0x7ef8, vcpu->arch.smbase);
|
||||
+ smram->cr4 = kvm_read_cr4(vcpu);
|
||||
+ smram->smm_revision = 0x00020000;
|
||||
+ smram->smbase = vcpu->arch.smbase;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
@@ -9378,7 +9367,7 @@ static void enter_smm(struct kvm_vcpu *vcpu)
|
||||
enter_smm_save_state_64(vcpu, (char *)&smram);
|
||||
else
|
||||
#endif
|
||||
- enter_smm_save_state_32(vcpu, (char *)&smram);
|
||||
+ enter_smm_save_state_32(vcpu, &smram.smram32);
|
||||
|
||||
/*
|
||||
* Give enter_smm() a chance to make ISA-specific changes to the vCPU
|
||||
@@ -0,0 +1,279 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Maxim Levitsky <mlevitsk@redhat.com>
|
||||
Date: Wed, 3 Aug 2022 18:50:08 +0300
|
||||
Subject: [PATCH] KVM: x86: emulator/smm: use smram struct for 64 bit smram
|
||||
load/restore
|
||||
|
||||
Use kvm_smram_state_64 struct to save/restore the 64 bit SMM state
|
||||
(used when X86_FEATURE_LM is present in the guest CPUID,
|
||||
regardless of 32-bitness of the guest).
|
||||
|
||||
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
|
||||
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
---
|
||||
arch/x86/kvm/emulate.c | 88 ++++++++++++++----------------------------
|
||||
arch/x86/kvm/x86.c | 75 ++++++++++++++++-------------------
|
||||
2 files changed, 62 insertions(+), 101 deletions(-)
|
||||
|
||||
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
|
||||
index 36c45c89563c..eb2f5e43f6ad 100644
|
||||
--- a/arch/x86/kvm/emulate.c
|
||||
+++ b/arch/x86/kvm/emulate.c
|
||||
@@ -2357,24 +2357,16 @@ static void rsm_load_seg_32(struct x86_emulate_ctxt *ctxt,
|
||||
}
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
-static int rsm_load_seg_64(struct x86_emulate_ctxt *ctxt, const char *smstate,
|
||||
- int n)
|
||||
+static void rsm_load_seg_64(struct x86_emulate_ctxt *ctxt,
|
||||
+ const struct kvm_smm_seg_state_64 *state,
|
||||
+ int n)
|
||||
{
|
||||
struct desc_struct desc;
|
||||
- int offset;
|
||||
- u16 selector;
|
||||
- u32 base3;
|
||||
-
|
||||
- offset = 0x7e00 + n * 16;
|
||||
-
|
||||
- selector = GET_SMSTATE(u16, smstate, offset);
|
||||
- rsm_set_desc_flags(&desc, GET_SMSTATE(u16, smstate, offset + 2) << 8);
|
||||
- set_desc_limit(&desc, GET_SMSTATE(u32, smstate, offset + 4));
|
||||
- set_desc_base(&desc, GET_SMSTATE(u32, smstate, offset + 8));
|
||||
- base3 = GET_SMSTATE(u32, smstate, offset + 12);
|
||||
|
||||
- ctxt->ops->set_segment(ctxt, selector, &desc, base3, n);
|
||||
- return X86EMUL_CONTINUE;
|
||||
+ rsm_set_desc_flags(&desc, state->attributes << 8);
|
||||
+ set_desc_limit(&desc, state->limit);
|
||||
+ set_desc_base(&desc, (u32)state->base);
|
||||
+ ctxt->ops->set_segment(ctxt, state->selector, &desc, state->base >> 32, n);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -2468,71 +2460,49 @@ static int rsm_load_state_32(struct x86_emulate_ctxt *ctxt,
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
static int rsm_load_state_64(struct x86_emulate_ctxt *ctxt,
|
||||
- const char *smstate)
|
||||
+ const struct kvm_smram_state_64 *smstate)
|
||||
{
|
||||
- struct desc_struct desc;
|
||||
struct desc_ptr dt;
|
||||
- u64 val, cr0, cr3, cr4;
|
||||
- u32 base3;
|
||||
- u16 selector;
|
||||
int i, r;
|
||||
|
||||
for (i = 0; i < 16; i++)
|
||||
- *reg_write(ctxt, i) = GET_SMSTATE(u64, smstate, 0x7ff8 - i * 8);
|
||||
+ *reg_write(ctxt, i) = smstate->gprs[15 - i];
|
||||
|
||||
- ctxt->_eip = GET_SMSTATE(u64, smstate, 0x7f78);
|
||||
- ctxt->eflags = GET_SMSTATE(u32, smstate, 0x7f70) | X86_EFLAGS_FIXED;
|
||||
+ ctxt->_eip = smstate->rip;
|
||||
+ ctxt->eflags = smstate->rflags | X86_EFLAGS_FIXED;
|
||||
|
||||
- val = GET_SMSTATE(u64, smstate, 0x7f68);
|
||||
-
|
||||
- if (ctxt->ops->set_dr(ctxt, 6, val))
|
||||
+ if (ctxt->ops->set_dr(ctxt, 6, smstate->dr6))
|
||||
return X86EMUL_UNHANDLEABLE;
|
||||
-
|
||||
- val = GET_SMSTATE(u64, smstate, 0x7f60);
|
||||
-
|
||||
- if (ctxt->ops->set_dr(ctxt, 7, val))
|
||||
+ if (ctxt->ops->set_dr(ctxt, 7, smstate->dr7))
|
||||
return X86EMUL_UNHANDLEABLE;
|
||||
|
||||
- cr0 = GET_SMSTATE(u64, smstate, 0x7f58);
|
||||
- cr3 = GET_SMSTATE(u64, smstate, 0x7f50);
|
||||
- cr4 = GET_SMSTATE(u64, smstate, 0x7f48);
|
||||
- ctxt->ops->set_smbase(ctxt, GET_SMSTATE(u32, smstate, 0x7f00));
|
||||
- val = GET_SMSTATE(u64, smstate, 0x7ed0);
|
||||
+ ctxt->ops->set_smbase(ctxt, smstate->smbase);
|
||||
|
||||
- if (ctxt->ops->set_msr(ctxt, MSR_EFER, val & ~EFER_LMA))
|
||||
+ if (ctxt->ops->set_msr(ctxt, MSR_EFER, smstate->efer & ~EFER_LMA))
|
||||
return X86EMUL_UNHANDLEABLE;
|
||||
|
||||
- selector = GET_SMSTATE(u32, smstate, 0x7e90);
|
||||
- rsm_set_desc_flags(&desc, GET_SMSTATE(u32, smstate, 0x7e92) << 8);
|
||||
- set_desc_limit(&desc, GET_SMSTATE(u32, smstate, 0x7e94));
|
||||
- set_desc_base(&desc, GET_SMSTATE(u32, smstate, 0x7e98));
|
||||
- base3 = GET_SMSTATE(u32, smstate, 0x7e9c);
|
||||
- ctxt->ops->set_segment(ctxt, selector, &desc, base3, VCPU_SREG_TR);
|
||||
+ rsm_load_seg_64(ctxt, &smstate->tr, VCPU_SREG_TR);
|
||||
|
||||
- dt.size = GET_SMSTATE(u32, smstate, 0x7e84);
|
||||
- dt.address = GET_SMSTATE(u64, smstate, 0x7e88);
|
||||
+ dt.size = smstate->idtr.limit;
|
||||
+ dt.address = smstate->idtr.base;
|
||||
ctxt->ops->set_idt(ctxt, &dt);
|
||||
|
||||
- selector = GET_SMSTATE(u32, smstate, 0x7e70);
|
||||
- rsm_set_desc_flags(&desc, GET_SMSTATE(u32, smstate, 0x7e72) << 8);
|
||||
- set_desc_limit(&desc, GET_SMSTATE(u32, smstate, 0x7e74));
|
||||
- set_desc_base(&desc, GET_SMSTATE(u32, smstate, 0x7e78));
|
||||
- base3 = GET_SMSTATE(u32, smstate, 0x7e7c);
|
||||
- ctxt->ops->set_segment(ctxt, selector, &desc, base3, VCPU_SREG_LDTR);
|
||||
+ rsm_load_seg_64(ctxt, &smstate->ldtr, VCPU_SREG_LDTR);
|
||||
|
||||
- dt.size = GET_SMSTATE(u32, smstate, 0x7e64);
|
||||
- dt.address = GET_SMSTATE(u64, smstate, 0x7e68);
|
||||
+ dt.size = smstate->gdtr.limit;
|
||||
+ dt.address = smstate->gdtr.base;
|
||||
ctxt->ops->set_gdt(ctxt, &dt);
|
||||
|
||||
- r = rsm_enter_protected_mode(ctxt, cr0, cr3, cr4);
|
||||
+ r = rsm_enter_protected_mode(ctxt, smstate->cr0, smstate->cr3, smstate->cr4);
|
||||
if (r != X86EMUL_CONTINUE)
|
||||
return r;
|
||||
|
||||
- for (i = 0; i < 6; i++) {
|
||||
- r = rsm_load_seg_64(ctxt, smstate, i);
|
||||
- if (r != X86EMUL_CONTINUE)
|
||||
- return r;
|
||||
- }
|
||||
+ rsm_load_seg_64(ctxt, &smstate->es, VCPU_SREG_ES);
|
||||
+ rsm_load_seg_64(ctxt, &smstate->cs, VCPU_SREG_CS);
|
||||
+ rsm_load_seg_64(ctxt, &smstate->ss, VCPU_SREG_SS);
|
||||
+ rsm_load_seg_64(ctxt, &smstate->ds, VCPU_SREG_DS);
|
||||
+ rsm_load_seg_64(ctxt, &smstate->fs, VCPU_SREG_FS);
|
||||
+ rsm_load_seg_64(ctxt, &smstate->gs, VCPU_SREG_GS);
|
||||
|
||||
return X86EMUL_CONTINUE;
|
||||
}
|
||||
@@ -2607,7 +2577,7 @@ static int em_rsm(struct x86_emulate_ctxt *ctxt)
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
if (emulator_has_longmode(ctxt))
|
||||
- ret = rsm_load_state_64(ctxt, (const char *)&smram);
|
||||
+ ret = rsm_load_state_64(ctxt, &smram.smram64);
|
||||
else
|
||||
#endif
|
||||
ret = rsm_load_state_32(ctxt, &smram.smram32);
|
||||
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
|
||||
index c6b5c0543931..f309248fa888 100644
|
||||
--- a/arch/x86/kvm/x86.c
|
||||
+++ b/arch/x86/kvm/x86.c
|
||||
@@ -9239,20 +9239,17 @@ static void enter_smm_save_seg_32(struct kvm_vcpu *vcpu,
|
||||
}
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
-static void enter_smm_save_seg_64(struct kvm_vcpu *vcpu, char *buf, int n)
|
||||
+static void enter_smm_save_seg_64(struct kvm_vcpu *vcpu,
|
||||
+ struct kvm_smm_seg_state_64 *state,
|
||||
+ int n)
|
||||
{
|
||||
struct kvm_segment seg;
|
||||
- int offset;
|
||||
- u16 flags;
|
||||
|
||||
kvm_get_segment(vcpu, &seg, n);
|
||||
- offset = 0x7e00 + n * 16;
|
||||
-
|
||||
- flags = enter_smm_get_segment_flags(&seg) >> 8;
|
||||
- put_smstate(u16, buf, offset, seg.selector);
|
||||
- put_smstate(u16, buf, offset + 2, flags);
|
||||
- put_smstate(u32, buf, offset + 4, seg.limit);
|
||||
- put_smstate(u64, buf, offset + 8, seg.base);
|
||||
+ state->selector = seg.selector;
|
||||
+ state->attributes = enter_smm_get_segment_flags(&seg) >> 8;
|
||||
+ state->limit = seg.limit;
|
||||
+ state->base = seg.base;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -9300,57 +9297,51 @@ static void enter_smm_save_state_32(struct kvm_vcpu *vcpu, struct kvm_smram_stat
|
||||
}
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
-static void enter_smm_save_state_64(struct kvm_vcpu *vcpu, char *buf)
|
||||
+static void enter_smm_save_state_64(struct kvm_vcpu *vcpu, struct kvm_smram_state_64 *smram)
|
||||
{
|
||||
struct desc_ptr dt;
|
||||
- struct kvm_segment seg;
|
||||
unsigned long val;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 16; i++)
|
||||
- put_smstate(u64, buf, 0x7ff8 - i * 8, kvm_register_read_raw(vcpu, i));
|
||||
+ smram->gprs[15 - i] = kvm_register_read_raw(vcpu, i);
|
||||
+
|
||||
+ smram->rip = kvm_rip_read(vcpu);
|
||||
+ smram->rflags = kvm_get_rflags(vcpu);
|
||||
|
||||
- put_smstate(u64, buf, 0x7f78, kvm_rip_read(vcpu));
|
||||
- put_smstate(u32, buf, 0x7f70, kvm_get_rflags(vcpu));
|
||||
|
||||
kvm_get_dr(vcpu, 6, &val);
|
||||
- put_smstate(u64, buf, 0x7f68, val);
|
||||
+ smram->dr6 = val;
|
||||
kvm_get_dr(vcpu, 7, &val);
|
||||
- put_smstate(u64, buf, 0x7f60, val);
|
||||
-
|
||||
- put_smstate(u64, buf, 0x7f58, kvm_read_cr0(vcpu));
|
||||
- put_smstate(u64, buf, 0x7f50, kvm_read_cr3(vcpu));
|
||||
- put_smstate(u64, buf, 0x7f48, kvm_read_cr4(vcpu));
|
||||
+ smram->dr7 = val;
|
||||
|
||||
- put_smstate(u32, buf, 0x7f00, vcpu->arch.smbase);
|
||||
+ smram->cr0 = kvm_read_cr0(vcpu);
|
||||
+ smram->cr3 = kvm_read_cr3(vcpu);
|
||||
+ smram->cr4 = kvm_read_cr4(vcpu);
|
||||
|
||||
- /* revision id */
|
||||
- put_smstate(u32, buf, 0x7efc, 0x00020064);
|
||||
+ smram->smbase = vcpu->arch.smbase;
|
||||
+ smram->smm_revison = 0x00020064;
|
||||
|
||||
- put_smstate(u64, buf, 0x7ed0, vcpu->arch.efer);
|
||||
+ smram->efer = vcpu->arch.efer;
|
||||
|
||||
- kvm_get_segment(vcpu, &seg, VCPU_SREG_TR);
|
||||
- put_smstate(u16, buf, 0x7e90, seg.selector);
|
||||
- put_smstate(u16, buf, 0x7e92, enter_smm_get_segment_flags(&seg) >> 8);
|
||||
- put_smstate(u32, buf, 0x7e94, seg.limit);
|
||||
- put_smstate(u64, buf, 0x7e98, seg.base);
|
||||
+ enter_smm_save_seg_64(vcpu, &smram->tr, VCPU_SREG_TR);
|
||||
|
||||
static_call(kvm_x86_get_idt)(vcpu, &dt);
|
||||
- put_smstate(u32, buf, 0x7e84, dt.size);
|
||||
- put_smstate(u64, buf, 0x7e88, dt.address);
|
||||
+ smram->idtr.limit = dt.size;
|
||||
+ smram->idtr.base = dt.address;
|
||||
|
||||
- kvm_get_segment(vcpu, &seg, VCPU_SREG_LDTR);
|
||||
- put_smstate(u16, buf, 0x7e70, seg.selector);
|
||||
- put_smstate(u16, buf, 0x7e72, enter_smm_get_segment_flags(&seg) >> 8);
|
||||
- put_smstate(u32, buf, 0x7e74, seg.limit);
|
||||
- put_smstate(u64, buf, 0x7e78, seg.base);
|
||||
+ enter_smm_save_seg_64(vcpu, &smram->ldtr, VCPU_SREG_LDTR);
|
||||
|
||||
static_call(kvm_x86_get_gdt)(vcpu, &dt);
|
||||
- put_smstate(u32, buf, 0x7e64, dt.size);
|
||||
- put_smstate(u64, buf, 0x7e68, dt.address);
|
||||
+ smram->gdtr.limit = dt.size;
|
||||
+ smram->gdtr.base = dt.address;
|
||||
|
||||
- for (i = 0; i < 6; i++)
|
||||
- enter_smm_save_seg_64(vcpu, buf, i);
|
||||
+ enter_smm_save_seg_64(vcpu, &smram->es, VCPU_SREG_ES);
|
||||
+ enter_smm_save_seg_64(vcpu, &smram->cs, VCPU_SREG_CS);
|
||||
+ enter_smm_save_seg_64(vcpu, &smram->ss, VCPU_SREG_SS);
|
||||
+ enter_smm_save_seg_64(vcpu, &smram->ds, VCPU_SREG_DS);
|
||||
+ enter_smm_save_seg_64(vcpu, &smram->fs, VCPU_SREG_FS);
|
||||
+ enter_smm_save_seg_64(vcpu, &smram->gs, VCPU_SREG_GS);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -9364,7 +9355,7 @@ static void enter_smm(struct kvm_vcpu *vcpu)
|
||||
memset(smram.bytes, 0, sizeof(smram.bytes));
|
||||
#ifdef CONFIG_X86_64
|
||||
if (guest_cpuid_has(vcpu, X86_FEATURE_LM))
|
||||
- enter_smm_save_state_64(vcpu, (char *)&smram);
|
||||
+ enter_smm_save_state_64(vcpu, &smram.smram64);
|
||||
else
|
||||
#endif
|
||||
enter_smm_save_state_32(vcpu, &smram.smram32);
|
||||
@@ -0,0 +1,98 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Maxim Levitsky <mlevitsk@redhat.com>
|
||||
Date: Wed, 3 Aug 2022 18:50:09 +0300
|
||||
Subject: [PATCH] KVM: x86: SVM: use smram structs
|
||||
|
||||
This removes the last user of put_smstate/GET_SMSTATE so
|
||||
remove these functions as well.
|
||||
|
||||
Also add a sanity check that we don't attempt to enter the SMM
|
||||
on non long mode capable guest CPU with a running nested guest.
|
||||
|
||||
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
|
||||
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
---
|
||||
arch/x86/include/asm/kvm_host.h | 6 ------
|
||||
arch/x86/kvm/svm/svm.c | 21 ++++++---------------
|
||||
2 files changed, 6 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
|
||||
index 4b1514a174b0..95d609e67dd0 100644
|
||||
--- a/arch/x86/include/asm/kvm_host.h
|
||||
+++ b/arch/x86/include/asm/kvm_host.h
|
||||
@@ -1936,12 +1936,6 @@ static inline int kvm_cpu_get_apicid(int mps_cpu)
|
||||
#endif
|
||||
}
|
||||
|
||||
-#define put_smstate(type, buf, offset, val) \
|
||||
- *(type *)((buf) + (offset) - 0x7e00) = val
|
||||
-
|
||||
-#define GET_SMSTATE(type, buf, offset) \
|
||||
- (*(type *)((buf) + (offset) - 0x7e00))
|
||||
-
|
||||
int kvm_cpu_dirty_log_size(void);
|
||||
|
||||
int alloc_all_memslots_rmaps(struct kvm *kvm);
|
||||
diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
|
||||
index 76a35d939b9f..ba3861d5114b 100644
|
||||
--- a/arch/x86/kvm/svm/svm.c
|
||||
+++ b/arch/x86/kvm/svm/svm.c
|
||||
@@ -4334,15 +4334,11 @@ static int svm_enter_smm(struct kvm_vcpu *vcpu, union kvm_smram *smram)
|
||||
struct kvm_host_map map_save;
|
||||
int ret;
|
||||
|
||||
- char *smstate = (char *)smram;
|
||||
-
|
||||
if (!is_guest_mode(vcpu))
|
||||
return 0;
|
||||
|
||||
- /* FED8h - SVM Guest */
|
||||
- put_smstate(u64, smstate, 0x7ed8, 1);
|
||||
- /* FEE0h - SVM Guest VMCB Physical Address */
|
||||
- put_smstate(u64, smstate, 0x7ee0, svm->nested.vmcb12_gpa);
|
||||
+ smram->smram64.svm_guest_flag = 1;
|
||||
+ smram->smram64.svm_guest_vmcb_gpa = svm->nested.vmcb12_gpa;
|
||||
|
||||
svm->vmcb->save.rax = vcpu->arch.regs[VCPU_REGS_RAX];
|
||||
svm->vmcb->save.rsp = vcpu->arch.regs[VCPU_REGS_RSP];
|
||||
@@ -4381,28 +4377,23 @@ static int svm_leave_smm(struct kvm_vcpu *vcpu, const union kvm_smram *smram)
|
||||
{
|
||||
struct vcpu_svm *svm = to_svm(vcpu);
|
||||
struct kvm_host_map map, map_save;
|
||||
- u64 saved_efer, vmcb12_gpa;
|
||||
struct vmcb *vmcb12;
|
||||
int ret;
|
||||
|
||||
- const char *smstate = (const char *)smram;
|
||||
-
|
||||
if (!guest_cpuid_has(vcpu, X86_FEATURE_LM))
|
||||
return 0;
|
||||
|
||||
/* Non-zero if SMI arrived while vCPU was in guest mode. */
|
||||
- if (!GET_SMSTATE(u64, smstate, 0x7ed8))
|
||||
+ if (!smram->smram64.svm_guest_flag)
|
||||
return 0;
|
||||
|
||||
if (!guest_cpuid_has(vcpu, X86_FEATURE_SVM))
|
||||
return 1;
|
||||
|
||||
- saved_efer = GET_SMSTATE(u64, smstate, 0x7ed0);
|
||||
- if (!(saved_efer & EFER_SVME))
|
||||
+ if (!(smram->smram64.efer & EFER_SVME))
|
||||
return 1;
|
||||
|
||||
- vmcb12_gpa = GET_SMSTATE(u64, smstate, 0x7ee0);
|
||||
- if (kvm_vcpu_map(vcpu, gpa_to_gfn(vmcb12_gpa), &map) == -EINVAL)
|
||||
+ if (kvm_vcpu_map(vcpu, gpa_to_gfn(smram->smram64.svm_guest_vmcb_gpa), &map) == -EINVAL)
|
||||
return 1;
|
||||
|
||||
ret = 1;
|
||||
@@ -4427,7 +4418,7 @@ static int svm_leave_smm(struct kvm_vcpu *vcpu, const union kvm_smram *smram)
|
||||
|
||||
vmcb12 = map.hva;
|
||||
nested_load_control_from_vmcb12(svm, &vmcb12->control);
|
||||
- ret = enter_svm_guest_mode(vcpu, vmcb12_gpa, vmcb12, false);
|
||||
+ ret = enter_svm_guest_mode(vcpu, smram->smram64.svm_guest_vmcb_gpa, vmcb12, false);
|
||||
|
||||
if (ret)
|
||||
goto unmap_save;
|
||||
@@ -0,0 +1,40 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Maxim Levitsky <mlevitsk@redhat.com>
|
||||
Date: Wed, 3 Aug 2022 18:50:10 +0300
|
||||
Subject: [PATCH] KVM: x86: SVM: don't save SVM state to SMRAM when VM is not
|
||||
long mode capable
|
||||
|
||||
When the guest CPUID doesn't have support for long mode, 32 bit SMRAM
|
||||
layout is used and it has no support for preserving EFER and/or SVM
|
||||
state.
|
||||
|
||||
Note that this isn't relevant to running 32 bit guests on VM which is
|
||||
long mode capable - such VM can still run 32 bit guests in compatibility
|
||||
mode.
|
||||
|
||||
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
|
||||
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
---
|
||||
arch/x86/kvm/svm/svm.c | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
|
||||
index ba3861d5114b..ebbd2d3b4e53 100644
|
||||
--- a/arch/x86/kvm/svm/svm.c
|
||||
+++ b/arch/x86/kvm/svm/svm.c
|
||||
@@ -4337,6 +4337,15 @@ static int svm_enter_smm(struct kvm_vcpu *vcpu, union kvm_smram *smram)
|
||||
if (!is_guest_mode(vcpu))
|
||||
return 0;
|
||||
|
||||
+ /*
|
||||
+ * 32 bit SMRAM format doesn't preserve EFER and SVM state.
|
||||
+ * SVM should not be enabled by the userspace without marking
|
||||
+ * the CPU as at least long mode capable.
|
||||
+ */
|
||||
+
|
||||
+ if (!guest_cpuid_has(vcpu, X86_FEATURE_LM))
|
||||
+ return 1;
|
||||
+
|
||||
smram->smram64.svm_guest_flag = 1;
|
||||
smram->smram64.svm_guest_vmcb_gpa = svm->nested.vmcb12_gpa;
|
||||
|
||||
@@ -0,0 +1,180 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Maxim Levitsky <mlevitsk@redhat.com>
|
||||
Date: Wed, 3 Aug 2022 18:50:11 +0300
|
||||
Subject: [PATCH] KVM: x86: emulator/smm: preserve interrupt shadow in SMRAM
|
||||
|
||||
When #SMI is asserted, the CPU can be in interrupt shadow
|
||||
due to sti or mov ss.
|
||||
|
||||
It is not mandatory in Intel/AMD prm to have the #SMI
|
||||
blocked during the shadow, and on top of
|
||||
that, since neither SVM nor VMX has true support for SMI
|
||||
window, waiting for one instruction would mean single stepping
|
||||
the guest.
|
||||
|
||||
Instead, allow #SMI in this case, but both reset the interrupt
|
||||
window and stash its value in SMRAM to restore it on exit
|
||||
from SMM.
|
||||
|
||||
This fixes rare failures seen mostly on windows guests on VMX,
|
||||
when #SMI falls on the sti instruction which mainfest in
|
||||
VM entry failure due to EFLAGS.IF not being set, but STI interrupt
|
||||
window still being set in the VMCS.
|
||||
|
||||
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
|
||||
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
---
|
||||
arch/x86/kvm/emulate.c | 17 ++++++++++++++---
|
||||
arch/x86/kvm/kvm_emulate.h | 10 ++++++----
|
||||
arch/x86/kvm/x86.c | 12 ++++++++++++
|
||||
3 files changed, 32 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
|
||||
index eb2f5e43f6ad..7f5710c34f4e 100644
|
||||
--- a/arch/x86/kvm/emulate.c
|
||||
+++ b/arch/x86/kvm/emulate.c
|
||||
@@ -2419,7 +2419,7 @@ static int rsm_load_state_32(struct x86_emulate_ctxt *ctxt,
|
||||
const struct kvm_smram_state_32 *smstate)
|
||||
{
|
||||
struct desc_ptr dt;
|
||||
- int i;
|
||||
+ int i, r;
|
||||
|
||||
ctxt->eflags = smstate->eflags | X86_EFLAGS_FIXED;
|
||||
ctxt->_eip = smstate->eip;
|
||||
@@ -2454,8 +2454,16 @@ static int rsm_load_state_32(struct x86_emulate_ctxt *ctxt,
|
||||
|
||||
ctxt->ops->set_smbase(ctxt, smstate->smbase);
|
||||
|
||||
- return rsm_enter_protected_mode(ctxt, smstate->cr0,
|
||||
- smstate->cr3, smstate->cr4);
|
||||
+ r = rsm_enter_protected_mode(ctxt, smstate->cr0,
|
||||
+ smstate->cr3, smstate->cr4);
|
||||
+
|
||||
+ if (r != X86EMUL_CONTINUE)
|
||||
+ return r;
|
||||
+
|
||||
+ ctxt->ops->set_int_shadow(ctxt, 0);
|
||||
+ ctxt->interruptibility = (u8)smstate->int_shadow;
|
||||
+
|
||||
+ return X86EMUL_CONTINUE;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
@@ -2504,6 +2512,9 @@ static int rsm_load_state_64(struct x86_emulate_ctxt *ctxt,
|
||||
rsm_load_seg_64(ctxt, &smstate->fs, VCPU_SREG_FS);
|
||||
rsm_load_seg_64(ctxt, &smstate->gs, VCPU_SREG_GS);
|
||||
|
||||
+ ctxt->ops->set_int_shadow(ctxt, 0);
|
||||
+ ctxt->interruptibility = (u8)smstate->int_shadow;
|
||||
+
|
||||
return X86EMUL_CONTINUE;
|
||||
}
|
||||
#endif
|
||||
diff --git a/arch/x86/kvm/kvm_emulate.h b/arch/x86/kvm/kvm_emulate.h
|
||||
index 3b37b3e17379..a64c190abf28 100644
|
||||
--- a/arch/x86/kvm/kvm_emulate.h
|
||||
+++ b/arch/x86/kvm/kvm_emulate.h
|
||||
@@ -231,6 +231,7 @@ struct x86_emulate_ops {
|
||||
bool (*guest_has_rdpid)(struct x86_emulate_ctxt *ctxt);
|
||||
|
||||
void (*set_nmi_mask)(struct x86_emulate_ctxt *ctxt, bool masked);
|
||||
+ void (*set_int_shadow)(struct x86_emulate_ctxt *ctxt, u8 shadow);
|
||||
|
||||
unsigned (*get_hflags)(struct x86_emulate_ctxt *ctxt);
|
||||
void (*exiting_smm)(struct x86_emulate_ctxt *ctxt);
|
||||
@@ -497,7 +498,8 @@ struct kvm_smram_state_32 {
|
||||
u32 reserved1[62];
|
||||
u32 smbase;
|
||||
u32 smm_revision;
|
||||
- u32 reserved2[5];
|
||||
+ u32 reserved2[4];
|
||||
+ u32 int_shadow; /* KVM extension */
|
||||
u32 cr4; /* CR4 is not present in Intel/AMD SMRAM image */
|
||||
u32 reserved3[5];
|
||||
|
||||
@@ -545,6 +547,7 @@ static inline void __check_smram32_offsets(void)
|
||||
__CHECK_SMRAM32_OFFSET(smbase, 0xFEF8);
|
||||
__CHECK_SMRAM32_OFFSET(smm_revision, 0xFEFC);
|
||||
__CHECK_SMRAM32_OFFSET(reserved2, 0xFF00);
|
||||
+ __CHECK_SMRAM32_OFFSET(int_shadow, 0xFF10);
|
||||
__CHECK_SMRAM32_OFFSET(cr4, 0xFF14);
|
||||
__CHECK_SMRAM32_OFFSET(reserved3, 0xFF18);
|
||||
__CHECK_SMRAM32_OFFSET(ds, 0xFF2C);
|
||||
@@ -604,7 +607,7 @@ struct kvm_smram_state_64 {
|
||||
u64 io_restart_rsi;
|
||||
u64 io_restart_rdi;
|
||||
u32 io_restart_dword;
|
||||
- u32 reserved1;
|
||||
+ u32 int_shadow;
|
||||
u8 io_inst_restart;
|
||||
u8 auto_hlt_restart;
|
||||
u8 reserved2[6];
|
||||
@@ -642,7 +645,6 @@ struct kvm_smram_state_64 {
|
||||
u64 gprs[16]; /* GPRS in a reversed "natural" X86 order (R15/R14/../RCX/RAX.) */
|
||||
};
|
||||
|
||||
-
|
||||
static inline void __check_smram64_offsets(void)
|
||||
{
|
||||
#define __CHECK_SMRAM64_OFFSET(field, offset) \
|
||||
@@ -663,7 +665,7 @@ static inline void __check_smram64_offsets(void)
|
||||
__CHECK_SMRAM64_OFFSET(io_restart_rsi, 0xFEB0);
|
||||
__CHECK_SMRAM64_OFFSET(io_restart_rdi, 0xFEB8);
|
||||
__CHECK_SMRAM64_OFFSET(io_restart_dword, 0xFEC0);
|
||||
- __CHECK_SMRAM64_OFFSET(reserved1, 0xFEC4);
|
||||
+ __CHECK_SMRAM64_OFFSET(int_shadow, 0xFEC4);
|
||||
__CHECK_SMRAM64_OFFSET(io_inst_restart, 0xFEC8);
|
||||
__CHECK_SMRAM64_OFFSET(auto_hlt_restart, 0xFEC9);
|
||||
__CHECK_SMRAM64_OFFSET(reserved2, 0xFECA);
|
||||
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
|
||||
index f309248fa888..4ea0e8112c42 100644
|
||||
--- a/arch/x86/kvm/x86.c
|
||||
+++ b/arch/x86/kvm/x86.c
|
||||
@@ -7476,6 +7476,11 @@ static void emulator_set_nmi_mask(struct x86_emulate_ctxt *ctxt, bool masked)
|
||||
static_call(kvm_x86_set_nmi_mask)(emul_to_vcpu(ctxt), masked);
|
||||
}
|
||||
|
||||
+static void emulator_set_int_shadow(struct x86_emulate_ctxt *ctxt, u8 shadow)
|
||||
+{
|
||||
+ static_call(kvm_x86_set_interrupt_shadow)(emul_to_vcpu(ctxt), shadow);
|
||||
+}
|
||||
+
|
||||
static unsigned emulator_get_hflags(struct x86_emulate_ctxt *ctxt)
|
||||
{
|
||||
return emul_to_vcpu(ctxt)->arch.hflags;
|
||||
@@ -7545,6 +7550,7 @@ static const struct x86_emulate_ops emulate_ops = {
|
||||
.guest_has_fxsr = emulator_guest_has_fxsr,
|
||||
.guest_has_rdpid = emulator_guest_has_rdpid,
|
||||
.set_nmi_mask = emulator_set_nmi_mask,
|
||||
+ .set_int_shadow = emulator_set_int_shadow,
|
||||
.get_hflags = emulator_get_hflags,
|
||||
.exiting_smm = emulator_exiting_smm,
|
||||
.leave_smm = emulator_leave_smm,
|
||||
@@ -9294,6 +9300,8 @@ static void enter_smm_save_state_32(struct kvm_vcpu *vcpu, struct kvm_smram_stat
|
||||
smram->cr4 = kvm_read_cr4(vcpu);
|
||||
smram->smm_revision = 0x00020000;
|
||||
smram->smbase = vcpu->arch.smbase;
|
||||
+
|
||||
+ smram->int_shadow = static_call(kvm_x86_get_interrupt_shadow)(vcpu);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
@@ -9342,6 +9350,8 @@ static void enter_smm_save_state_64(struct kvm_vcpu *vcpu, struct kvm_smram_stat
|
||||
enter_smm_save_seg_64(vcpu, &smram->ds, VCPU_SREG_DS);
|
||||
enter_smm_save_seg_64(vcpu, &smram->fs, VCPU_SREG_FS);
|
||||
enter_smm_save_seg_64(vcpu, &smram->gs, VCPU_SREG_GS);
|
||||
+
|
||||
+ smram->int_shadow = static_call(kvm_x86_get_interrupt_shadow)(vcpu);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -9378,6 +9388,8 @@ static void enter_smm(struct kvm_vcpu *vcpu)
|
||||
kvm_set_rflags(vcpu, X86_EFLAGS_FIXED);
|
||||
kvm_rip_write(vcpu, 0x8000);
|
||||
|
||||
+ static_call(kvm_x86_set_interrupt_shadow)(vcpu, 0);
|
||||
+
|
||||
cr0 = vcpu->arch.cr0 & ~(X86_CR0_PE | X86_CR0_EM | X86_CR0_TS | X86_CR0_PG);
|
||||
static_call(kvm_x86_set_cr0)(vcpu, cr0);
|
||||
vcpu->arch.cr0 = cr0;
|
||||
Submodule submodules/ubuntu-bionic deleted from 18e103f8c8
Submodule
+1
Submodule submodules/ubuntu-kernel added at 1e5c98582d
+1
-1
Submodule submodules/zfsonlinux updated: 5e3e80687e...66ef8d3dc8
Reference in New Issue
Block a user