mirror of
https://github.com/a52xq-dev/kernel.git
synced 2026-10-18 21:58:11 +07:00
Merge ra.kernel.org:/pub/scm/linux/kernel/git/davem/net
This commit is contained in:
commit
9ff3b40e41
251 changed files with 2947 additions and 1069 deletions
|
|
@ -410,7 +410,7 @@ argument is passed to the kernel in the command line.
|
|||
That only is supported in some configurations, though (for example, if
|
||||
the `HWP feature is enabled in the processor <Active Mode With HWP_>`_,
|
||||
the operation mode of the driver cannot be changed), and if it is not
|
||||
supported in the current configuration, writes to this attribute with
|
||||
supported in the current configuration, writes to this attribute will
|
||||
fail with an appropriate error.
|
||||
|
||||
Interpretation of Policy Attributes
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
==============================================================
|
||||
Linux* Base Driver for the Intel(R) PRO/100 Family of Adapters
|
||||
==============================================================
|
||||
|
||||
|
|
@ -86,83 +87,84 @@ Event Log Message Level: The driver uses the message level flag to log events
|
|||
Additional Configurations
|
||||
=========================
|
||||
|
||||
Configuring the Driver on Different Distributions
|
||||
-------------------------------------------------
|
||||
Configuring the Driver on Different Distributions
|
||||
-------------------------------------------------
|
||||
|
||||
Configuring a network driver to load properly when the system is started is
|
||||
distribution dependent. Typically, the configuration process involves adding
|
||||
an alias line to /etc/modprobe.d/*.conf as well as editing other system
|
||||
startup scripts and/or configuration files. Many popular Linux
|
||||
distributions ship with tools to make these changes for you. To learn the
|
||||
proper way to configure a network device for your system, refer to your
|
||||
distribution documentation. If during this process you are asked for the
|
||||
driver or module name, the name for the Linux Base Driver for the Intel
|
||||
PRO/100 Family of Adapters is e100.
|
||||
Configuring a network driver to load properly when the system is started
|
||||
is distribution dependent. Typically, the configuration process involves
|
||||
adding an alias line to /etc/modprobe.d/*.conf as well as editing other
|
||||
system startup scripts and/or configuration files. Many popular Linux
|
||||
distributions ship with tools to make these changes for you. To learn
|
||||
the proper way to configure a network device for your system, refer to
|
||||
your distribution documentation. If during this process you are asked
|
||||
for the driver or module name, the name for the Linux Base Driver for
|
||||
the Intel PRO/100 Family of Adapters is e100.
|
||||
|
||||
As an example, if you install the e100 driver for two PRO/100 adapters
|
||||
(eth0 and eth1), add the following to a configuration file in /etc/modprobe.d/
|
||||
As an example, if you install the e100 driver for two PRO/100 adapters
|
||||
(eth0 and eth1), add the following to a configuration file in
|
||||
/etc/modprobe.d/::
|
||||
|
||||
alias eth0 e100
|
||||
alias eth1 e100
|
||||
|
||||
Viewing Link Messages
|
||||
---------------------
|
||||
In order to see link messages and other Intel driver information on your
|
||||
console, you must set the dmesg level up to six. This can be done by
|
||||
entering the following on the command line before loading the e100 driver::
|
||||
Viewing Link Messages
|
||||
---------------------
|
||||
|
||||
In order to see link messages and other Intel driver information on your
|
||||
console, you must set the dmesg level up to six. This can be done by
|
||||
entering the following on the command line before loading the e100
|
||||
driver::
|
||||
|
||||
dmesg -n 6
|
||||
|
||||
If you wish to see all messages issued by the driver, including debug
|
||||
messages, set the dmesg level to eight.
|
||||
If you wish to see all messages issued by the driver, including debug
|
||||
messages, set the dmesg level to eight.
|
||||
|
||||
NOTE: This setting is not saved across reboots.
|
||||
NOTE: This setting is not saved across reboots.
|
||||
|
||||
ethtool
|
||||
-------
|
||||
|
||||
ethtool
|
||||
-------
|
||||
The driver utilizes the ethtool interface for driver configuration and
|
||||
diagnostics, as well as displaying statistical information. The ethtool
|
||||
version 1.6 or later is required for this functionality.
|
||||
|
||||
The driver utilizes the ethtool interface for driver configuration and
|
||||
diagnostics, as well as displaying statistical information. The ethtool
|
||||
version 1.6 or later is required for this functionality.
|
||||
The latest release of ethtool can be found from
|
||||
https://www.kernel.org/pub/software/network/ethtool/
|
||||
|
||||
The latest release of ethtool can be found from
|
||||
https://www.kernel.org/pub/software/network/ethtool/
|
||||
Enabling Wake on LAN* (WoL)
|
||||
---------------------------
|
||||
WoL is provided through the ethtool* utility. For instructions on
|
||||
enabling WoL with ethtool, refer to the ethtool man page. WoL will be
|
||||
enabled on the system during the next shut down or reboot. For this
|
||||
driver version, in order to enable WoL, the e100 driver must be loaded
|
||||
when shutting down or rebooting the system.
|
||||
|
||||
Enabling Wake on LAN* (WoL)
|
||||
---------------------------
|
||||
WoL is provided through the ethtool* utility. For instructions on enabling
|
||||
WoL with ethtool, refer to the ethtool man page.
|
||||
NAPI
|
||||
----
|
||||
|
||||
WoL will be enabled on the system during the next shut down or reboot. For
|
||||
this driver version, in order to enable WoL, the e100 driver must be
|
||||
loaded when shutting down or rebooting the system.
|
||||
NAPI (Rx polling mode) is supported in the e100 driver.
|
||||
|
||||
NAPI
|
||||
----
|
||||
See https://wiki.linuxfoundation.org/networking/napi for more
|
||||
information on NAPI.
|
||||
|
||||
NAPI (Rx polling mode) is supported in the e100 driver.
|
||||
Multiple Interfaces on Same Ethernet Broadcast Network
|
||||
------------------------------------------------------
|
||||
|
||||
See https://wiki.linuxfoundation.org/networking/napi for more information
|
||||
on NAPI.
|
||||
Due to the default ARP behavior on Linux, it is not possible to have one
|
||||
system on two IP networks in the same Ethernet broadcast domain
|
||||
(non-partitioned switch) behave as expected. All Ethernet interfaces
|
||||
will respond to IP traffic for any IP address assigned to the system.
|
||||
This results in unbalanced receive traffic.
|
||||
|
||||
Multiple Interfaces on Same Ethernet Broadcast Network
|
||||
------------------------------------------------------
|
||||
If you have multiple interfaces in a server, either turn on ARP
|
||||
filtering by
|
||||
|
||||
Due to the default ARP behavior on Linux, it is not possible to have
|
||||
one system on two IP networks in the same Ethernet broadcast domain
|
||||
(non-partitioned switch) behave as expected. All Ethernet interfaces
|
||||
will respond to IP traffic for any IP address assigned to the system.
|
||||
This results in unbalanced receive traffic.
|
||||
(1) entering:: echo 1 > /proc/sys/net/ipv4/conf/all/arp_filter
|
||||
(this only works if your kernel's version is higher than 2.4.5), or
|
||||
|
||||
If you have multiple interfaces in a server, either turn on ARP
|
||||
filtering by
|
||||
|
||||
(1) entering:: echo 1 > /proc/sys/net/ipv4/conf/all/arp_filter
|
||||
(this only works if your kernel's version is higher than 2.4.5), or
|
||||
|
||||
(2) installing the interfaces in separate broadcast domains (either
|
||||
in different switches or in a switch partitioned to VLANs).
|
||||
(2) installing the interfaces in separate broadcast domains (either
|
||||
in different switches or in a switch partitioned to VLANs).
|
||||
|
||||
|
||||
Support
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
===========================================================
|
||||
Linux* Base Driver for Intel(R) Ethernet Network Connection
|
||||
===========================================================
|
||||
|
||||
|
|
@ -354,57 +355,58 @@ previously mentioned to force the adapter to the same speed and duplex.
|
|||
Additional Configurations
|
||||
=========================
|
||||
|
||||
Jumbo Frames
|
||||
------------
|
||||
Jumbo Frames support is enabled by changing the MTU to a value larger than
|
||||
the default of 1500. Use the ifconfig command to increase the MTU size.
|
||||
For example::
|
||||
Jumbo Frames
|
||||
------------
|
||||
Jumbo Frames support is enabled by changing the MTU to a value larger
|
||||
than the default of 1500. Use the ifconfig command to increase the MTU
|
||||
size. For example::
|
||||
|
||||
ifconfig eth<x> mtu 9000 up
|
||||
|
||||
This setting is not saved across reboots. It can be made permanent if
|
||||
you add::
|
||||
This setting is not saved across reboots. It can be made permanent if
|
||||
you add::
|
||||
|
||||
MTU=9000
|
||||
|
||||
to the file /etc/sysconfig/network-scripts/ifcfg-eth<x>. This example
|
||||
applies to the Red Hat distributions; other distributions may store this
|
||||
setting in a different location.
|
||||
to the file /etc/sysconfig/network-scripts/ifcfg-eth<x>. This example
|
||||
applies to the Red Hat distributions; other distributions may store this
|
||||
setting in a different location.
|
||||
|
||||
Notes:
|
||||
Degradation in throughput performance may be observed in some Jumbo frames
|
||||
environments. If this is observed, increasing the application's socket buffer
|
||||
size and/or increasing the /proc/sys/net/ipv4/tcp_*mem entry values may help.
|
||||
See the specific application manual and /usr/src/linux*/Documentation/
|
||||
networking/ip-sysctl.txt for more details.
|
||||
Notes: Degradation in throughput performance may be observed in some
|
||||
Jumbo frames environments. If this is observed, increasing the
|
||||
application's socket buffer size and/or increasing the
|
||||
/proc/sys/net/ipv4/tcp_*mem entry values may help. See the specific
|
||||
application manual and /usr/src/linux*/Documentation/
|
||||
networking/ip-sysctl.txt for more details.
|
||||
|
||||
- The maximum MTU setting for Jumbo Frames is 16110. This value coincides
|
||||
with the maximum Jumbo Frames size of 16128.
|
||||
- The maximum MTU setting for Jumbo Frames is 16110. This value
|
||||
coincides with the maximum Jumbo Frames size of 16128.
|
||||
|
||||
- Using Jumbo frames at 10 or 100 Mbps is not supported and may result in
|
||||
poor performance or loss of link.
|
||||
- Using Jumbo frames at 10 or 100 Mbps is not supported and may result
|
||||
in poor performance or loss of link.
|
||||
|
||||
- Adapters based on the Intel(R) 82542 and 82573V/E controller do not
|
||||
support Jumbo Frames. These correspond to the following product names:
|
||||
Intel(R) PRO/1000 Gigabit Server Adapter
|
||||
Intel(R) PRO/1000 PM Network Connection
|
||||
- Adapters based on the Intel(R) 82542 and 82573V/E controller do not
|
||||
support Jumbo Frames. These correspond to the following product names:
|
||||
Intel(R) PRO/1000 Gigabit Server Adapter Intel(R) PRO/1000 PM Network
|
||||
Connection
|
||||
|
||||
ethtool
|
||||
-------
|
||||
The driver utilizes the ethtool interface for driver configuration and
|
||||
diagnostics, as well as displaying statistical information. The ethtool
|
||||
version 1.6 or later is required for this functionality.
|
||||
ethtool
|
||||
-------
|
||||
The driver utilizes the ethtool interface for driver configuration and
|
||||
diagnostics, as well as displaying statistical information. The ethtool
|
||||
version 1.6 or later is required for this functionality.
|
||||
|
||||
The latest release of ethtool can be found from
|
||||
https://www.kernel.org/pub/software/network/ethtool/
|
||||
The latest release of ethtool can be found from
|
||||
https://www.kernel.org/pub/software/network/ethtool/
|
||||
|
||||
Enabling Wake on LAN* (WoL)
|
||||
---------------------------
|
||||
WoL is configured through the ethtool* utility.
|
||||
Enabling Wake on LAN* (WoL)
|
||||
---------------------------
|
||||
WoL is configured through the ethtool* utility.
|
||||
|
||||
WoL will be enabled on the system during the next shut down or reboot.
|
||||
For this driver version, in order to enable WoL, the e1000 driver must be
|
||||
loaded when shutting down or rebooting the system.
|
||||
|
||||
WoL will be enabled on the system during the next shut down or reboot.
|
||||
For this driver version, in order to enable WoL, the e1000 driver must be
|
||||
loaded when shutting down or rebooting the system.
|
||||
|
||||
Support
|
||||
=======
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ void strp_pause(struct strparser *strp)
|
|||
Temporarily pause a stream parser. Message parsing is suspended
|
||||
and no new messages are delivered to the upper layer.
|
||||
|
||||
void strp_pause(struct strparser *strp)
|
||||
void strp_unpause(struct strparser *strp)
|
||||
|
||||
Unpause a paused stream parser.
|
||||
|
||||
|
|
|
|||
|
|
@ -1729,35 +1729,35 @@ If a variable isn't a key variable or prefixed with 'vals=', the
|
|||
associated event field will be saved in a variable but won't be summed
|
||||
as a value:
|
||||
|
||||
# echo 'hist:keys=next_pid:ts1=common_timestamp ... >> event/trigger
|
||||
# echo 'hist:keys=next_pid:ts1=common_timestamp ...' >> event/trigger
|
||||
|
||||
Multiple variables can be assigned at the same time. The below would
|
||||
result in both ts0 and b being created as variables, with both
|
||||
common_timestamp and field1 additionally being summed as values:
|
||||
|
||||
# echo 'hist:keys=pid:vals=$ts0,$b:ts0=common_timestamp,b=field1 ... >> \
|
||||
# echo 'hist:keys=pid:vals=$ts0,$b:ts0=common_timestamp,b=field1 ...' >> \
|
||||
event/trigger
|
||||
|
||||
Note that variable assignments can appear either preceding or
|
||||
following their use. The command below behaves identically to the
|
||||
command above:
|
||||
|
||||
# echo 'hist:keys=pid:ts0=common_timestamp,b=field1:vals=$ts0,$b ... >> \
|
||||
# echo 'hist:keys=pid:ts0=common_timestamp,b=field1:vals=$ts0,$b ...' >> \
|
||||
event/trigger
|
||||
|
||||
Any number of variables not bound to a 'vals=' prefix can also be
|
||||
assigned by simply separating them with colons. Below is the same
|
||||
thing but without the values being summed in the histogram:
|
||||
|
||||
# echo 'hist:keys=pid:ts0=common_timestamp:b=field1 ... >> event/trigger
|
||||
# echo 'hist:keys=pid:ts0=common_timestamp:b=field1 ...' >> event/trigger
|
||||
|
||||
Variables set as above can be referenced and used in expressions on
|
||||
another event.
|
||||
|
||||
For example, here's how a latency can be calculated:
|
||||
|
||||
# echo 'hist:keys=pid,prio:ts0=common_timestamp ... >> event1/trigger
|
||||
# echo 'hist:keys=next_pid:wakeup_lat=common_timestamp-$ts0 ... >> event2/trigger
|
||||
# echo 'hist:keys=pid,prio:ts0=common_timestamp ...' >> event1/trigger
|
||||
# echo 'hist:keys=next_pid:wakeup_lat=common_timestamp-$ts0 ...' >> event2/trigger
|
||||
|
||||
In the first line above, the event's timetamp is saved into the
|
||||
variable ts0. In the next line, ts0 is subtracted from the second
|
||||
|
|
@ -1766,7 +1766,7 @@ yet another variable, 'wakeup_lat'. The hist trigger below in turn
|
|||
makes use of the wakeup_lat variable to compute a combined latency
|
||||
using the same key and variable from yet another event:
|
||||
|
||||
# echo 'hist:key=pid:wakeupswitch_lat=$wakeup_lat+$switchtime_lat ... >> event3/trigger
|
||||
# echo 'hist:key=pid:wakeupswitch_lat=$wakeup_lat+$switchtime_lat ...' >> event3/trigger
|
||||
|
||||
2.2.2 Synthetic Events
|
||||
----------------------
|
||||
|
|
@ -1807,10 +1807,11 @@ the command that defined it with a '!':
|
|||
At this point, there isn't yet an actual 'wakeup_latency' event
|
||||
instantiated in the event subsytem - for this to happen, a 'hist
|
||||
trigger action' needs to be instantiated and bound to actual fields
|
||||
and variables defined on other events (see Section 6.3.3 below).
|
||||
and variables defined on other events (see Section 2.2.3 below on
|
||||
how that is done using hist trigger 'onmatch' action). Once that is
|
||||
done, the 'wakeup_latency' synthetic event instance is created.
|
||||
|
||||
Once that is done, an event instance is created, and a histogram can
|
||||
be defined using it:
|
||||
A histogram can now be defined for the new synthetic event:
|
||||
|
||||
# echo 'hist:keys=pid,prio,lat.log2:sort=pid,lat' >> \
|
||||
/sys/kernel/debug/tracing/events/synthetic/wakeup_latency/trigger
|
||||
|
|
@ -1960,7 +1961,7 @@ hist trigger specification.
|
|||
back to that pid, the timestamp difference is calculated. If the
|
||||
resulting latency, stored in wakeup_lat, exceeds the current
|
||||
maximum latency, the values specified in the save() fields are
|
||||
recoreded:
|
||||
recorded:
|
||||
|
||||
# echo 'hist:keys=pid:ts0=common_timestamp.usecs \
|
||||
if comm=="cyclictest"' >> \
|
||||
|
|
|
|||
|
|
@ -4610,7 +4610,7 @@ This capability indicates that kvm will implement the interfaces to handle
|
|||
reset, migration and nested KVM for branch prediction blocking. The stfle
|
||||
facility 82 should not be provided to the guest without this capability.
|
||||
|
||||
8.14 KVM_CAP_HYPERV_TLBFLUSH
|
||||
8.18 KVM_CAP_HYPERV_TLBFLUSH
|
||||
|
||||
Architectures: x86
|
||||
|
||||
|
|
|
|||
|
|
@ -9882,6 +9882,7 @@ M: Andrew Lunn <andrew@lunn.ch>
|
|||
M: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
|
||||
M: Florian Fainelli <f.fainelli@gmail.com>
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/net/dsa/
|
||||
F: net/dsa/
|
||||
F: include/net/dsa.h
|
||||
F: include/linux/dsa/
|
||||
|
|
@ -15574,6 +15575,7 @@ M: x86@kernel.org
|
|||
L: linux-kernel@vger.kernel.org
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/core
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/x86/
|
||||
F: Documentation/x86/
|
||||
F: arch/x86/
|
||||
|
||||
|
|
|
|||
2
Makefile
2
Makefile
|
|
@ -2,7 +2,7 @@
|
|||
VERSION = 4
|
||||
PATCHLEVEL = 18
|
||||
SUBLEVEL = 0
|
||||
EXTRAVERSION = -rc1
|
||||
EXTRAVERSION = -rc2
|
||||
NAME = Merciless Moray
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
|
|
|||
|
|
@ -555,11 +555,6 @@ config SMP
|
|||
|
||||
If you don't know what to do here, say N.
|
||||
|
||||
config HAVE_DEC_LOCK
|
||||
bool
|
||||
depends on SMP
|
||||
default y
|
||||
|
||||
config NR_CPUS
|
||||
int "Maximum number of CPUs (2-32)"
|
||||
range 2 32
|
||||
|
|
|
|||
|
|
@ -35,8 +35,6 @@ lib-y = __divqu.o __remqu.o __divlu.o __remlu.o \
|
|||
callback_srm.o srm_puts.o srm_printk.o \
|
||||
fls.o
|
||||
|
||||
lib-$(CONFIG_SMP) += dec_and_lock.o
|
||||
|
||||
# The division routines are built from single source, with different defines.
|
||||
AFLAGS___divqu.o = -DDIV
|
||||
AFLAGS___remqu.o = -DREM
|
||||
|
|
|
|||
|
|
@ -1,44 +0,0 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* arch/alpha/lib/dec_and_lock.c
|
||||
*
|
||||
* ll/sc version of atomic_dec_and_lock()
|
||||
*
|
||||
*/
|
||||
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/atomic.h>
|
||||
#include <linux/export.h>
|
||||
|
||||
asm (".text \n\
|
||||
.global _atomic_dec_and_lock \n\
|
||||
.ent _atomic_dec_and_lock \n\
|
||||
.align 4 \n\
|
||||
_atomic_dec_and_lock: \n\
|
||||
.prologue 0 \n\
|
||||
1: ldl_l $1, 0($16) \n\
|
||||
subl $1, 1, $1 \n\
|
||||
beq $1, 2f \n\
|
||||
stl_c $1, 0($16) \n\
|
||||
beq $1, 4f \n\
|
||||
mb \n\
|
||||
clr $0 \n\
|
||||
ret \n\
|
||||
2: br $29, 3f \n\
|
||||
3: ldgp $29, 0($29) \n\
|
||||
br $atomic_dec_and_lock_1..ng \n\
|
||||
.subsection 2 \n\
|
||||
4: br 1b \n\
|
||||
.previous \n\
|
||||
.end _atomic_dec_and_lock");
|
||||
|
||||
static int __used atomic_dec_and_lock_1(atomic_t *atomic, spinlock_t *lock)
|
||||
{
|
||||
/* Slow path */
|
||||
spin_lock(lock);
|
||||
if (atomic_dec_and_test(atomic))
|
||||
return 1;
|
||||
spin_unlock(lock);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(_atomic_dec_and_lock);
|
||||
|
|
@ -544,7 +544,7 @@ static void handle_signal(struct ksignal *ksig, struct pt_regs *regs)
|
|||
* Increment event counter and perform fixup for the pre-signal
|
||||
* frame.
|
||||
*/
|
||||
rseq_signal_deliver(regs);
|
||||
rseq_signal_deliver(ksig, regs);
|
||||
|
||||
/*
|
||||
* Set up the stack frame
|
||||
|
|
@ -666,7 +666,7 @@ do_work_pending(struct pt_regs *regs, unsigned int thread_flags, int syscall)
|
|||
} else {
|
||||
clear_thread_flag(TIF_NOTIFY_RESUME);
|
||||
tracehook_notify_resume(regs);
|
||||
rseq_handle_notify_resume(regs);
|
||||
rseq_handle_notify_resume(NULL, regs);
|
||||
}
|
||||
}
|
||||
local_irq_disable();
|
||||
|
|
|
|||
|
|
@ -59,6 +59,9 @@ struct xen_memory_region xen_extra_mem[XEN_EXTRA_MEM_MAX_REGIONS] __initdata;
|
|||
|
||||
static __read_mostly unsigned int xen_events_irq;
|
||||
|
||||
uint32_t xen_start_flags;
|
||||
EXPORT_SYMBOL(xen_start_flags);
|
||||
|
||||
int xen_remap_domain_gfn_array(struct vm_area_struct *vma,
|
||||
unsigned long addr,
|
||||
xen_pfn_t *gfn, int nr,
|
||||
|
|
@ -293,9 +296,7 @@ void __init xen_early_init(void)
|
|||
xen_setup_features();
|
||||
|
||||
if (xen_feature(XENFEAT_dom0))
|
||||
xen_start_info->flags |= SIF_INITDOMAIN|SIF_PRIVILEGED;
|
||||
else
|
||||
xen_start_info->flags &= ~(SIF_INITDOMAIN|SIF_PRIVILEGED);
|
||||
xen_start_flags |= SIF_INITDOMAIN|SIF_PRIVILEGED;
|
||||
|
||||
if (!console_set_on_cmdline && !xen_initial_domain())
|
||||
add_preferred_console("hvc", 0, NULL);
|
||||
|
|
|
|||
|
|
@ -223,8 +223,8 @@ static int ctr_encrypt(struct skcipher_request *req)
|
|||
kernel_neon_begin();
|
||||
aes_ctr_encrypt(walk.dst.virt.addr, walk.src.virt.addr,
|
||||
(u8 *)ctx->key_enc, rounds, blocks, walk.iv);
|
||||
err = skcipher_walk_done(&walk, walk.nbytes % AES_BLOCK_SIZE);
|
||||
kernel_neon_end();
|
||||
err = skcipher_walk_done(&walk, walk.nbytes % AES_BLOCK_SIZE);
|
||||
}
|
||||
if (walk.nbytes) {
|
||||
u8 __aligned(8) tail[AES_BLOCK_SIZE];
|
||||
|
|
|
|||
|
|
@ -306,6 +306,7 @@ struct kvm_vcpu_arch {
|
|||
#define KVM_ARM64_FP_ENABLED (1 << 1) /* guest FP regs loaded */
|
||||
#define KVM_ARM64_FP_HOST (1 << 2) /* host FP regs loaded */
|
||||
#define KVM_ARM64_HOST_SVE_IN_USE (1 << 3) /* backup for host TIF_SVE */
|
||||
#define KVM_ARM64_HOST_SVE_ENABLED (1 << 4) /* SVE enabled for EL0 */
|
||||
|
||||
#define vcpu_gp_regs(v) (&(v)->arch.ctxt.gp_regs)
|
||||
|
||||
|
|
|
|||
|
|
@ -728,6 +728,17 @@ asm(
|
|||
asm volatile("msr_s " __stringify(r) ", %x0" : : "rZ" (__val)); \
|
||||
} while (0)
|
||||
|
||||
/*
|
||||
* Modify bits in a sysreg. Bits in the clear mask are zeroed, then bits in the
|
||||
* set mask are set. Other bits are left as-is.
|
||||
*/
|
||||
#define sysreg_clear_set(sysreg, clear, set) do { \
|
||||
u64 __scs_val = read_sysreg(sysreg); \
|
||||
u64 __scs_new = (__scs_val & ~(u64)(clear)) | (set); \
|
||||
if (__scs_new != __scs_val) \
|
||||
write_sysreg(__scs_new, sysreg); \
|
||||
} while (0)
|
||||
|
||||
static inline void config_sctlr_el1(u32 clear, u32 set)
|
||||
{
|
||||
u32 val;
|
||||
|
|
|
|||
|
|
@ -937,7 +937,7 @@ static int __init parse_kpti(char *str)
|
|||
__kpti_forced = enabled ? 1 : -1;
|
||||
return 0;
|
||||
}
|
||||
__setup("kpti=", parse_kpti);
|
||||
early_param("kpti", parse_kpti);
|
||||
#endif /* CONFIG_UNMAP_KERNEL_AT_EL0 */
|
||||
|
||||
#ifdef CONFIG_ARM64_HW_AFDBM
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ int __cpu_up(unsigned int cpu, struct task_struct *idle)
|
|||
* This is the secondary CPU boot entry. We're using this CPUs
|
||||
* idle thread stack, but a set of temporary page tables.
|
||||
*/
|
||||
asmlinkage void secondary_start_kernel(void)
|
||||
asmlinkage notrace void secondary_start_kernel(void)
|
||||
{
|
||||
u64 mpidr = read_cpuid_mpidr() & MPIDR_HWID_BITMASK;
|
||||
struct mm_struct *mm = &init_mm;
|
||||
|
|
|
|||
|
|
@ -5,13 +5,14 @@
|
|||
* Copyright 2018 Arm Limited
|
||||
* Author: Dave Martin <Dave.Martin@arm.com>
|
||||
*/
|
||||
#include <linux/bottom_half.h>
|
||||
#include <linux/irqflags.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/thread_info.h>
|
||||
#include <linux/kvm_host.h>
|
||||
#include <asm/kvm_asm.h>
|
||||
#include <asm/kvm_host.h>
|
||||
#include <asm/kvm_mmu.h>
|
||||
#include <asm/sysreg.h>
|
||||
|
||||
/*
|
||||
* Called on entry to KVM_RUN unless this vcpu previously ran at least
|
||||
|
|
@ -61,10 +62,16 @@ void kvm_arch_vcpu_load_fp(struct kvm_vcpu *vcpu)
|
|||
{
|
||||
BUG_ON(!current->mm);
|
||||
|
||||
vcpu->arch.flags &= ~(KVM_ARM64_FP_ENABLED | KVM_ARM64_HOST_SVE_IN_USE);
|
||||
vcpu->arch.flags &= ~(KVM_ARM64_FP_ENABLED |
|
||||
KVM_ARM64_HOST_SVE_IN_USE |
|
||||
KVM_ARM64_HOST_SVE_ENABLED);
|
||||
vcpu->arch.flags |= KVM_ARM64_FP_HOST;
|
||||
|
||||
if (test_thread_flag(TIF_SVE))
|
||||
vcpu->arch.flags |= KVM_ARM64_HOST_SVE_IN_USE;
|
||||
|
||||
if (read_sysreg(cpacr_el1) & CPACR_EL1_ZEN_EL0EN)
|
||||
vcpu->arch.flags |= KVM_ARM64_HOST_SVE_ENABLED;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -92,19 +99,30 @@ void kvm_arch_vcpu_ctxsync_fp(struct kvm_vcpu *vcpu)
|
|||
*/
|
||||
void kvm_arch_vcpu_put_fp(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
local_bh_disable();
|
||||
unsigned long flags;
|
||||
|
||||
update_thread_flag(TIF_SVE,
|
||||
vcpu->arch.flags & KVM_ARM64_HOST_SVE_IN_USE);
|
||||
local_irq_save(flags);
|
||||
|
||||
if (vcpu->arch.flags & KVM_ARM64_FP_ENABLED) {
|
||||
/* Clean guest FP state to memory and invalidate cpu view */
|
||||
fpsimd_save();
|
||||
fpsimd_flush_cpu_state();
|
||||
} else if (!test_thread_flag(TIF_FOREIGN_FPSTATE)) {
|
||||
/* Ensure user trap controls are correctly restored */
|
||||
fpsimd_bind_task_to_cpu();
|
||||
} else if (system_supports_sve()) {
|
||||
/*
|
||||
* The FPSIMD/SVE state in the CPU has not been touched, and we
|
||||
* have SVE (and VHE): CPACR_EL1 (alias CPTR_EL2) has been
|
||||
* reset to CPACR_EL1_DEFAULT by the Hyp code, disabling SVE
|
||||
* for EL0. To avoid spurious traps, restore the trap state
|
||||
* seen by kvm_arch_vcpu_load_fp():
|
||||
*/
|
||||
if (vcpu->arch.flags & KVM_ARM64_HOST_SVE_ENABLED)
|
||||
sysreg_clear_set(CPACR_EL1, 0, CPACR_EL1_ZEN_EL0EN);
|
||||
else
|
||||
sysreg_clear_set(CPACR_EL1, CPACR_EL1_ZEN_EL0EN, 0);
|
||||
}
|
||||
|
||||
local_bh_enable();
|
||||
update_thread_flag(TIF_SVE,
|
||||
vcpu->arch.flags & KVM_ARM64_HOST_SVE_IN_USE);
|
||||
|
||||
local_irq_restore(flags);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -583,13 +583,14 @@ static void *__iommu_alloc_attrs(struct device *dev, size_t size,
|
|||
size >> PAGE_SHIFT);
|
||||
return NULL;
|
||||
}
|
||||
if (!coherent)
|
||||
__dma_flush_area(page_to_virt(page), iosize);
|
||||
|
||||
addr = dma_common_contiguous_remap(page, size, VM_USERMAP,
|
||||
prot,
|
||||
__builtin_return_address(0));
|
||||
if (!addr) {
|
||||
if (addr) {
|
||||
memset(addr, 0, size);
|
||||
if (!coherent)
|
||||
__dma_flush_area(page_to_virt(page), iosize);
|
||||
} else {
|
||||
iommu_dma_unmap_page(dev, *handle, iosize, 0, attrs);
|
||||
dma_release_from_contiguous(dev, page,
|
||||
size >> PAGE_SHIFT);
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue