On Wed, Mar 10, 2021 at 7:39 PM Rafael J. Wysocki wrote:
>
> On Fri, Mar 5, 2021 at 2:40 PM David Hildenbrand wrote:
> >
> > >> The ibft table, for example, is mapped in via acpi_map() and kmap(). The
> > >> page for the ibft table is not reserved, so it can end up on the
> > >> freelist.
> > >
On Thu, Mar 04 2021 at 21:58, Thomas Gleixner wrote:
> On Thu, Mar 04 2021 at 13:04, Eric W. Biederman wrote:
>> Thomas Gleixner writes:
>>>
>>> We could of course do the caching unconditionally for all tasks.
>>
>> Is there any advantage to only doing this for realtime tasks?
>
> It was mostly to
On Wed, Mar 10, 2021 at 7:28 PM syzbot
wrote:
>
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit:0d7588ab riscv: process: Fix no prototype for arch_dup_tas..
> git tree: git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git
> fixes
> console output: https://syzk
want_pmd_share() is undefined with !ARCH_WANT_HUGE_PMD_SHARE since it's put
by accident into a "#ifdef ARCH_WANT_HUGE_PMD_SHARE" block. Moving it out
won't work either since vma_shareable() is only defined within the block.
Define it for !ARCH_WANT_HUGE_PMD_SHARE instead.
Fixes: 5b109cc1cdcc ("hu
Having dynamic debug prints in b53_vlan_enable() has been helpful to
uncover a recent but update the function to indicate the port being
configured (or -1 for initial setup) and include the global VLAN enabled
and VLAN filtering enable status.
Signed-off-by: Florian Fainelli
---
drivers/net/dsa/
On Wed, Mar 10, 2021 at 10:43:33AM -0800, Linus Torvalds wrote:
> Just a note to the stable tree: this commit has been reverted
> upstream, because it causes a huge performance drop (admittedly on a
> load and setup that may not be all that relevant to most people).
>
> It was applied to 4.4, 4.9
I don't think I can review this patch, I don't understand the problem space
well enough. But just in case, I see nothing wrong in this simple patch.
Feel free to add
Acked-by: Oleg Nesterov
On 02/26, Piotr Figiel wrote:
>
> For userspace checkpoint and restore (C/R) a way of getting process s
On Wed, Mar 10, 2021 at 06:38:07PM +, William Kucharski wrote:
> Looks good, just one super minor nit inline.
> > @@ -228,13 +202,6 @@ void fb_deferred_io_cleanup(struct fb_info *info)
> >
> > BUG_ON(!fbdefio);
> > cancel_delayed_work_sync(&info->deferred_work);
> > -
> > - /* clear
Add two function prototypes for -W1 warnings generated by the
kernel test robot.
Reported-by: kernel test robot
Signed-off-by: Michael Kelley
---
include/asm-generic/mshyperv.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/asm-generic/mshyperv.h b/include/asm-generic/mshyperv.h
The bcm_sf2 driver uses the b53 driver as a library but does not make
usre of the b53_setup() function, this made it fail to inherit the
vlan_filtering_is_global attribute. Fix this by moving the assignment to
b53_switch_alloc() which is used by bcm_sf2.
Fixes: 7228b23e68f7 ("net: dsa: b53: Let DS
On Wed, Mar 10, 2021 at 11:03 AM Álvaro Fernández Rojas
wrote:
>
> Hi Rob,
>
> > El 10 mar 2021, a las 18:45, Rob Herring escribió:
> >
> > On Wed, Mar 10, 2021 at 5:55 AM Álvaro Fernández Rojas
> > wrote:
> >>
> >> Add binding documentation for the pincontrol core found in BCM6328 SoCs.
> >>
>
This is a trgodor variant, required to have sound node variable
for coachz specific platform.
Signed-off-by: Srinivasa Rao Mandadapu
---
.../boot/dts/qcom/sc7180-trogdor-coachz.dtsi | 18 ++
1 file changed, 18 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-
The root clock generators with MND divider has the capability to support
change in duty-cycle by updating the 'D'. Add the clock ops which would
check all the boundary conditions and enable setting the desired duty-cycle
as per the consumer.
Signed-off-by: Taniya Das
---
drivers/clk/qcom/clk-rcg
These patches are device tree changes to support audio over I2S.
Changes Since v1:
-- Ajith's Certification is added.
-- Alias name added for sound dai link node
Changes Since v2:
-- sound node variable is added in sc7180-trogdor-coachz.dtsi.
-- Audio-jack property is removed, as it may cr
From: Ajit Pandey
Add dai link for supporting lpass I2S driver, which is used
for audio capture and playback.
Add lpass-cpu node with pin controls and i2s primary
and secondary dai-links
Signed-off-by: Ajit Pandey
Signed-off-by: V Sujith Kumar Reddy
Signed-off-by: Srinivasa Rao Mandadapu
---
Just a note to the stable tree: this commit has been reverted
upstream, because it causes a huge performance drop (admittedly on a
load and setup that may not be all that relevant to most people).
It was applied to 4.4, 4.9 and 4.12, because the commit it was marked
as "fixing" is from 2012, but i
On Wed, Mar 10, 2021 at 11:34:06AM -0700, Alex Williamson wrote:
> > I think after the address_space changes this should try to stick with
> > a normal io_rmap_pfn_range() done outside the fault handler.
>
> I assume you're suggesting calling io_remap_pfn_range() when device
> memory is enabled,
On Fri, Mar 5, 2021 at 2:40 PM David Hildenbrand wrote:
>
> >> The ibft table, for example, is mapped in via acpi_map() and kmap(). The
> >> page for the ibft table is not reserved, so it can end up on the freelist.
> >
> > You appear to be saying that it is not sufficient to kmap() a page in
> >
Looks good, just one super minor nit inline.
Reviewed-by: William Kucharski
> On Mar 10, 2021, at 6:51 AM, Matthew Wilcox (Oracle)
> wrote:
>
> There's no need to give the page an address_space. Leaving the
> page->mapping as NULL will cause the VM to handle set_page_dirty()
> the same way t
Build time dependencies aren't going to help anything, arm64 (and to my
understanding some future x86 systems, LynxPoint IIRC) supports both DT
and ACPI and so you have kernels built with support for both.
well, that's what I suggested initially:
if (is_of_node(card->dev->fwnode))
On Wed, 10 Mar 2021 14:14:46 -0400
Jason Gunthorpe wrote:
> On Wed, Mar 10, 2021 at 10:53:29AM -0700, Alex Williamson wrote:
>
> > diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio/pci/vfio_pci.c
> > index 65e7e6b44578..ae723808e08b 100644
> > +++ b/drivers/vfio/pci/vfio_pci.c
> > @@ -1573
On 3/7/21 6:00 AM, Sergei Trofimovich wrote:
> Before the change there were two inclusions of Documentation/Kconfig:
> lib/Kconfig.debug:source "Documentation/Kconfig"
> Kconfig: source "Documentation/Kconfig"
>
> Kconfig also included 'source "lib/Kconfig.debug"'.
>
> Noticed as two 'mak
On Sun, Mar 07, 2021 at 08:53:25PM -0700, Shuah Khan wrote:
> This patch series fixes the following problems founds in syzbot
> fuzzing.
Thanks for these, all now queued up.
greg k-h
On Thu, Mar 11, 2021 at 12:55:09AM +0900, Masami Hiramatsu wrote:
> +#ifdef CONFIG_KRETPROBES
> +static unsigned long orc_kretprobe_correct_ip(struct unwind_state *state)
> +{
> + return kretprobe_find_ret_addr(
> + (unsigned long)kretprobe_trampoline_addr(),
> +
From: Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.23 release.
There are 47 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Fri, 12 Mar 2021 1
Nice cleanup, IMHO.
Reviewed-by: William Kucharski
> On Mar 9, 2021, at 12:57 PM, Matthew Wilcox (Oracle)
> wrote:
>
> My UEK-derived config has 1030 files depending on pagemap.h before
> this change. Afterwards, just 326 files need to be rebuilt when I
> touch pagemap.h. I think blkdev.h i
Hello,
syzbot found the following issue on:
HEAD commit:0d7588ab riscv: process: Fix no prototype for arch_dup_tas..
git tree: git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git
fixes
console output: https://syzkaller.appspot.com/x/log.txt?x=122c343ad0
kernel config: ht
Am 2021-03-10 13:54, schrieb Álvaro Fernández Rojas:
This is needed for properly registering GPIO regmap as a child of a
regmap
pin controller.
Signed-off-by: Álvaro Fernández Rojas
Reviewed-by: Michael Walle
---
v6: add comment and simplify of_node assignment
Ah, I see you add the comment
On Wed, Mar 10, 2021 at 11:06:09PM +0530, Naresh Kamboju wrote:
> On Wed, 10 Mar 2021 at 18:56, wrote:
> >
> > From: Greg Kroah-Hartman
> >
> > From: Alex Elder
> >
> > [ Upstream commit f849afcc8c3b27d7b50827e95b60557f24184df0 ]
> >
> > IPA v4.2 has a hardware quirk that requires the AP to allo
On Wed, Mar 10, 2021 at 11:08:10PM +0530, Naresh Kamboju wrote:
> On Wed, 10 Mar 2021 at 18:54, wrote:
> >
> > From: Greg Kroah-Hartman
> >
> > This is the start of the stable review cycle for the 5.10.23 release.
> > There are 49 patches in this series, all will be posted as a response
> > to th
On Wed, Mar 10, 2021 at 09:58:34AM -0800, Guenter Roeck wrote:
> On Wed, Mar 10, 2021 at 11:08:10PM +0530, Naresh Kamboju wrote:
> > On Wed, 10 Mar 2021 at 18:54, wrote:
> > >
> > > From: Greg Kroah-Hartman
> > >
> > > This is the start of the stable review cycle for the 5.10.23 release.
> > > Th
On Wed, Mar 10, 2021 at 9:46 AM Yang Shi wrote:
>
> The number of deferred objects might get windup to an absurd number, and it
> results in clamp of slab objects. It is undesirable for sustaining
> workingset.
>
> So shrink deferred objects proportional to priority and cap nr_deferred to
> twi
Hi Jens,
There is a new clang warning added in the development branch,
-Walign-mismatch, which shows an instance in block/blk-mq.c:
block/blk-mq.c:630:39: warning: passing 8-byte aligned argument to
32-byte aligned parameter 2 of 'smp_call_function_single_async' may
result in an unaligned pointer
On Mon, Feb 22, 2021 at 09:44:40AM -0600, Eric W. Biederman wrote:
> Alexey Gladkov writes:
>
> > If only the dynamic part of procfs is mounted (subset=pid), then there is no
> > need to check if procfs is fully visible to the user in the new user
> > namespace.
>
>
> A couple of things.
>
> 1
Signed-off-by: Alexey Gladkov
---
Documentation/filesystems/proc.rst | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/filesystems/proc.rst
b/Documentation/filesystems/proc.rst
index 3daf0e7d1071..9d2985a7aad6 100644
--- a/Documentation/filesystems/proc.rst
+++ b/Documentation/
Allow to mount of procfs with subset=pid option even if the entire
procfs is not fully accessible to the user.
Signed-off-by: Alexey Gladkov
---
fs/namespace.c | 27 ---
fs/proc/root.c | 17 ++---
include/linux/fs.h | 1 +
3 files changed, 27 insertio
There is no way to remount procfs mountpoint with subset=pid option
without it. This is done in order not to make visible what was hidden
since some checks occur during mount.
This patch makes this limitation explicit and demonstrates the error.
Signed-off-by: Alexey Gladkov
---
fs/proc/root.c
Signed-off-by: Alexey Gladkov
---
Documentation/filesystems/proc.rst | 16
1 file changed, 16 insertions(+)
diff --git a/Documentation/filesystems/proc.rst
b/Documentation/filesystems/proc.rst
index 2fa69f710e2a..3daf0e7d1071 100644
--- a/Documentation/filesystems/proc.rst
+++
Cache the mounters credentials and make access to the net directories
contingent of the permissions of the mounter of proc.
Show /proc/self/net only if mounter has CAP_NET_ADMIN and if proc is
mounted with subset=pid option.
Signed-off-by: Alexey Gladkov
---
fs/proc/proc_net.c | 8
If only the dynamic part of procfs is mounted (subset=pid), then there is no
need to check if procfs is fully visible to the user in the new user namespace.
Changelog
-
v4:
* Set SB_I_DYNAMIC only if pidonly is set.
* Add an error message if subset=pid is canceled during remount.
v3:
* Ad
From: Mickaël Salaün
Being able to easily change root directories enable to ease some
development workflow and can be used as a tool to strengthen
unprivileged security sandboxes. chroot(2) is not an access-control
mechanism per se, but it can be used to limit the absolute view of the
filesystem
Hi,
This second patch replaces the custom is_path_beneath() with the
existing path_is_under().
The chroot system call is currently limited to be used by processes with
the CAP_SYS_CHROOT capability. This protects against malicious
procesess willing to trick SUID-like binaries. The following pat
The bi_tcxo clock source for SC7280 requires a div 4 to derive 19.2MHz
from the xo_board. Thus update the same.
Fixes: fff2b9a65162 ("clk: qcom: rpmh: Add support for RPMH clocks on SC7280")
Signed-off-by: Taniya Das
---
drivers/clk/qcom/clk-rpmh.c | 7 +--
1 file changed, 5 insertions(+), 2
> Make it patch series? I can split it to 2/3 patches.
I don't think that will be needed. The helpers should be pretty
obvious.
Andrew
On 10/03/2021 18:22, Casey Schaufler wrote:
> On 3/10/2021 8:09 AM, Mickaël Salaün wrote:
>> Hi,
>>
>> The chroot system call is currently limited to be used by processes with
>> the CAP_SYS_CHROOT capability. This protects against malicious
>> procesess willing to trick SUID-like binaries. The
On Tue, Mar 9, 2021 at 10:59 PM Christoph Lameter wrote:
>
> >
> > it really looks like this might well have been very intentional
> > indeed. Or at least very beneficial for _some_ loads.
>
> Yes the thought was that adding an additional page when contention is
> there on the page objects will in
On Wed, Mar 10, 2021 at 11:50:13AM -0600, Pierre-Louis Bossart wrote:
> On 3/10/21 10:52 AM, Mark Brown wrote:
> > Build time dependencies aren't going to help anything, arm64 (and to my
> > understanding some future x86 systems, LynxPoint IIRC) supports both DT
> > and ACPI and so you have kernel
On Wed, Mar 10, 2021, Peter Zijlstra wrote:
> On Tue, Mar 09, 2021 at 09:10:19AM -0800, Sean Christopherson wrote:
>
> > @@ -2024,9 +2021,6 @@ static int __init init_hw_perf_events(void)
> > if (!x86_pmu.read)
> > x86_pmu.read = _x86_pmu_read;
> >
> > - if (!x86_pmu.guest_get_m
On Wed, Mar 10, 2021 at 10:53:29AM -0700, Alex Williamson wrote:
> diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio/pci/vfio_pci.c
> index 65e7e6b44578..ae723808e08b 100644
> +++ b/drivers/vfio/pci/vfio_pci.c
> @@ -1573,6 +1573,11 @@ static int __vfio_pci_add_vma(struct vfio_pci_device
> *
Hi Sameer, Hi Mark,
Am 2021-03-10 15:50, schrieb Sameer Pujar:
On 3/10/2021 4:00 AM, Michael Walle wrote:
Am 2021-03-09 17:27, schrieb Sameer Pujar:
On 3/9/2021 8:11 PM, Michael Walle wrote:
If "clocks = <&xxx>" is specified from the CPU or Codec component
device node, the clock is not gettin
On 10/03/2021 17:56, Eric W. Biederman wrote:
> Mickaël Salaün writes:
>
>> From: Mickaël Salaün
>>
>> Being able to easily change root directories enable to ease some
>> development workflow and can be used as a tool to strengthen
>> unprivileged security sandboxes. chroot(2) is not an acces
The pull request you sent on Wed, 10 Mar 2021 13:45:22 +0100:
> g...@gitolite.kernel.org:pub/scm/linux/kernel/git/brauner/linux
> tags/for-linus-2021-03-10
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/d3110f256d126b44d34c1f662310cd295877c447
Thank you!
--
Deet-do
The pull request you sent on Tue, 9 Mar 2021 20:49:00 -0600:
> git://git.samba.org/sfrench/cifs-2.6.git tags/5.12-rc2-smb3
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/d0df9aabefda4d0a64730087f939f53f91e29ee6
Thank you!
--
Deet-doot-dot, I am a bot.
https://korg.d
On Wed, Mar 10, 2021 at 09:51:48AM -0800, Sean Christopherson wrote:
> On Wed, Mar 10, 2021, Martin Radev wrote:
> > On Wed, Mar 10, 2021 at 08:08:37AM -0800, Sean Christopherson wrote:
> > > On Wed, Mar 10, 2021, Joerg Roedel wrote:
> > > > + /*
> > > > +* Sanity check CPUID results
m/hugetlbpage.c
> > > index 6e3bcffe2837..58987a98e179 100644
> > > --- a/arch/arm64/mm/hugetlbpage.c
> > > +++ b/arch/arm64/mm/hugetlbpage.c
> > > @@ -284,8 +284,7 @@ pte_t *huge_pte_alloc(struct mm_struct *mm, struct
> > > vm_area_struct *vma,
> > >
Hi Wesley,
On Wed, Mar 10, 2021 at 03:02:10AM -0800, Wesley Cheng wrote:
> In the situations where the DWC3 gadget stops active transfers, once
> calling the dwc3_gadget_giveback(), there is a chance where a function
> driver can queue a new USB request in between the time where the dwc3
> lock ha
On Wed, Mar 10, 2021 at 09:06:48AM -0800, Minchan Kim wrote:
> On Wed, Mar 10, 2021 at 05:46:56PM +0100, Michal Hocko wrote:
> > On Wed 10-03-21 08:05:36, Minchan Kim wrote:
> > > On Wed, Mar 10, 2021 at 02:07:05PM +0100, Michal Hocko wrote:
> > [...]
> > > > The is a lot of churn indeed. Have you
On Wed, Mar 10, 2021 at 6:51 PM Sebastian Andrzej Siewior
wrote:
>
> I assumed you are going to apply it but I don't see it in -next as of
> today. Is there anything I need to do?
Ah, since you said you were posting a patch, I kept this in the
waiting list. I will apply the latest one then.
Chee
Hi Rob,
> El 10 mar 2021, a las 18:45, Rob Herring escribió:
>
> On Wed, Mar 10, 2021 at 5:55 AM Álvaro Fernández Rojas
> wrote:
>>
>> Add binding documentation for the pincontrol core found in BCM6328 SoCs.
>>
>> Signed-off-by: Jonas Gorski
>> Co-developed-by: Jonas Gorski
>> Signed-off-by
On Mar 10, 2021, at 09:43, Borislav Petkov wrote:
>
> No, build the docs by doing
>
> make htmldocs
>
> and look at the result.
>
> Btw, you should always look at the result before sending it out.
Ah, now I get that. Sorry for my ignorance. I will fix and make sure not
missing this check.
Th
On Tue, Mar 09, 2021 at 10:30:37AM +0100, Borislav Petkov wrote:
> On Tue, Mar 09, 2021 at 02:38:49PM +1300, Kai Huang wrote:
> > This series adds KVM SGX virtualization support. The first 14 patches
> > starting
> > with x86/sgx or x86/cpu.. are necessary changes to x86 and SGX core/driver
> > t
Currently, debugging CMA allocation failures is quite limited.
The most commong source of these failures seems to be page
migration which doesn't provide any useful information on the
reason of the failure by itself. alloc_contig_range can report
those failures as it holds a list of migrate-failed
On Wed, Mar 10, 2021 at 11:48:03AM -0600, Alex Elder wrote:
> On 3/10/21 11:36 AM, Naresh Kamboju wrote:
> > On Wed, 10 Mar 2021 at 18:56, wrote:
> > >
> > > From: Greg Kroah-Hartman
> > >
> > > From: Alex Elder
> > >
> > > [ Upstream commit f849afcc8c3b27d7b50827e95b60557f24184df0 ]
>
> Ups
On 10.03.21 18:52, Mike Rapoport wrote:
Any comments on these?
Take my
Acked-by: David Hildenbrand
it looks sane to me ... but not sure what it's worth in that x86-64 code :)
--
Thanks,
David / dhildenb
When KVM runs in nVHE protected mode, use the host stage 2 to unmap the
hypervisor sections by marking them as owned by the hypervisor itself.
The long-term goal is to ensure the EL2 code can remain robust
regardless of the host's state, so this starts by making sure the host
cannot e.g. write to t
We will soon unmap the .hyp sections from the host stage 2 in Protected
nVHE mode, which obviously works with at least page granularity, so make
sure to align them correctly.
Acked-by: Will Deacon
Signed-off-by: Quentin Perret
---
arch/arm64/kernel/vmlinux.lds.S | 22 +-
1 f
Since the host stage 2 will be identity mapped, and since it will own
most of memory, it would preferable for performance to try and use large
block mappings whenever that is possible. To ease this, introduce a new
helper in the KVM page-table code which allows to search for large
ranges of availab
When KVM runs in protected nVHE mode, make use of a stage 2 page-table
to give the hypervisor some control over the host memory accesses. The
host stage 2 is created lazily using large block mappings if possible,
and will default to page mappings in absence of a better solution.
>From this point o
The host currently writes directly in EL2 per-CPU data sections from
the PMU code when running in nVHE. In preparation for unmapping the EL2
sections from the host stage 2, disable PMU support in protected mode as
we currently do not have a use-case for it.
Acked-by: Will Deacon
Signed-off-by: Qu
We will soon need to check if a Physical Address belongs to a memblock
at EL2, so make sure to sort them so this can be done efficiently.
Acked-by: Will Deacon
Signed-off-by: Quentin Perret
---
arch/arm64/kvm/hyp/reserved_mem.c | 19 +++
1 file changed, 19 insertions(+)
diff --
In order to ease its re-use in other code paths, refactor
stage2_map_set_prot_attr() to not depend on a stage2_map_data struct.
No functional change intended.
Signed-off-by: Quentin Perret
---
arch/arm64/kvm/hyp/pgtable.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git
Extend the memory pool allocated for the hypervisor to include enough
pages to map all of memory at page granularity for the host stage 2.
While at it, also reserve some memory for device mappings.
Acked-by: Will Deacon
Signed-off-by: Quentin Perret
---
arch/arm64/kvm/hyp/include/nvhe/mm.h | 27
As the host stage 2 will be identity mapped, all the .hyp memory regions
and/or memory pages donated to protected guestis will have to marked
invalid in the host stage 2 page-table. At the same time, the hypervisor
will need a way to track the ownership of each physical page to ensure
memory sharin
The current stage2 page-table allocator uses a memcache to get
pre-allocated pages when it needs any. To allow re-using this code at
EL2 which uses a concept of memory pools, make the memcache argument of
kvm_pgtable_stage2_map() anonymous, and let the mm_ops zalloc_page()
callbacks use it the way
kvm_set_invalid_pte() currently only clears bit 0 from a PTE because
stage2_map_walk_table_post() needs to be able to follow the anchor. In
preparation for re-using bits 63-02 from invalid PTEs, make sure to zero
it entirely by ensuring to cache the anchor's child upfront.
Suggested-by: Will Deaco
Refactor __load_guest_stage2() to introduce __load_stage2() which will
be re-used when loading the host stage 2.
Acked-by: Will Deacon
Signed-off-by: Quentin Perret
---
arch/arm64/include/asm/kvm_mmu.h | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/inclu
Refactor __populate_fault_info() to introduce __get_fault_info() which
will be used once the host is wrapped in a stage 2.
Acked-by: Will Deacon
Signed-off-by: Quentin Perret
---
arch/arm64/kvm/hyp/include/hyp/switch.h | 34 +
1 file changed, 18 insertions(+), 16 deletio
Move the registers relevant to host stage 2 enablement to
kvm_nvhe_init_params to prepare the ground for enabling it in later
patches.
Acked-by: Will Deacon
Signed-off-by: Quentin Perret
---
arch/arm64/include/asm/kvm_asm.h | 3 +++
arch/arm64/kernel/asm-offsets.c| 3 +++
arch/arm64/kvm
In order to re-use some of the stage 2 setup code at EL2, factor parts
of kvm_arm_setup_stage2() out into separate functions.
No functional change intended.
Acked-by: Will Deacon
Signed-off-by: Quentin Perret
---
arch/arm64/include/asm/kvm_pgtable.h | 26 +
arch/arm64/kvm/hyp/p
On Wed, Mar 10, 2021 at 11:08:10PM +0530, Naresh Kamboju wrote:
> On Wed, 10 Mar 2021 at 18:54, wrote:
> >
> > From: Greg Kroah-Hartman
> >
> > This is the start of the stable review cycle for the 5.10.23 release.
> > There are 49 patches in this series, all will be posted as a response
> > to th
In order to make use of the stage 2 pgtable code for the host stage 2,
change kvm_s2_mmu to use a kvm_arch pointer in lieu of the kvm pointer,
as the host will have the former but not the latter.
Acked-by: Will Deacon
Signed-off-by: Quentin Perret
---
arch/arm64/include/asm/kvm_host.h | 2 +-
a
In order to make use of the stage 2 pgtable code for the host stage 2,
use struct kvm_arch in lieu of struct kvm as the host will have the
former but not the latter.
Acked-by: Will Deacon
Signed-off-by: Quentin Perret
---
arch/arm64/include/asm/kvm_pgtable.h | 5 +++--
arch/arm64/kvm/hyp/pgtabl
On 10.03.21 18:49, Oscar Salvador wrote:
On Tue, Mar 09, 2021 at 06:52:38PM +0100, David Hildenbrand wrote:
-#define PAGE_INUSE 0xFD
+#ifdef CONFIG_SPARSEMEM_VMEMMAP
+#define PAGE_UNUSED 0xFD
+
+/* Returns true if the PMD is completely unused and thus it can be freed */
+static bool __meminit vm
Previous commits have introduced infrastructure to enable the EL2 code
to manage its own stage 1 mappings. However, this was preliminary work,
and none of it is currently in use.
Put all of this together by elevating the mapping creation at EL2 when
memory protection is enabled. In this case, the
We will soon need to turn the EL2 stage 1 MMU on and off in nVHE
protected mode, so refactor the set_sctlr_el1 macro to make it usable
for that purpose.
Signed-off-by: Quentin Perret
---
arch/arm64/include/asm/assembler.h | 14 +++---
1 file changed, 11 insertions(+), 3 deletions(-)
dif
When memory protection is enabled, the hyp code will require a basic
form of memory management in order to allocate and free memory pages at
EL2. This is needed for various use-cases, including the creation of hyp
mappings or the allocation of stage 2 page tables.
To address these use-case, introd
When memory protection is enabled, the EL2 code needs the ability to
create and manage its own page-table. To do so, introduce a new set of
hypercalls to bootstrap a memory management system at EL2.
This leads to the following boot flow in nVHE Protected mode:
1. the host allocates memory for th
In order to re-map the guest vectors at EL2 when pKVM is enabled,
refactor __kvm_vector_slot2idx() and kvm_init_vector_slot() to move all
the address calculation logic in a static inline function.
Acked-by: Will Deacon
Signed-off-by: Quentin Perret
---
arch/arm64/include/asm/kvm_mmu.h | 8 +
In order to use the kernel list library at EL2, introduce stubs for the
CONFIG_DEBUG_LIST out-of-lines calls.
Signed-off-by: Quentin Perret
---
arch/arm64/kvm/hyp/nvhe/Makefile | 2 +-
arch/arm64/kvm/hyp/nvhe/stub.c | 22 ++
2 files changed, 23 insertions(+), 1 deletion(-)
Introduce the infrastructure in KVM enabling to copy CPU feature
registers into EL2-owned data-structures, to allow reading sanitised
values directly at EL2 in nVHE.
Given that only a subset of these features are being read by the
hypervisor, the ones that need to be copied are to be listed under
With nVHE, the host currently creates all stage 1 hypervisor mappings at
EL1 during boot, installs them at EL2, and extends them as required
(e.g. when creating a new VM). But in a world where the host is no
longer trusted, it cannot have full control over the code mapped in the
hypervisor.
In pre
kvm_call_hyp() has some logic to issue a function call or a hypercall
depending on the EL at which the kernel is running. However, all the
code compiled under __KVM_NVHE_HYPERVISOR__ is guaranteed to only run
at EL2 which allows us to simplify.
Add ifdefery to kvm_host.h to simplify kvm_call_hyp()
In order to allow the usage of code shared by the host and the hyp in
static inline library functions, allow the usage of kvm_nvhe_sym() at
EL2 by defaulting to the raw symbol name.
Acked-by: Will Deacon
Signed-off-by: Quentin Perret
---
arch/arm64/include/asm/hyp_image.h | 4
1 file chang
Currently, the hyp code cannot make full use of a bss, as the kernel
section is mapped read-only.
While this mapping could simply be changed to read-write, it would
intermingle even more the hyp and kernel state than they currently are.
Instead, introduce a __hyp_bss section, that uses reserved pa
In preparation for enabling the creation of page-tables at EL2, factor
all memory allocation out of the page-table code, hence making it
re-usable with any compatible memory allocator.
No functional changes intended.
Signed-off-by: Quentin Perret
---
arch/arm64/include/asm/kvm_pgtable.h | 41 ++
From: Will Deacon
Pull clear_page(), copy_page(), memcpy() and memset() into the nVHE hyp
code and ensure that we always execute the '__pi_' entry point on the
offchance that it changes in future.
[ qperret: Commit title nits and added linker script alias ]
Signed-off-by: Will Deacon
Signed-of
Currently, the KVM page-table allocator uses a mix of put_page() and
free_page() calls depending on the context even though page-allocation
is always achieved using variants of __get_free_page().
Make the code consistent by using put_page() throughout, and reduce the
memory management API surface
Move the initialization of kvm_nvhe_init_params in a dedicated function
that is run early, and only once during KVM init, rather than every time
the KVM vectors are set and reset.
This also opens the opportunity for the hypervisor to change the init
structs during boot, hence simplifying the repla
From: Will Deacon
We will soon need to synchronise multiple CPUs in the hyp text at EL2.
The qspinlock-based locking used by the host is overkill for this purpose
and relies on the kernel's "percpu" implementation for the MCS nodes.
Implement a simple ticket locking scheme based heavily on the c
From: Will Deacon
clear_page() and copy_page() are suitable for use outside of the kernel
address space, so annotate them as position-independent code.
Signed-off-by: Will Deacon
Signed-off-by: Quentin Perret
---
arch/arm64/lib/clear_page.S | 4 ++--
arch/arm64/lib/copy_page.S | 4 ++--
2 fi
701 - 800 of 1854 matches
Mail list logo