Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e6f7fdd3 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Merge 4.19.182 into android-4.19-stable



Changes in 4.19.182
	ext4: check journal inode extents more carefully
	KVM: arm64: nvhe: Save the SPE context early
	bpf: Prohibit alu ops for pointer types not defining ptr_limit
	bpf: Fix off-by-one for area size in creating mask to left
	bpf: Simplify alu_limit masking for pointer arithmetic
	bpf: Add sanity check for upper ptr_limit
	net: dsa: tag_mtk: fix 802.1ad VLAN egress
	net: dsa: b53: Support setting learning on port
	Linux 4.19.182

Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
Change-Id: I2a2499aaa213a5e3c2ae03add30ba8dabb9c9338
parents 39f48fe4 12522281
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
VERSION = 4
PATCHLEVEL = 19
SUBLEVEL = 181
SUBLEVEL = 182
EXTRAVERSION =
NAME = "People's Front"

+3 −0
Original line number Diff line number Diff line
@@ -144,6 +144,9 @@ void __sysreg32_restore_state(struct kvm_vcpu *vcpu);

void __debug_switch_to_guest(struct kvm_vcpu *vcpu);
void __debug_switch_to_host(struct kvm_vcpu *vcpu);
void __debug_save_host_buffers_nvhe(struct kvm_vcpu *vcpu);
void __debug_restore_host_buffers_nvhe(struct kvm_vcpu *vcpu);


void __fpsimd_save_state(struct user_fpsimd_state *fp_regs);
void __fpsimd_restore_state(struct user_fpsimd_state *fp_regs);
+15 −9
Original line number Diff line number Diff line
@@ -149,20 +149,28 @@ static void __hyp_text __debug_restore_state(struct kvm_vcpu *vcpu,
	write_sysreg(ctxt->sys_regs[MDCCINT_EL1], mdccint_el1);
}

void __hyp_text __debug_switch_to_guest(struct kvm_vcpu *vcpu)
void __hyp_text __debug_save_host_buffers_nvhe(struct kvm_vcpu *vcpu)
{
	struct kvm_cpu_context *host_ctxt;
	struct kvm_cpu_context *guest_ctxt;
	struct kvm_guest_debug_arch *host_dbg;
	struct kvm_guest_debug_arch *guest_dbg;

	/*
	 * Non-VHE: Disable and flush SPE data generation
	 * VHE: The vcpu can run, but it can't hide.
	 */
	if (!has_vhe())
	__debug_save_spe_nvhe(&vcpu->arch.host_debug_state.pmscr_el1);

}

void __hyp_text __debug_restore_host_buffers_nvhe(struct kvm_vcpu *vcpu)
{
	__debug_restore_spe_nvhe(vcpu->arch.host_debug_state.pmscr_el1);
}

void __hyp_text __debug_switch_to_guest(struct kvm_vcpu *vcpu)
{
	struct kvm_cpu_context *host_ctxt;
	struct kvm_cpu_context *guest_ctxt;
	struct kvm_guest_debug_arch *host_dbg;
	struct kvm_guest_debug_arch *guest_dbg;

	if (!(vcpu->arch.flags & KVM_ARM64_DEBUG_DIRTY))
		return;

@@ -182,8 +190,6 @@ void __hyp_text __debug_switch_to_host(struct kvm_vcpu *vcpu)
	struct kvm_guest_debug_arch *host_dbg;
	struct kvm_guest_debug_arch *guest_dbg;

	if (!has_vhe())
		__debug_restore_spe_nvhe(vcpu->arch.host_debug_state.pmscr_el1);

	if (!(vcpu->arch.flags & KVM_ARM64_DEBUG_DIRTY))
		return;
+3 −1
Original line number Diff line number Diff line
@@ -560,6 +560,7 @@ int __hyp_text __kvm_vcpu_run_nvhe(struct kvm_vcpu *vcpu)
	guest_ctxt = &vcpu->arch.ctxt;

	__sysreg_save_state_nvhe(host_ctxt);
	__debug_save_host_buffers_nvhe(vcpu);

	__activate_traps(vcpu);
	__activate_vm(kern_hyp_va(vcpu->kvm));
@@ -599,11 +600,12 @@ int __hyp_text __kvm_vcpu_run_nvhe(struct kvm_vcpu *vcpu)
	if (vcpu->arch.flags & KVM_ARM64_FP_ENABLED)
		__fpsimd_save_fpexc32(vcpu);

	__debug_switch_to_host(vcpu);
	/*
	 * This must come after restoring the host sysregs, since a non-VHE
	 * system may enable SPE here and make use of the TTBRs.
	 */
	__debug_switch_to_host(vcpu);
	__debug_restore_host_buffers_nvhe(vcpu);

	return exit_code;
}
+19 −0
Original line number Diff line number Diff line
@@ -507,12 +507,27 @@ void b53_imp_vlan_setup(struct dsa_switch *ds, int cpu_port)
}
EXPORT_SYMBOL(b53_imp_vlan_setup);

static void b53_port_set_learning(struct b53_device *dev, int port,
				  bool learning)
{
	u16 reg;

	b53_read16(dev, B53_CTRL_PAGE, B53_DIS_LEARNING, &reg);
	if (learning)
		reg &= ~BIT(port);
	else
		reg |= BIT(port);
	b53_write16(dev, B53_CTRL_PAGE, B53_DIS_LEARNING, reg);
}

int b53_enable_port(struct dsa_switch *ds, int port, struct phy_device *phy)
{
	struct b53_device *dev = ds->priv;
	unsigned int cpu_port = ds->ports[port].cpu_dp->index;
	u16 pvlan;

	b53_port_set_learning(dev, port, false);

	/* Clear the Rx and Tx disable bits and set to no spanning tree */
	b53_write8(dev, B53_CTRL_PAGE, B53_PORT_CTRL(port), 0);

@@ -620,6 +635,7 @@ static void b53_enable_cpu_port(struct b53_device *dev, int port)
	b53_write8(dev, B53_CTRL_PAGE, B53_PORT_CTRL(port), port_ctrl);

	b53_brcm_hdr_setup(dev->ds, port);
	b53_port_set_learning(dev, port, false);
}

static void b53_enable_mib(struct b53_device *dev)
@@ -1517,6 +1533,8 @@ int b53_br_join(struct dsa_switch *ds, int port, struct net_device *br)
	b53_write16(dev, B53_PVLAN_PAGE, B53_PVLAN_PORT_MASK(port), pvlan);
	dev->ports[port].vlan_ctl_mask = pvlan;

	b53_port_set_learning(dev, port, true);

	return 0;
}
EXPORT_SYMBOL(b53_br_join);
@@ -1564,6 +1582,7 @@ void b53_br_leave(struct dsa_switch *ds, int port, struct net_device *br)
		vl->untag |= BIT(port) | BIT(cpu_port);
		b53_set_vlan_entry(dev, pvid, vl);
	}
	b53_port_set_learning(dev, port, false);
}
EXPORT_SYMBOL(b53_br_leave);

Loading