Compare commits
119 Commits
master
...
pve-kernel
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 |
6
.gitmodules
vendored
6
.gitmodules
vendored
@ -1,6 +1,6 @@
|
||||
[submodule "submodules/zfsonlinux"]
|
||||
path = submodules/zfsonlinux
|
||||
url = ../zfsonlinux
|
||||
[submodule "submodules/ubuntu-jammy"]
|
||||
path = submodules/ubuntu-jammy
|
||||
url = ../mirror_ubuntu-jammy-kernel
|
||||
[submodule "submodules/ubuntu-kernel"]
|
||||
path = submodules/ubuntu-kernel
|
||||
url = ../mirror_ubuntu-kernels
|
||||
|
151
Makefile
151
Makefile
@ -1,7 +1,9 @@
|
||||
include /usr/share/dpkg/pkg-info.mk
|
||||
|
||||
# also bump pve-kernel-meta if either of MAJ.MIN, PATCHLEVEL or KREL change
|
||||
KERNEL_MAJ=5
|
||||
KERNEL_MIN=15
|
||||
KERNEL_PATCHLEVEL=53
|
||||
KERNEL_PATCHLEVEL=158
|
||||
# increment KREL if the ABI changes (abicheck target in debian/rules)
|
||||
# rebuild packages with new KREL and run 'make abiupdate'
|
||||
KREL=1
|
||||
@ -11,100 +13,115 @@ 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
|
||||
|
||||
BUILD_DIR=build
|
||||
BUILD_DIR=pve-kernel-$(KERNEL_VER)
|
||||
|
||||
KERNEL_SRC=ubuntu-jammy
|
||||
KERNEL_SRC=ubuntu-kernel
|
||||
KERNEL_SRC_SUBMODULE=submodules/$(KERNEL_SRC)
|
||||
KERNEL_CFG_ORG=config-${KERNEL_VER}.org
|
||||
KERNEL_CFG_ORG=config-$(KERNEL_VER).org
|
||||
|
||||
ZFSONLINUX_SUBMODULE=submodules/zfsonlinux
|
||||
ZFSDIR=pkg-zfs
|
||||
|
||||
MODULES=modules
|
||||
MODULE_DIRS=${ZFSDIR}
|
||||
MODULE_DIRS=$(ZFSDIR)
|
||||
|
||||
# exported to debian/rules via debian/rules.d/dirs.mk
|
||||
DIRS=KERNEL_SRC ZFSDIR MODULES
|
||||
|
||||
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
|
||||
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} ${USR_HDR_DEB} ${LINUX_TOOLS_DEB} ${LINUX_TOOLS_DBG_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: deb
|
||||
deb: ${DEBS}
|
||||
deb: $(DEBS)
|
||||
|
||||
${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}
|
||||
$(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)
|
||||
|
||||
${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}/
|
||||
dsc: $(DSC)
|
||||
$(DSC): $(BUILD_DIR).prepared
|
||||
cd $(BUILD_DIR); dpkg-buildpackage -S -uc -us -d
|
||||
lintian $(DSC)
|
||||
|
||||
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 $@
|
||||
|
||||
${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
|
||||
$(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,pbs --dist bullseye --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
|
||||
@ -114,18 +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 --recursive ${ZFSONLINUX_SUBMODULE}
|
||||
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
|
||||
@ -133,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.*
|
||||
|
26350
abi-prev-5.15.158-1-pve
Normal file
26350
abi-prev-5.15.158-1-pve
Normal file
File diff suppressed because it is too large
Load Diff
26274
abi-prev-5.15.53-1-pve
26274
abi-prev-5.15.53-1-pve
File diff suppressed because it is too large
Load Diff
168
debian/changelog
vendored
168
debian/changelog
vendored
@ -1,3 +1,171 @@
|
||||
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
|
||||
|
32
debian/control.in
vendored
32
debian/control.in
vendored
@ -25,16 +25,15 @@ Build-Depends: asciidoc-base,
|
||||
libtool,
|
||||
lintian,
|
||||
lz4,
|
||||
perl-modules,
|
||||
python3-dev,
|
||||
python3-minimal,
|
||||
rsync,
|
||||
sed,
|
||||
sphinx-common,
|
||||
tar,
|
||||
xmlto,
|
||||
zlib1g-dev,
|
||||
zstd,
|
||||
Build-Conflicts: pve-headers-@KVNAME@
|
||||
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
|
||||
|
||||
@ -42,7 +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)
|
||||
@ -51,8 +50,8 @@ Package: pve-headers-@KVNAME@
|
||||
Section: devel
|
||||
Priority: optional
|
||||
Architecture: any
|
||||
Provides: linux-headers-@KVNAME@-amd64
|
||||
Depends: coreutils | fileutils (>= 4.0)
|
||||
Provides: linux-headers-@KVNAME@-amd64,
|
||||
Depends: ${misc:Depends},
|
||||
Description: Proxmox Kernel Headers
|
||||
This package contains the linux kernel headers
|
||||
|
||||
@ -60,19 +59,20 @@ Package: pve-kernel-@KVNAME@
|
||||
Section: admin
|
||||
Priority: optional
|
||||
Architecture: any
|
||||
Provides: linux-image-@KVNAME@-amd64
|
||||
Suggests: pve-firmware
|
||||
Depends: busybox, initramfs-tools
|
||||
Recommends: grub-pc | grub-efi-amd64 | grub-efi-ia32 | grub-efi-arm64
|
||||
Provides: linux-image-@KVNAME@-amd64,
|
||||
Suggests: pve-firmware,
|
||||
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
|
||||
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
|
||||
@ -84,10 +84,10 @@ 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}
|
||||
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.
|
||||
|
217
debian/rules
vendored
217
debian/rules
vendored
@ -9,19 +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_DEBUG_KERNEL_PKG=pve-kernel-${KVNAME}-dbgsym
|
||||
PVE_HEADER_PKG=pve-headers-${KVNAME}
|
||||
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
|
||||
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 \
|
||||
@ -83,18 +87,19 @@ PVE_CONFIG_OPTS= \
|
||||
-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
|
||||
|
||||
@ -108,7 +113,7 @@ install: .install_mark .tools_install_mark .headers_install_mark .usr_headers_in
|
||||
|
||||
binary: install
|
||||
debian/rules fwcheck abicheck
|
||||
dh_strip -N${PVE_HEADER_PKG} -N${PVE_USR_HEADER_PKG}
|
||||
dh_strip -N$(PVE_HEADER_PKG) -N$(PVE_USR_HEADER_PKG)
|
||||
dh_makeshlibs
|
||||
dh_shlibdeps
|
||||
dh_installdeb
|
||||
@ -117,82 +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}
|
||||
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
|
||||
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}/,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
|
||||
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.*
|
||||
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=python3
|
||||
$(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}
|
||||
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 \
|
||||
@ -204,40 +209,40 @@ endif
|
||||
-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}; \
|
||||
-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 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}
|
||||
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 $@
|
||||
|
||||
.usr_headers_install_mark: PKG_DIR = debian/${PVE_USR_HEADER_PKG}
|
||||
.usr_headers_install_mark: OUT_DIR = ${PKG_DIR}/usr
|
||||
.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 '$(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 {} +
|
||||
|
||||
@ -248,43 +253,43 @@ endif
|
||||
mv $(OUT_DIR)/include/arch $(OUT_DIR)/include/$(DEB_HOST_MULTIARCH)/
|
||||
touch $@
|
||||
|
||||
.modules_compile_mark: ${MODULES}/zfs.ko
|
||||
.modules_compile_mark: $(MODULES)/zfs.ko
|
||||
touch $@
|
||||
|
||||
${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)/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)/
|
||||
|
||||
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
|
||||
|
2
debian/source/lintian-overrides
vendored
Normal file
2
debian/source/lintian-overrides
vendored
Normal file
@ -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]
|
@ -1767,6 +1767,7 @@ rtl_nic/rtl8402-1.fw kernel/drivers/net/ethernet/realtek/r8169.ko
|
||||
rtl_nic/rtl8411-1.fw kernel/drivers/net/ethernet/realtek/r8169.ko
|
||||
rtl_nic/rtl8411-2.fw kernel/drivers/net/ethernet/realtek/r8169.ko
|
||||
rtlwifi/rtl8188efw.bin kernel/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/rtl8188ee.ko
|
||||
rtlwifi/rtl8188eufw.bin kernel/drivers/staging/r8188eu/r8188eu.ko
|
||||
rtlwifi/rtl8192cfw.bin kernel/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/rtl8192ce.ko
|
||||
rtlwifi/rtl8192cfwU_B.bin kernel/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/rtl8192ce.ko
|
||||
rtlwifi/rtl8192cfwU.bin kernel/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/rtl8192ce.ko
|
||||
@ -1842,6 +1843,7 @@ ti-connectivity/wl128x-fw-5-mr.bin kernel/drivers/net/wireless/ti/wl12xx/wl12xx.
|
||||
ti-connectivity/wl128x-fw-5-plt.bin kernel/drivers/net/wireless/ti/wl12xx/wl12xx.ko
|
||||
ti-connectivity/wl128x-fw-5-sr.bin kernel/drivers/net/wireless/ti/wl12xx/wl12xx.ko
|
||||
ti-connectivity/wl18xx-fw-4.bin kernel/drivers/net/wireless/ti/wl18xx/wl18xx.ko
|
||||
tigon/tg357766.bin kernel/drivers/net/ethernet/broadcom/tg3.ko
|
||||
tigon/tg3.bin kernel/drivers/net/ethernet/broadcom/tg3.ko
|
||||
tigon/tg3_tso5.bin kernel/drivers/net/ethernet/broadcom/tg3.ko
|
||||
tigon/tg3_tso.bin kernel/drivers/net/ethernet/broadcom/tg3.ko
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -19,10 +19,10 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
1 file changed, 1 insertion(+), 4 deletions(-)
|
||||
|
||||
diff --git a/net/bridge/br_stp_if.c b/net/bridge/br_stp_if.c
|
||||
index ba55851fe132..82675e1ecfb8 100644
|
||||
index 3326dfced68a..3f1604948ace 100644
|
||||
--- a/net/bridge/br_stp_if.c
|
||||
+++ b/net/bridge/br_stp_if.c
|
||||
@@ -265,10 +265,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) {
|
@ -55,10 +55,10 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
2 files changed, 111 insertions(+)
|
||||
|
||||
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
|
||||
index efb9e8b66652..b2331a9c08dd 100644
|
||||
index 6c1254a22225..91c091c0f2c9 100644
|
||||
--- a/Documentation/admin-guide/kernel-parameters.txt
|
||||
+++ b/Documentation/admin-guide/kernel-parameters.txt
|
||||
@@ -3943,6 +3943,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).
|
||||
@ -75,10 +75,10 @@ index efb9e8b66652..b2331a9c08dd 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 1c566b0cbee9..d49c54c579bb 100644
|
||||
index bc680bdcbbed..faa53ccc9b69 100644
|
||||
--- a/drivers/pci/quirks.c
|
||||
+++ b/drivers/pci/quirks.c
|
||||
@@ -193,6 +193,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);
|
||||
|
||||
@ -185,7 +185,7 @@ index 1c566b0cbee9..d49c54c579bb 100644
|
||||
/*
|
||||
* 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
|
||||
@@ -4927,6 +5027,8 @@ static const struct pci_dev_acs_enabled {
|
||||
@@ -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 },
|
@ -13,7 +13,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
|
||||
index fefdf3a6dae3..b1f35bc88be5 100644
|
||||
index d11c581ce9b9..0b0ce6979370 100644
|
||||
--- a/virt/kvm/kvm_main.c
|
||||
+++ b/virt/kvm/kvm_main.c
|
||||
@@ -79,7 +79,7 @@ module_param(halt_poll_ns, uint, 0644);
|
@ -10,10 +10,10 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/net/core/dev.c b/net/core/dev.c
|
||||
index 6111506a4105..564801ce82ba 100644
|
||||
index f80bc2ca888a..6ca7a4b8a8f4 100644
|
||||
--- a/net/core/dev.c
|
||||
+++ b/net/core/dev.c
|
||||
@@ -10528,7 +10528,7 @@ static void netdev_wait_allrefs(struct net_device *dev)
|
||||
@@ -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)) {
|
@ -19,7 +19,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
1 file changed, 4 insertions(+), 46 deletions(-)
|
||||
|
||||
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
|
||||
index 4f26c222f5f2..c0abe906b84e 100644
|
||||
index 103ee42f6717..6b73e9179111 100644
|
||||
--- a/drivers/pci/probe.c
|
||||
+++ b/drivers/pci/probe.c
|
||||
@@ -20,7 +20,6 @@
|
@ -56,7 +56,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
1 file changed, 27 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
|
||||
index c0abe906b84e..8b7c58dec9e4 100644
|
||||
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)
|
@ -14,10 +14,10 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
|
||||
index ead81fad883c..9d76f3c39735 100644
|
||||
index 28faea9b5da6..9cfb8a026adb 100644
|
||||
--- a/lib/Kconfig.debug
|
||||
+++ b/lib/Kconfig.debug
|
||||
@@ -325,7 +325,7 @@ config PAHOLE_HAS_SPLIT_BTF
|
||||
@@ -331,7 +331,7 @@ config PAHOLE_HAS_SPLIT_BTF
|
||||
def_bool PAHOLE_VERSION >= 119
|
||||
|
||||
config DEBUG_INFO_BTF_MODULES
|
@ -22,10 +22,10 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
4 files changed, 8 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
|
||||
index ce5858dadca5..aa43ed94deb6 100644
|
||||
index fd81a7370864..4677829e4ae3 100644
|
||||
--- a/block/blk-cgroup.c
|
||||
+++ b/block/blk-cgroup.c
|
||||
@@ -887,7 +887,6 @@ static void blkcg_print_one_stat(struct blkcg_gq *blkg, struct seq_file *s)
|
||||
@@ -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;
|
||||
@ -33,7 +33,7 @@ index ce5858dadca5..aa43ed94deb6 100644
|
||||
const char *dname;
|
||||
unsigned seq;
|
||||
int i;
|
||||
@@ -913,14 +912,12 @@ static void blkcg_print_one_stat(struct blkcg_gq *blkg, struct seq_file *s)
|
||||
@@ -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) {
|
||||
@ -48,7 +48,7 @@ index ce5858dadca5..aa43ed94deb6 100644
|
||||
seq_printf(s, " use_delay=%d delay_nsec=%llu",
|
||||
atomic_read(&blkg->use_delay),
|
||||
atomic64_read(&blkg->delay_nsec));
|
||||
@@ -932,12 +929,10 @@ static void blkcg_print_one_stat(struct blkcg_gq *blkg, struct seq_file *s)
|
||||
@@ -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;
|
||||
|
||||
@ -64,10 +64,10 @@ index ce5858dadca5..aa43ed94deb6 100644
|
||||
|
||||
static int blkcg_print_stat(struct seq_file *sf, void *v)
|
||||
diff --git a/block/blk-iocost.c b/block/blk-iocost.c
|
||||
index 10851493940c..21db328c0bcc 100644
|
||||
index 645a589edda8..b0846da38eda 100644
|
||||
--- a/block/blk-iocost.c
|
||||
+++ b/block/blk-iocost.c
|
||||
@@ -3005,13 +3005,13 @@ static void ioc_pd_free(struct blkg_policy_data *pd)
|
||||
@@ -3028,13 +3028,13 @@ static void ioc_pd_free(struct blkg_policy_data *pd)
|
||||
kfree(iocg);
|
||||
}
|
||||
|
||||
@ -83,7 +83,7 @@ index 10851493940c..21db328c0bcc 100644
|
||||
|
||||
if (iocg->level == 0) {
|
||||
unsigned vp10k = DIV64_U64_ROUND_CLOSEST(
|
||||
@@ -3027,7 +3027,6 @@ static bool ioc_pd_stat(struct blkg_policy_data *pd, struct seq_file *s)
|
||||
@@ -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);
|
||||
@ -92,10 +92,10 @@ index 10851493940c..21db328c0bcc 100644
|
||||
|
||||
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 ce3847499d85..0bac2c9ebb4a 100644
|
||||
index bdef8395af6e..a5f13743a280 100644
|
||||
--- a/block/blk-iolatency.c
|
||||
+++ b/block/blk-iolatency.c
|
||||
@@ -902,7 +902,7 @@ static int iolatency_print_limit(struct seq_file *sf, void *v)
|
||||
@@ -906,7 +906,7 @@ static int iolatency_print_limit(struct seq_file *sf, void *v)
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -104,7 +104,7 @@ index ce3847499d85..0bac2c9ebb4a 100644
|
||||
{
|
||||
struct latency_stat stat;
|
||||
int cpu;
|
||||
@@ -925,17 +925,16 @@ static bool iolatency_ssd_stat(struct iolatency_grp *iolat, struct seq_file *s)
|
||||
@@ -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);
|
||||
@ -124,7 +124,7 @@ index ce3847499d85..0bac2c9ebb4a 100644
|
||||
|
||||
if (iolat->ssd)
|
||||
return iolatency_ssd_stat(iolat, s);
|
||||
@@ -948,7 +947,6 @@ static bool iolatency_pd_stat(struct blkg_policy_data *pd, struct seq_file *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);
|
@ -20,10 +20,10 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/firmware/sysfb_simplefb.c b/drivers/firmware/sysfb_simplefb.c
|
||||
index 757cc8b9f3de..bda8712bfd8c 100644
|
||||
index fd4fa923088a..ca907f7e76c6 100644
|
||||
--- a/drivers/firmware/sysfb_simplefb.c
|
||||
+++ b/drivers/firmware/sysfb_simplefb.c
|
||||
@@ -99,7 +99,7 @@ __init int sysfb_create_simplefb(const struct screen_info *si,
|
||||
@@ -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));
|
@ -19,7 +19,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
1 file changed, 17 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/tiny/simpledrm.c b/drivers/gpu/drm/tiny/simpledrm.c
|
||||
index 3e3f9ba1e885..806fdc3237b3 100644
|
||||
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)
|
@ -68,10 +68,10 @@ index fb3cad38b149..0166370f088e 100644
|
||||
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 da9ef0ab9b4b..5336e494703b 100644
|
||||
index 5e065f16d061..324bdd653ad4 100644
|
||||
--- a/include/linux/nfs_fs_sb.h
|
||||
+++ b/include/linux/nfs_fs_sb.h
|
||||
@@ -156,6 +156,7 @@ struct nfs_server {
|
||||
@@ -157,6 +157,7 @@ struct nfs_server {
|
||||
#define NFS_MOUNT_SOFTREVAL 0x800000
|
||||
#define NFS_MOUNT_WRITE_EAGER 0x01000000
|
||||
#define NFS_MOUNT_WRITE_WAIT 0x02000000
|
@ -1,31 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Maxim Levitsky <mlevitsk@redhat.com>
|
||||
Date: Wed, 3 Aug 2022 18:50:00 +0300
|
||||
Subject: [PATCH] KVM: x86: emulator: em_sysexit should update ctxt->mode
|
||||
|
||||
This is one of the instructions that can change the
|
||||
processor mode.
|
||||
|
||||
Note that this is likely a benign bug, because the only problematic
|
||||
mode change is from 32 bit to 64 bit which can lead to truncation of RIP,
|
||||
and it is not possible to do with sysexit,
|
||||
since sysexit running in 32 bit mode will be limited to 32 bit version.
|
||||
|
||||
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
|
||||
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
---
|
||||
arch/x86/kvm/emulate.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
|
||||
index 318a78379ca6..35b12692739c 100644
|
||||
--- a/arch/x86/kvm/emulate.c
|
||||
+++ b/arch/x86/kvm/emulate.c
|
||||
@@ -2862,6 +2862,7 @@ static int em_sysexit(struct x86_emulate_ctxt *ctxt)
|
||||
ops->set_segment(ctxt, ss_sel, &ss, 0, VCPU_SREG_SS);
|
||||
|
||||
ctxt->_eip = rdx;
|
||||
+ ctxt->mode = usermode;
|
||||
*reg_write(ctxt, VCPU_REGS_RSP) = rcx;
|
||||
|
||||
return X86EMUL_CONTINUE;
|
@ -1,158 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Maxim Levitsky <mlevitsk@redhat.com>
|
||||
Date: Wed, 3 Aug 2022 18:50:01 +0300
|
||||
Subject: [PATCH] KVM: x86: emulator: introduce emulator_recalc_and_set_mode
|
||||
|
||||
Some instructions update the cpu execution mode, which needs
|
||||
to update the emulation mode.
|
||||
|
||||
Extract this code, and make assign_eip_far use it.
|
||||
|
||||
assign_eip_far now reads CS, instead of getting it via a parameter,
|
||||
which is ok, because callers always assign CS to the
|
||||
same value before calling it.
|
||||
|
||||
No functional change is intended.
|
||||
|
||||
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
|
||||
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
---
|
||||
arch/x86/kvm/emulate.c | 85 ++++++++++++++++++++++++++++--------------
|
||||
1 file changed, 57 insertions(+), 28 deletions(-)
|
||||
|
||||
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
|
||||
index 35b12692739c..6a597d68d456 100644
|
||||
--- a/arch/x86/kvm/emulate.c
|
||||
+++ b/arch/x86/kvm/emulate.c
|
||||
@@ -795,8 +795,7 @@ static int linearize(struct x86_emulate_ctxt *ctxt,
|
||||
ctxt->mode, linear);
|
||||
}
|
||||
|
||||
-static inline int assign_eip(struct x86_emulate_ctxt *ctxt, ulong dst,
|
||||
- enum x86emul_mode mode)
|
||||
+static inline int assign_eip(struct x86_emulate_ctxt *ctxt, ulong dst)
|
||||
{
|
||||
ulong linear;
|
||||
int rc;
|
||||
@@ -806,41 +805,71 @@ static inline int assign_eip(struct x86_emulate_ctxt *ctxt, ulong dst,
|
||||
|
||||
if (ctxt->op_bytes != sizeof(unsigned long))
|
||||
addr.ea = dst & ((1UL << (ctxt->op_bytes << 3)) - 1);
|
||||
- rc = __linearize(ctxt, addr, &max_size, 1, false, true, mode, &linear);
|
||||
+ rc = __linearize(ctxt, addr, &max_size, 1, false, true, ctxt->mode, &linear);
|
||||
if (rc == X86EMUL_CONTINUE)
|
||||
ctxt->_eip = addr.ea;
|
||||
return rc;
|
||||
}
|
||||
|
||||
+static inline int emulator_recalc_and_set_mode(struct x86_emulate_ctxt *ctxt)
|
||||
+{
|
||||
+ u64 efer;
|
||||
+ struct desc_struct cs;
|
||||
+ u16 selector;
|
||||
+ u32 base3;
|
||||
+
|
||||
+ ctxt->ops->get_msr(ctxt, MSR_EFER, &efer);
|
||||
+
|
||||
+ if (!ctxt->ops->get_cr(ctxt, 0) & X86_CR0_PE) {
|
||||
+ /* Real mode. cpu must not have long mode active */
|
||||
+ if (efer & EFER_LMA)
|
||||
+ return X86EMUL_UNHANDLEABLE;
|
||||
+ ctxt->mode = X86EMUL_MODE_REAL;
|
||||
+ return X86EMUL_CONTINUE;
|
||||
+ }
|
||||
+
|
||||
+ if (ctxt->eflags & X86_EFLAGS_VM) {
|
||||
+ /* Protected/VM86 mode. cpu must not have long mode active */
|
||||
+ if (efer & EFER_LMA)
|
||||
+ return X86EMUL_UNHANDLEABLE;
|
||||
+ ctxt->mode = X86EMUL_MODE_VM86;
|
||||
+ return X86EMUL_CONTINUE;
|
||||
+ }
|
||||
+
|
||||
+ if (!ctxt->ops->get_segment(ctxt, &selector, &cs, &base3, VCPU_SREG_CS))
|
||||
+ return X86EMUL_UNHANDLEABLE;
|
||||
+
|
||||
+ if (efer & EFER_LMA) {
|
||||
+ if (cs.l) {
|
||||
+ /* Proper long mode */
|
||||
+ ctxt->mode = X86EMUL_MODE_PROT64;
|
||||
+ } else if (cs.d) {
|
||||
+ /* 32 bit compatibility mode*/
|
||||
+ ctxt->mode = X86EMUL_MODE_PROT32;
|
||||
+ } else {
|
||||
+ ctxt->mode = X86EMUL_MODE_PROT16;
|
||||
+ }
|
||||
+ } else {
|
||||
+ /* Legacy 32 bit / 16 bit mode */
|
||||
+ ctxt->mode = cs.d ? X86EMUL_MODE_PROT32 : X86EMUL_MODE_PROT16;
|
||||
+ }
|
||||
+
|
||||
+ return X86EMUL_CONTINUE;
|
||||
+}
|
||||
+
|
||||
static inline int assign_eip_near(struct x86_emulate_ctxt *ctxt, ulong dst)
|
||||
{
|
||||
- return assign_eip(ctxt, dst, ctxt->mode);
|
||||
+ return assign_eip(ctxt, dst);
|
||||
}
|
||||
|
||||
-static int assign_eip_far(struct x86_emulate_ctxt *ctxt, ulong dst,
|
||||
- const struct desc_struct *cs_desc)
|
||||
+static int assign_eip_far(struct x86_emulate_ctxt *ctxt, ulong dst)
|
||||
{
|
||||
- enum x86emul_mode mode = ctxt->mode;
|
||||
- int rc;
|
||||
+ int rc = emulator_recalc_and_set_mode(ctxt);
|
||||
|
||||
-#ifdef CONFIG_X86_64
|
||||
- if (ctxt->mode >= X86EMUL_MODE_PROT16) {
|
||||
- if (cs_desc->l) {
|
||||
- u64 efer = 0;
|
||||
+ if (rc != X86EMUL_CONTINUE)
|
||||
+ return rc;
|
||||
|
||||
- ctxt->ops->get_msr(ctxt, MSR_EFER, &efer);
|
||||
- if (efer & EFER_LMA)
|
||||
- mode = X86EMUL_MODE_PROT64;
|
||||
- } else
|
||||
- mode = X86EMUL_MODE_PROT32; /* temporary value */
|
||||
- }
|
||||
-#endif
|
||||
- if (mode == X86EMUL_MODE_PROT16 || mode == X86EMUL_MODE_PROT32)
|
||||
- mode = cs_desc->d ? X86EMUL_MODE_PROT32 : X86EMUL_MODE_PROT16;
|
||||
- rc = assign_eip(ctxt, dst, mode);
|
||||
- if (rc == X86EMUL_CONTINUE)
|
||||
- ctxt->mode = mode;
|
||||
- return rc;
|
||||
+ return assign_eip(ctxt, dst);
|
||||
}
|
||||
|
||||
static inline int jmp_rel(struct x86_emulate_ctxt *ctxt, int rel)
|
||||
@@ -2154,7 +2183,7 @@ static int em_jmp_far(struct x86_emulate_ctxt *ctxt)
|
||||
if (rc != X86EMUL_CONTINUE)
|
||||
return rc;
|
||||
|
||||
- rc = assign_eip_far(ctxt, ctxt->src.val, &new_desc);
|
||||
+ rc = assign_eip_far(ctxt, ctxt->src.val);
|
||||
/* Error handling is not implemented. */
|
||||
if (rc != X86EMUL_CONTINUE)
|
||||
return X86EMUL_UNHANDLEABLE;
|
||||
@@ -2235,7 +2264,7 @@ static int em_ret_far(struct x86_emulate_ctxt *ctxt)
|
||||
&new_desc);
|
||||
if (rc != X86EMUL_CONTINUE)
|
||||
return rc;
|
||||
- rc = assign_eip_far(ctxt, eip, &new_desc);
|
||||
+ rc = assign_eip_far(ctxt, eip);
|
||||
/* Error handling is not implemented. */
|
||||
if (rc != X86EMUL_CONTINUE)
|
||||
return X86EMUL_UNHANDLEABLE;
|
||||
@@ -3459,7 +3488,7 @@ static int em_call_far(struct x86_emulate_ctxt *ctxt)
|
||||
if (rc != X86EMUL_CONTINUE)
|
||||
return rc;
|
||||
|
||||
- rc = assign_eip_far(ctxt, ctxt->src.val, &new_desc);
|
||||
+ rc = assign_eip_far(ctxt, ctxt->src.val);
|
||||
if (rc != X86EMUL_CONTINUE)
|
||||
goto fail;
|
||||
|
@ -17,10 +17,10 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
|
||||
index 6a597d68d456..49697d589f87 100644
|
||||
index 98b25a7af8ce..0616ee9cd977 100644
|
||||
--- a/arch/x86/kvm/emulate.c
|
||||
+++ b/arch/x86/kvm/emulate.c
|
||||
@@ -2639,6 +2639,11 @@ static int em_rsm(struct x86_emulate_ctxt *ctxt)
|
||||
@@ -2638,6 +2638,11 @@ static int em_rsm(struct x86_emulate_ctxt *ctxt)
|
||||
if (ret != X86EMUL_CONTINUE)
|
||||
goto emulate_shutdown;
|
||||
|
@ -17,10 +17,10 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
3 files changed, 225 insertions(+)
|
||||
|
||||
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
|
||||
index 89f035fc52e7..bfaf5d24bf1e 100644
|
||||
index 0616ee9cd977..6866f09a5b53 100644
|
||||
--- a/arch/x86/kvm/emulate.c
|
||||
+++ b/arch/x86/kvm/emulate.c
|
||||
@@ -5825,3 +5825,9 @@ bool emulator_can_use_gpa(struct x86_emulate_ctxt *ctxt)
|
||||
@@ -5829,3 +5829,9 @@ bool emulator_can_use_gpa(struct x86_emulate_ctxt *ctxt)
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -267,14 +267,14 @@ index fb09cd22cb7f..0b2bbcce321a 100644
|
||||
#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 604716996c5d..673262228f3e 100644
|
||||
index 7e817493667d..f62bce0a74f0 100644
|
||||
--- a/arch/x86/kvm/x86.c
|
||||
+++ b/arch/x86/kvm/x86.c
|
||||
@@ -12449,6 +12449,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(kvm_vmgexit_msr_protocol_exit);
|
||||
@@ -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;
|
||||
}
|
||||
module_init(kvm_x86_init);
|
@ -17,7 +17,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
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 867febee8fc3..fb48dd8773e1 100644
|
||||
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;
|
||||
@ -28,7 +28,7 @@ index 867febee8fc3..fb48dd8773e1 100644
|
||||
enum x86_intercept;
|
||||
enum x86_intercept_stage;
|
||||
|
||||
@@ -1463,8 +1464,8 @@ struct kvm_x86_ops {
|
||||
@@ -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);
|
||||
@ -40,10 +40,10 @@ index 867febee8fc3..fb48dd8773e1 100644
|
||||
|
||||
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 bfaf5d24bf1e..730c3e2662d6 100644
|
||||
index 6866f09a5b53..ae6f89b79ef2 100644
|
||||
--- a/arch/x86/kvm/emulate.c
|
||||
+++ b/arch/x86/kvm/emulate.c
|
||||
@@ -2567,16 +2567,18 @@ static int rsm_load_state_64(struct x86_emulate_ctxt *ctxt,
|
||||
@@ -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;
|
||||
@ -64,7 +64,7 @@ index bfaf5d24bf1e..730c3e2662d6 100644
|
||||
if (ret != X86EMUL_CONTINUE)
|
||||
return X86EMUL_UNHANDLEABLE;
|
||||
|
||||
@@ -2626,15 +2628,15 @@ static int em_rsm(struct x86_emulate_ctxt *ctxt)
|
||||
@@ -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.
|
||||
*/
|
||||
@ -105,10 +105,10 @@ index 0b2bbcce321a..3b37b3e17379 100644
|
||||
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 21f747eacc9a..d903120811b9 100644
|
||||
index af33aafcb410..76a35d939b9f 100644
|
||||
--- a/arch/x86/kvm/svm/svm.c
|
||||
+++ b/arch/x86/kvm/svm/svm.c
|
||||
@@ -4302,12 +4302,14 @@ static int svm_smi_allowed(struct kvm_vcpu *vcpu, bool for_injection)
|
||||
@@ -4328,12 +4328,14 @@ static int svm_smi_allowed(struct kvm_vcpu *vcpu, bool for_injection)
|
||||
return !svm_smi_blocked(vcpu);
|
||||
}
|
||||
|
||||
@ -124,7 +124,7 @@ index 21f747eacc9a..d903120811b9 100644
|
||||
if (!is_guest_mode(vcpu))
|
||||
return 0;
|
||||
|
||||
@@ -4349,7 +4351,7 @@ static int svm_enter_smm(struct kvm_vcpu *vcpu, char *smstate)
|
||||
@@ -4375,7 +4377,7 @@ static int svm_enter_smm(struct kvm_vcpu *vcpu, char *smstate)
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -133,7 +133,7 @@ index 21f747eacc9a..d903120811b9 100644
|
||||
{
|
||||
struct vcpu_svm *svm = to_svm(vcpu);
|
||||
struct kvm_host_map map, map_save;
|
||||
@@ -4357,6 +4359,8 @@ static int svm_leave_smm(struct kvm_vcpu *vcpu, const char *smstate)
|
||||
@@ -4383,6 +4385,8 @@ static int svm_leave_smm(struct kvm_vcpu *vcpu, const char *smstate)
|
||||
struct vmcb *vmcb12;
|
||||
int ret;
|
||||
|
||||
@ -143,10 +143,10 @@ index 21f747eacc9a..d903120811b9 100644
|
||||
return 0;
|
||||
|
||||
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
|
||||
index 417176817d80..a45a43bcc844 100644
|
||||
index ab7141c1def4..f844864b5763 100644
|
||||
--- a/arch/x86/kvm/vmx/vmx.c
|
||||
+++ b/arch/x86/kvm/vmx/vmx.c
|
||||
@@ -7594,7 +7594,7 @@ static int vmx_smi_allowed(struct kvm_vcpu *vcpu, bool for_injection)
|
||||
@@ -7652,7 +7652,7 @@ static int vmx_smi_allowed(struct kvm_vcpu *vcpu, bool for_injection)
|
||||
return !is_smm(vcpu);
|
||||
}
|
||||
|
||||
@ -155,7 +155,7 @@ index 417176817d80..a45a43bcc844 100644
|
||||
{
|
||||
struct vcpu_vmx *vmx = to_vmx(vcpu);
|
||||
|
||||
@@ -7608,7 +7608,7 @@ static int vmx_enter_smm(struct kvm_vcpu *vcpu, char *smstate)
|
||||
@@ -7666,7 +7666,7 @@ static int vmx_enter_smm(struct kvm_vcpu *vcpu, char *smstate)
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -165,10 +165,10 @@ index 417176817d80..a45a43bcc844 100644
|
||||
struct vcpu_vmx *vmx = to_vmx(vcpu);
|
||||
int ret;
|
||||
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
|
||||
index 673262228f3e..37edf00584f8 100644
|
||||
index f62bce0a74f0..3d282bcce9ef 100644
|
||||
--- a/arch/x86/kvm/x86.c
|
||||
+++ b/arch/x86/kvm/x86.c
|
||||
@@ -7312,9 +7312,9 @@ static void emulator_exiting_smm(struct x86_emulate_ctxt *ctxt)
|
||||
@@ -7489,9 +7489,9 @@ static void emulator_exiting_smm(struct x86_emulate_ctxt *ctxt)
|
||||
}
|
||||
|
||||
static int emulator_leave_smm(struct x86_emulate_ctxt *ctxt,
|
||||
@ -180,7 +180,7 @@ index 673262228f3e..37edf00584f8 100644
|
||||
}
|
||||
|
||||
static void emulator_triple_fault(struct x86_emulate_ctxt *ctxt)
|
||||
@@ -9171,25 +9171,25 @@ static void enter_smm(struct kvm_vcpu *vcpu)
|
||||
@@ -9370,25 +9370,25 @@ static void enter_smm(struct kvm_vcpu *vcpu)
|
||||
struct kvm_segment cs, ds;
|
||||
struct desc_ptr dt;
|
||||
unsigned long cr0;
|
@ -1,49 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Maxim Levitsky <mlevitsk@redhat.com>
|
||||
Date: Wed, 3 Aug 2022 18:50:03 +0300
|
||||
Subject: [PATCH] KVM: x86: emulator: update the emulation mode after CR0 write
|
||||
|
||||
CR0.PE toggles real/protected mode, thus its update
|
||||
should update the emulation mode.
|
||||
|
||||
This is likely a benign bug because there is no writeback
|
||||
of state, other than the RIP increment, and when toggling
|
||||
CR0.PE, the CPU has to execute code from a very low memory address.
|
||||
|
||||
Also CR0.PG toggle when EFER.LMA is set, toggles the long mode.
|
||||
|
||||
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
|
||||
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
---
|
||||
arch/x86/kvm/emulate.c | 14 +++++++++++++-
|
||||
1 file changed, 13 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
|
||||
index 49697d589f87..89f035fc52e7 100644
|
||||
--- a/arch/x86/kvm/emulate.c
|
||||
+++ b/arch/x86/kvm/emulate.c
|
||||
@@ -3635,11 +3635,23 @@ static int em_movbe(struct x86_emulate_ctxt *ctxt)
|
||||
|
||||
static int em_cr_write(struct x86_emulate_ctxt *ctxt)
|
||||
{
|
||||
- if (ctxt->ops->set_cr(ctxt, ctxt->modrm_reg, ctxt->src.val))
|
||||
+ int cr_num = ctxt->modrm_reg;
|
||||
+ int r;
|
||||
+
|
||||
+ if (ctxt->ops->set_cr(ctxt, cr_num, ctxt->src.val))
|
||||
return emulate_gp(ctxt, 0);
|
||||
|
||||
/* Disable writeback. */
|
||||
ctxt->dst.type = OP_NONE;
|
||||
+
|
||||
+ if (cr_num == 0) {
|
||||
+ /* CR0 write might have updated CR0.PE and/or CR0.PG
|
||||
+ * which can affect the cpu execution mode */
|
||||
+ r = emulator_recalc_and_set_mode(ctxt);
|
||||
+ if (r != X86EMUL_CONTINUE)
|
||||
+ return r;
|
||||
+ }
|
||||
+
|
||||
return X86EMUL_CONTINUE;
|
||||
}
|
||||
|
@ -15,10 +15,10 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
2 files changed, 60 insertions(+), 96 deletions(-)
|
||||
|
||||
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
|
||||
index 730c3e2662d6..ad5d2ab9ab84 100644
|
||||
index ae6f89b79ef2..36c45c89563c 100644
|
||||
--- a/arch/x86/kvm/emulate.c
|
||||
+++ b/arch/x86/kvm/emulate.c
|
||||
@@ -2344,25 +2344,17 @@ static void rsm_set_desc_flags(struct desc_struct *desc, u32 flags)
|
||||
@@ -2343,25 +2343,17 @@ static void rsm_set_desc_flags(struct desc_struct *desc, u32 flags)
|
||||
desc->type = (flags >> 8) & 15;
|
||||
}
|
||||
|
||||
@ -50,7 +50,7 @@ index 730c3e2662d6..ad5d2ab9ab84 100644
|
||||
}
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
@@ -2433,63 +2425,46 @@ static int rsm_enter_protected_mode(struct x86_emulate_ctxt *ctxt,
|
||||
@@ -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,
|
||||
@ -135,7 +135,7 @@ index 730c3e2662d6..ad5d2ab9ab84 100644
|
||||
}
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
@@ -2636,7 +2611,7 @@ static int em_rsm(struct x86_emulate_ctxt *ctxt)
|
||||
@@ -2635,7 +2610,7 @@ static int em_rsm(struct x86_emulate_ctxt *ctxt)
|
||||
ret = rsm_load_state_64(ctxt, (const char *)&smram);
|
||||
else
|
||||
#endif
|
||||
@ -145,10 +145,10 @@ index 730c3e2662d6..ad5d2ab9ab84 100644
|
||||
if (ret != X86EMUL_CONTINUE)
|
||||
goto emulate_shutdown;
|
||||
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
|
||||
index 37edf00584f8..11e62b1f1764 100644
|
||||
index 3d282bcce9ef..c6b5c0543931 100644
|
||||
--- a/arch/x86/kvm/x86.c
|
||||
+++ b/arch/x86/kvm/x86.c
|
||||
@@ -9025,22 +9025,18 @@ static u32 enter_smm_get_segment_flags(struct kvm_segment *seg)
|
||||
@@ -9224,22 +9224,18 @@ static u32 enter_smm_get_segment_flags(struct kvm_segment *seg)
|
||||
return flags;
|
||||
}
|
||||
|
||||
@ -179,7 +179,7 @@ index 37edf00584f8..11e62b1f1764 100644
|
||||
}
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
@@ -9061,54 +9057,47 @@ static void enter_smm_save_seg_64(struct kvm_vcpu *vcpu, char *buf, int n)
|
||||
@@ -9260,54 +9256,47 @@ static void enter_smm_save_seg_64(struct kvm_vcpu *vcpu, char *buf, int n)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -257,7 +257,7 @@ index 37edf00584f8..11e62b1f1764 100644
|
||||
}
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
@@ -9179,7 +9168,7 @@ static void enter_smm(struct kvm_vcpu *vcpu)
|
||||
@@ -9378,7 +9367,7 @@ static void enter_smm(struct kvm_vcpu *vcpu)
|
||||
enter_smm_save_state_64(vcpu, (char *)&smram);
|
||||
else
|
||||
#endif
|
@ -16,10 +16,10 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
2 files changed, 62 insertions(+), 101 deletions(-)
|
||||
|
||||
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
|
||||
index ad5d2ab9ab84..4eb35a0a33a5 100644
|
||||
index 36c45c89563c..eb2f5e43f6ad 100644
|
||||
--- a/arch/x86/kvm/emulate.c
|
||||
+++ b/arch/x86/kvm/emulate.c
|
||||
@@ -2358,24 +2358,16 @@ static void rsm_load_seg_32(struct x86_emulate_ctxt *ctxt,
|
||||
@@ -2357,24 +2357,16 @@ static void rsm_load_seg_32(struct x86_emulate_ctxt *ctxt,
|
||||
}
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
@ -51,7 +51,7 @@ index ad5d2ab9ab84..4eb35a0a33a5 100644
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -2469,71 +2461,49 @@ static int rsm_load_state_32(struct x86_emulate_ctxt *ctxt,
|
||||
@@ -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,
|
||||
@ -144,7 +144,7 @@ index ad5d2ab9ab84..4eb35a0a33a5 100644
|
||||
|
||||
return X86EMUL_CONTINUE;
|
||||
}
|
||||
@@ -2608,7 +2578,7 @@ static int em_rsm(struct x86_emulate_ctxt *ctxt)
|
||||
@@ -2607,7 +2577,7 @@ static int em_rsm(struct x86_emulate_ctxt *ctxt)
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
if (emulator_has_longmode(ctxt))
|
||||
@ -154,10 +154,10 @@ index ad5d2ab9ab84..4eb35a0a33a5 100644
|
||||
#endif
|
||||
ret = rsm_load_state_32(ctxt, &smram.smram32);
|
||||
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
|
||||
index 11e62b1f1764..5c4be3873c0d 100644
|
||||
index c6b5c0543931..f309248fa888 100644
|
||||
--- a/arch/x86/kvm/x86.c
|
||||
+++ b/arch/x86/kvm/x86.c
|
||||
@@ -9040,20 +9040,17 @@ static void enter_smm_save_seg_32(struct kvm_vcpu *vcpu,
|
||||
@@ -9239,20 +9239,17 @@ static void enter_smm_save_seg_32(struct kvm_vcpu *vcpu,
|
||||
}
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
@ -185,7 +185,7 @@ index 11e62b1f1764..5c4be3873c0d 100644
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -9101,57 +9098,51 @@ static void enter_smm_save_state_32(struct kvm_vcpu *vcpu, struct kvm_smram_stat
|
||||
@@ -9300,57 +9297,51 @@ static void enter_smm_save_state_32(struct kvm_vcpu *vcpu, struct kvm_smram_stat
|
||||
}
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
@ -268,7 +268,7 @@ index 11e62b1f1764..5c4be3873c0d 100644
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -9165,7 +9156,7 @@ static void enter_smm(struct kvm_vcpu *vcpu)
|
||||
@@ -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))
|
@ -17,10 +17,10 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
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 fb48dd8773e1..0362d3fba42a 100644
|
||||
index 4b1514a174b0..95d609e67dd0 100644
|
||||
--- a/arch/x86/include/asm/kvm_host.h
|
||||
+++ b/arch/x86/include/asm/kvm_host.h
|
||||
@@ -1932,12 +1932,6 @@ static inline int kvm_cpu_get_apicid(int mps_cpu)
|
||||
@@ -1936,12 +1936,6 @@ static inline int kvm_cpu_get_apicid(int mps_cpu)
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -34,10 +34,10 @@ index fb48dd8773e1..0362d3fba42a 100644
|
||||
|
||||
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 d903120811b9..742497b1d4c3 100644
|
||||
index 76a35d939b9f..ba3861d5114b 100644
|
||||
--- a/arch/x86/kvm/svm/svm.c
|
||||
+++ b/arch/x86/kvm/svm/svm.c
|
||||
@@ -4308,15 +4308,11 @@ static int svm_enter_smm(struct kvm_vcpu *vcpu, union kvm_smram *smram)
|
||||
@@ -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;
|
||||
|
||||
@ -55,7 +55,7 @@ index d903120811b9..742497b1d4c3 100644
|
||||
|
||||
svm->vmcb->save.rax = vcpu->arch.regs[VCPU_REGS_RAX];
|
||||
svm->vmcb->save.rsp = vcpu->arch.regs[VCPU_REGS_RSP];
|
||||
@@ -4355,28 +4351,23 @@ static int svm_leave_smm(struct kvm_vcpu *vcpu, const union kvm_smram *smram)
|
||||
@@ -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;
|
||||
@ -87,7 +87,7 @@ index d903120811b9..742497b1d4c3 100644
|
||||
return 1;
|
||||
|
||||
ret = 1;
|
||||
@@ -4401,7 +4392,7 @@ static int svm_leave_smm(struct kvm_vcpu *vcpu, const union kvm_smram *smram)
|
||||
@@ -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);
|
@ -19,10 +19,10 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
|
||||
index 742497b1d4c3..938b9b24f0ee 100644
|
||||
index ba3861d5114b..ebbd2d3b4e53 100644
|
||||
--- a/arch/x86/kvm/svm/svm.c
|
||||
+++ b/arch/x86/kvm/svm/svm.c
|
||||
@@ -4311,6 +4311,15 @@ static int svm_enter_smm(struct kvm_vcpu *vcpu, union kvm_smram *smram)
|
||||
@@ -4337,6 +4337,15 @@ static int svm_enter_smm(struct kvm_vcpu *vcpu, union kvm_smram *smram)
|
||||
if (!is_guest_mode(vcpu))
|
||||
return 0;
|
||||
|
@ -30,10 +30,10 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
3 files changed, 32 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
|
||||
index 4eb35a0a33a5..3e6ea2951e2b 100644
|
||||
index eb2f5e43f6ad..7f5710c34f4e 100644
|
||||
--- a/arch/x86/kvm/emulate.c
|
||||
+++ b/arch/x86/kvm/emulate.c
|
||||
@@ -2420,7 +2420,7 @@ static int rsm_load_state_32(struct x86_emulate_ctxt *ctxt,
|
||||
@@ -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;
|
||||
@ -42,7 +42,7 @@ index 4eb35a0a33a5..3e6ea2951e2b 100644
|
||||
|
||||
ctxt->eflags = smstate->eflags | X86_EFLAGS_FIXED;
|
||||
ctxt->_eip = smstate->eip;
|
||||
@@ -2455,8 +2455,16 @@ static int rsm_load_state_32(struct x86_emulate_ctxt *ctxt,
|
||||
@@ -2454,8 +2454,16 @@ static int rsm_load_state_32(struct x86_emulate_ctxt *ctxt,
|
||||
|
||||
ctxt->ops->set_smbase(ctxt, smstate->smbase);
|
||||
|
||||
@ -61,7 +61,7 @@ index 4eb35a0a33a5..3e6ea2951e2b 100644
|
||||
}
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
@@ -2505,6 +2513,9 @@ static int rsm_load_state_64(struct x86_emulate_ctxt *ctxt,
|
||||
@@ -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);
|
||||
|
||||
@ -128,10 +128,10 @@ index 3b37b3e17379..a64c190abf28 100644
|
||||
__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 5c4be3873c0d..461c9d815d6c 100644
|
||||
index f309248fa888..4ea0e8112c42 100644
|
||||
--- a/arch/x86/kvm/x86.c
|
||||
+++ b/arch/x86/kvm/x86.c
|
||||
@@ -7299,6 +7299,11 @@ static void emulator_set_nmi_mask(struct x86_emulate_ctxt *ctxt, bool masked)
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@ -143,7 +143,7 @@ index 5c4be3873c0d..461c9d815d6c 100644
|
||||
static unsigned emulator_get_hflags(struct x86_emulate_ctxt *ctxt)
|
||||
{
|
||||
return emul_to_vcpu(ctxt)->arch.hflags;
|
||||
@@ -7368,6 +7373,7 @@ static const struct x86_emulate_ops emulate_ops = {
|
||||
@@ -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,
|
||||
@ -151,7 +151,7 @@ index 5c4be3873c0d..461c9d815d6c 100644
|
||||
.get_hflags = emulator_get_hflags,
|
||||
.exiting_smm = emulator_exiting_smm,
|
||||
.leave_smm = emulator_leave_smm,
|
||||
@@ -9095,6 +9101,8 @@ static void enter_smm_save_state_32(struct kvm_vcpu *vcpu, struct kvm_smram_stat
|
||||
@@ -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;
|
||||
@ -160,7 +160,7 @@ index 5c4be3873c0d..461c9d815d6c 100644
|
||||
}
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
@@ -9143,6 +9151,8 @@ static void enter_smm_save_state_64(struct kvm_vcpu *vcpu, struct kvm_smram_stat
|
||||
@@ -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);
|
||||
@ -169,7 +169,7 @@ index 5c4be3873c0d..461c9d815d6c 100644
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -9179,6 +9189,8 @@ static void enter_smm(struct kvm_vcpu *vcpu)
|
||||
@@ -9378,6 +9388,8 @@ static void enter_smm(struct kvm_vcpu *vcpu)
|
||||
kvm_set_rflags(vcpu, X86_EFLAGS_FIXED);
|
||||
kvm_rip_write(vcpu, 0x8000);
|
||||
|
@ -1,37 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Maher Sanalla <msanalla@nvidia.com>
|
||||
Date: Sun, 24 Jul 2022 11:28:21 +0300
|
||||
Subject: [PATCH] net/mlx5: Adjust log_max_qp to be 18 at most
|
||||
|
||||
[ Upstream commit a6e9085d791f8306084fd5bc44dd3fdd4e1ac27b ]
|
||||
|
||||
The cited commit limited log_max_qp to be 17 due to FW capabilities.
|
||||
Recently, it turned out that there are old FW versions that supported
|
||||
more than 17, so the cited commit caused a degradation.
|
||||
|
||||
Thus, set the maximum log_max_qp back to 18 as it was before the
|
||||
cited commit.
|
||||
|
||||
Fixes: 7f839965b2d7 ("net/mlx5: Update log_max_qp value to be 17 at most")
|
||||
Signed-off-by: Maher Sanalla <msanalla@nvidia.com>
|
||||
Reviewed-by: Maor Gottlieb <maorg@nvidia.com>
|
||||
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
|
||||
Signed-off-by: Sasha Levin <sashal@kernel.org>
|
||||
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
---
|
||||
drivers/net/ethernet/mellanox/mlx5/core/main.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/ethernet/mellanox/mlx5/core/main.c
|
||||
index 4ed740994279..5a6606c843ed 100644
|
||||
--- a/drivers/net/ethernet/mellanox/mlx5/core/main.c
|
||||
+++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c
|
||||
@@ -516,7 +516,7 @@ static int handle_hca_cap(struct mlx5_core_dev *dev, void *set_ctx)
|
||||
|
||||
/* Check log_max_qp from HCA caps to set in current profile */
|
||||
if (prof->log_max_qp == LOG_MAX_SUPPORTED_QPS) {
|
||||
- prof->log_max_qp = min_t(u8, 17, MLX5_CAP_GEN_MAX(dev, log_max_qp));
|
||||
+ prof->log_max_qp = min_t(u8, 18, MLX5_CAP_GEN_MAX(dev, log_max_qp));
|
||||
} else if (MLX5_CAP_GEN_MAX(dev, log_max_qp) < prof->log_max_qp) {
|
||||
mlx5_core_warn(dev, "log_max_qp value in current profile is %d, changing it to HCA capability limit (%d)\n",
|
||||
prof->log_max_qp,
|
@ -1,60 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Paolo Bonzini <pbonzini@redhat.com>
|
||||
Date: Thu, 4 Aug 2022 15:28:32 +0200
|
||||
Subject: [PATCH] KVM: x86: revalidate steal time cache if MSR value changes
|
||||
|
||||
commit 901d3765fa804ce42812f1d5b1f3de2dfbb26723 upstream.
|
||||
|
||||
Commit 7e2175ebd695 ("KVM: x86: Fix recording of guest steal time
|
||||
/ preempted status", 2021-11-11) open coded the previous call to
|
||||
kvm_map_gfn, but in doing so it dropped the comparison between the cached
|
||||
guest physical address and the one in the MSR. This cause an incorrect
|
||||
cache hit if the guest modifies the steal time address while the memslots
|
||||
remain the same. This can happen with kexec, in which case the steal
|
||||
time data is written at the address used by the old kernel instead of
|
||||
the old one.
|
||||
|
||||
While at it, rename the variable from gfn to gpa since it is a plain
|
||||
physical address and not a right-shifted one.
|
||||
|
||||
Reported-by: Dave Young <ruyang@redhat.com>
|
||||
Reported-by: Xiaoying Yan <yiyan@redhat.com>
|
||||
Analyzed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
||||
Cc: David Woodhouse <dwmw@amazon.co.uk>
|
||||
Cc: stable@vger.kernel.org
|
||||
Fixes: 7e2175ebd695 ("KVM: x86: Fix recording of guest steal time / preempted status")
|
||||
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
---
|
||||
arch/x86/kvm/x86.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
|
||||
index 461c9d815d6c..b46677baf396 100644
|
||||
--- a/arch/x86/kvm/x86.c
|
||||
+++ b/arch/x86/kvm/x86.c
|
||||
@@ -3236,6 +3236,7 @@ static void record_steal_time(struct kvm_vcpu *vcpu)
|
||||
struct gfn_to_hva_cache *ghc = &vcpu->arch.st.cache;
|
||||
struct kvm_steal_time __user *st;
|
||||
struct kvm_memslots *slots;
|
||||
+ gpa_t gpa = vcpu->arch.st.msr_val & KVM_STEAL_VALID_BITS;
|
||||
u64 steal;
|
||||
u32 version;
|
||||
|
||||
@@ -3253,13 +3254,12 @@ static void record_steal_time(struct kvm_vcpu *vcpu)
|
||||
slots = kvm_memslots(vcpu->kvm);
|
||||
|
||||
if (unlikely(slots->generation != ghc->generation ||
|
||||
+ gpa != ghc->gpa ||
|
||||
kvm_is_error_hva(ghc->hva) || !ghc->memslot)) {
|
||||
- gfn_t gfn = vcpu->arch.st.msr_val & KVM_STEAL_VALID_BITS;
|
||||
-
|
||||
/* We rely on the fact that it fits in a single page. */
|
||||
BUILD_BUG_ON((sizeof(*st) - 1) & KVM_STEAL_VALID_BITS);
|
||||
|
||||
- if (kvm_gfn_to_hva_cache_init(vcpu->kvm, ghc, gfn, sizeof(*st)) ||
|
||||
+ if (kvm_gfn_to_hva_cache_init(vcpu->kvm, ghc, gpa, sizeof(*st)) ||
|
||||
kvm_is_error_hva(ghc->hva) || !ghc->memslot)
|
||||
return;
|
||||
}
|
@ -1,47 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Paolo Bonzini <pbonzini@redhat.com>
|
||||
Date: Thu, 4 Aug 2022 15:28:32 +0200
|
||||
Subject: [PATCH] KVM: x86: do not report preemption if the steal time cache is
|
||||
stale
|
||||
|
||||
commit c3c28d24d910a746b02f496d190e0e8c6560224b upstream.
|
||||
|
||||
Commit 7e2175ebd695 ("KVM: x86: Fix recording of guest steal time
|
||||
/ preempted status", 2021-11-11) open coded the previous call to
|
||||
kvm_map_gfn, but in doing so it dropped the comparison between the cached
|
||||
guest physical address and the one in the MSR. This cause an incorrect
|
||||
cache hit if the guest modifies the steal time address while the memslots
|
||||
remain the same. This can happen with kexec, in which case the preempted
|
||||
bit is written at the address used by the old kernel instead of
|
||||
the old one.
|
||||
|
||||
Cc: David Woodhouse <dwmw@amazon.co.uk>
|
||||
Cc: stable@vger.kernel.org
|
||||
Fixes: 7e2175ebd695 ("KVM: x86: Fix recording of guest steal time / preempted status")
|
||||
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
---
|
||||
arch/x86/kvm/x86.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
|
||||
index b46677baf396..48aaff0ce3b9 100644
|
||||
--- a/arch/x86/kvm/x86.c
|
||||
+++ b/arch/x86/kvm/x86.c
|
||||
@@ -4370,6 +4370,7 @@ static void kvm_steal_time_set_preempted(struct kvm_vcpu *vcpu)
|
||||
struct kvm_steal_time __user *st;
|
||||
struct kvm_memslots *slots;
|
||||
static const u8 preempted = KVM_VCPU_PREEMPTED;
|
||||
+ gpa_t gpa = vcpu->arch.st.msr_val & KVM_STEAL_VALID_BITS;
|
||||
|
||||
if (!(vcpu->arch.st.msr_val & KVM_MSR_ENABLED))
|
||||
return;
|
||||
@@ -4384,6 +4385,7 @@ static void kvm_steal_time_set_preempted(struct kvm_vcpu *vcpu)
|
||||
slots = kvm_memslots(vcpu->kvm);
|
||||
|
||||
if (unlikely(slots->generation != ghc->generation ||
|
||||
+ gpa != ghc->gpa ||
|
||||
kvm_is_error_hva(ghc->hva) || !ghc->memslot))
|
||||
return;
|
||||
|
@ -1,70 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Nilesh Javali <njavali@marvell.com>
|
||||
Date: Tue, 12 Jul 2022 22:20:36 -0700
|
||||
Subject: [PATCH] scsi: Revert "scsi: qla2xxx: Fix disk failure to rediscover"
|
||||
|
||||
commit 5bc7b01c513a4a9b4cfe306e8d1720cfcfd3b8a3 upstream.
|
||||
|
||||
This fixes the regression of NVMe discovery failure during driver load
|
||||
time.
|
||||
|
||||
This reverts commit 6a45c8e137d4e2c72eecf1ac7cf64f2fdfcead99.
|
||||
|
||||
Link: https://lore.kernel.org/r/20220713052045.10683-2-njavali@marvell.com
|
||||
Cc: stable@vger.kernel.org
|
||||
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
|
||||
Signed-off-by: Nilesh Javali <njavali@marvell.com>
|
||||
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
---
|
||||
drivers/scsi/qla2xxx/qla_init.c | 5 ++---
|
||||
drivers/scsi/qla2xxx/qla_nvme.c | 5 -----
|
||||
2 files changed, 2 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
|
||||
index af8df5a800c6..7caf573af58e 100644
|
||||
--- a/drivers/scsi/qla2xxx/qla_init.c
|
||||
+++ b/drivers/scsi/qla2xxx/qla_init.c
|
||||
@@ -5749,8 +5749,6 @@ qla2x00_reg_remote_port(scsi_qla_host_t *vha, fc_port_t *fcport)
|
||||
if (atomic_read(&fcport->state) == FCS_ONLINE)
|
||||
return;
|
||||
|
||||
- qla2x00_set_fcport_state(fcport, FCS_ONLINE);
|
||||
-
|
||||
rport_ids.node_name = wwn_to_u64(fcport->node_name);
|
||||
rport_ids.port_name = wwn_to_u64(fcport->port_name);
|
||||
rport_ids.port_id = fcport->d_id.b.domain << 16 |
|
||||
@@ -5858,7 +5856,6 @@ qla2x00_update_fcport(scsi_qla_host_t *vha, fc_port_t *fcport)
|
||||
qla2x00_reg_remote_port(vha, fcport);
|
||||
break;
|
||||
case MODE_TARGET:
|
||||
- qla2x00_set_fcport_state(fcport, FCS_ONLINE);
|
||||
if (!vha->vha_tgt.qla_tgt->tgt_stop &&
|
||||
!vha->vha_tgt.qla_tgt->tgt_stopped)
|
||||
qlt_fc_port_added(vha, fcport);
|
||||
@@ -5873,6 +5870,8 @@ qla2x00_update_fcport(scsi_qla_host_t *vha, fc_port_t *fcport)
|
||||
break;
|
||||
}
|
||||
|
||||
+ qla2x00_set_fcport_state(fcport, FCS_ONLINE);
|
||||
+
|
||||
if (IS_IIDMA_CAPABLE(vha->hw) && vha->hw->flags.gpsc_supported) {
|
||||
if (fcport->id_changed) {
|
||||
fcport->id_changed = 0;
|
||||
diff --git a/drivers/scsi/qla2xxx/qla_nvme.c b/drivers/scsi/qla2xxx/qla_nvme.c
|
||||
index 42b29f4fd937..e63272487788 100644
|
||||
--- a/drivers/scsi/qla2xxx/qla_nvme.c
|
||||
+++ b/drivers/scsi/qla2xxx/qla_nvme.c
|
||||
@@ -35,11 +35,6 @@ int qla_nvme_register_remote(struct scsi_qla_host *vha, struct fc_port *fcport)
|
||||
(fcport->nvme_flag & NVME_FLAG_REGISTERED))
|
||||
return 0;
|
||||
|
||||
- if (atomic_read(&fcport->state) == FCS_ONLINE)
|
||||
- return 0;
|
||||
-
|
||||
- qla2x00_set_fcport_state(fcport, FCS_ONLINE);
|
||||
-
|
||||
fcport->nvme_flag &= ~NVME_FLAG_RESETTING;
|
||||
|
||||
memset(&req, 0, sizeof(struct nvme_fc_port_info));
|
@ -1,30 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Gruenbacher <agruenba@redhat.com>
|
||||
Date: Thu, 17 Mar 2022 14:47:24 +0100
|
||||
Subject: [PATCH] gfs2: Fix gfs2_file_buffered_write endless loop workaround
|
||||
|
||||
[ Upstream commit 46f3e0421ccb5474b5c006b0089b9dfd42534bb6 ]
|
||||
|
||||
Since commit 554c577cee95b, gfs2_file_buffered_write() can accidentally
|
||||
return a truncated iov_iter, which might confuse callers. Fix that.
|
||||
|
||||
Fixes: 554c577cee95b ("gfs2: Prevent endless loops in gfs2_file_buffered_write")
|
||||
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
|
||||
Signed-off-by: Sasha Levin <sashal@kernel.org>
|
||||
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
---
|
||||
fs/gfs2/file.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c
|
||||
index 60390f9dc31f..e93185d804e0 100644
|
||||
--- a/fs/gfs2/file.c
|
||||
+++ b/fs/gfs2/file.c
|
||||
@@ -1086,6 +1086,7 @@ static ssize_t gfs2_file_buffered_write(struct kiocb *iocb,
|
||||
gfs2_holder_uninit(gh);
|
||||
if (statfs_gh)
|
||||
kfree(statfs_gh);
|
||||
+ from->count = orig_count - read;
|
||||
return read ? read : ret;
|
||||
}
|
||||
|
@ -1 +0,0 @@
|
||||
Subproject commit 941bdeb5ab2258758fce5f4d06296da98bfa7e82
|
1
submodules/ubuntu-kernel
Submodule
1
submodules/ubuntu-kernel
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 1e5c98582d147f016e297cf0936b2598779cd24c
|
@ -1 +1 @@
|
||||
Subproject commit 3f3541cad07018038b112fe1219895c210a30473
|
||||
Subproject commit 66ef8d3dc8bdbf2ec44e3f452de4461f0bf4d4c1
|
Loading…
Reference in New Issue
Block a user