Re: [PATCH v2 1/9] KVM: Pass kvm_init()'s opaque param to additional arch funcs

2020-02-18 Thread Marc Zyngier
On Tue, 18 Feb 2020 15:54:29 -0800 Sean Christopherson wrote: > Pass @opaque to kvm_arch_hardware_setup() and > kvm_arch_check_processor_compat() to allow architecture specific code to > reference @opaque without having to stash it away in a temporary global > variable. This will enable x86 to s

[PATCH v2 8/9] KVM: VMX: Annotate vmx_x86_ops as __initdata

2020-02-18 Thread Sean Christopherson
Tag vmx_x86_ops with __initdata now the the struct is copied by value to a common x86 instance of kvm_x86_ops as part of kvm_init(). Signed-off-by: Sean Christopherson --- arch/x86/kvm/vmx/vmx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86

[PATCH v2 6/9] KVM: x86: Copy kvm_x86_ops by value to eliminate layer of indirection

2020-02-18 Thread Sean Christopherson
Replace the kvm_x86_ops pointer in common x86 with an instance of the struct to save one memory instance when invoking function. Copy the struct by value to set the ops during kvm_init(). Arbitrarily use kvm_x86_ops.hardware_enable to track whether or not the ops have been initialized, i.e. a ven

[PATCH v2 7/9] KVM: x86: Drop __exit from kvm_x86_ops' hardware_unsetup()

2020-02-18 Thread Sean Christopherson
Remove the __exit annotation from VMX/SVM's hardware_unsetup(), the hook can be reached during kvm_init() by way of kvm_arch_hardware_unsetup() if failure occurs at various points during initialization. Note, there is no known functional issue with the __exit annotation, the above is merely justif

[PATCH v2 5/9] KVM: x86: Set kvm_x86_ops only after ->hardware_setup() completes

2020-02-18 Thread Sean Christopherson
Set kvm_x86_ops with the vendor's ops only after ->hardware_setup() completes to "prevent" using kvm_x86_ops before they are ready, i.e. to generate a null pointer fault instead of silently consuming unconfigured state. An alternative implementation would be to have ->hardware_setup() return the v

[PATCH v2 4/9] KVM: VMX: Configure runtime hooks using vmx_x86_ops

2020-02-18 Thread Sean Christopherson
Configure VMX's runtime hooks by modifying vmx_x86_ops directly instead of using on the global kvm_x86_ops. This sets the stage for waiting until after ->hardware_setup() to set kvm_x86_ops with the vendor's implementation. Signed-off-by: Sean Christopherson --- arch/x86/kvm/vmx/nested.c | 15 +

[PATCH v2 2/9] KVM: x86: Move init-only kvm_x86_ops to separate struct

2020-02-18 Thread Sean Christopherson
Move the kvm_x86_ops functions that are used only within the scope of kvm_init() into a separate struct, kvm_x86_init_ops. In addition to identifying the init-only functions without restorting to code comments, this also sets the stage for waiting until after ->hardware_setup() to set kvm_x86_ops.

[PATCH v2 9/9] KVM: SVM: Annotate svm_x86_ops as __initdata

2020-02-18 Thread Sean Christopherson
Tag svm_x86_ops with __initdata now the the struct is copied by value to a common x86 instance of kvm_x86_ops as part of kvm_init(). Signed-off-by: Sean Christopherson --- arch/x86/kvm/svm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm

[PATCH v2 0/9] KVM: Move x86 init ops to separate struct

2020-02-18 Thread Sean Christopherson
The non-x86 part of this series is wholly contained in patch 01. Compared to other recent kvm-wide changes, this one is very straightforward (famous last words). Like a few other architectures, e.g. PPC, x86 uses a set of global hooks to call back into vendor code on demand. A handlful of the x8

[PATCH v2 3/9] KVM: VMX: Move hardware_setup() definition below vmx_x86_ops

2020-02-18 Thread Sean Christopherson
Move VMX's hardware_setup() below its vmx_x86_ops definition so that a future patch can refactor hardware_setup() to modify vmx_x86_ops directly instead of indirectly modifying the ops via the global kvm_x86_ops. No functional change intended. Signed-off-by: Sean Christopherson --- arch/x86/kvm

[PATCH v2 1/9] KVM: Pass kvm_init()'s opaque param to additional arch funcs

