mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-04 04:04:19 +00:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
net/wireless/nl80211.cb27f07c50a
("wifi: nl80211: fix puncturing bitmap policy")cbbaf2bb82
("wifi: nl80211: add a command to enable/disable HW timestamping") https://lore.kernel.org/all/20230314105421.3608efae@canb.auug.org.au tools/testing/selftests/net/Makefile62199e3f16
("selftests: net: Add VXLAN MDB test")13715acf8a
("selftest: Add test for bind() conflicts.") Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
commit
1118aa4c70
10
.mailmap
10
.mailmap
@ -28,6 +28,7 @@ Alexander Lobakin <alobakin@pm.me> <bloodyreaper@yandex.ru>
|
||||
Alexander Mikhalitsyn <alexander@mihalicyn.com> <alexander.mikhalitsyn@virtuozzo.com>
|
||||
Alexander Mikhalitsyn <alexander@mihalicyn.com> <aleksandr.mikhalitsyn@canonical.com>
|
||||
Alexandre Belloni <alexandre.belloni@bootlin.com> <alexandre.belloni@free-electrons.com>
|
||||
Alexandre Ghiti <alex@ghiti.fr> <alexandre.ghiti@canonical.com>
|
||||
Alexei Starovoitov <ast@kernel.org> <alexei.starovoitov@gmail.com>
|
||||
Alexei Starovoitov <ast@kernel.org> <ast@fb.com>
|
||||
Alexei Starovoitov <ast@kernel.org> <ast@plumgrid.com>
|
||||
@ -121,7 +122,7 @@ Dengcheng Zhu <dzhu@wavecomp.com> <dengcheng.zhu@gmail.com>
|
||||
Dengcheng Zhu <dzhu@wavecomp.com> <dengcheng.zhu@imgtec.com>
|
||||
Dengcheng Zhu <dzhu@wavecomp.com> <dengcheng.zhu@mips.com>
|
||||
<dev.kurt@vandijck-laurijssen.be> <kurt.van.dijck@eia.be>
|
||||
Dikshita Agarwal <dikshita@qti.qualcomm.com> <dikshita@codeaurora.org>
|
||||
Dikshita Agarwal <quic_dikshita@quicinc.com> <dikshita@codeaurora.org>
|
||||
Dmitry Baryshkov <dbaryshkov@gmail.com>
|
||||
Dmitry Baryshkov <dbaryshkov@gmail.com> <[dbaryshkov@gmail.com]>
|
||||
Dmitry Baryshkov <dbaryshkov@gmail.com> <dmitry_baryshkov@mentor.com>
|
||||
@ -136,6 +137,9 @@ Erik Kaneda <erik.kaneda@intel.com> <erik.schmauss@intel.com>
|
||||
Eugen Hristev <eugen.hristev@collabora.com> <eugen.hristev@microchip.com>
|
||||
Evgeniy Polyakov <johnpol@2ka.mipt.ru>
|
||||
Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> <ezequiel@collabora.com>
|
||||
Faith Ekstrand <faith.ekstrand@collabora.com> <jason@jlekstrand.net>
|
||||
Faith Ekstrand <faith.ekstrand@collabora.com> <jason.ekstrand@intel.com>
|
||||
Faith Ekstrand <faith.ekstrand@collabora.com> <jason.ekstrand@collabora.com>
|
||||
Felipe W Damasio <felipewd@terra.com.br>
|
||||
Felix Kuhling <fxkuehl@gmx.de>
|
||||
Felix Moeller <felix@derklecks.de>
|
||||
@ -191,6 +195,7 @@ Jan Glauber <jan.glauber@gmail.com> <jang@linux.vnet.ibm.com>
|
||||
Jan Glauber <jan.glauber@gmail.com> <jglauber@cavium.com>
|
||||
Jarkko Sakkinen <jarkko@kernel.org> <jarkko.sakkinen@linux.intel.com>
|
||||
Jarkko Sakkinen <jarkko@kernel.org> <jarkko@profian.com>
|
||||
Jarkko Sakkinen <jarkko@kernel.org> <jarkko.sakkinen@tuni.fi>
|
||||
Jason Gunthorpe <jgg@ziepe.ca> <jgg@mellanox.com>
|
||||
Jason Gunthorpe <jgg@ziepe.ca> <jgg@nvidia.com>
|
||||
Jason Gunthorpe <jgg@ziepe.ca> <jgunthorpe@obsidianresearch.com>
|
||||
@ -210,6 +215,9 @@ Jens Axboe <axboe@suse.de>
|
||||
Jens Osterkamp <Jens.Osterkamp@de.ibm.com>
|
||||
Jernej Skrabec <jernej.skrabec@gmail.com> <jernej.skrabec@siol.net>
|
||||
Jessica Zhang <quic_jesszhan@quicinc.com> <jesszhan@codeaurora.org>
|
||||
Jiri Pirko <jiri@resnulli.us> <jiri@nvidia.com>
|
||||
Jiri Pirko <jiri@resnulli.us> <jiri@mellanox.com>
|
||||
Jiri Pirko <jiri@resnulli.us> <jpirko@redhat.com>
|
||||
Jiri Slaby <jirislaby@kernel.org> <jirislaby@gmail.com>
|
||||
Jiri Slaby <jirislaby@kernel.org> <jslaby@novell.com>
|
||||
Jiri Slaby <jirislaby@kernel.org> <jslaby@suse.com>
|
||||
|
@ -705,6 +705,15 @@ Description:
|
||||
zoned will report "none".
|
||||
|
||||
|
||||
What: /sys/block/<disk>/hidden
|
||||
Date: March 2023
|
||||
Contact: linux-block@vger.kernel.org
|
||||
Description:
|
||||
[RO] the block device is hidden. it doesn’t produce events, and
|
||||
can’t be opened from userspace or using blkdev_get*.
|
||||
Used for the underlying components of multipath devices.
|
||||
|
||||
|
||||
What: /sys/block/<disk>/stat
|
||||
Date: February 2008
|
||||
Contact: Jerome Marchand <jmarchan@redhat.com>
|
||||
|
@ -242,7 +242,7 @@ group and can access them as follows::
|
||||
VFIO User API
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Please see include/linux/vfio.h for complete API documentation.
|
||||
Please see include/uapi/linux/vfio.h for complete API documentation.
|
||||
|
||||
VFIO bus driver API
|
||||
-------------------------------------------------------------------------------
|
||||
|
@ -105,9 +105,9 @@ descriptors. Instead, the superblock and a single block group descriptor
|
||||
block is placed at the beginning of the first, second, and last block
|
||||
groups in a meta-block group. A meta-block group is a collection of
|
||||
block groups which can be described by a single block group descriptor
|
||||
block. Since the size of the block group descriptor structure is 32
|
||||
bytes, a meta-block group contains 32 block groups for filesystems with
|
||||
a 1KB block size, and 128 block groups for filesystems with a 4KB
|
||||
block. Since the size of the block group descriptor structure is 64
|
||||
bytes, a meta-block group contains 16 block groups for filesystems with
|
||||
a 1KB block size, and 64 block groups for filesystems with a 4KB
|
||||
blocksize. Filesystems can either be created using this new block group
|
||||
descriptor layout, or existing filesystems can be resized on-line, and
|
||||
the field s_first_meta_bg in the superblock will indicate the first
|
||||
|
@ -1222,7 +1222,7 @@ defined:
|
||||
return
|
||||
-ECHILD and it will be called again in ref-walk mode.
|
||||
|
||||
``_weak_revalidate``
|
||||
``d_weak_revalidate``
|
||||
called when the VFS needs to revalidate a "jumped" dentry. This
|
||||
is called when a path-walk ends at dentry that was not acquired
|
||||
by doing a lookup in the parent directory. This includes "/",
|
||||
|
@ -19,7 +19,7 @@ possible we decided to do following:
|
||||
platform devices.
|
||||
|
||||
- Devices behind real busses where there is a connector resource
|
||||
are represented as struct spi_device or struct i2c_device. Note
|
||||
are represented as struct spi_device or struct i2c_client. Note
|
||||
that standard UARTs are not busses so there is no struct uart_device,
|
||||
although some of them may be represented by struct serdev_device.
|
||||
|
||||
|
@ -213,11 +213,7 @@ point rather than some random spot. If your upstream-bound branch has
|
||||
emptied entirely into the mainline during the merge window, you can pull it
|
||||
forward with a command like::
|
||||
|
||||
git merge v5.2-rc1^0
|
||||
|
||||
The "^0" will cause Git to do a fast-forward merge (which should be
|
||||
possible in this situation), thus avoiding the addition of a spurious merge
|
||||
commit.
|
||||
git merge --ff-only v5.2-rc1
|
||||
|
||||
The guidelines laid out above are just that: guidelines. There will always
|
||||
be situations that call out for a different solution, and these guidelines
|
||||
|
@ -5,10 +5,10 @@ Hugetlbfs Reservation
|
||||
Overview
|
||||
========
|
||||
|
||||
Huge pages as described at Documentation/mm/hugetlbpage.rst are typically
|
||||
preallocated for application use. These huge pages are instantiated in a
|
||||
task's address space at page fault time if the VMA indicates huge pages are
|
||||
to be used. If no huge page exists at page fault time, the task is sent
|
||||
Huge pages as described at Documentation/admin-guide/mm/hugetlbpage.rst are
|
||||
typically preallocated for application use. These huge pages are instantiated
|
||||
in a task's address space at page fault time if the VMA indicates huge pages
|
||||
are to be used. If no huge page exists at page fault time, the task is sent
|
||||
a SIGBUS and often dies an unhappy death. Shortly after huge page support
|
||||
was added, it was determined that it would be better to detect a shortage
|
||||
of huge pages at mmap() time. The idea is that if there were not enough
|
||||
|
@ -66,7 +66,7 @@ one of the types described below.
|
||||
also populated on boot using one of ``kernelcore``, ``movablecore`` and
|
||||
``movable_node`` kernel command line parameters. See
|
||||
Documentation/mm/page_migration.rst and
|
||||
Documentation/admin-guide/mm/memory_hotplug.rst for additional details.
|
||||
Documentation/admin-guide/mm/memory-hotplug.rst for additional details.
|
||||
|
||||
* ``ZONE_DEVICE`` represents memory residing on devices such as PMEM and GPU.
|
||||
It has different characteristics than RAM zone types and it exists to provide
|
||||
|
@ -1,4 +1,4 @@
|
||||
# SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
# SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://kernel.org/schemas/netlink/genetlink-c.yaml#
|
||||
|
@ -1,4 +1,4 @@
|
||||
# SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
# SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://kernel.org/schemas/netlink/genetlink-legacy.yaml#
|
||||
|
@ -1,4 +1,4 @@
|
||||
# SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
# SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://kernel.org/schemas/netlink/genetlink-legacy.yaml#
|
||||
|
@ -1,4 +1,4 @@
|
||||
# SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
# SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
|
||||
|
||||
name: ethtool
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
# SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
|
||||
|
||||
name: fou
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
# SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
|
||||
|
||||
name: netdev
|
||||
|
||||
@ -9,6 +9,7 @@ definitions:
|
||||
-
|
||||
type: flags
|
||||
name: xdp-act
|
||||
render-max: true
|
||||
entries:
|
||||
-
|
||||
name: basic
|
||||
|
@ -12,10 +12,6 @@ under ``-std=gnu11`` [gcc-c-dialect-options]_: the GNU dialect of ISO C11.
|
||||
This dialect contains many extensions to the language [gnu-extensions]_,
|
||||
and many of them are used within the kernel as a matter of course.
|
||||
|
||||
There is some support for compiling the kernel with ``icc`` [icc]_ for several
|
||||
of the architectures, although at the time of writing it is not completed,
|
||||
requiring third-party patches.
|
||||
|
||||
Attributes
|
||||
----------
|
||||
|
||||
@ -35,12 +31,28 @@ in order to feature detect which ones can be used and/or to shorten the code.
|
||||
|
||||
Please refer to ``include/linux/compiler_attributes.h`` for more information.
|
||||
|
||||
Rust
|
||||
----
|
||||
|
||||
The kernel has experimental support for the Rust programming language
|
||||
[rust-language]_ under ``CONFIG_RUST``. It is compiled with ``rustc`` [rustc]_
|
||||
under ``--edition=2021`` [rust-editions]_. Editions are a way to introduce
|
||||
small changes to the language that are not backwards compatible.
|
||||
|
||||
On top of that, some unstable features [rust-unstable-features]_ are used in
|
||||
the kernel. Unstable features may change in the future, thus it is an important
|
||||
goal to reach a point where only stable features are used.
|
||||
|
||||
Please refer to Documentation/rust/index.rst for more information.
|
||||
|
||||
.. [c-language] http://www.open-std.org/jtc1/sc22/wg14/www/standards
|
||||
.. [gcc] https://gcc.gnu.org
|
||||
.. [clang] https://clang.llvm.org
|
||||
.. [icc] https://software.intel.com/en-us/c-compilers
|
||||
.. [gcc-c-dialect-options] https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html
|
||||
.. [gnu-extensions] https://gcc.gnu.org/onlinedocs/gcc/C-Extensions.html
|
||||
.. [gcc-attribute-syntax] https://gcc.gnu.org/onlinedocs/gcc/Attribute-Syntax.html
|
||||
.. [n2049] http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2049.pdf
|
||||
|
||||
.. [rust-language] https://www.rust-lang.org
|
||||
.. [rustc] https://doc.rust-lang.org/rustc/
|
||||
.. [rust-editions] https://doc.rust-lang.org/edition-guide/editions/
|
||||
.. [rust-unstable-features] https://github.com/Rust-for-Linux/linux/issues/2
|
||||
|
@ -320,7 +320,7 @@ for their time. Code review is a tiring and time-consuming process, and
|
||||
reviewers sometimes get grumpy. Even in that case, though, respond
|
||||
politely and address the problems they have pointed out. When sending a next
|
||||
version, add a ``patch changelog`` to the cover letter or to individual patches
|
||||
explaining difference aganst previous submission (see
|
||||
explaining difference against previous submission (see
|
||||
:ref:`the_canonical_patch_format`).
|
||||
|
||||
See Documentation/process/email-clients.rst for recommendations on email
|
||||
|
@ -258,7 +258,7 @@ Linux cannot currently figure out CPU capacity on its own, this information thus
|
||||
needs to be handed to it. Architectures must define arch_scale_cpu_capacity()
|
||||
for that purpose.
|
||||
|
||||
The arm and arm64 architectures directly map this to the arch_topology driver
|
||||
The arm, arm64, and RISC-V architectures directly map this to the arch_topology driver
|
||||
CPU scaling data, which is derived from the capacity-dmips-mhz CPU binding; see
|
||||
Documentation/devicetree/bindings/cpu/cpu-capacity.txt.
|
||||
|
||||
|
@ -15,7 +15,8 @@ Hugetlbfs 预留
|
||||
概述
|
||||
====
|
||||
|
||||
Documentation/mm/hugetlbpage.rst 中描述的巨页通常是预先分配给应用程序使用的。如果VMA指
|
||||
Documentation/admin-guide/mm/hugetlbpage.rst
|
||||
中描述的巨页通常是预先分配给应用程序使用的 。如果VMA指
|
||||
示要使用巨页,这些巨页会在缺页异常时被实例化到任务的地址空间。如果在缺页异常
|
||||
时没有巨页存在,任务就会被发送一个SIGBUS,并经常不高兴地死去。在加入巨页支
|
||||
持后不久,人们决定,在mmap()时检测巨页的短缺情况会更好。这个想法是,如果
|
||||
|
@ -231,7 +231,7 @@ CFS调度类基于实体负载跟踪机制(Per-Entity Load Tracking, PELT)
|
||||
当前,Linux无法凭自身算出CPU算力,因此必须要有把这个信息传递给Linux的方式。每个架构必须为此
|
||||
定义arch_scale_cpu_capacity()函数。
|
||||
|
||||
arm和arm64架构直接把这个信息映射到arch_topology驱动的CPU scaling数据中(译注:参考
|
||||
arm、arm64和RISC-V架构直接把这个信息映射到arch_topology驱动的CPU scaling数据中(译注:参考
|
||||
arch_topology.h的percpu变量cpu_scale),它是从capacity-dmips-mhz CPU binding中衍生计算
|
||||
出来的。参见Documentation/devicetree/bindings/cpu/cpu-capacity.txt。
|
||||
|
||||
|
@ -24,7 +24,8 @@ YAML specifications can be found under ``Documentation/netlink/specs/``
|
||||
This document describes details of the schema.
|
||||
See :doc:`intro-specs` for a practical starting guide.
|
||||
|
||||
All specs must be licensed under ``GPL-2.0-only OR BSD-3-Clause``
|
||||
All specs must be licensed under
|
||||
``((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)``
|
||||
to allow for easy adoption in user space code.
|
||||
|
||||
Compatibility levels
|
||||
|
28
MAINTAINERS
28
MAINTAINERS
@ -5971,7 +5971,7 @@ F: include/linux/dm-*.h
|
||||
F: include/uapi/linux/dm-*.h
|
||||
|
||||
DEVLINK
|
||||
M: Jiri Pirko <jiri@nvidia.com>
|
||||
M: Jiri Pirko <jiri@resnulli.us>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
F: Documentation/networking/devlink
|
||||
@ -9871,10 +9871,10 @@ M: Christian Brauner <brauner@kernel.org>
|
||||
M: Seth Forshee <sforshee@kernel.org>
|
||||
L: linux-fsdevel@vger.kernel.org
|
||||
S: Maintained
|
||||
T: git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping.git
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping.git
|
||||
F: Documentation/filesystems/idmappings.rst
|
||||
F: tools/testing/selftests/mount_setattr/
|
||||
F: include/linux/mnt_idmapping.*
|
||||
F: tools/testing/selftests/mount_setattr/
|
||||
|
||||
IDT VersaClock 5 CLOCK DRIVER
|
||||
M: Luca Ceresoli <luca@lucaceresoli.net>
|
||||
@ -14872,12 +14872,12 @@ M: Sagi Grimberg <sagi@grimberg.me>
|
||||
L: linux-nvme@lists.infradead.org
|
||||
S: Supported
|
||||
W: http://git.infradead.org/nvme.git
|
||||
T: git://git.infradead.org/nvme.git
|
||||
T: git git://git.infradead.org/nvme.git
|
||||
F: Documentation/nvme/
|
||||
F: drivers/nvme/host/
|
||||
F: drivers/nvme/common/
|
||||
F: include/linux/nvme.h
|
||||
F: drivers/nvme/host/
|
||||
F: include/linux/nvme-*.h
|
||||
F: include/linux/nvme.h
|
||||
F: include/uapi/linux/nvme_ioctl.h
|
||||
|
||||
NVM EXPRESS FABRICS AUTHENTICATION
|
||||
@ -14912,7 +14912,7 @@ M: Chaitanya Kulkarni <kch@nvidia.com>
|
||||
L: linux-nvme@lists.infradead.org
|
||||
S: Supported
|
||||
W: http://git.infradead.org/nvme.git
|
||||
T: git://git.infradead.org/nvme.git
|
||||
T: git git://git.infradead.org/nvme.git
|
||||
F: drivers/nvme/target/
|
||||
|
||||
NVMEM FRAMEWORK
|
||||
@ -15079,7 +15079,7 @@ F: Documentation/hwmon/nzxt-smart2.rst
|
||||
F: drivers/hwmon/nzxt-smart2.c
|
||||
|
||||
OBJAGG
|
||||
M: Jiri Pirko <jiri@nvidia.com>
|
||||
M: Jiri Pirko <jiri@resnulli.us>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
F: include/linux/objagg.h
|
||||
@ -15853,7 +15853,7 @@ F: drivers/video/logo/logo_parisc*
|
||||
F: include/linux/hp_sdc.h
|
||||
|
||||
PARMAN
|
||||
M: Jiri Pirko <jiri@nvidia.com>
|
||||
M: Jiri Pirko <jiri@resnulli.us>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
F: include/linux/parman.h
|
||||
@ -16391,6 +16391,7 @@ R: Alexander Shishkin <alexander.shishkin@linux.intel.com>
|
||||
R: Jiri Olsa <jolsa@kernel.org>
|
||||
R: Namhyung Kim <namhyung@kernel.org>
|
||||
R: Ian Rogers <irogers@google.com>
|
||||
R: Adrian Hunter <adrian.hunter@intel.com>
|
||||
L: linux-perf-users@vger.kernel.org
|
||||
L: linux-kernel@vger.kernel.org
|
||||
S: Supported
|
||||
@ -17989,7 +17990,7 @@ F: Documentation/devicetree/bindings/spi/microchip,mpfs-spi.yaml
|
||||
F: Documentation/devicetree/bindings/usb/microchip,mpfs-musb.yaml
|
||||
F: arch/riscv/boot/dts/microchip/
|
||||
F: drivers/char/hw_random/mpfs-rng.c
|
||||
F: drivers/clk/microchip/clk-mpfs.c
|
||||
F: drivers/clk/microchip/clk-mpfs*.c
|
||||
F: drivers/i2c/busses/i2c-microchip-corei2c.c
|
||||
F: drivers/mailbox/mailbox-mpfs.c
|
||||
F: drivers/pci/controller/pcie-microchip-host.c
|
||||
@ -19863,13 +19864,6 @@ S: Maintained
|
||||
W: http://wiki.laptop.org/go/DCON
|
||||
F: drivers/staging/olpc_dcon/
|
||||
|
||||
STAGING - REALTEK RTL8188EU DRIVERS
|
||||
M: Larry Finger <Larry.Finger@lwfinger.net>
|
||||
M: Phillip Potter <phil@philpotter.co.uk>
|
||||
R: Pavel Skripkin <paskripkin@gmail.com>
|
||||
S: Supported
|
||||
F: drivers/staging/r8188eu/
|
||||
|
||||
STAGING - REALTEK RTL8712U DRIVERS
|
||||
M: Larry Finger <Larry.Finger@lwfinger.net>
|
||||
M: Florian Schilhabel <florian.c.schilhabel@googlemail.com>.
|
||||
|
2
Makefile
2
Makefile
@ -2,7 +2,7 @@
|
||||
VERSION = 6
|
||||
PATCHLEVEL = 3
|
||||
SUBLEVEL = 0
|
||||
EXTRAVERSION = -rc1
|
||||
EXTRAVERSION = -rc2
|
||||
NAME = Hurr durr I'ma ninja sloth
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
@ -23,7 +23,7 @@ alpha_read_fp_reg (unsigned long reg)
|
||||
|
||||
if (unlikely(reg >= 32))
|
||||
return 0;
|
||||
preempt_enable();
|
||||
preempt_disable();
|
||||
if (current_thread_info()->status & TS_SAVED_FP)
|
||||
val = current_thread_info()->fp[reg];
|
||||
else switch (reg) {
|
||||
@ -133,7 +133,7 @@ alpha_read_fp_reg_s (unsigned long reg)
|
||||
if (unlikely(reg >= 32))
|
||||
return 0;
|
||||
|
||||
preempt_enable();
|
||||
preempt_disable();
|
||||
if (current_thread_info()->status & TS_SAVED_FP) {
|
||||
LDT(0, current_thread_info()->fp[reg]);
|
||||
STS(0, val);
|
||||
|
@ -193,6 +193,9 @@ struct kvm_arch {
|
||||
/* Interrupt controller */
|
||||
struct vgic_dist vgic;
|
||||
|
||||
/* Timers */
|
||||
struct arch_timer_vm_data timer_data;
|
||||
|
||||
/* Mandated version of PSCI */
|
||||
u32 psci_version;
|
||||
|
||||
|
@ -84,14 +84,10 @@ u64 timer_get_cval(struct arch_timer_context *ctxt)
|
||||
|
||||
static u64 timer_get_offset(struct arch_timer_context *ctxt)
|
||||
{
|
||||
struct kvm_vcpu *vcpu = ctxt->vcpu;
|
||||
if (ctxt->offset.vm_offset)
|
||||
return *ctxt->offset.vm_offset;
|
||||
|
||||
switch(arch_timer_ctx_index(ctxt)) {
|
||||
case TIMER_VTIMER:
|
||||
return __vcpu_sys_reg(vcpu, CNTVOFF_EL2);
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void timer_set_ctl(struct arch_timer_context *ctxt, u32 ctl)
|
||||
@ -128,15 +124,12 @@ static void timer_set_cval(struct arch_timer_context *ctxt, u64 cval)
|
||||
|
||||
static void timer_set_offset(struct arch_timer_context *ctxt, u64 offset)
|
||||
{
|
||||
struct kvm_vcpu *vcpu = ctxt->vcpu;
|
||||
|
||||
switch(arch_timer_ctx_index(ctxt)) {
|
||||
case TIMER_VTIMER:
|
||||
__vcpu_sys_reg(vcpu, CNTVOFF_EL2) = offset;
|
||||
break;
|
||||
default:
|
||||
if (!ctxt->offset.vm_offset) {
|
||||
WARN(offset, "timer %ld\n", arch_timer_ctx_index(ctxt));
|
||||
return;
|
||||
}
|
||||
|
||||
WRITE_ONCE(*ctxt->offset.vm_offset, offset);
|
||||
}
|
||||
|
||||
u64 kvm_phys_timer_read(void)
|
||||
@ -765,25 +758,6 @@ int kvm_timer_vcpu_reset(struct kvm_vcpu *vcpu)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Make the updates of cntvoff for all vtimer contexts atomic */
|
||||
static void update_vtimer_cntvoff(struct kvm_vcpu *vcpu, u64 cntvoff)
|
||||
{
|
||||
unsigned long i;
|
||||
struct kvm *kvm = vcpu->kvm;
|
||||
struct kvm_vcpu *tmp;
|
||||
|
||||
mutex_lock(&kvm->lock);
|
||||
kvm_for_each_vcpu(i, tmp, kvm)
|
||||
timer_set_offset(vcpu_vtimer(tmp), cntvoff);
|
||||
|
||||
/*
|
||||
* When called from the vcpu create path, the CPU being created is not
|
||||
* included in the loop above, so we just set it here as well.
|
||||
*/
|
||||
timer_set_offset(vcpu_vtimer(vcpu), cntvoff);
|
||||
mutex_unlock(&kvm->lock);
|
||||
}
|
||||
|
||||
void kvm_timer_vcpu_init(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
struct arch_timer_cpu *timer = vcpu_timer(vcpu);
|
||||
@ -791,10 +765,11 @@ void kvm_timer_vcpu_init(struct kvm_vcpu *vcpu)
|
||||
struct arch_timer_context *ptimer = vcpu_ptimer(vcpu);
|
||||
|
||||
vtimer->vcpu = vcpu;
|
||||
vtimer->offset.vm_offset = &vcpu->kvm->arch.timer_data.voffset;
|
||||
ptimer->vcpu = vcpu;
|
||||
|
||||
/* Synchronize cntvoff across all vtimers of a VM. */
|
||||
update_vtimer_cntvoff(vcpu, kvm_phys_timer_read());
|
||||
timer_set_offset(vtimer, kvm_phys_timer_read());
|
||||
timer_set_offset(ptimer, 0);
|
||||
|
||||
hrtimer_init(&timer->bg_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_HARD);
|
||||
@ -840,7 +815,7 @@ int kvm_arm_timer_set_reg(struct kvm_vcpu *vcpu, u64 regid, u64 value)
|
||||
break;
|
||||
case KVM_REG_ARM_TIMER_CNT:
|
||||
timer = vcpu_vtimer(vcpu);
|
||||
update_vtimer_cntvoff(vcpu, kvm_phys_timer_read() - value);
|
||||
timer_set_offset(timer, kvm_phys_timer_read() - value);
|
||||
break;
|
||||
case KVM_REG_ARM_TIMER_CVAL:
|
||||
timer = vcpu_vtimer(vcpu);
|
||||
|
@ -44,7 +44,7 @@ static void kvm_ptp_get_time(struct kvm_vcpu *vcpu, u64 *val)
|
||||
feature = smccc_get_arg1(vcpu);
|
||||
switch (feature) {
|
||||
case KVM_PTP_VIRT_COUNTER:
|
||||
cycles = systime_snapshot.cycles - vcpu_read_sys_reg(vcpu, CNTVOFF_EL2);
|
||||
cycles = systime_snapshot.cycles - vcpu->kvm->arch.timer_data.voffset;
|
||||
break;
|
||||
case KVM_PTP_PHYS_COUNTER:
|
||||
cycles = systime_snapshot.cycles;
|
||||
|
@ -271,11 +271,16 @@ static bool access_error(bool is_write, bool is_exec, struct vm_area_struct *vma
|
||||
}
|
||||
|
||||
/*
|
||||
* Check for a read fault. This could be caused by a read on an
|
||||
* inaccessible page (i.e. PROT_NONE), or a Radix MMU execute-only page.
|
||||
* VM_READ, VM_WRITE and VM_EXEC all imply read permissions, as
|
||||
* defined in protection_map[]. Read faults can only be caused by
|
||||
* a PROT_NONE mapping, or with a PROT_EXEC-only mapping on Radix.
|
||||
*/
|
||||
if (unlikely(!(vma->vm_flags & VM_READ)))
|
||||
if (unlikely(!vma_is_accessible(vma)))
|
||||
return true;
|
||||
|
||||
if (unlikely(radix_enabled() && ((vma->vm_flags & VM_ACCESS_FLAGS) == VM_EXEC)))
|
||||
return true;
|
||||
|
||||
/*
|
||||
* We should ideally do the vma pkey access check here. But in the
|
||||
* fault path, handle_mm_fault() also does the same check. To avoid
|
||||
|
@ -7,6 +7,7 @@ config PPC_PSERIES
|
||||
select OF_DYNAMIC
|
||||
select FORCE_PCI
|
||||
select PCI_MSI
|
||||
select GENERIC_ALLOCATOR
|
||||
select PPC_XICS
|
||||
select PPC_XIVE_SPAPR
|
||||
select PPC_ICP_NATIVE
|
||||
|
@ -84,6 +84,13 @@ endif
|
||||
# Avoid generating .eh_frame sections.
|
||||
KBUILD_CFLAGS += -fno-asynchronous-unwind-tables -fno-unwind-tables
|
||||
|
||||
# The RISC-V attributes frequently cause compatibility issues and provide no
|
||||
# information, so just turn them off.
|
||||
KBUILD_CFLAGS += $(call cc-option,-mno-riscv-attribute)
|
||||
KBUILD_AFLAGS += $(call cc-option,-mno-riscv-attribute)
|
||||
KBUILD_CFLAGS += $(call as-option,-Wa$(comma)-mno-arch-attr)
|
||||
KBUILD_AFLAGS += $(call as-option,-Wa$(comma)-mno-arch-attr)
|
||||
|
||||
KBUILD_CFLAGS_MODULE += $(call cc-option,-mno-relax)
|
||||
KBUILD_AFLAGS_MODULE += $(call as-option,-Wa$(comma)-mno-relax)
|
||||
|
||||
|
@ -111,7 +111,7 @@ void __init_or_module sifive_errata_patch_func(struct alt_entry *begin,
|
||||
mutex_lock(&text_mutex);
|
||||
patch_text_nosync(ALT_OLD_PTR(alt), ALT_ALT_PTR(alt),
|
||||
alt->alt_len);
|
||||
mutex_lock(&text_mutex);
|
||||
mutex_unlock(&text_mutex);
|
||||
cpu_apply_errata |= tmp;
|
||||
}
|
||||
}
|
||||
|
@ -109,6 +109,6 @@ int ftrace_init_nop(struct module *mod, struct dyn_ftrace *rec);
|
||||
#define ftrace_init_nop ftrace_init_nop
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif /* CONFIG_DYNAMIC_FTRACE */
|
||||
|
||||
#endif /* _ASM_RISCV_FTRACE_H */
|
||||
|
@ -19,8 +19,6 @@ typedef struct {
|
||||
#ifdef CONFIG_SMP
|
||||
/* A local icache flush is needed before user execution can resume. */
|
||||
cpumask_t icache_stale_mask;
|
||||
/* A local tlb flush is needed before user execution can resume. */
|
||||
cpumask_t tlb_stale_mask;
|
||||
#endif
|
||||
} mm_context_t;
|
||||
|
||||
|
@ -9,4 +9,6 @@
|
||||
int patch_text_nosync(void *addr, const void *insns, size_t len);
|
||||
int patch_text(void *addr, u32 *insns, int ninsns);
|
||||
|
||||
extern int riscv_patch_in_stop_machine;
|
||||
|
||||
#endif /* _ASM_RISCV_PATCH_H */
|
||||
|
@ -22,24 +22,6 @@ static inline void local_flush_tlb_page(unsigned long addr)
|
||||
{
|
||||
ALT_FLUSH_TLB_PAGE(__asm__ __volatile__ ("sfence.vma %0" : : "r" (addr) : "memory"));
|
||||
}
|
||||
|
||||
static inline void local_flush_tlb_all_asid(unsigned long asid)
|
||||
{
|
||||
__asm__ __volatile__ ("sfence.vma x0, %0"
|
||||
:
|
||||
: "r" (asid)
|
||||
: "memory");
|
||||
}
|
||||
|
||||
static inline void local_flush_tlb_page_asid(unsigned long addr,
|
||||
unsigned long asid)
|
||||
{
|
||||
__asm__ __volatile__ ("sfence.vma %0, %1"
|
||||
:
|
||||
: "r" (addr), "r" (asid)
|
||||
: "memory");
|
||||
}
|
||||
|
||||
#else /* CONFIG_MMU */
|
||||
#define local_flush_tlb_all() do { } while (0)
|
||||
#define local_flush_tlb_page(addr) do { } while (0)
|
||||
|
@ -14,6 +14,10 @@ COMPAT_LD := $(LD)
|
||||
COMPAT_CC_FLAGS := -march=rv32g -mabi=ilp32
|
||||
COMPAT_LD_FLAGS := -melf32lriscv
|
||||
|
||||
# Disable attributes, as they're useless and break the build.
|
||||
COMPAT_CC_FLAGS += $(call cc-option,-mno-riscv-attribute)
|
||||
COMPAT_CC_FLAGS += $(call as-option,-Wa$(comma)-mno-arch-attr)
|
||||
|
||||
# Files to link into the compat_vdso
|
||||
obj-compat_vdso = $(patsubst %, %.o, $(compat_vdso-syms)) note.o
|
||||
|
||||
|
@ -15,10 +15,19 @@
|
||||
void ftrace_arch_code_modify_prepare(void) __acquires(&text_mutex)
|
||||
{
|
||||
mutex_lock(&text_mutex);
|
||||
|
||||
/*
|
||||
* The code sequences we use for ftrace can't be patched while the
|
||||
* kernel is running, so we need to use stop_machine() to modify them
|
||||
* for now. This doesn't play nice with text_mutex, we use this flag
|
||||
* to elide the check.
|
||||
*/
|
||||
riscv_patch_in_stop_machine = true;
|
||||
}
|
||||
|
||||
void ftrace_arch_code_modify_post_process(void) __releases(&text_mutex)
|
||||
{
|
||||
riscv_patch_in_stop_machine = false;
|
||||
mutex_unlock(&text_mutex);
|
||||
}
|
||||
|
||||
@ -107,9 +116,9 @@ int ftrace_init_nop(struct module *mod, struct dyn_ftrace *rec)
|
||||
{
|
||||
int out;
|
||||
|
||||
ftrace_arch_code_modify_prepare();
|
||||
mutex_lock(&text_mutex);
|
||||
out = ftrace_make_nop(mod, rec, MCOUNT_ADDR);
|
||||
ftrace_arch_code_modify_post_process();
|
||||
mutex_unlock(&text_mutex);
|
||||
|
||||
return out;
|
||||
}
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include <asm/kprobes.h>
|
||||
#include <asm/cacheflush.h>
|
||||
#include <asm/fixmap.h>
|
||||
#include <asm/ftrace.h>
|
||||
#include <asm/patch.h>
|
||||
|
||||
struct patch_insn {
|
||||
@ -20,6 +21,8 @@ struct patch_insn {
|
||||
atomic_t cpu_count;
|
||||
};
|
||||
|
||||
int riscv_patch_in_stop_machine = false;
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
/*
|
||||
* The fix_to_virt(, idx) needs a const value (not a dynamic variable of
|
||||
@ -60,8 +63,15 @@ static int patch_insn_write(void *addr, const void *insn, size_t len)
|
||||
* Before reaching here, it was expected to lock the text_mutex
|
||||
* already, so we don't need to give another lock here and could
|
||||
* ensure that it was safe between each cores.
|
||||
*
|
||||
* We're currently using stop_machine() for ftrace & kprobes, and while
|
||||
* that ensures text_mutex is held before installing the mappings it
|
||||
* does not ensure text_mutex is held by the calling thread. That's
|
||||
* safe but triggers a lockdep failure, so just elide it for that
|
||||
* specific case.
|
||||
*/
|
||||
lockdep_assert_held(&text_mutex);
|
||||
if (!riscv_patch_in_stop_machine)
|
||||
lockdep_assert_held(&text_mutex);
|
||||
|
||||
if (across_pages)
|
||||
patch_map(addr + len, FIX_TEXT_POKE1);
|
||||
@ -125,6 +135,7 @@ NOKPROBE_SYMBOL(patch_text_cb);
|
||||
|
||||
int patch_text(void *addr, u32 *insns, int ninsns)
|
||||
{
|
||||
int ret;
|
||||
struct patch_insn patch = {
|
||||
.addr = addr,
|
||||
.insns = insns,
|
||||
@ -132,7 +143,18 @@ int patch_text(void *addr, u32 *insns, int ninsns)
|
||||
.cpu_count = ATOMIC_INIT(0),
|
||||
};
|
||||
|
||||
return stop_machine_cpuslocked(patch_text_cb,
|
||||
&patch, cpu_online_mask);
|
||||
/*
|
||||
* kprobes takes text_mutex, before calling patch_text(), but as we call
|
||||
* calls stop_machine(), the lockdep assertion in patch_insn_write()
|
||||
* gets confused by the context in which the lock is taken.
|
||||
* Instead, ensure the lock is held before calling stop_machine(), and
|
||||
* set riscv_patch_in_stop_machine to skip the check in
|
||||
* patch_insn_write().
|
||||
*/
|
||||
lockdep_assert_held(&text_mutex);
|
||||
riscv_patch_in_stop_machine = true;
|
||||
ret = stop_machine_cpuslocked(patch_text_cb, &patch, cpu_online_mask);
|
||||
riscv_patch_in_stop_machine = false;
|
||||
return ret;
|
||||
}
|
||||
NOKPROBE_SYMBOL(patch_text);
|
||||
|
@ -101,7 +101,7 @@ void notrace walk_stackframe(struct task_struct *task,
|
||||
while (!kstack_end(ksp)) {
|
||||
if (__kernel_text_address(pc) && unlikely(!fn(arg, pc)))
|
||||
break;
|
||||
pc = (*ksp++) - 0x4;
|
||||
pc = READ_ONCE_NOCHECK(*ksp++) - 0x4;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -196,16 +196,6 @@ static void set_mm_asid(struct mm_struct *mm, unsigned int cpu)
|
||||
|
||||
if (need_flush_tlb)
|
||||
local_flush_tlb_all();
|
||||
#ifdef CONFIG_SMP
|
||||
else {
|
||||
cpumask_t *mask = &mm->context.tlb_stale_mask;
|
||||
|
||||
if (cpumask_test_cpu(cpu, mask)) {
|
||||
cpumask_clear_cpu(cpu, mask);
|
||||
local_flush_tlb_all_asid(cntx & asid_mask);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void set_mm_noasid(struct mm_struct *mm)
|
||||
@ -215,12 +205,24 @@ static void set_mm_noasid(struct mm_struct *mm)
|
||||
local_flush_tlb_all();
|
||||
}
|
||||
|
||||
static inline void set_mm(struct mm_struct *mm, unsigned int cpu)
|
||||
static inline void set_mm(struct mm_struct *prev,
|
||||
struct mm_struct *next, unsigned int cpu)
|
||||
{
|
||||
if (static_branch_unlikely(&use_asid_allocator))
|
||||
set_mm_asid(mm, cpu);
|
||||
else
|
||||
set_mm_noasid(mm);
|
||||
/*
|
||||
* The mm_cpumask indicates which harts' TLBs contain the virtual
|
||||
* address mapping of the mm. Compared to noasid, using asid
|
||||
* can't guarantee that stale TLB entries are invalidated because
|
||||
* the asid mechanism wouldn't flush TLB for every switch_mm for
|
||||
* performance. So when using asid, keep all CPUs footmarks in
|
||||
* cpumask() until mm reset.
|
||||
*/
|
||||
cpumask_set_cpu(cpu, mm_cpumask(next));
|
||||
if (static_branch_unlikely(&use_asid_allocator)) {
|
||||
set_mm_asid(next, cpu);
|
||||
} else {
|
||||
cpumask_clear_cpu(cpu, mm_cpumask(prev));
|
||||
set_mm_noasid(next);
|
||||
}
|
||||
}
|
||||
|
||||
static int __init asids_init(void)
|
||||
@ -274,7 +276,8 @@ static int __init asids_init(void)
|
||||
}
|
||||
early_initcall(asids_init);
|
||||
#else
|
||||
static inline void set_mm(struct mm_struct *mm, unsigned int cpu)
|
||||
static inline void set_mm(struct mm_struct *prev,
|
||||
struct mm_struct *next, unsigned int cpu)
|
||||
{
|
||||
/* Nothing to do here when there is no MMU */
|
||||
}
|
||||
@ -327,10 +330,7 @@ void switch_mm(struct mm_struct *prev, struct mm_struct *next,
|
||||
*/
|
||||
cpu = smp_processor_id();
|
||||
|
||||
cpumask_clear_cpu(cpu, mm_cpumask(prev));
|
||||
cpumask_set_cpu(cpu, mm_cpumask(next));
|
||||
|
||||
set_mm(next, cpu);
|
||||
set_mm(prev, next, cpu);
|
||||
|
||||
flush_icache_deferred(next, cpu);
|
||||
}
|
||||
|
@ -143,6 +143,8 @@ static inline void vmalloc_fault(struct pt_regs *regs, int code, unsigned long a
|
||||
no_context(regs, addr);
|
||||
return;
|
||||
}
|
||||
if (pud_leaf(*pud_k))
|
||||
goto flush_tlb;
|
||||
|
||||
/*
|
||||
* Since the vmalloc area is global, it is unnecessary
|
||||
@ -153,6 +155,8 @@ static inline void vmalloc_fault(struct pt_regs *regs, int code, unsigned long a
|
||||
no_context(regs, addr);
|
||||
return;
|
||||
}
|
||||
if (pmd_leaf(*pmd_k))
|
||||
goto flush_tlb;
|
||||
|
||||
/*
|
||||
* Make sure the actual PTE exists as well to
|
||||
@ -172,6 +176,7 @@ static inline void vmalloc_fault(struct pt_regs *regs, int code, unsigned long a
|
||||
* ordering constraint, not a cache flush; it is
|
||||
* necessary even after writing invalid entries.
|
||||
*/
|
||||
flush_tlb:
|
||||
local_flush_tlb_page(addr);
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,23 @@
|
||||
#include <linux/sched.h>
|
||||
#include <asm/sbi.h>
|
||||
#include <asm/mmu_context.h>
|
||||
#include <asm/tlbflush.h>
|
||||
|
||||
static inline void local_flush_tlb_all_asid(unsigned long asid)
|
||||
{
|
||||
__asm__ __volatile__ ("sfence.vma x0, %0"
|
||||
:
|
||||
: "r" (asid)
|
||||
: "memory");
|
||||
}
|
||||
|
||||
static inline void local_flush_tlb_page_asid(unsigned long addr,
|
||||
unsigned long asid)
|
||||
{
|
||||
__asm__ __volatile__ ("sfence.vma %0, %1"
|
||||
:
|
||||
: "r" (addr), "r" (asid)
|
||||
: "memory");
|
||||
}
|
||||
|
||||
void flush_tlb_all(void)
|
||||
{
|
||||
@ -15,7 +31,6 @@ void flush_tlb_all(void)
|
||||
static void __sbi_tlb_flush_range(struct mm_struct *mm, unsigned long start,
|
||||
unsigned long size, unsigned long stride)
|
||||
{
|
||||
struct cpumask *pmask = &mm->context.tlb_stale_mask;
|
||||
struct cpumask *cmask = mm_cpumask(mm);
|
||||
unsigned int cpuid;
|
||||
bool broadcast;
|
||||
@ -29,15 +44,6 @@ static void __sbi_tlb_flush_range(struct mm_struct *mm, unsigned long start,
|
||||
if (static_branch_unlikely(&use_asid_allocator)) {
|
||||
unsigned long asid = atomic_long_read(&mm->context.id);
|
||||
|
||||
/*
|
||||
* TLB will be immediately flushed on harts concurrently
|
||||
* executing this MM context. TLB flush on other harts
|
||||
* is deferred until this MM context migrates there.
|
||||
*/
|
||||
cpumask_setall(pmask);
|
||||
cpumask_clear_cpu(cpuid, pmask);
|
||||
cpumask_andnot(pmask, pmask, cmask);
|
||||
|
||||
if (broadcast) {
|
||||
sbi_remote_sfence_vma_asid(cmask, start, size, asid);
|
||||
} else if (size <= stride) {
|
||||
|
@ -57,11 +57,19 @@ static unsigned long find_bootdata_space(struct ipl_rb_components *comps,
|
||||
if (IS_ENABLED(CONFIG_BLK_DEV_INITRD) && initrd_data.start && initrd_data.size &&
|
||||
intersects(initrd_data.start, initrd_data.size, safe_addr, size))
|
||||
safe_addr = initrd_data.start + initrd_data.size;
|
||||
if (intersects(safe_addr, size, (unsigned long)comps, comps->len)) {
|
||||
safe_addr = (unsigned long)comps + comps->len;
|
||||
goto repeat;
|
||||
}
|
||||
for_each_rb_entry(comp, comps)
|
||||
if (intersects(safe_addr, size, comp->addr, comp->len)) {
|
||||
safe_addr = comp->addr + comp->len;
|
||||
goto repeat;
|
||||
}
|
||||
if (intersects(safe_addr, size, (unsigned long)certs, certs->len)) {
|
||||
safe_addr = (unsigned long)certs + certs->len;
|
||||
goto repeat;
|
||||
}
|
||||
for_each_rb_entry(cert, certs)
|
||||
if (intersects(safe_addr, size, cert->addr, cert->len)) {
|
||||
safe_addr = cert->addr + cert->len;
|
||||
|
@ -23,7 +23,6 @@ CONFIG_NUMA_BALANCING=y
|
||||
CONFIG_MEMCG=y
|
||||
CONFIG_BLK_CGROUP=y
|
||||
CONFIG_CFS_BANDWIDTH=y
|
||||
CONFIG_RT_GROUP_SCHED=y
|
||||
CONFIG_CGROUP_PIDS=y
|
||||
CONFIG_CGROUP_RDMA=y
|
||||
CONFIG_CGROUP_FREEZER=y
|
||||
@ -90,7 +89,6 @@ CONFIG_MINIX_SUBPARTITION=y
|
||||
CONFIG_SOLARIS_X86_PARTITION=y
|
||||
CONFIG_UNIXWARE_DISKLABEL=y
|
||||
CONFIG_IOSCHED_BFQ=y
|
||||
CONFIG_BFQ_GROUP_IOSCHED=y
|
||||
CONFIG_BINFMT_MISC=m
|
||||
CONFIG_ZSWAP=y
|
||||
CONFIG_ZSMALLOC_STAT=y
|
||||
@ -298,7 +296,6 @@ CONFIG_IP_NF_TARGET_REJECT=m
|
||||
CONFIG_IP_NF_NAT=m
|
||||
CONFIG_IP_NF_TARGET_MASQUERADE=m
|
||||
CONFIG_IP_NF_MANGLE=m
|
||||
CONFIG_IP_NF_TARGET_CLUSTERIP=m
|
||||
CONFIG_IP_NF_TARGET_ECN=m
|
||||
CONFIG_IP_NF_TARGET_TTL=m
|
||||
CONFIG_IP_NF_RAW=m
|
||||
@ -340,7 +337,6 @@ CONFIG_BRIDGE_MRP=y
|
||||
CONFIG_VLAN_8021Q=m
|
||||
CONFIG_VLAN_8021Q_GVRP=y
|
||||
CONFIG_NET_SCHED=y
|
||||
CONFIG_NET_SCH_CBQ=m
|
||||
CONFIG_NET_SCH_HTB=m
|
||||
CONFIG_NET_SCH_HFSC=m
|
||||
CONFIG_NET_SCH_PRIO=m
|
||||
@ -351,7 +347,6 @@ CONFIG_NET_SCH_SFQ=m
|
||||
CONFIG_NET_SCH_TEQL=m
|
||||
CONFIG_NET_SCH_TBF=m
|
||||
CONFIG_NET_SCH_GRED=m
|
||||
CONFIG_NET_SCH_DSMARK=m
|
||||
CONFIG_NET_SCH_NETEM=m
|
||||
CONFIG_NET_SCH_DRR=m
|
||||
CONFIG_NET_SCH_MQPRIO=m
|
||||
@ -363,14 +358,11 @@ CONFIG_NET_SCH_INGRESS=m
|
||||
CONFIG_NET_SCH_PLUG=m
|
||||
CONFIG_NET_SCH_ETS=m
|
||||
CONFIG_NET_CLS_BASIC=m
|
||||
CONFIG_NET_CLS_TCINDEX=m
|
||||
CONFIG_NET_CLS_ROUTE4=m
|
||||
CONFIG_NET_CLS_FW=m
|
||||
CONFIG_NET_CLS_U32=m
|
||||
CONFIG_CLS_U32_PERF=y
|
||||
CONFIG_CLS_U32_MARK=y
|
||||
CONFIG_NET_CLS_RSVP=m
|
||||
CONFIG_NET_CLS_RSVP6=m
|
||||
CONFIG_NET_CLS_FLOW=m
|
||||
CONFIG_NET_CLS_CGROUP=y
|
||||
CONFIG_NET_CLS_BPF=m
|
||||
@ -584,7 +576,7 @@ CONFIG_DIAG288_WATCHDOG=m
|
||||
CONFIG_FB=y
|
||||
CONFIG_FRAMEBUFFER_CONSOLE=y
|
||||
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
|
||||
# CONFIG_HID is not set
|
||||
# CONFIG_HID_SUPPORT is not set
|
||||
# CONFIG_USB_SUPPORT is not set
|
||||
CONFIG_INFINIBAND=m
|
||||
CONFIG_INFINIBAND_USER_ACCESS=m
|
||||
@ -828,6 +820,7 @@ CONFIG_PANIC_ON_OOPS=y
|
||||
CONFIG_DETECT_HUNG_TASK=y
|
||||
CONFIG_WQ_WATCHDOG=y
|
||||
CONFIG_TEST_LOCKUP=m
|
||||
CONFIG_DEBUG_PREEMPT=y
|
||||
CONFIG_PROVE_LOCKING=y
|
||||
CONFIG_LOCK_STAT=y
|
||||
CONFIG_DEBUG_ATOMIC_SLEEP=y
|
||||
@ -843,6 +836,7 @@ CONFIG_RCU_CPU_STALL_TIMEOUT=300
|
||||
# CONFIG_RCU_TRACE is not set
|
||||
CONFIG_LATENCYTOP=y
|
||||
CONFIG_BOOTTIME_TRACING=y
|
||||
CONFIG_FPROBE=y
|
||||
CONFIG_FUNCTION_PROFILER=y
|
||||
CONFIG_STACK_TRACER=y
|
||||
CONFIG_IRQSOFF_TRACER=y
|
||||
@ -857,6 +851,7 @@ CONFIG_SAMPLES=y
|
||||
CONFIG_SAMPLE_TRACE_PRINTK=m
|
||||
CONFIG_SAMPLE_FTRACE_DIRECT=m
|
||||
CONFIG_SAMPLE_FTRACE_DIRECT_MULTI=m
|
||||
CONFIG_SAMPLE_FTRACE_OPS=m
|
||||
CONFIG_DEBUG_ENTRY=y
|
||||
CONFIG_CIO_INJECT=y
|
||||
CONFIG_KUNIT=m
|
||||
|
@ -21,7 +21,6 @@ CONFIG_NUMA_BALANCING=y
|
||||
CONFIG_MEMCG=y
|
||||
CONFIG_BLK_CGROUP=y
|
||||
CONFIG_CFS_BANDWIDTH=y
|
||||
CONFIG_RT_GROUP_SCHED=y
|
||||
CONFIG_CGROUP_PIDS=y
|
||||
CONFIG_CGROUP_RDMA=y
|
||||
CONFIG_CGROUP_FREEZER=y
|
||||
@ -85,7 +84,6 @@ CONFIG_MINIX_SUBPARTITION=y
|
||||
CONFIG_SOLARIS_X86_PARTITION=y
|
||||
CONFIG_UNIXWARE_DISKLABEL=y
|
||||
CONFIG_IOSCHED_BFQ=y
|
||||
CONFIG_BFQ_GROUP_IOSCHED=y
|
||||
CONFIG_BINFMT_MISC=m
|
||||
CONFIG_ZSWAP=y
|
||||
CONFIG_ZSMALLOC_STAT=y
|
||||
@ -289,7 +287,6 @@ CONFIG_IP_NF_TARGET_REJECT=m
|
||||
CONFIG_IP_NF_NAT=m
|
||||
CONFIG_IP_NF_TARGET_MASQUERADE=m
|
||||
CONFIG_IP_NF_MANGLE=m
|
||||
CONFIG_IP_NF_TARGET_CLUSTERIP=m
|
||||
CONFIG_IP_NF_TARGET_ECN=m
|
||||
CONFIG_IP_NF_TARGET_TTL=m
|
||||
CONFIG_IP_NF_RAW=m
|
||||
@ -330,7 +327,6 @@ CONFIG_BRIDGE_MRP=y
|
||||
CONFIG_VLAN_8021Q=m
|
||||
CONFIG_VLAN_8021Q_GVRP=y
|
||||
CONFIG_NET_SCHED=y
|
||||
CONFIG_NET_SCH_CBQ=m
|
||||
CONFIG_NET_SCH_HTB=m
|
||||
CONFIG_NET_SCH_HFSC=m
|
||||
CONFIG_NET_SCH_PRIO=m
|
||||
@ -341,7 +337,6 @@ CONFIG_NET_SCH_SFQ=m
|
||||
CONFIG_NET_SCH_TEQL=m
|
||||
CONFIG_NET_SCH_TBF=m
|
||||
CONFIG_NET_SCH_GRED=m
|
||||
CONFIG_NET_SCH_DSMARK=m
|
||||
CONFIG_NET_SCH_NETEM=m
|
||||
CONFIG_NET_SCH_DRR=m
|
||||
CONFIG_NET_SCH_MQPRIO=m
|
||||
@ -353,14 +348,11 @@ CONFIG_NET_SCH_INGRESS=m
|
||||
CONFIG_NET_SCH_PLUG=m
|
||||
CONFIG_NET_SCH_ETS=m
|
||||
CONFIG_NET_CLS_BASIC=m
|
||||
CONFIG_NET_CLS_TCINDEX=m
|
||||
CONFIG_NET_CLS_ROUTE4=m
|
||||
CONFIG_NET_CLS_FW=m
|
||||
CONFIG_NET_CLS_U32=m
|
||||
CONFIG_CLS_U32_PERF=y
|
||||
CONFIG_CLS_U32_MARK=y
|
||||
CONFIG_NET_CLS_RSVP=m
|
||||
CONFIG_NET_CLS_RSVP6=m
|
||||
CONFIG_NET_CLS_FLOW=m
|
||||
CONFIG_NET_CLS_CGROUP=y
|
||||
CONFIG_NET_CLS_BPF=m
|
||||
@ -573,7 +565,7 @@ CONFIG_DIAG288_WATCHDOG=m
|
||||
CONFIG_FB=y
|
||||
CONFIG_FRAMEBUFFER_CONSOLE=y
|
||||
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
|
||||
# CONFIG_HID is not set
|
||||
# CONFIG_HID_SUPPORT is not set
|
||||
# CONFIG_USB_SUPPORT is not set
|
||||
CONFIG_INFINIBAND=m
|
||||
CONFIG_INFINIBAND_USER_ACCESS=m
|
||||
@ -795,6 +787,7 @@ CONFIG_RCU_REF_SCALE_TEST=m
|
||||
CONFIG_RCU_CPU_STALL_TIMEOUT=60
|
||||
CONFIG_LATENCYTOP=y
|
||||
CONFIG_BOOTTIME_TRACING=y
|
||||
CONFIG_FPROBE=y
|
||||
CONFIG_FUNCTION_PROFILER=y
|
||||
CONFIG_STACK_TRACER=y
|
||||
CONFIG_SCHED_TRACER=y
|
||||
@ -805,6 +798,7 @@ CONFIG_SAMPLES=y
|
||||
CONFIG_SAMPLE_TRACE_PRINTK=m
|
||||
CONFIG_SAMPLE_FTRACE_DIRECT=m
|
||||
CONFIG_SAMPLE_FTRACE_DIRECT_MULTI=m
|
||||
CONFIG_SAMPLE_FTRACE_OPS=m
|
||||
CONFIG_KUNIT=m
|
||||
CONFIG_KUNIT_DEBUGFS=y
|
||||
CONFIG_LKDTM=m
|
||||
|
@ -58,7 +58,7 @@ CONFIG_ZFCP=y
|
||||
# CONFIG_VMCP is not set
|
||||
# CONFIG_MONWRITER is not set
|
||||
# CONFIG_S390_VMUR is not set
|
||||
# CONFIG_HID is not set
|
||||
# CONFIG_HID_SUPPORT is not set
|
||||
# CONFIG_VIRTIO_MENU is not set
|
||||
# CONFIG_VHOST_MENU is not set
|
||||
# CONFIG_IOMMU_SUPPORT is not set
|
||||
|
@ -544,8 +544,7 @@ static struct resource *__alloc_res(struct zpci_dev *zdev, unsigned long start,
|
||||
return r;
|
||||
}
|
||||
|
||||
int zpci_setup_bus_resources(struct zpci_dev *zdev,
|
||||
struct list_head *resources)
|
||||
int zpci_setup_bus_resources(struct zpci_dev *zdev)
|
||||
{
|
||||
unsigned long addr, size, flags;
|
||||
struct resource *res;
|
||||
@ -581,7 +580,6 @@ int zpci_setup_bus_resources(struct zpci_dev *zdev,
|
||||
return -ENOMEM;
|
||||
}
|
||||
zdev->bars[i].res = res;
|
||||
pci_add_resource(resources, res);
|
||||
}
|
||||
zdev->has_resources = 1;
|
||||
|
||||
@ -590,17 +588,23 @@ int zpci_setup_bus_resources(struct zpci_dev *zdev,
|
||||
|
||||
static void zpci_cleanup_bus_resources(struct zpci_dev *zdev)
|
||||
{
|
||||
struct resource *res;
|
||||
int i;
|
||||
|
||||
pci_lock_rescan_remove();
|
||||
for (i = 0; i < PCI_STD_NUM_BARS; i++) {
|
||||
if (!zdev->bars[i].size || !zdev->bars[i].res)
|
||||
res = zdev->bars[i].res;
|
||||
if (!res)
|
||||
continue;
|
||||
|
||||
release_resource(res);
|
||||
pci_bus_remove_resource(zdev->zbus->bus, res);
|
||||
zpci_free_iomap(zdev, zdev->bars[i].map_idx);
|
||||
release_resource(zdev->bars[i].res);
|
||||
kfree(zdev->bars[i].res);
|
||||
zdev->bars[i].res = NULL;
|
||||
kfree(res);
|
||||
}
|
||||
zdev->has_resources = 0;
|
||||
pci_unlock_rescan_remove();
|
||||
}
|
||||
|
||||
int pcibios_device_add(struct pci_dev *pdev)
|
||||
|
@ -41,9 +41,7 @@ static int zpci_nb_devices;
|
||||
*/
|
||||
static int zpci_bus_prepare_device(struct zpci_dev *zdev)
|
||||
{
|
||||
struct resource_entry *window, *n;
|
||||
struct resource *res;
|
||||
int rc;
|
||||
int rc, i;
|
||||
|
||||
if (!zdev_enabled(zdev)) {
|
||||
rc = zpci_enable_device(zdev);
|
||||
@ -57,10 +55,10 @@ static int zpci_bus_prepare_device(struct zpci_dev *zdev)
|
||||
}
|
||||
|
||||
if (!zdev->has_resources) {
|
||||
zpci_setup_bus_resources(zdev, &zdev->zbus->resources);
|
||||
resource_list_for_each_entry_safe(window, n, &zdev->zbus->resources) {
|
||||
res = window->res;
|
||||
pci_bus_add_resource(zdev->zbus->bus, res, 0);
|
||||
zpci_setup_bus_resources(zdev);
|
||||
for (i = 0; i < PCI_STD_NUM_BARS; i++) {
|
||||
if (zdev->bars[i].res)
|
||||
pci_bus_add_resource(zdev->zbus->bus, zdev->bars[i].res, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -30,8 +30,7 @@ static inline void zpci_zdev_get(struct zpci_dev *zdev)
|
||||
|
||||
int zpci_alloc_domain(int domain);
|
||||
void zpci_free_domain(int domain);
|
||||
int zpci_setup_bus_resources(struct zpci_dev *zdev,
|
||||
struct list_head *resources);
|
||||
int zpci_setup_bus_resources(struct zpci_dev *zdev);
|
||||
|
||||
static inline struct zpci_dev *zdev_from_bus(struct pci_bus *bus,
|
||||
unsigned int devfn)
|
||||
|
@ -261,20 +261,22 @@ enum avic_ipi_failure_cause {
|
||||
AVIC_IPI_FAILURE_INVALID_BACKING_PAGE,
|
||||
};
|
||||
|
||||
#define AVIC_PHYSICAL_MAX_INDEX_MASK GENMASK_ULL(9, 0)
|
||||
#define AVIC_PHYSICAL_MAX_INDEX_MASK GENMASK_ULL(8, 0)
|
||||
|
||||
/*
|
||||
* For AVIC, the max index allowed for physical APIC ID
|
||||
* table is 0xff (255).
|
||||
* For AVIC, the max index allowed for physical APIC ID table is 0xfe (254), as
|
||||
* 0xff is a broadcast to all CPUs, i.e. can't be targeted individually.
|
||||
*/
|
||||
#define AVIC_MAX_PHYSICAL_ID 0XFEULL
|
||||
|
||||
/*
|
||||
* For x2AVIC, the max index allowed for physical APIC ID
|
||||
* table is 0x1ff (511).
|
||||
* For x2AVIC, the max index allowed for physical APIC ID table is 0x1ff (511).
|
||||
*/
|
||||
#define X2AVIC_MAX_PHYSICAL_ID 0x1FFUL
|
||||
|
||||
static_assert((AVIC_MAX_PHYSICAL_ID & AVIC_PHYSICAL_MAX_INDEX_MASK) == AVIC_MAX_PHYSICAL_ID);
|
||||
static_assert((X2AVIC_MAX_PHYSICAL_ID & AVIC_PHYSICAL_MAX_INDEX_MASK) == X2AVIC_MAX_PHYSICAL_ID);
|
||||
|
||||
#define AVIC_HPA_MASK ~((0xFFFULL << 52) | 0xFFF)
|
||||
#define VMCB_AVIC_APIC_BAR_MASK 0xFFFFFFFFFF000ULL
|
||||
|
||||
|
@ -89,11 +89,21 @@
|
||||
* Sub-leaf 2: EAX: host tsc frequency in kHz
|
||||
*/
|
||||
|
||||
#define XEN_CPUID_TSC_EMULATED (1u << 0)
|
||||
#define XEN_CPUID_HOST_TSC_RELIABLE (1u << 1)
|
||||
#define XEN_CPUID_RDTSCP_INSTR_AVAIL (1u << 2)
|
||||
|
||||
#define XEN_CPUID_TSC_MODE_DEFAULT (0)
|
||||
#define XEN_CPUID_TSC_MODE_ALWAYS_EMULATE (1u)
|
||||
#define XEN_CPUID_TSC_MODE_NEVER_EMULATE (2u)
|
||||
#define XEN_CPUID_TSC_MODE_PVRDTSCP (3u)
|
||||
|
||||
/*
|
||||
* Leaf 5 (0x40000x04)
|
||||
* HVM-specific features
|
||||
* Sub-leaf 0: EAX: Features
|
||||
* Sub-leaf 0: EBX: vcpu id (iff EAX has XEN_HVM_CPUID_VCPU_ID_PRESENT flag)
|
||||
* Sub-leaf 0: ECX: domain id (iff EAX has XEN_HVM_CPUID_DOMID_PRESENT flag)
|
||||
*/
|
||||
#define XEN_HVM_CPUID_APIC_ACCESS_VIRT (1u << 0) /* Virtualized APIC registers */
|
||||
#define XEN_HVM_CPUID_X2APIC_VIRT (1u << 1) /* Virtualized x2APIC accesses */
|
||||
@ -102,12 +112,16 @@
|
||||
#define XEN_HVM_CPUID_VCPU_ID_PRESENT (1u << 3) /* vcpu id is present in EBX */
|
||||
#define XEN_HVM_CPUID_DOMID_PRESENT (1u << 4) /* domid is present in ECX */
|
||||
/*
|
||||
* Bits 55:49 from the IO-APIC RTE and bits 11:5 from the MSI address can be
|
||||
* used to store high bits for the Destination ID. This expands the Destination
|
||||
* ID field from 8 to 15 bits, allowing to target APIC IDs up 32768.
|
||||
* With interrupt format set to 0 (non-remappable) bits 55:49 from the
|
||||
* IO-APIC RTE and bits 11:5 from the MSI address can be used to store
|
||||
* high bits for the Destination ID. This expands the Destination ID
|
||||
* field from 8 to 15 bits, allowing to target APIC IDs up 32768.
|
||||
*/
|
||||
#define XEN_HVM_CPUID_EXT_DEST_ID (1u << 5)
|
||||
/* Per-vCPU event channel upcalls */
|
||||
/*
|
||||
* Per-vCPU event channel upcalls work correctly with physical IRQs
|
||||
* bound to event channels.
|
||||
*/
|
||||
#define XEN_HVM_CPUID_UPCALL_VECTOR (1u << 6)
|
||||
|
||||
/*
|
||||
|
@ -880,6 +880,15 @@ void init_spectral_chicken(struct cpuinfo_x86 *c)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
/*
|
||||
* Work around Erratum 1386. The XSAVES instruction malfunctions in
|
||||
* certain circumstances on Zen1/2 uarch, and not all parts have had
|
||||
* updated microcode at the time of writing (March 2023).
|
||||
*
|
||||
* Affected parts all have no supervisor XSAVE states, meaning that
|
||||
* the XSAVEC instruction (which works fine) is equivalent.
|
||||
*/
|
||||
clear_cpu_cap(c, X86_FEATURE_XSAVES);
|
||||
}
|
||||
|
||||
static void init_amd_zn(struct cpuinfo_x86 *c)
|
||||
|
@ -136,10 +136,12 @@ SYM_TYPED_FUNC_START(ftrace_stub)
|
||||
RET
|
||||
SYM_FUNC_END(ftrace_stub)
|
||||
|
||||
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
|
||||
SYM_TYPED_FUNC_START(ftrace_stub_graph)
|
||||
CALL_DEPTH_ACCOUNT
|
||||
RET
|
||||
SYM_FUNC_END(ftrace_stub_graph)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DYNAMIC_FTRACE
|
||||
|
||||
|
@ -27,19 +27,38 @@
|
||||
#include "irq.h"
|
||||
#include "svm.h"
|
||||
|
||||
/* AVIC GATAG is encoded using VM and VCPU IDs */
|
||||
#define AVIC_VCPU_ID_BITS 8
|
||||
#define AVIC_VCPU_ID_MASK ((1 << AVIC_VCPU_ID_BITS) - 1)
|
||||
/*
|
||||
* Encode the arbitrary VM ID and the vCPU's default APIC ID, i.e the vCPU ID,
|
||||
* into the GATag so that KVM can retrieve the correct vCPU from a GALog entry
|
||||
* if an interrupt can't be delivered, e.g. because the vCPU isn't running.
|
||||
*
|
||||
* For the vCPU ID, use however many bits are currently allowed for the max
|
||||
* guest physical APIC ID (limited by the size of the physical ID table), and
|
||||
* use whatever bits remain to assign arbitrary AVIC IDs to VMs. Note, the
|
||||
* size of the GATag is defined by hardware (32 bits), but is an opaque value
|
||||
* as far as hardware is concerned.
|
||||
*/
|
||||
#define AVIC_VCPU_ID_MASK AVIC_PHYSICAL_MAX_INDEX_MASK
|
||||
|
||||
#define AVIC_VM_ID_BITS 24
|
||||
#define AVIC_VM_ID_NR (1 << AVIC_VM_ID_BITS)
|
||||
#define AVIC_VM_ID_MASK ((1 << AVIC_VM_ID_BITS) - 1)
|
||||
#define AVIC_VM_ID_SHIFT HWEIGHT32(AVIC_PHYSICAL_MAX_INDEX_MASK)
|
||||
#define AVIC_VM_ID_MASK (GENMASK(31, AVIC_VM_ID_SHIFT) >> AVIC_VM_ID_SHIFT)
|
||||
|
||||
#define AVIC_GATAG(x, y) (((x & AVIC_VM_ID_MASK) << AVIC_VCPU_ID_BITS) | \
|
||||
(y & AVIC_VCPU_ID_MASK))
|
||||
#define AVIC_GATAG_TO_VMID(x) ((x >> AVIC_VCPU_ID_BITS) & AVIC_VM_ID_MASK)
|
||||
#define AVIC_GATAG_TO_VMID(x) ((x >> AVIC_VM_ID_SHIFT) & AVIC_VM_ID_MASK)
|
||||
#define AVIC_GATAG_TO_VCPUID(x) (x & AVIC_VCPU_ID_MASK)
|
||||
|
||||
#define __AVIC_GATAG(vm_id, vcpu_id) ((((vm_id) & AVIC_VM_ID_MASK) << AVIC_VM_ID_SHIFT) | \
|
||||
((vcpu_id) & AVIC_VCPU_ID_MASK))
|
||||
#define AVIC_GATAG(vm_id, vcpu_id) \
|
||||
({ \
|
||||
u32 ga_tag = __AVIC_GATAG(vm_id, vcpu_id); \
|
||||
\
|
||||
WARN_ON_ONCE(AVIC_GATAG_TO_VCPUID(ga_tag) != (vcpu_id)); \
|
||||
WARN_ON_ONCE(AVIC_GATAG_TO_VMID(ga_tag) != (vm_id)); \
|
||||
ga_tag; \
|
||||
})
|
||||
|
||||
static_assert(__AVIC_GATAG(AVIC_VM_ID_MASK, AVIC_VCPU_ID_MASK) == -1u);
|
||||
|
||||
static bool force_avic;
|
||||
module_param_unsafe(force_avic, bool, 0444);
|
||||
|
||||
|
@ -2903,7 +2903,7 @@ static int nested_vmx_check_address_space_size(struct kvm_vcpu *vcpu,
|
||||
static int nested_vmx_check_host_state(struct kvm_vcpu *vcpu,
|
||||
struct vmcs12 *vmcs12)
|
||||
{
|
||||
bool ia32e;
|
||||
bool ia32e = !!(vmcs12->vm_exit_controls & VM_EXIT_HOST_ADDR_SPACE_SIZE);
|
||||
|
||||
if (CC(!nested_host_cr0_valid(vcpu, vmcs12->host_cr0)) ||
|
||||
CC(!nested_host_cr4_valid(vcpu, vmcs12->host_cr4)) ||
|
||||
@ -2923,12 +2923,6 @@ static int nested_vmx_check_host_state(struct kvm_vcpu *vcpu,
|
||||
vmcs12->host_ia32_perf_global_ctrl)))
|
||||
return -EINVAL;
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
ia32e = !!(vmcs12->vm_exit_controls & VM_EXIT_HOST_ADDR_SPACE_SIZE);
|
||||
#else
|
||||
ia32e = false;
|
||||
#endif
|
||||
|
||||
if (ia32e) {
|
||||
if (CC(!(vmcs12->host_cr4 & X86_CR4_PAE)))
|
||||
return -EINVAL;
|
||||
@ -3022,7 +3016,7 @@ static int nested_vmx_check_guest_state(struct kvm_vcpu *vcpu,
|
||||
struct vmcs12 *vmcs12,
|
||||
enum vm_entry_failure_code *entry_failure_code)
|
||||
{
|
||||
bool ia32e;
|
||||
bool ia32e = !!(vmcs12->vm_entry_controls & VM_ENTRY_IA32E_MODE);
|
||||
|
||||
*entry_failure_code = ENTRY_FAIL_DEFAULT;
|
||||
|
||||
@ -3048,6 +3042,13 @@ static int nested_vmx_check_guest_state(struct kvm_vcpu *vcpu,
|
||||
vmcs12->guest_ia32_perf_global_ctrl)))
|
||||
return -EINVAL;
|
||||
|
||||
if (CC((vmcs12->guest_cr0 & (X86_CR0_PG | X86_CR0_PE)) == X86_CR0_PG))
|
||||
return -EINVAL;
|
||||
|
||||
if (CC(ia32e && !(vmcs12->guest_cr4 & X86_CR4_PAE)) ||
|
||||
CC(ia32e && !(vmcs12->guest_cr0 & X86_CR0_PG)))
|
||||
return -EINVAL;
|
||||
|
||||
/*
|
||||
* If the load IA32_EFER VM-entry control is 1, the following checks
|
||||
* are performed on the field for the IA32_EFER MSR:
|
||||
@ -3059,7 +3060,6 @@ static int nested_vmx_check_guest_state(struct kvm_vcpu *vcpu,
|
||||
*/
|
||||
if (to_vmx(vcpu)->nested.nested_run_pending &&
|
||||
(vmcs12->vm_entry_controls & VM_ENTRY_LOAD_IA32_EFER)) {
|
||||
ia32e = (vmcs12->vm_entry_controls & VM_ENTRY_IA32E_MODE) != 0;
|
||||
if (CC(!kvm_valid_efer(vcpu, vmcs12->guest_ia32_efer)) ||
|
||||
CC(ia32e != !!(vmcs12->guest_ia32_efer & EFER_LMA)) ||
|
||||
CC(((vmcs12->guest_cr0 & X86_CR0_PG) &&
|
||||
|
@ -262,7 +262,7 @@ SYM_INNER_LABEL(vmx_vmexit, SYM_L_GLOBAL)
|
||||
* eIBRS has its own protection against poisoned RSB, so it doesn't
|
||||
* need the RSB filling sequence. But it does need to be enabled, and a
|
||||
* single call to retire, before the first unbalanced RET.
|
||||
*/
|
||||
*/
|
||||
|
||||
FILL_RETURN_BUFFER %_ASM_CX, RSB_CLEAR_LOOPS, X86_FEATURE_RSB_VMEXIT,\
|
||||
X86_FEATURE_RSB_VMEXIT_LITE
|
||||
@ -311,7 +311,7 @@ SYM_FUNC_END(vmx_do_nmi_irqoff)
|
||||
* vmread_error_trampoline - Trampoline from inline asm to vmread_error()
|
||||
* @field: VMCS field encoding that failed
|
||||
* @fault: %true if the VMREAD faulted, %false if it failed
|
||||
|
||||
*
|
||||
* Save and restore volatile registers across a call to vmread_error(). Note,
|
||||
* all parameters are passed on the stack.
|
||||
*/
|
||||
|
@ -874,7 +874,7 @@ void vmx_update_exception_bitmap(struct kvm_vcpu *vcpu)
|
||||
*/
|
||||
if (is_guest_mode(vcpu))
|
||||
eb |= get_vmcs12(vcpu)->exception_bitmap;
|
||||
else {
|
||||
else {
|
||||
int mask = 0, match = 0;
|
||||
|
||||
if (enable_ept && (eb & (1u << PF_VECTOR))) {
|
||||
@ -1282,7 +1282,7 @@ void vmx_prepare_switch_to_guest(struct kvm_vcpu *vcpu)
|
||||
}
|
||||
}
|
||||
|
||||
if (vmx->nested.need_vmcs12_to_shadow_sync)
|
||||
if (vmx->nested.need_vmcs12_to_shadow_sync)
|
||||
nested_sync_vmcs12_to_shadow(vcpu);
|
||||
|
||||
if (vmx->guest_state_loaded)
|
||||
@ -5049,10 +5049,10 @@ static int vmx_interrupt_allowed(struct kvm_vcpu *vcpu, bool for_injection)
|
||||
if (to_vmx(vcpu)->nested.nested_run_pending)
|
||||
return -EBUSY;
|
||||
|
||||
/*
|
||||
* An IRQ must not be injected into L2 if it's supposed to VM-Exit,
|
||||
* e.g. if the IRQ arrived asynchronously after checking nested events.
|
||||
*/
|
||||
/*
|
||||
* An IRQ must not be injected into L2 if it's supposed to VM-Exit,
|
||||
* e.g. if the IRQ arrived asynchronously after checking nested events.
|
||||
*/
|
||||
if (for_injection && is_guest_mode(vcpu) && nested_exit_on_intr(vcpu))
|
||||
return -EBUSY;
|
||||
|
||||
|
@ -45,6 +45,6 @@ obj-$(CONFIG_PARAVIRT_SPINLOCKS)+= spinlock.o
|
||||
|
||||
obj-$(CONFIG_XEN_DEBUG_FS) += debugfs.o
|
||||
|
||||
obj-$(CONFIG_XEN_PV_DOM0) += vga.o
|
||||
obj-$(CONFIG_XEN_DOM0) += vga.o
|
||||
|
||||
obj-$(CONFIG_XEN_EFI) += efi.o
|
||||
|
@ -1390,7 +1390,8 @@ asmlinkage __visible void __init xen_start_kernel(struct start_info *si)
|
||||
|
||||
x86_platform.set_legacy_features =
|
||||
xen_dom0_set_legacy_features;
|
||||
xen_init_vga(info, xen_start_info->console.dom0.info_size);
|
||||
xen_init_vga(info, xen_start_info->console.dom0.info_size,
|
||||
&boot_params.screen_info);
|
||||
xen_start_info->console.domU.mfn = 0;
|
||||
xen_start_info->console.domU.evtchn = 0;
|
||||
|
||||
|
@ -43,6 +43,19 @@ void __init xen_pvh_init(struct boot_params *boot_params)
|
||||
x86_init.oem.banner = xen_banner;
|
||||
|
||||
xen_efi_init(boot_params);
|
||||
|
||||
if (xen_initial_domain()) {
|
||||
struct xen_platform_op op = {
|
||||
.cmd = XENPF_get_dom0_console,
|
||||
};
|
||||
long ret = HYPERVISOR_platform_op(&op);
|
||||
|
||||
if (ret > 0)
|
||||
xen_init_vga(&op.u.dom0_console,
|
||||
min(ret * sizeof(char),
|
||||
sizeof(op.u.dom0_console)),
|
||||
&boot_params->screen_info);
|
||||
}
|
||||
}
|
||||
|
||||
void __init mem_map_via_hcall(struct boot_params *boot_params_p)
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include <asm/pvclock.h>
|
||||
#include <asm/xen/hypervisor.h>
|
||||
#include <asm/xen/hypercall.h>
|
||||
#include <asm/xen/cpuid.h>
|
||||
|
||||
#include <xen/events.h>
|
||||
#include <xen/features.h>
|
||||
@ -503,11 +504,7 @@ static int __init xen_tsc_safe_clocksource(void)
|
||||
/* Leaf 4, sub-leaf 0 (0x40000x03) */
|
||||
cpuid_count(xen_cpuid_base() + 3, 0, &eax, &ebx, &ecx, &edx);
|
||||
|
||||
/* tsc_mode = no_emulate (2) */
|
||||
if (ebx != 2)
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
return ebx == XEN_CPUID_TSC_MODE_NEVER_EMULATE;
|
||||
}
|
||||
|
||||
static void __init xen_time_init(void)
|
||||
|
@ -9,10 +9,9 @@
|
||||
|
||||
#include "xen-ops.h"
|
||||
|
||||
void __init xen_init_vga(const struct dom0_vga_console_info *info, size_t size)
|
||||
void __init xen_init_vga(const struct dom0_vga_console_info *info, size_t size,
|
||||
struct screen_info *screen_info)
|
||||
{
|
||||
struct screen_info *screen_info = &boot_params.screen_info;
|
||||
|
||||
/* This is drawn from a dump from vgacon:startup in
|
||||
* standard Linux. */
|
||||
screen_info->orig_video_mode = 3;
|
||||
|
@ -108,11 +108,12 @@ static inline void xen_uninit_lock_cpu(int cpu)
|
||||
|
||||
struct dom0_vga_console_info;
|
||||
|
||||
#ifdef CONFIG_XEN_PV_DOM0
|
||||
void __init xen_init_vga(const struct dom0_vga_console_info *, size_t size);
|
||||
#ifdef CONFIG_XEN_DOM0
|
||||
void __init xen_init_vga(const struct dom0_vga_console_info *, size_t size,
|
||||
struct screen_info *);
|
||||
#else
|
||||
static inline void __init xen_init_vga(const struct dom0_vga_console_info *info,
|
||||
size_t size)
|
||||
size_t size, struct screen_info *si)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
@ -204,9 +204,6 @@ config BLK_INLINE_ENCRYPTION_FALLBACK
|
||||
|
||||
source "block/partitions/Kconfig"
|
||||
|
||||
config BLOCK_COMPAT
|
||||
def_bool COMPAT
|
||||
|
||||
config BLK_MQ_PCI
|
||||
def_bool PCI
|
||||
|
||||
|
@ -2854,11 +2854,11 @@ bfq_setup_stable_merge(struct bfq_data *bfqd, struct bfq_queue *bfqq,
|
||||
{
|
||||
int proc_ref = min(bfqq_process_refs(bfqq),
|
||||
bfqq_process_refs(stable_merge_bfqq));
|
||||
struct bfq_queue *new_bfqq;
|
||||
struct bfq_queue *new_bfqq = NULL;
|
||||
|
||||
if (idling_boosts_thr_without_issues(bfqd, bfqq) ||
|
||||
proc_ref == 0)
|
||||
return NULL;
|
||||
bfqq_data->stable_merge_bfqq = NULL;
|
||||
if (idling_boosts_thr_without_issues(bfqd, bfqq) || proc_ref == 0)
|
||||
goto out;
|
||||
|
||||
/* next function will take at least one ref */
|
||||
new_bfqq = bfq_setup_merge(bfqq, stable_merge_bfqq);
|
||||
@ -2873,6 +2873,11 @@ bfq_setup_stable_merge(struct bfq_data *bfqd, struct bfq_queue *bfqq,
|
||||
new_bfqq_data->stably_merged = true;
|
||||
}
|
||||
}
|
||||
|
||||
out:
|
||||
/* deschedule stable merge, because done or aborted here */
|
||||
bfq_put_stable_ref(stable_merge_bfqq);
|
||||
|
||||
return new_bfqq;
|
||||
}
|
||||
|
||||
@ -2933,11 +2938,6 @@ bfq_setup_cooperator(struct bfq_data *bfqd, struct bfq_queue *bfqq,
|
||||
struct bfq_queue *stable_merge_bfqq =
|
||||
bfqq_data->stable_merge_bfqq;
|
||||
|
||||
/* deschedule stable merge, because done or aborted here */
|
||||
bfq_put_stable_ref(stable_merge_bfqq);
|
||||
|
||||
bfqq_data->stable_merge_bfqq = NULL;
|
||||
|
||||
return bfq_setup_stable_merge(bfqd, bfqq,
|
||||
stable_merge_bfqq,
|
||||
bfqq_data);
|
||||
|
@ -959,16 +959,11 @@ void update_io_ticks(struct block_device *part, unsigned long now, bool end)
|
||||
}
|
||||
}
|
||||
|
||||
unsigned long bdev_start_io_acct(struct block_device *bdev,
|
||||
unsigned int sectors, enum req_op op,
|
||||
unsigned long bdev_start_io_acct(struct block_device *bdev, enum req_op op,
|
||||
unsigned long start_time)
|
||||
{
|
||||
const int sgrp = op_stat_group(op);
|
||||
|
||||
part_stat_lock();
|
||||
update_io_ticks(bdev, start_time, false);
|
||||
part_stat_inc(bdev, ios[sgrp]);
|
||||
part_stat_add(bdev, sectors[sgrp], sectors);
|
||||
part_stat_local_inc(bdev, in_flight[op_is_write(op)]);
|
||||
part_stat_unlock();
|
||||
|
||||
@ -984,13 +979,12 @@ EXPORT_SYMBOL(bdev_start_io_acct);
|
||||
*/
|
||||
unsigned long bio_start_io_acct(struct bio *bio)
|
||||
{
|
||||
return bdev_start_io_acct(bio->bi_bdev, bio_sectors(bio),
|
||||
bio_op(bio), jiffies);
|
||||
return bdev_start_io_acct(bio->bi_bdev, bio_op(bio), jiffies);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(bio_start_io_acct);
|
||||
|
||||
void bdev_end_io_acct(struct block_device *bdev, enum req_op op,
|
||||
unsigned long start_time)
|
||||
unsigned int sectors, unsigned long start_time)
|
||||
{
|
||||
const int sgrp = op_stat_group(op);
|
||||
unsigned long now = READ_ONCE(jiffies);
|
||||
@ -998,6 +992,8 @@ void bdev_end_io_acct(struct block_device *bdev, enum req_op op,
|
||||
|
||||
part_stat_lock();
|
||||
update_io_ticks(bdev, now, true);
|
||||
part_stat_inc(bdev, ios[sgrp]);
|
||||
part_stat_add(bdev, sectors[sgrp], sectors);
|
||||
part_stat_add(bdev, nsecs[sgrp], jiffies_to_nsecs(duration));
|
||||
part_stat_local_dec(bdev, in_flight[op_is_write(op)]);
|
||||
part_stat_unlock();
|
||||
@ -1007,7 +1003,7 @@ EXPORT_SYMBOL(bdev_end_io_acct);
|
||||
void bio_end_io_acct_remapped(struct bio *bio, unsigned long start_time,
|
||||
struct block_device *orig_bdev)
|
||||
{
|
||||
bdev_end_io_acct(orig_bdev, bio_op(bio), start_time);
|
||||
bdev_end_io_acct(orig_bdev, bio_op(bio), bio_sectors(bio), start_time);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(bio_end_io_acct_remapped);
|
||||
|
||||
|
@ -2725,6 +2725,7 @@ static void blk_mq_dispatch_plug_list(struct blk_plug *plug, bool from_sched)
|
||||
struct blk_mq_hw_ctx *this_hctx = NULL;
|
||||
struct blk_mq_ctx *this_ctx = NULL;
|
||||
struct request *requeue_list = NULL;
|
||||
struct request **requeue_lastp = &requeue_list;
|
||||
unsigned int depth = 0;
|
||||
LIST_HEAD(list);
|
||||
|
||||
@ -2735,10 +2736,10 @@ static void blk_mq_dispatch_plug_list(struct blk_plug *plug, bool from_sched)
|
||||
this_hctx = rq->mq_hctx;
|
||||
this_ctx = rq->mq_ctx;
|
||||
} else if (this_hctx != rq->mq_hctx || this_ctx != rq->mq_ctx) {
|
||||
rq_list_add(&requeue_list, rq);
|
||||
rq_list_add_tail(&requeue_lastp, rq);
|
||||
continue;
|
||||
}
|
||||
list_add_tail(&rq->queuelist, &list);
|
||||
list_add(&rq->queuelist, &list);
|
||||
depth++;
|
||||
} while (!rq_list_empty(plug->mq_list));
|
||||
|
||||
|
@ -378,12 +378,13 @@ static inline bool hctx_may_queue(struct blk_mq_hw_ctx *hctx,
|
||||
#define __blk_mq_run_dispatch_ops(q, check_sleep, dispatch_ops) \
|
||||
do { \
|
||||
if ((q)->tag_set->flags & BLK_MQ_F_BLOCKING) { \
|
||||
struct blk_mq_tag_set *__tag_set = (q)->tag_set; \
|
||||
int srcu_idx; \
|
||||
\
|
||||
might_sleep_if(check_sleep); \
|
||||
srcu_idx = srcu_read_lock((q)->tag_set->srcu); \
|
||||
srcu_idx = srcu_read_lock(__tag_set->srcu); \
|
||||
(dispatch_ops); \
|
||||
srcu_read_unlock((q)->tag_set->srcu, srcu_idx); \
|
||||
srcu_read_unlock(__tag_set->srcu, srcu_idx); \
|
||||
} else { \
|
||||
rcu_read_lock(); \
|
||||
(dispatch_ops); \
|
||||
|
@ -385,7 +385,7 @@ int disk_scan_partitions(struct gendisk *disk, fmode_t mode)
|
||||
if (IS_ERR(bdev))
|
||||
ret = PTR_ERR(bdev);
|
||||
else
|
||||
blkdev_put(bdev, mode);
|
||||
blkdev_put(bdev, mode & ~FMODE_EXCL);
|
||||
|
||||
if (!(mode & FMODE_EXCL))
|
||||
bd_abort_claiming(disk->part0, disk_scan_partitions);
|
||||
|
@ -1,4 +1,4 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
obj-y += habanalabs/
|
||||
obj-y += ivpu/
|
||||
obj-$(CONFIG_DRM_ACCEL_HABANALABS) += habanalabs/
|
||||
obj-$(CONFIG_DRM_ACCEL_IVPU) += ivpu/
|
||||
|
@ -536,16 +536,19 @@ static int topology_get_acpi_cpu_tag(struct acpi_table_header *table,
|
||||
static struct acpi_table_header *acpi_get_pptt(void)
|
||||
{
|
||||
static struct acpi_table_header *pptt;
|
||||
static bool is_pptt_checked;
|
||||
acpi_status status;
|
||||
|
||||
/*
|
||||
* PPTT will be used at runtime on every CPU hotplug in path, so we
|
||||
* don't need to call acpi_put_table() to release the table mapping.
|
||||
*/
|
||||
if (!pptt) {
|
||||
if (!pptt && !is_pptt_checked) {
|
||||
status = acpi_get_table(ACPI_SIG_PPTT, 0, &pptt);
|
||||
if (ACPI_FAILURE(status))
|
||||
acpi_pptt_warn_missing();
|
||||
|
||||
is_pptt_checked = true;
|
||||
}
|
||||
|
||||
return pptt;
|
||||
|
@ -716,6 +716,13 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "Dell G15 5515"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.callback = video_detect_force_native,
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "Vostro 15 3535"),
|
||||
},
|
||||
},
|
||||
|
||||
/*
|
||||
* Desktops which falsely report a backlight and which our heuristics
|
||||
|
@ -251,6 +251,7 @@ bool force_storage_d3(void)
|
||||
#define ACPI_QUIRK_UART1_TTY_UART2_SKIP BIT(1)
|
||||
#define ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY BIT(2)
|
||||
#define ACPI_QUIRK_USE_ACPI_AC_AND_BATTERY BIT(3)
|
||||
#define ACPI_QUIRK_SKIP_GPIO_EVENT_HANDLERS BIT(4)
|
||||
|
||||
static const struct dmi_system_id acpi_quirk_skip_dmi_ids[] = {
|
||||
/*
|
||||
@ -279,6 +280,16 @@ static const struct dmi_system_id acpi_quirk_skip_dmi_ids[] = {
|
||||
* need the x86-android-tablets module to properly work.
|
||||
*/
|
||||
#if IS_ENABLED(CONFIG_X86_ANDROID_TABLETS)
|
||||
{
|
||||
/* Acer Iconia One 7 B1-750 */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "VESPA2"),
|
||||
},
|
||||
.driver_data = (void *)(ACPI_QUIRK_SKIP_I2C_CLIENTS |
|
||||
ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY |
|
||||
ACPI_QUIRK_SKIP_GPIO_EVENT_HANDLERS),
|
||||
},
|
||||
{
|
||||
.matches = {
|
||||
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
||||
@ -286,7 +297,19 @@ static const struct dmi_system_id acpi_quirk_skip_dmi_ids[] = {
|
||||
},
|
||||
.driver_data = (void *)(ACPI_QUIRK_SKIP_I2C_CLIENTS |
|
||||
ACPI_QUIRK_UART1_TTY_UART2_SKIP |
|
||||
ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY),
|
||||
ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY |
|
||||
ACPI_QUIRK_SKIP_GPIO_EVENT_HANDLERS),
|
||||
},
|
||||
{
|
||||
/* Lenovo Yoga Book X90F/L */
|
||||
.matches = {
|
||||
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Intel Corporation"),
|
||||
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "CHERRYVIEW D1 PLATFORM"),
|
||||
DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "YETI-11"),
|
||||
},
|
||||
.driver_data = (void *)(ACPI_QUIRK_SKIP_I2C_CLIENTS |
|
||||
ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY |
|
||||
ACPI_QUIRK_SKIP_GPIO_EVENT_HANDLERS),
|
||||
},
|
||||
{
|
||||
.matches = {
|
||||
@ -294,7 +317,8 @@ static const struct dmi_system_id acpi_quirk_skip_dmi_ids[] = {
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "TF103C"),
|
||||
},
|
||||
.driver_data = (void *)(ACPI_QUIRK_SKIP_I2C_CLIENTS |
|
||||
ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY),
|
||||
ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY |
|
||||
ACPI_QUIRK_SKIP_GPIO_EVENT_HANDLERS),
|
||||
},
|
||||
{
|
||||
/* Lenovo Yoga Tablet 2 1050F/L */
|
||||
@ -336,7 +360,8 @@ static const struct dmi_system_id acpi_quirk_skip_dmi_ids[] = {
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "M890BAP"),
|
||||
},
|
||||
.driver_data = (void *)(ACPI_QUIRK_SKIP_I2C_CLIENTS |
|
||||
ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY),
|
||||
ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY |
|
||||
ACPI_QUIRK_SKIP_GPIO_EVENT_HANDLERS),
|
||||
},
|
||||
{
|
||||
/* Whitelabel (sold as various brands) TM800A550L */
|
||||
@ -413,6 +438,20 @@ int acpi_quirk_skip_serdev_enumeration(struct device *controller_parent, bool *s
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(acpi_quirk_skip_serdev_enumeration);
|
||||
|
||||
bool acpi_quirk_skip_gpio_event_handlers(void)
|
||||
{
|
||||
const struct dmi_system_id *dmi_id;
|
||||
long quirks;
|
||||
|
||||
dmi_id = dmi_first_match(acpi_quirk_skip_dmi_ids);
|
||||
if (!dmi_id)
|
||||
return false;
|
||||
|
||||
quirks = (unsigned long)dmi_id->driver_data;
|
||||
return (quirks & ACPI_QUIRK_SKIP_GPIO_EVENT_HANDLERS);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(acpi_quirk_skip_gpio_event_handlers);
|
||||
#endif
|
||||
|
||||
/* Lists of PMIC ACPI HIDs with an (often better) native charger driver */
|
||||
|
@ -1859,35 +1859,44 @@ static blk_status_t loop_queue_rq(struct blk_mq_hw_ctx *hctx,
|
||||
|
||||
static void loop_handle_cmd(struct loop_cmd *cmd)
|
||||
{
|
||||
struct cgroup_subsys_state *cmd_blkcg_css = cmd->blkcg_css;
|
||||
struct cgroup_subsys_state *cmd_memcg_css = cmd->memcg_css;
|
||||
struct request *rq = blk_mq_rq_from_pdu(cmd);
|
||||
const bool write = op_is_write(req_op(rq));
|
||||
struct loop_device *lo = rq->q->queuedata;
|
||||
int ret = 0;
|
||||
struct mem_cgroup *old_memcg = NULL;
|
||||
const bool use_aio = cmd->use_aio;
|
||||
|
||||
if (write && (lo->lo_flags & LO_FLAGS_READ_ONLY)) {
|
||||
ret = -EIO;
|
||||
goto failed;
|
||||
}
|
||||
|
||||
if (cmd->blkcg_css)
|
||||
kthread_associate_blkcg(cmd->blkcg_css);
|
||||
if (cmd->memcg_css)
|
||||
if (cmd_blkcg_css)
|
||||
kthread_associate_blkcg(cmd_blkcg_css);
|
||||
if (cmd_memcg_css)
|
||||
old_memcg = set_active_memcg(
|
||||
mem_cgroup_from_css(cmd->memcg_css));
|
||||
mem_cgroup_from_css(cmd_memcg_css));
|
||||
|
||||
/*
|
||||
* do_req_filebacked() may call blk_mq_complete_request() synchronously
|
||||
* or asynchronously if using aio. Hence, do not touch 'cmd' after
|
||||
* do_req_filebacked() has returned unless we are sure that 'cmd' has
|
||||
* not yet been completed.
|
||||
*/
|
||||
ret = do_req_filebacked(lo, rq);
|
||||
|
||||
if (cmd->blkcg_css)
|
||||
if (cmd_blkcg_css)
|
||||
kthread_associate_blkcg(NULL);
|
||||
|
||||
if (cmd->memcg_css) {
|
||||
if (cmd_memcg_css) {
|
||||
set_active_memcg(old_memcg);
|
||||
css_put(cmd->memcg_css);
|
||||
css_put(cmd_memcg_css);
|
||||
}
|
||||
failed:
|
||||
/* complete non-aio request */
|
||||
if (!cmd->use_aio || ret) {
|
||||
if (!use_aio || ret) {
|
||||
if (ret == -EOPNOTSUPP)
|
||||
cmd->ret = ret;
|
||||
else
|
||||
|
@ -1413,8 +1413,7 @@ static inline void nullb_complete_cmd(struct nullb_cmd *cmd)
|
||||
case NULL_IRQ_SOFTIRQ:
|
||||
switch (cmd->nq->dev->queue_mode) {
|
||||
case NULL_Q_MQ:
|
||||
if (likely(!blk_should_fake_timeout(cmd->rq->q)))
|
||||
blk_mq_complete_request(cmd->rq);
|
||||
blk_mq_complete_request(cmd->rq);
|
||||
break;
|
||||
case NULL_Q_BIO:
|
||||
/*
|
||||
@ -1658,12 +1657,13 @@ static enum blk_eh_timer_return null_timeout_rq(struct request *rq)
|
||||
}
|
||||
|
||||
static blk_status_t null_queue_rq(struct blk_mq_hw_ctx *hctx,
|
||||
const struct blk_mq_queue_data *bd)
|
||||
const struct blk_mq_queue_data *bd)
|
||||
{
|
||||
struct nullb_cmd *cmd = blk_mq_rq_to_pdu(bd->rq);
|
||||
struct request *rq = bd->rq;
|
||||
struct nullb_cmd *cmd = blk_mq_rq_to_pdu(rq);
|
||||
struct nullb_queue *nq = hctx->driver_data;
|
||||
sector_t nr_sectors = blk_rq_sectors(bd->rq);
|
||||
sector_t sector = blk_rq_pos(bd->rq);
|
||||
sector_t nr_sectors = blk_rq_sectors(rq);
|
||||
sector_t sector = blk_rq_pos(rq);
|
||||
const bool is_poll = hctx->type == HCTX_TYPE_POLL;
|
||||
|
||||
might_sleep_if(hctx->flags & BLK_MQ_F_BLOCKING);
|
||||
@ -1672,14 +1672,15 @@ static blk_status_t null_queue_rq(struct blk_mq_hw_ctx *hctx,
|
||||
hrtimer_init(&cmd->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
cmd->timer.function = null_cmd_timer_expired;
|
||||
}
|
||||
cmd->rq = bd->rq;
|
||||
cmd->rq = rq;
|
||||
cmd->error = BLK_STS_OK;
|
||||
cmd->nq = nq;
|
||||
cmd->fake_timeout = should_timeout_request(bd->rq);
|
||||
cmd->fake_timeout = should_timeout_request(rq) ||
|
||||
blk_should_fake_timeout(rq->q);
|
||||
|
||||
blk_mq_start_request(bd->rq);
|
||||
blk_mq_start_request(rq);
|
||||
|
||||
if (should_requeue_request(bd->rq)) {
|
||||
if (should_requeue_request(rq)) {
|
||||
/*
|
||||
* Alternate between hitting the core BUSY path, and the
|
||||
* driver driven requeue path
|
||||
@ -1687,22 +1688,20 @@ static blk_status_t null_queue_rq(struct blk_mq_hw_ctx *hctx,
|
||||
nq->requeue_selection++;
|
||||
if (nq->requeue_selection & 1)
|
||||
return BLK_STS_RESOURCE;
|
||||
else {
|
||||
blk_mq_requeue_request(bd->rq, true);
|
||||
return BLK_STS_OK;
|
||||
}
|
||||
blk_mq_requeue_request(rq, true);
|
||||
return BLK_STS_OK;
|
||||
}
|
||||
|
||||
if (is_poll) {
|
||||
spin_lock(&nq->poll_lock);
|
||||
list_add_tail(&bd->rq->queuelist, &nq->poll_list);
|
||||
list_add_tail(&rq->queuelist, &nq->poll_list);
|
||||
spin_unlock(&nq->poll_lock);
|
||||
return BLK_STS_OK;
|
||||
}
|
||||
if (cmd->fake_timeout)
|
||||
return BLK_STS_OK;
|
||||
|
||||
return null_handle_cmd(cmd, sector, nr_sectors, req_op(bd->rq));
|
||||
return null_handle_cmd(cmd, sector, nr_sectors, req_op(rq));
|
||||
}
|
||||
|
||||
static void cleanup_queue(struct nullb_queue *nq)
|
||||
|
@ -972,6 +972,8 @@ static int vdc_port_probe(struct vio_dev *vdev, const struct vio_device_id *id)
|
||||
print_version();
|
||||
|
||||
hp = mdesc_grab();
|
||||
if (!hp)
|
||||
return -ENODEV;
|
||||
|
||||
err = -ENODEV;
|
||||
if ((vdev->dev_no << PARTITION_SHIFT) & ~(u64)MINORMASK) {
|
||||
|
@ -144,8 +144,12 @@ int tpm_read_log_acpi(struct tpm_chip *chip)
|
||||
|
||||
ret = -EIO;
|
||||
virt = acpi_os_map_iomem(start, len);
|
||||
if (!virt)
|
||||
if (!virt) {
|
||||
dev_warn(&chip->dev, "%s: Failed to map ACPI memory\n", __func__);
|
||||
/* try EFI log next */
|
||||
ret = -ENODEV;
|
||||
goto err;
|
||||
}
|
||||
|
||||
memcpy_fromio(log->bios_event_log, virt, len);
|
||||
|
||||
|
@ -511,6 +511,63 @@ static int tpm_add_legacy_sysfs(struct tpm_chip *chip)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Some AMD fTPM versions may cause stutter
|
||||
* https://www.amd.com/en/support/kb/faq/pa-410
|
||||
*
|
||||
* Fixes are available in two series of fTPM firmware:
|
||||
* 6.x.y.z series: 6.0.18.6 +
|
||||
* 3.x.y.z series: 3.57.y.5 +
|
||||
*/
|
||||
static bool tpm_amd_is_rng_defective(struct tpm_chip *chip)
|
||||
{
|
||||
u32 val1, val2;
|
||||
u64 version;
|
||||
int ret;
|
||||
|
||||
if (!(chip->flags & TPM_CHIP_FLAG_TPM2))
|
||||
return false;
|
||||
|
||||
ret = tpm_request_locality(chip);
|
||||
if (ret)
|
||||
return false;
|
||||
|
||||
ret = tpm2_get_tpm_pt(chip, TPM2_PT_MANUFACTURER, &val1, NULL);
|
||||
if (ret)
|
||||
goto release;
|
||||
if (val1 != 0x414D4400U /* AMD */) {
|
||||
ret = -ENODEV;
|
||||
goto release;
|
||||
}
|
||||
ret = tpm2_get_tpm_pt(chip, TPM2_PT_FIRMWARE_VERSION_1, &val1, NULL);
|
||||
if (ret)
|
||||
goto release;
|
||||
ret = tpm2_get_tpm_pt(chip, TPM2_PT_FIRMWARE_VERSION_2, &val2, NULL);
|
||||
|
||||
release:
|
||||
tpm_relinquish_locality(chip);
|
||||
|
||||
if (ret)
|
||||
return false;
|
||||
|
||||
version = ((u64)val1 << 32) | val2;
|
||||
if ((version >> 48) == 6) {
|
||||
if (version >= 0x0006000000180006ULL)
|
||||
return false;
|
||||
} else if ((version >> 48) == 3) {
|
||||
if (version >= 0x0003005700000005ULL)
|
||||
return false;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
dev_warn(&chip->dev,
|
||||
"AMD fTPM version 0x%llx causes system stutter; hwrng disabled\n",
|
||||
version);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static int tpm_hwrng_read(struct hwrng *rng, void *data, size_t max, bool wait)
|
||||
{
|
||||
struct tpm_chip *chip = container_of(rng, struct tpm_chip, hwrng);
|
||||
@ -520,7 +577,8 @@ static int tpm_hwrng_read(struct hwrng *rng, void *data, size_t max, bool wait)
|
||||
|
||||
static int tpm_add_hwrng(struct tpm_chip *chip)
|
||||
{
|
||||
if (!IS_ENABLED(CONFIG_HW_RANDOM_TPM) || tpm_is_firmware_upgrade(chip))
|
||||
if (!IS_ENABLED(CONFIG_HW_RANDOM_TPM) || tpm_is_firmware_upgrade(chip) ||
|
||||
tpm_amd_is_rng_defective(chip))
|
||||
return 0;
|
||||
|
||||
snprintf(chip->hwrng_name, sizeof(chip->hwrng_name),
|
||||
|
@ -150,6 +150,79 @@ enum tpm_sub_capabilities {
|
||||
TPM_CAP_PROP_TIS_DURATION = 0x120,
|
||||
};
|
||||
|
||||
enum tpm2_pt_props {
|
||||
TPM2_PT_NONE = 0x00000000,
|
||||
TPM2_PT_GROUP = 0x00000100,
|
||||
TPM2_PT_FIXED = TPM2_PT_GROUP * 1,
|
||||
TPM2_PT_FAMILY_INDICATOR = TPM2_PT_FIXED + 0,
|
||||
TPM2_PT_LEVEL = TPM2_PT_FIXED + 1,
|
||||
TPM2_PT_REVISION = TPM2_PT_FIXED + 2,
|
||||
TPM2_PT_DAY_OF_YEAR = TPM2_PT_FIXED + 3,
|
||||
TPM2_PT_YEAR = TPM2_PT_FIXED + 4,
|
||||
TPM2_PT_MANUFACTURER = TPM2_PT_FIXED + 5,
|
||||
TPM2_PT_VENDOR_STRING_1 = TPM2_PT_FIXED + 6,
|
||||
TPM2_PT_VENDOR_STRING_2 = TPM2_PT_FIXED + 7,
|
||||
TPM2_PT_VENDOR_STRING_3 = TPM2_PT_FIXED + 8,
|
||||
TPM2_PT_VENDOR_STRING_4 = TPM2_PT_FIXED + 9,
|
||||
TPM2_PT_VENDOR_TPM_TYPE = TPM2_PT_FIXED + 10,
|
||||
TPM2_PT_FIRMWARE_VERSION_1 = TPM2_PT_FIXED + 11,
|
||||
TPM2_PT_FIRMWARE_VERSION_2 = TPM2_PT_FIXED + 12,
|
||||
TPM2_PT_INPUT_BUFFER = TPM2_PT_FIXED + 13,
|
||||
TPM2_PT_HR_TRANSIENT_MIN = TPM2_PT_FIXED + 14,
|
||||
TPM2_PT_HR_PERSISTENT_MIN = TPM2_PT_FIXED + 15,
|
||||
TPM2_PT_HR_LOADED_MIN = TPM2_PT_FIXED + 16,
|
||||
TPM2_PT_ACTIVE_SESSIONS_MAX = TPM2_PT_FIXED + 17,
|
||||
TPM2_PT_PCR_COUNT = TPM2_PT_FIXED + 18,
|
||||
TPM2_PT_PCR_SELECT_MIN = TPM2_PT_FIXED + 19,
|
||||
TPM2_PT_CONTEXT_GAP_MAX = TPM2_PT_FIXED + 20,
|
||||
TPM2_PT_NV_COUNTERS_MAX = TPM2_PT_FIXED + 22,
|
||||
TPM2_PT_NV_INDEX_MAX = TPM2_PT_FIXED + 23,
|
||||
TPM2_PT_MEMORY = TPM2_PT_FIXED + 24,
|
||||
TPM2_PT_CLOCK_UPDATE = TPM2_PT_FIXED + 25,
|
||||
TPM2_PT_CONTEXT_HASH = TPM2_PT_FIXED + 26,
|
||||
TPM2_PT_CONTEXT_SYM = TPM2_PT_FIXED + 27,
|
||||
TPM2_PT_CONTEXT_SYM_SIZE = TPM2_PT_FIXED + 28,
|
||||
TPM2_PT_ORDERLY_COUNT = TPM2_PT_FIXED + 29,
|
||||
TPM2_PT_MAX_COMMAND_SIZE = TPM2_PT_FIXED + 30,
|
||||
TPM2_PT_MAX_RESPONSE_SIZE = TPM2_PT_FIXED + 31,
|
||||
TPM2_PT_MAX_DIGEST = TPM2_PT_FIXED + 32,
|
||||
TPM2_PT_MAX_OBJECT_CONTEXT = TPM2_PT_FIXED + 33,
|
||||
TPM2_PT_MAX_SESSION_CONTEXT = TPM2_PT_FIXED + 34,
|
||||
TPM2_PT_PS_FAMILY_INDICATOR = TPM2_PT_FIXED + 35,
|
||||
TPM2_PT_PS_LEVEL = TPM2_PT_FIXED + 36,
|
||||
TPM2_PT_PS_REVISION = TPM2_PT_FIXED + 37,
|
||||
TPM2_PT_PS_DAY_OF_YEAR = TPM2_PT_FIXED + 38,
|
||||
TPM2_PT_PS_YEAR = TPM2_PT_FIXED + 39,
|
||||
TPM2_PT_SPLIT_MAX = TPM2_PT_FIXED + 40,
|
||||
TPM2_PT_TOTAL_COMMANDS = TPM2_PT_FIXED + 41,
|
||||
TPM2_PT_LIBRARY_COMMANDS = TPM2_PT_FIXED + 42,
|
||||
TPM2_PT_VENDOR_COMMANDS = TPM2_PT_FIXED + 43,
|
||||
TPM2_PT_NV_BUFFER_MAX = TPM2_PT_FIXED + 44,
|
||||
TPM2_PT_MODES = TPM2_PT_FIXED + 45,
|
||||
TPM2_PT_MAX_CAP_BUFFER = TPM2_PT_FIXED + 46,
|
||||
TPM2_PT_VAR = TPM2_PT_GROUP * 2,
|
||||
TPM2_PT_PERMANENT = TPM2_PT_VAR + 0,
|
||||
TPM2_PT_STARTUP_CLEAR = TPM2_PT_VAR + 1,
|
||||
TPM2_PT_HR_NV_INDEX = TPM2_PT_VAR + 2,
|
||||
TPM2_PT_HR_LOADED = TPM2_PT_VAR + 3,
|
||||
TPM2_PT_HR_LOADED_AVAIL = TPM2_PT_VAR + 4,
|
||||
TPM2_PT_HR_ACTIVE = TPM2_PT_VAR + 5,
|
||||
TPM2_PT_HR_ACTIVE_AVAIL = TPM2_PT_VAR + 6,
|
||||
TPM2_PT_HR_TRANSIENT_AVAIL = TPM2_PT_VAR + 7,
|
||||
TPM2_PT_HR_PERSISTENT = TPM2_PT_VAR + 8,
|
||||
TPM2_PT_HR_PERSISTENT_AVAIL = TPM2_PT_VAR + 9,
|
||||
TPM2_PT_NV_COUNTERS = TPM2_PT_VAR + 10,
|
||||
TPM2_PT_NV_COUNTERS_AVAIL = TPM2_PT_VAR + 11,
|
||||
TPM2_PT_ALGORITHM_SET = TPM2_PT_VAR + 12,
|
||||
TPM2_PT_LOADED_CURVES = TPM2_PT_VAR + 13,
|
||||
TPM2_PT_LOCKOUT_COUNTER = TPM2_PT_VAR + 14,
|
||||
TPM2_PT_MAX_AUTH_FAIL = TPM2_PT_VAR + 15,
|
||||
TPM2_PT_LOCKOUT_INTERVAL = TPM2_PT_VAR + 16,
|
||||
TPM2_PT_LOCKOUT_RECOVERY = TPM2_PT_VAR + 17,
|
||||
TPM2_PT_NV_WRITE_RECOVERY = TPM2_PT_VAR + 18,
|
||||
TPM2_PT_AUDIT_COUNTER_0 = TPM2_PT_VAR + 19,
|
||||
TPM2_PT_AUDIT_COUNTER_1 = TPM2_PT_VAR + 20,
|
||||
};
|
||||
|
||||
/* 128 bytes is an arbitrary cap. This could be as large as TPM_BUFSIZE - 18
|
||||
* bytes, but 128 is still a relatively large number of random bytes and
|
||||
|
@ -91,7 +91,7 @@ config COMMON_CLK_RK808
|
||||
config COMMON_CLK_HI655X
|
||||
tristate "Clock driver for Hi655x" if EXPERT
|
||||
depends on (MFD_HI655X_PMIC || COMPILE_TEST)
|
||||
depends on REGMAP
|
||||
select REGMAP
|
||||
default MFD_HI655X_PMIC
|
||||
help
|
||||
This driver supports the hi655x PMIC clock. This
|
||||
|
@ -69,4 +69,3 @@ builtin_platform_driver(bcm2835_aux_clk_driver);
|
||||
|
||||
MODULE_AUTHOR("Eric Anholt <eric@anholt.net>");
|
||||
MODULE_DESCRIPTION("BCM2835 auxiliary peripheral clock driver");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
@ -2350,4 +2350,3 @@ builtin_platform_driver(bcm2835_clk_driver);
|
||||
|
||||
MODULE_AUTHOR("Eric Anholt <eric@anholt.net>");
|
||||
MODULE_DESCRIPTION("BCM2835 clock driver");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
@ -99,4 +99,3 @@ module_platform_driver(of_fixed_mmio_clk_driver);
|
||||
|
||||
MODULE_AUTHOR("Jan Kotas <jank@cadence.com>");
|
||||
MODULE_DESCRIPTION("Memory Mapped IO Fixed clock driver");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
|
@ -88,5 +88,4 @@ module_platform_driver(fsl_sai_clk_driver);
|
||||
|
||||
MODULE_DESCRIPTION("Freescale SAI bitclock-as-a-clock driver");
|
||||
MODULE_AUTHOR("Michael Walle <michael@walle.cc>");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_ALIAS("platform:fsl-sai-clk");
|
||||
|
@ -495,7 +495,7 @@ static unsigned long k210_pll_get_rate(struct clk_hw *hw,
|
||||
f = FIELD_GET(K210_PLL_CLKF, reg) + 1;
|
||||
od = FIELD_GET(K210_PLL_CLKOD, reg) + 1;
|
||||
|
||||
return (u64)parent_rate * f / (r * od);
|
||||
return div_u64((u64)parent_rate * f, r * od);
|
||||
}
|
||||
|
||||
static const struct clk_ops k210_pll_ops = {
|
||||
|
@ -841,5 +841,4 @@ static void __exit hi3559av100_crg_exit(void)
|
||||
module_exit(hi3559av100_crg_exit);
|
||||
|
||||
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_DESCRIPTION("HiSilicon Hi3559AV100 CRG Driver");
|
||||
|
@ -291,4 +291,3 @@ module_exit(clk_ccc_exit);
|
||||
|
||||
MODULE_DESCRIPTION("Microchip PolarFire SoC Clock Conditioning Circuitry Driver");
|
||||
MODULE_AUTHOR("Conor Dooley <conor.dooley@microchip.com>");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
@ -106,7 +106,8 @@ static void psci_pd_remove(void)
|
||||
struct psci_pd_provider *pd_provider, *it;
|
||||
struct generic_pm_domain *genpd;
|
||||
|
||||
list_for_each_entry_safe(pd_provider, it, &psci_pd_providers, link) {
|
||||
list_for_each_entry_safe_reverse(pd_provider, it,
|
||||
&psci_pd_providers, link) {
|
||||
of_genpd_del_provider(pd_provider->node);
|
||||
|
||||
genpd = of_genpd_remove_last(pd_provider->node);
|
||||
|
@ -536,6 +536,9 @@ void acpi_gpiochip_request_interrupts(struct gpio_chip *chip)
|
||||
if (ACPI_FAILURE(status))
|
||||
return;
|
||||
|
||||
if (acpi_quirk_skip_gpio_event_handlers())
|
||||
return;
|
||||
|
||||
acpi_walk_resources(handle, METHOD_NAME__AEI,
|
||||
acpi_gpiochip_alloc_event, acpi_gpio);
|
||||
|
||||
|
@ -4145,8 +4145,6 @@ int amdgpu_device_suspend(struct drm_device *dev, bool fbcon)
|
||||
if (amdgpu_acpi_smart_shift_update(dev, AMDGPU_SS_DEV_D3))
|
||||
DRM_WARN("smart shift update failed\n");
|
||||
|
||||
drm_kms_helper_poll_disable(dev);
|
||||
|
||||
if (fbcon)
|
||||
drm_fb_helper_set_suspend_unlocked(adev_to_drm(adev)->fb_helper, true);
|
||||
|
||||
@ -4243,8 +4241,6 @@ int amdgpu_device_resume(struct drm_device *dev, bool fbcon)
|
||||
if (fbcon)
|
||||
drm_fb_helper_set_suspend_unlocked(adev_to_drm(adev)->fb_helper, false);
|
||||
|
||||
drm_kms_helper_poll_enable(dev);
|
||||
|
||||
amdgpu_ras_resume(adev);
|
||||
|
||||
if (adev->mode_info.num_crtc) {
|
||||
|
@ -543,6 +543,7 @@ static void amdgpu_discovery_read_from_harvest_table(struct amdgpu_device *adev,
|
||||
struct harvest_table *harvest_info;
|
||||
u16 offset;
|
||||
int i;
|
||||
uint32_t umc_harvest_config = 0;
|
||||
|
||||
bhdr = (struct binary_header *)adev->mman.discovery_bin;
|
||||
offset = le16_to_cpu(bhdr->table_list[HARVEST_INFO].offset);
|
||||
@ -570,12 +571,17 @@ static void amdgpu_discovery_read_from_harvest_table(struct amdgpu_device *adev,
|
||||
adev->harvest_ip_mask |= AMD_HARVEST_IP_DMU_MASK;
|
||||
break;
|
||||
case UMC_HWID:
|
||||
umc_harvest_config |=
|
||||
1 << (le16_to_cpu(harvest_info->list[i].number_instance));
|
||||
(*umc_harvest_count)++;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
adev->umc.active_mask = ((1 << adev->umc.node_inst_num) - 1) &
|
||||
~umc_harvest_config;
|
||||
}
|
||||
|
||||
/* ================================================== */
|
||||
@ -1156,8 +1162,10 @@ static int amdgpu_discovery_reg_base_init(struct amdgpu_device *adev)
|
||||
AMDGPU_MAX_SDMA_INSTANCES);
|
||||
}
|
||||
|
||||
if (le16_to_cpu(ip->hw_id) == UMC_HWID)
|
||||
if (le16_to_cpu(ip->hw_id) == UMC_HWID) {
|
||||
adev->gmc.num_umc++;
|
||||
adev->umc.node_inst_num++;
|
||||
}
|
||||
|
||||
for (k = 0; k < num_base_address; k++) {
|
||||
/*
|
||||
|
@ -1618,6 +1618,8 @@ int amdgpu_display_suspend_helper(struct amdgpu_device *adev)
|
||||
struct drm_connector_list_iter iter;
|
||||
int r;
|
||||
|
||||
drm_kms_helper_poll_disable(dev);
|
||||
|
||||
/* turn off display hw */
|
||||
drm_modeset_lock_all(dev);
|
||||
drm_connector_list_iter_begin(dev, &iter);
|
||||
@ -1694,6 +1696,8 @@ int amdgpu_display_resume_helper(struct amdgpu_device *adev)
|
||||
|
||||
drm_modeset_unlock_all(dev);
|
||||
|
||||
drm_kms_helper_poll_enable(dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1315,7 +1315,7 @@ void amdgpu_bo_release_notify(struct ttm_buffer_object *bo)
|
||||
|
||||
if (!bo->resource || bo->resource->mem_type != TTM_PL_VRAM ||
|
||||
!(abo->flags & AMDGPU_GEM_CREATE_VRAM_WIPE_ON_RELEASE) ||
|
||||
adev->in_suspend || adev->shutdown)
|
||||
adev->in_suspend || drm_dev_is_unplugged(adev_to_drm(adev)))
|
||||
return;
|
||||
|
||||
if (WARN_ON_ONCE(!dma_resv_trylock(bo->base.resv)))
|
||||
|
@ -602,27 +602,14 @@ psp_cmd_submit_buf(struct psp_context *psp,
|
||||
struct psp_gfx_cmd_resp *cmd, uint64_t fence_mc_addr)
|
||||
{
|
||||
int ret;
|
||||
int index, idx;
|
||||
int index;
|
||||
int timeout = 20000;
|
||||
bool ras_intr = false;
|
||||
bool skip_unsupport = false;
|
||||
bool dev_entered;
|
||||
|
||||
if (psp->adev->no_hw_access)
|
||||
return 0;
|
||||
|
||||
dev_entered = drm_dev_enter(adev_to_drm(psp->adev), &idx);
|
||||
/*
|
||||
* We allow sending PSP messages LOAD_ASD and UNLOAD_TA without acquiring
|
||||
* a lock in drm_dev_enter during driver unload because we must call
|
||||
* drm_dev_unplug as the beginning of unload driver sequence . It is very
|
||||
* crucial that userspace can't access device instances anymore.
|
||||
*/
|
||||
if (!dev_entered)
|
||||
WARN_ON(psp->cmd_buf_mem->cmd_id != GFX_CMD_ID_LOAD_ASD &&
|
||||
psp->cmd_buf_mem->cmd_id != GFX_CMD_ID_UNLOAD_TA &&
|
||||
psp->cmd_buf_mem->cmd_id != GFX_CMD_ID_INVOKE_CMD);
|
||||
|
||||
memset(psp->cmd_buf_mem, 0, PSP_CMD_BUFFER_SIZE);
|
||||
|
||||
memcpy(psp->cmd_buf_mem, cmd, sizeof(struct psp_gfx_cmd_resp));
|
||||
@ -686,8 +673,6 @@ psp_cmd_submit_buf(struct psp_context *psp,
|
||||
}
|
||||
|
||||
exit:
|
||||
if (dev_entered)
|
||||
drm_dev_exit(idx);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@
|
||||
#define LOOP_UMC_INST_AND_CH(umc_inst, ch_inst) LOOP_UMC_INST((umc_inst)) LOOP_UMC_CH_INST((ch_inst))
|
||||
|
||||
#define LOOP_UMC_NODE_INST(node_inst) \
|
||||
for ((node_inst) = 0; (node_inst) < adev->umc.node_inst_num; (node_inst)++)
|
||||
for_each_set_bit((node_inst), &(adev->umc.active_mask), adev->umc.node_inst_num)
|
||||
|
||||
#define LOOP_UMC_EACH_NODE_INST_AND_CH(node_inst, umc_inst, ch_inst) \
|
||||
LOOP_UMC_NODE_INST((node_inst)) LOOP_UMC_INST_AND_CH((umc_inst), (ch_inst))
|
||||
@ -69,7 +69,7 @@ struct amdgpu_umc {
|
||||
/* number of umc instance with memory map register access */
|
||||
uint32_t umc_inst_num;
|
||||
|
||||
/*number of umc node instance with memory map register access*/
|
||||
/* Total number of umc node instance including harvest one */
|
||||
uint32_t node_inst_num;
|
||||
|
||||
/* UMC regiser per channel offset */
|
||||
@ -82,6 +82,9 @@ struct amdgpu_umc {
|
||||
|
||||
const struct amdgpu_umc_funcs *funcs;
|
||||
struct amdgpu_umc_ras *ras;
|
||||
|
||||
/* active mask for umc node instance */
|
||||
unsigned long active_mask;
|
||||
};
|
||||
|
||||
int amdgpu_umc_ras_late_init(struct amdgpu_device *adev, struct ras_common_if *ras_block);
|
||||
|
@ -26,6 +26,7 @@
|
||||
|
||||
#include <linux/firmware.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/dmi.h>
|
||||
#include <linux/pci.h>
|
||||
#include <linux/debugfs.h>
|
||||
#include <drm/drm_drv.h>
|
||||
@ -114,6 +115,24 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)
|
||||
(adev->pg_flags & AMD_PG_SUPPORT_VCN_DPG))
|
||||
adev->vcn.indirect_sram = true;
|
||||
|
||||
/*
|
||||
* Some Steam Deck's BIOS versions are incompatible with the
|
||||
* indirect SRAM mode, leading to amdgpu being unable to get
|
||||
* properly probed (and even potentially crashing the kernel).
|
||||
* Hence, check for these versions here - notice this is
|
||||
* restricted to Vangogh (Deck's APU).
|
||||
*/
|
||||
if (adev->ip_versions[UVD_HWIP][0] == IP_VERSION(3, 0, 2)) {
|
||||
const char *bios_ver = dmi_get_system_info(DMI_BIOS_VERSION);
|
||||
|
||||
if (bios_ver && (!strncmp("F7A0113", bios_ver, 7) ||
|
||||
!strncmp("F7A0114", bios_ver, 7))) {
|
||||
adev->vcn.indirect_sram = false;
|
||||
dev_info(adev->dev,
|
||||
"Steam Deck quirk: indirect SRAM disabled on BIOS %s\n", bios_ver);
|
||||
}
|
||||
}
|
||||
|
||||
hdr = (const struct common_firmware_header *)adev->vcn.fw->data;
|
||||
adev->vcn.fw_version = le32_to_cpu(hdr->ucode_version);
|
||||
|
||||
|
@ -124,6 +124,8 @@ enum AMDGIM_FEATURE_FLAG {
|
||||
AMDGIM_FEATURE_PP_ONE_VF = (1 << 4),
|
||||
/* Indirect Reg Access enabled */
|
||||
AMDGIM_FEATURE_INDIRECT_REG_ACCESS = (1 << 5),
|
||||
/* AV1 Support MODE*/
|
||||
AMDGIM_FEATURE_AV1_SUPPORT = (1 << 6),
|
||||
};
|
||||
|
||||
enum AMDGIM_REG_ACCESS_FLAG {
|
||||
@ -322,6 +324,8 @@ static inline bool is_virtual_machine(void)
|
||||
((!amdgpu_in_reset(adev)) && adev->virt.tdr_debug)
|
||||
#define amdgpu_sriov_is_normal(adev) \
|
||||
((!amdgpu_in_reset(adev)) && (!adev->virt.tdr_debug))
|
||||
#define amdgpu_sriov_is_av1_support(adev) \
|
||||
((adev)->virt.gim_feature & AMDGIM_FEATURE_AV1_SUPPORT)
|
||||
bool amdgpu_virt_mmio_blocked(struct amdgpu_device *adev);
|
||||
void amdgpu_virt_init_setting(struct amdgpu_device *adev);
|
||||
void amdgpu_virt_kiq_reg_write_reg_wait(struct amdgpu_device *adev,
|
||||
|
@ -93,7 +93,8 @@ union amd_sriov_msg_feature_flags {
|
||||
uint32_t mm_bw_management : 1;
|
||||
uint32_t pp_one_vf_mode : 1;
|
||||
uint32_t reg_indirect_acc : 1;
|
||||
uint32_t reserved : 26;
|
||||
uint32_t av1_support : 1;
|
||||
uint32_t reserved : 25;
|
||||
} flags;
|
||||
uint32_t all;
|
||||
};
|
||||
|
@ -567,7 +567,6 @@ static void gmc_v11_0_set_umc_funcs(struct amdgpu_device *adev)
|
||||
case IP_VERSION(8, 10, 0):
|
||||
adev->umc.channel_inst_num = UMC_V8_10_CHANNEL_INSTANCE_NUM;
|
||||
adev->umc.umc_inst_num = UMC_V8_10_UMC_INSTANCE_NUM;
|
||||
adev->umc.node_inst_num = adev->gmc.num_umc;
|
||||
adev->umc.max_ras_err_cnt_per_query = UMC_V8_10_TOTAL_CHANNEL_NUM(adev);
|
||||
adev->umc.channel_offs = UMC_V8_10_PER_CHANNEL_OFFSET;
|
||||
adev->umc.retire_unit = UMC_V8_10_NA_COL_2BITS_POWER_OF_2_NUM;
|
||||
|
@ -382,11 +382,6 @@ static void nbio_v7_2_init_registers(struct amdgpu_device *adev)
|
||||
if (def != data)
|
||||
WREG32_PCIE_PORT(SOC15_REG_OFFSET(NBIO, 0, regBIF1_PCIE_MST_CTRL_3), data);
|
||||
break;
|
||||
case IP_VERSION(7, 5, 1):
|
||||
data = RREG32_SOC15(NBIO, 0, regRCC_DEV2_EPF0_STRAP2);
|
||||
data &= ~RCC_DEV2_EPF0_STRAP2__STRAP_NO_SOFT_RESET_DEV2_F0_MASK;
|
||||
WREG32_SOC15(NBIO, 0, regRCC_DEV2_EPF0_STRAP2, data);
|
||||
fallthrough;
|
||||
default:
|
||||
def = data = RREG32_PCIE_PORT(SOC15_REG_OFFSET(NBIO, 0, regPCIE_CONFIG_CNTL));
|
||||
data = REG_SET_FIELD(data, PCIE_CONFIG_CNTL,
|
||||
@ -399,6 +394,15 @@ static void nbio_v7_2_init_registers(struct amdgpu_device *adev)
|
||||
break;
|
||||
}
|
||||
|
||||
switch (adev->ip_versions[NBIO_HWIP][0]) {
|
||||
case IP_VERSION(7, 3, 0):
|
||||
case IP_VERSION(7, 5, 1):
|
||||
data = RREG32_SOC15(NBIO, 0, regRCC_DEV2_EPF0_STRAP2);
|
||||
data &= ~RCC_DEV2_EPF0_STRAP2__STRAP_NO_SOFT_RESET_DEV2_F0_MASK;
|
||||
WREG32_SOC15(NBIO, 0, regRCC_DEV2_EPF0_STRAP2, data);
|
||||
break;
|
||||
}
|
||||
|
||||
if (amdgpu_sriov_vf(adev))
|
||||
adev->rmmio_remap.reg_offset = SOC15_REG_OFFSET(NBIO, 0,
|
||||
regBIF_BX_PF0_HDP_MEM_COHERENCY_FLUSH_CNTL) << 2;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user