2020-02-18 Thread Sean Christopherson
Pass @opaque to kvm_arch_hardware_setup() and kvm_arch_check_processor_compat() to allow architecture specific code to reference @opaque without having to stash it away in a temporary global variable. This will enable x86 to separate its vendor specific callback ops, which are passed via @opaque,

[PATCH v6 21/22] KVM: x86/mmu: Use ranged-based TLB flush for dirty log memslot flush

2020-02-18 Thread Sean Christopherson
Use the with_address() variant to when performing a TLB flush for a specific memslot via kvm_arch_flush_remote_tlbs_memslot(), i.e. when flushing after clearing dirty bits during KVM_{GET,CLEAR}_DIRTY_LOG. This aligns all dirty log memslot-specific TLB flushes to use the with_address() variant and

[PATCH v6 15/22] KVM: Provide common implementation for generic dirty log functions

2020-02-18 Thread Sean Christopherson
Move the implementations of KVM_GET_DIRTY_LOG and KVM_CLEAR_DIRTY_LOG for CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT into common KVM code. The arch specific implemenations are extremely similar, differing only in whether the dirty log needs to be sync'd from hardware (x86) and how the TLBs are flushe

[PATCH v6 18/22] KVM: Dynamically size memslot array based on number of used slots

2020-02-18 Thread Sean Christopherson
Now that the memslot logic doesn't assume memslots are always non-NULL, dynamically size the array of memslots instead of unconditionally allocating memory for the maximum number of memslots. Note, because a to-be-deleted memslot must first be invalidated, the array size cannot be immediately redu

[PATCH v6 14/22] KVM: Clean up local variable usage in __kvm_set_memory_region()

2020-02-18 Thread Sean Christopherson
Clean up __kvm_set_memory_region() to achieve several goals: - Remove local variables that serve no real purpose - Improve the readability of the code - Better show the relationship between the 'old' and 'new' memslot - Prepare for dynamically sizing memslots - Document subtle gotchas (v

[PATCH v6 19/22] KVM: selftests: Add test for KVM_SET_USER_MEMORY_REGION

2020-02-18 Thread Sean Christopherson
Add a KVM selftest to test moving the base gfn of a userspace memory region. Although the basic concept of moving memory regions is not x86 specific, the assumptions regarding large pages and MMIO shenanigans used to verify the correctness make this x86_64 only for the time being. Reviewed-by: Pe

[PATCH v6 17/22] KVM: Terminate memslot walks via used_slots

2020-02-18 Thread Sean Christopherson
Refactor memslot handling to treat the number of used slots as the de facto size of the memslot array, e.g. return NULL from id_to_memslot() when an invalid index is provided instead of relying on npages==0 to detect an invalid memslot. Rework the sorting and walking of memslots in advance of dyna

[PATCH v6 13/22] KVM: Simplify kvm_free_memslot() and all its descendents

2020-02-18 Thread Sean Christopherson
Now that all callers of kvm_free_memslot() pass NULL for @dont, remove the param from the top-level routine and all arch's implementations. No functional change intended. Tested-by: Christoffer Dall Reviewed-by: Peter Xu Signed-off-by: Sean Christopherson --- arch/mips/include/asm/kvm_host.h

[PATCH v6 20/22] KVM: x86/mmu: Move kvm_arch_flush_remote_tlbs_memslot() to mmu.c

2020-02-18 Thread Sean Christopherson
Move kvm_arch_flush_remote_tlbs_memslot() from x86.c to mmu.c in preparation for calling kvm_flush_remote_tlbs_with_address() instead of kvm_flush_remote_tlbs(). The with_address() variant is statically defined in mmu.c, arguably kvm_arch_flush_remote_tlbs_memslot() belongs in mmu.c anyways, and d

[PATCH v6 06/22] KVM: Drop kvm_arch_create_memslot()

2020-02-18 Thread Sean Christopherson
Remove kvm_arch_create_memslot() now that all arch implementations are effectively nops. Removing kvm_arch_create_memslot() eliminates the possibility for arch specific code to allocate memory prior to setting a memslot, which sets the stage for simplifying kvm_free_memslot(). Cc: Janosch Frank

[PATCH v6 12/22] KVM: Move memslot deletion to helper function

2020-02-18 Thread Sean Christopherson
Move memslot deletion into its own routine so that the success path for other memslot updates does not need to use kvm_free_memslot(), i.e. can explicitly destroy the dirty bitmap when necessary. This paves the way for dropping @dont from kvm_free_memslot(), i.e. all callers now pass NULL for @don

[PATCH v6 22/22] KVM: x86/mmu: Consolidate open coded variants of memslot TLB flushes

2020-02-18 Thread Sean Christopherson
Replace open coded instances of kvm_arch_flush_remote_tlbs_memslot()'s functionality with calls to the aforementioned function. Update the comment in kvm_arch_flush_remote_tlbs_memslot() to elaborate on how it is used and why it asserts that slots_lock is held. No functional change intended. Sig

[PATCH v6 09/22] KVM: Move setting of memslot into helper routine

2020-02-18 Thread Sean Christopherson
Split out the core functionality of setting a memslot into a separate helper in preparation for moving memslot deletion into its own routine. Tested-by: Christoffer Dall Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Peter Xu Signed-off-by: Sean Christopherson --- virt/kvm/kvm_main.c | 106

[PATCH v6 16/22] KVM: Ensure validity of memslot with respect to kvm_get_dirty_log()

2020-02-18 Thread Sean Christopherson
Rework kvm_get_dirty_log() so that it "returns" the associated memslot on success. A future patch will rework memslot handling such that id_to_memslot() can return NULL, returning the memslot makes it more obvious that the validity of the memslot has been verified, i.e. precludes the need to add v

[PATCH v6 11/22] KVM: x86: Free arrays for old memslot when moving memslot's base gfn

2020-02-18 Thread Sean Christopherson
Explicitly free the metadata arrays (stored in slot->arch) in the old memslot structure when moving the memslot's base gfn is committed. This eliminates x86's dependency on kvm_free_memslot() being called when a memlsot move is committed, and paves the way for removing the funky code in kvm_free_m

[PATCH v6 10/22] KVM: Drop "const" attribute from old memslot in commit_memory_region()

2020-02-18 Thread Sean Christopherson
Drop the "const" attribute from @old in kvm_arch_commit_memory_region() to allow arch specific code to free arch specific resources in the old memslot without having to cast away the attribute. Freeing resources in kvm_arch_commit_memory_region() paves the way for simplifying kvm_free_memslot() by

[PATCH v6 00/22] KVM: Dynamically size memslot arrays

2020-02-18 Thread Sean Christopherson
The end goal of this series is to dynamically size the memslot array so that KVM allocates memory based on the number of memslots in use, as opposed to unconditionally allocating memory for the maximum number of memslots. On x86, each memslot consumes 88 bytes, and so with 2 address spaces of 512

[PATCH v6 05/22] KVM: x86: Allocate memslot resources during prepare_memory_region()

2020-02-18 Thread Sean Christopherson
Allocate the various metadata structures associated with a new memslot during kvm_arch_prepare_memory_region(), which paves the way for removing kvm_arch_create_memslot() altogether. Moving x86's memory allocation only changes the order of kernel memory allocations between x86 and common KVM code.

[PATCH v6 03/22] KVM: Don't free new memslot if allocation of said memslot fails

2020-02-18 Thread Sean Christopherson
The two implementations of kvm_arch_create_memslot() in x86 and PPC are both good citizens and free up all local resources if creation fails. Return immediately (via a superfluous goto) instead of calling kvm_free_memslot(). Note, the call to kvm_free_memslot() is effectively an expensive nop in t

[PATCH v6 08/22] KVM: Refactor error handling for setting memory region

2020-02-18 Thread Sean Christopherson
Replace a big pile o' gotos with returns to make it more obvious what error code is being returned, and to prepare for refactoring the functional, i.e. post-checks, portion of __kvm_set_memory_region(). Reviewed-by: Janosch Frank Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Peter Xu Signed-

[PATCH v6 04/22] KVM: PPC: Move memslot memory allocation into prepare_memory_region()

2020-02-18 Thread Sean Christopherson
Allocate the rmap array during kvm_arch_prepare_memory_region() to pave the way for removing kvm_arch_create_memslot() altogether. Moving PPC's memory allocation only changes the order of kernel memory allocations between PPC and common KVM code. No functional change intended. Acked-by: Paul Mac

[PATCH v6 02/22] KVM: Reinstall old memslots if arch preparation fails

2020-02-18 Thread Sean Christopherson
Reinstall the old memslots if preparing the new memory region fails after invalidating a to-be-{re}moved memslot. Remove the superfluous 'old_memslots' variable so that it's somewhat clear that the error handling path needs to free the unused memslots, not simply the 'old' memslots. Fixes: bc6678

[PATCH v6 01/22] KVM: x86: Allocate new rmap and large page tracking when moving memslot

2020-02-18 Thread Sean Christopherson
Reallocate a rmap array and recalcuate large page compatibility when moving an existing memslot to correctly handle the alignment properties of the new memslot. The number of rmap entries required at each level is dependent on the alignment of the memslot's base gfn with respect to that level, e.g

[PATCH v6 07/22] KVM: Explicitly free allocated-but-unused dirty bitmap

2020-02-18 Thread Sean Christopherson
Explicitly free an allocated-but-unused dirty bitmap instead of relying on kvm_free_memslot() if an error occurs in __kvm_set_memory_region(). There is no longer a need to abuse kvm_free_memslot() to free arch specific resources as arch specific code is now called only after the common flow is guar

[PATCH 04/18] arm64: entry: Annotate ret_from_fork as code

2020-02-18 Thread Mark Brown
In an effort to clarify and simplify the annotation of assembly functions new macros have been introduced. These replace ENTRY and ENDPROC with two different annotations for normal functions and those with unusual calling conventions. ret_from_fork is not a normal C function and should therefore b

[PATCH 02/18] arm64: crypto: Modernize names for AES function macros

2020-02-18 Thread Mark Brown
Now that the rest of the code has been converted to the modern START/END macros the AES_ENTRY() and AES_ENDPROC() macros look out of place and like they need updating. Rename them to AES_FUNC_START() and AES_FUNC_END() to line up with the modern style assembly macros. Signed-off-by: Mark Brown Re

[PATCH 08/18] arm64: ftrace: Modernise annotation of return_to_handler

2020-02-18 Thread Mark Brown
In an effort to clarify and simplify the annotation of assembly functions new macros have been introduced. These replace ENTRY and ENDPROC with two different annotations for normal functions and those with unusual calling conventions. return_to_handler does entertaining things with LR so doesn't f

[PATCH 03/18] arm64: entry: Annotate vector table and handlers as code

2020-02-18 Thread Mark Brown
In an effort to clarify and simplify the annotation of assembly functions new macros have been introduced. These replace ENTRY and ENDPROC with two different annotations for normal functions and those with unusual calling conventions. The vector table and handlers aren't normal C style code so shou

[PATCH 11/18] arm64: kernel: Convert to modern annotations for assembly data

2020-02-18 Thread Mark Brown
In an effort to clarify and simplify the annotation of assembly functions in the kernel new macros have been introduced. These include specific annotations for the start and end of data, update symbols for data to use these. Signed-off-by: Mark Brown --- arch/arm64/kernel/entry.S | 7 --- ar

[PATCH 15/18] arm64: kvm: Modernize __smccc_workaround_1_smc_start annotations

2020-02-18 Thread Mark Brown
In an effort to clarify and simplify the annotation of assembly functions in the kernel new macros have been introduced. These replace ENTRY and ENDPROC with separate annotations for standard C callable functions, data and code with different calling conventions. Using these for __smccc_workaround

[PATCH 10/18] arm64: head: Annotate stext and preserve_boot_args as code

2020-02-18 Thread Mark Brown
In an effort to clarify and simplify the annotation of assembly functions new macros have been introduced. These replace ENTRY and ENDPROC with two different annotations for normal functions and those with unusual calling conventions. Neither stext nor preserve_boot_args is called with the usual A

[PATCH 14/18] arm64: kvm: Modernize annotation for __bp_harden_hyp_vecs

2020-02-18 Thread Mark Brown
We have recently introduced new macros for annotating assembly symbols for things that aren't C functions, SYM_CODE_START() and SYM_CODE_END(), in an effort to clarify and simplify our annotations of assembly files. Using these for __bp_harden_hyp_vecs is more involved than for most symbols as thi

[PATCH 17/18] arm64: vdso: Convert to modern assembler annotations

2020-02-18 Thread Mark Brown
In an effort to clarify and simplify the annotation of assembly functions new macros have been introduced. These replace ENTRY and ENDPROC with two different annotations for normal functions and those with unusual calling conventions. Convert the assembly function in the arm64 VDSO to the new macro

[PATCH 06/18] arm64: entry-ftrace.S: Convert to modern annotations for assembly functions

2020-02-18 Thread Mark Brown
In an effort to clarify and simplify the annotation of assembly functions in the kernel new macros have been introduced. These replace ENTRY and ENDPROC and also add a new annotation for static functions which previously had no ENTRY equivalent. Update the annotations in the core kernel code to the

[PATCH 13/18] arm64: kvm: Annotate assembly using modern annoations

2020-02-18 Thread Mark Brown
In an effort to clarify and simplify the annotation of assembly functions in the kernel new macros have been introduced. These replace ENTRY and ENDPROC with separate annotations for standard C callable functions, data and code with different calling conventions. Update the more straightforward an

[PATCH 12/18] arm64: kernel: Convert to modern annotations for assembly functions

2020-02-18 Thread Mark Brown
In an effort to clarify and simplify the annotation of assembly functions in the kernel new macros have been introduced. These replace ENTRY and ENDPROC and also add a new annotation for static functions which previously had no ENTRY equivalent. Update the annotations in the core kernel code to the

[PATCH 16/18] arm64: sdei: Annotate SDEI entry points using new style annotations

2020-02-18 Thread Mark Brown
In an effort to clarify and simplify the annotation of assembly functions new macros have been introduced. These replace ENTRY and ENDPROC with two different annotations for normal functions and those with unusual calling conventions. The SDEI entry points are currently annotated as normal functio

[PATCH 18/18] arm64: vdso32: Convert to modern assembler annotations

2020-02-18 Thread Mark Brown
In an effort to clarify and simplify the annotation of assembly functions new macros have been introduced. These replace ENTRY and ENDPROC with two different annotations for normal functions and those with unusual calling conventions. Use these for the compat VDSO, allowing us to drop the custom AR

[PATCH 09/18] arm64: head.S: Convert to modern annotations for assembly functions

2020-02-18 Thread Mark Brown
In an effort to clarify and simplify the annotation of assembly functions in the kernel new macros have been introduced. These replace ENTRY and ENDPROC and also add a new annotation for static functions which previously had no ENTRY equivalent. Update the annotations in the core kernel code to the

[PATCH 07/18] arm64: ftrace: Correct annotation of ftrace_caller assembly

2020-02-18 Thread Mark Brown
In an effort to clarify and simplify the annotation of assembly functions new macros have been introduced. These replace ENTRY and ENDPROC with two different annotations for normal functions and those with unusual calling conventions. The patchable function entry versions of ftrace_*_caller don't

[PATCH 00/18] arm64: Modernize assembly annotations

2020-02-18 Thread Mark Brown
In an effort to clarify and simplify the annotation of assembly functions in the kernel new macros have been introduced. These replace ENTRY and ENDPROC and also add a new annotation for static functions which previously had no ENTRY equivalent. This series collects together all the currently pend

[PATCH 05/18] arm64: entry: Additional annotation conversions for entry.S

2020-02-18 Thread Mark Brown
In an effort to clarify and simplify the annotation of assembly functions in the kernel new macros have been introduced. These replace ENTRY and ENDPROC with separate annotations for standard C callable functions, data and code with different calling conventions. Update the remaining annotations i

[PATCH 01/18] arm64: crypto: Modernize some extra assembly annotations

2020-02-18 Thread Mark Brown
A couple of functions were missed in the modernisation of assembly macros, update them too. Signed-off-by: Mark Brown Reviewed-by: Ard Biesheuvel --- arch/arm64/crypto/ghash-ce-core.S | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/arm64/crypto/ghash-ce

Re: [PATCH 1/5] KVM: arm64: Fix missing RES1 in emulation of DBGBIDR

2020-02-18 Thread James Morse
Hi Robin, On 18/02/2020 18:01, Robin Murphy wrote: > On 18/02/2020 5:43 pm, James Morse wrote: >> On 16/02/2020 18:53, Marc Zyngier wrote: >>> The AArch32 CP14 DBGDIDR has bit 15 set to RES1, which our current >>> emulation doesn't set. Just add the missing bit. >>> diff --git a/arch/arm64/kvm/sy

Re: [PATCH 1/5] KVM: arm64: Fix missing RES1 in emulation of DBGBIDR

2020-02-18 Thread Robin Murphy
On 18/02/2020 5:43 pm, James Morse wrote: Hi Marc, $subject typo: ~/DBGBIDR/DBGDIDR/ On 16/02/2020 18:53, Marc Zyngier wrote: The AArch32 CP14 DBGDIDR has bit 15 set to RES1, which our current emulation doesn't set. Just add the missing bit. So it does. Reviewed-by: James Morse diff --g

Re: [PATCH 4/5] KVM: arm64: Limit the debug architecture to ARMv8.0

2020-02-18 Thread James Morse
Hi Marc, On 16/02/2020 18:53, Marc Zyngier wrote: > Let's not pretend we support anything but ARMv8.0 as far as the > debug architecture is concerned. (what happens for features that disappeared?) For v8.0 the 'OS Double Lock' was mandatory. With v8.2 it became optional, and not-implemented with

Re: [PATCH 3/5] kvm: arm64: Limit PMU version to ARMv8.1

2020-02-18 Thread James Morse
Hi Marc, On 16/02/2020 18:53, Marc Zyngier wrote: > Our PMU code is only implementing the ARMv8.1 features, so let's > stick to this when reporting the feature set to the guest. > diff --git a/arch/arm64/kvm/sys_regs.c b/arch/arm64/kvm/sys_regs.c > index 682fedd7700f..06b2d0dc6c73 100644 > --- a/

Re: [PATCH 1/5] KVM: arm64: Fix missing RES1 in emulation of DBGBIDR

2020-02-18 Thread James Morse
Hi Marc, $subject typo: ~/DBGBIDR/DBGDIDR/ On 16/02/2020 18:53, Marc Zyngier wrote: > The AArch32 CP14 DBGDIDR has bit 15 set to RES1, which our current > emulation doesn't set. Just add the missing bit. So it does. Reviewed-by: James Morse > diff --git a/arch/arm64/kvm/sys_regs.c b/arch/arm

Re: [PATCH v5 15/19] KVM: Provide common implementation for generic dirty log functions

2020-02-18 Thread Sean Christopherson
On Mon, Feb 17, 2020 at 04:39:39PM +0100, Vitaly Kuznetsov wrote: > Sean Christopherson writes: > > Unless it's functionally incorrect (Vitaly?), going with option (2) and > > naming the hook kvm_arch_flush_remote_tlbs_memslot() seems like the obvious > > choice, e.g. the final cleanup gives this

Re: [PATCH v4 08/20] irqchip/gic-v4.1: Plumb get/set_irqchip_state SGI callbacks

2020-02-18 Thread Marc Zyngier
Hi Zenghui, On 2020-02-18 09:27, Marc Zyngier wrote: Hi Zenghui, On 2020-02-18 07:00, Zenghui Yu wrote: Hi Marc, [...] There might be a race on reading the 'vpe->col_idx' against a concurrent vPE schedule (col_idx will be modified in its_vpe_set_affinity)? Will we end up accessing the GI

Re: [PATCH] arm64: kvm: Modernize annotation for __bp_harden_hyp_vecs

2020-02-18 Thread Mark Brown
On Tue, Feb 18, 2020 at 01:14:37PM +, Will Deacon wrote: > On Tue, Feb 18, 2020 at 01:06:19PM +, Mark Brown wrote: > > OK, I can do that for the KVM stuff - I've been actively trying to keep > > the patches separate where there's no dependencies between them as it > > avoids things getting

Re: [PATCH] arm64: kvm: Modernize annotation for __bp_harden_hyp_vecs

2020-02-18 Thread Marc Zyngier
On 2020-02-18 13:29, Mark Brown wrote: On Tue, Feb 18, 2020 at 01:09:53PM +, Will Deacon wrote: On Tue, Feb 18, 2020 at 12:56:52PM +, Marc Zyngier wrote: > I'd really appreciate it if you could send these as a series, instead of > an isolated patch every other day. Same for the non-KV

Re: [PATCH] arm64: kvm: Modernize annotation for __bp_harden_hyp_vecs

2020-02-18 Thread Mark Brown
On Tue, Feb 18, 2020 at 01:09:53PM +, Will Deacon wrote: > On Tue, Feb 18, 2020 at 12:56:52PM +, Marc Zyngier wrote: > > I'd really appreciate it if you could send these as a series, instead of > > an isolated patch every other day. > Same for the non-KVM parts, please :) Ugh, right. As

Re: [PATCH] arm64: kvm: Modernize annotation for __bp_harden_hyp_vecs

2020-02-18 Thread Will Deacon
On Tue, Feb 18, 2020 at 01:06:19PM +, Mark Brown wrote: > On Tue, Feb 18, 2020 at 12:56:52PM +, Marc Zyngier wrote: > > > I'd really appreciate it if you could send these as a series, instead of > > an isolated patch every other day. > > OK, I can do that for the KVM stuff - I've been act

Re: [PATCH] arm64: kvm: Modernize annotation for __bp_harden_hyp_vecs

2020-02-18 Thread Will Deacon
On Tue, Feb 18, 2020 at 12:56:52PM +, Marc Zyngier wrote: > I'd really appreciate it if you could send these as a series, instead of > an isolated patch every other day. Same for the non-KVM parts, please :) I *think* the current ones to track are: [PATCH v2] arm64: sdei: Annotate SDEI entry

Re: [PATCH] arm64: kvm: Modernize annotation for __bp_harden_hyp_vecs

2020-02-18 Thread Mark Brown
On Tue, Feb 18, 2020 at 12:56:52PM +, Marc Zyngier wrote: > I'd really appreciate it if you could send these as a series, instead of > an isolated patch every other day. OK, I can do that for the KVM stuff - I've been actively trying to keep the patches separate where there's no dependencies

Re: [PATCH] arm64: kvm: Modernize annotation for __bp_harden_hyp_vecs

2020-02-18 Thread Marc Zyngier
Mark, I'd really appreciate it if you could send these as a series, instead of an isolated patch every other day. On 2020-02-18 12:44, Mark Brown wrote: We have recently introduced new macros for annotating assembly symbols for things that aren't C functions, SYM_CODE_START() and SYM_CODE_END(

[PATCH] arm64: kvm: Modernize annotation for __bp_harden_hyp_vecs

2020-02-18 Thread Mark Brown
We have recently introduced new macros for annotating assembly symbols for things that aren't C functions, SYM_CODE_START() and SYM_CODE_END(), in an effort to clarify and simplify our annotations of assembly files. Using these for __bp_harden_hyp_vecs is more involved than for most symbols as thi

Re: [PATCH v2 07/13] powerpc: add support for folded p4d page tables

2020-02-18 Thread Mike Rapoport
On Sun, Feb 16, 2020 at 11:41:07AM +0100, Christophe Leroy wrote: > > > Le 16/02/2020 à 09:18, Mike Rapoport a écrit : > > From: Mike Rapoport > > > > Implement primitives necessary for the 4th level folding, add walks of p4d > > level where appropriate and replace 5level-fixup.h with pgtable-n

Re: [PATCH v4 06/20] irqchip/gic-v4.1: Add initial SGI configuration

2020-02-18 Thread Marc Zyngier
Hi Zenghui, On 2020-02-18 07:25, Zenghui Yu wrote: Hi Marc, [...] static void its_sgi_irq_domain_deactivate(struct irq_domain *domain, struct irq_data *d) { - /* Nothing to do */ + struct its_vpe *vpe = irq_data_get_irq_chip_data(d

Re: [PATCH v4 15/20] KVM: arm64: GICv4.1: Add direct injection capability to SGI registers

2020-02-18 Thread Marc Zyngier
On 2020-02-18 08:46, Zenghui Yu wrote: Hi Marc, On 2020/2/14 22:57, Marc Zyngier wrote: Most of the GICv3 emulation code that deals with SGIs now has to be aware of the v4.1 capabilities in order to benefit from it. Add such support, keyed on the interrupt having the hw flag set and being a SG

Re: [PATCH v4 08/20] irqchip/gic-v4.1: Plumb get/set_irqchip_state SGI callbacks

2020-02-18 Thread Marc Zyngier
Hi Zenghui, On 2020-02-18 07:00, Zenghui Yu wrote: Hi Marc, On 2020/2/14 22:57, Marc Zyngier wrote: To implement the get/set_irqchip_state callbacks (limited to the PENDING state), we have to use a particular set of hacks: - Reading the pending state is done by using a pair of new redistribu

Re: [PATCH v4 15/20] KVM: arm64: GICv4.1: Add direct injection capability to SGI registers

2020-02-18 Thread Zenghui Yu
Hi Marc, On 2020/2/14 22:57, Marc Zyngier wrote: Most of the GICv3 emulation code that deals with SGIs now has to be aware of the v4.1 capabilities in order to benefit from it. Add such support, keyed on the interrupt having the hw flag set and being a SGI. Signed-off-by: Marc Zyngier --- v