On Fri, Dec 30, 2022 at 06:54:51PM +0900, Akihiko Odaki wrote:
> The CCSIDR access handler masks the associativity bits according to the
> bit layout for processors without FEAT_CCIDX. KVM also assumes CCSIDR is
> 32-bit where it will be 64-bit if FEAT_CCIDX is enabled. Mask FEAT_CCIDX
> so that th
Hi Akihiko,
On Thu, Dec 22, 2022 at 05:40:15AM +0900, Akihiko Odaki wrote:
> The CCSIDR access handler masks the associativity bits according to the
> bit layout for processors without FEAT_CCIDX. KVM also assumes CCSIDR is
> 32-bit where it will be 64-bit if FEAT_CCIDX is enabled. Mask FEAT_CCIDX
Hi Akihiko,
On Fri, Dec 30, 2022 at 06:54:52PM +0900, Akihiko Odaki wrote:
[...]
> @@ -417,6 +418,9 @@ struct kvm_vcpu_arch {
> u64 last_steal;
> gpa_t base;
> } steal;
> +
> + /* Per-vcpu CCSIDR override or NULL */
> + u32 *ccsidr;
I don't believe we n
On Thu, Dec 22, 2022 at 09:01:15AM +, Marc Zyngier wrote:
> On Wed, 21 Dec 2022 17:46:24 +0000, Oliver Upton
> wrote:
> > - When UFFD is in use, translation faults are reported to userspace as
> >writes when from a RW memslot and reads when from an RO memsl
On Wed, Dec 21, 2022 at 05:53:58PM +, Marc Zyngier wrote:
> On Wed, 21 Dec 2022 16:50:30 +,
> Oliver Upton wrote:
> >
> > On Wed, Dec 21, 2022 at 09:35:06AM +, Marc Zyngier wrote:
> >
> > [...]
> >
> >
On Wed, Dec 21, 2022 at 08:46:06AM -0800, Ricardo Koller wrote:
[...]
> > - return false;
> > + /* Can't introspect TCR_EL1 with pKVM */
> > + if (kvm_vm_is_protected(vcpu->kvm))
> > + return false;
> > +
> > +
e flags
> > > + * to be set.
> > > + */
> > > + switch (kvm_vcpu_trap_get_fault_type(vcpu)) {
> > > + case ESR_ELx_FSC_PERM:
> > > + return true;
> > > + default:
> > > +
return true;
> + default:
> + return false;
> + }
> + }
>
> if (kvm_vcpu_trap_is_iabt(vcpu))
> return false;
> --
> 2.34.1
>
Besides the changelog/comment suggestions, the patch looks good to me.
Reviewed-by: Oliver Upton
--
Thanks,
Oliver
___
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
On Thu, Dec 15, 2022 at 06:12:14PM +, Oliver Upton wrote:
> On Thu, Dec 15, 2022 at 09:33:17AM +, Ryan Roberts wrote:
> > On 15/12/2022 00:52, Oliver Upton wrote:
> > > On Tue, Dec 06, 2022 at 01:59:18PM +, Ryan Roberts wrote:
> > >> (appologies, I'm
On Tue, Dec 20, 2022 at 09:01:19AM +, Ryan Roberts wrote:
> On 20/12/2022 00:06, Oliver Upton wrote:
> > Hi Ryan,
> >
> > On Tue, Dec 06, 2022 at 01:59:28PM +, Ryan Roberts wrote:
> >> In order to support 5 level translation, FEAT_LPA2 introduces the 1-bit
Hi Ryan,
On Tue, Dec 06, 2022 at 01:59:28PM +, Ryan Roberts wrote:
> In order to support 5 level translation, FEAT_LPA2 introduces the 1-bit
> SL2 field within VTCR_EL2 to extend the existing 2-bit SL0 field. The
> SL2[0]:SL0[1:0] encodings have no simple algorithmic relationship to the
> star
Hi Ryan,
On Tue, Dec 06, 2022 at 01:59:23PM +, Ryan Roberts wrote:
> As the next step on the journey to supporting FEAT_LPA2 in KVM, add a
> flag to struct kvm_pgtable, which functions can then use to select the
> approprate behavior for either the `classic` or `lpa2` page-table
> formats. For
On Thu, Dec 15, 2022 at 09:33:17AM +, Ryan Roberts wrote:
> On 15/12/2022 00:52, Oliver Upton wrote:
> > On Tue, Dec 06, 2022 at 01:59:18PM +, Ryan Roberts wrote:
> >> (appologies, I'm resending this series as I managed to send the cover
> >> letter to
&g
On Wed, Dec 14, 2022 at 07:16:09PM +, Oliver Upton wrote:
> On Tue, Dec 06, 2022 at 01:59:19PM +, Ryan Roberts wrote:
> > From: Anshuman Khandual
> >
> > PAGE_SIZE support is tested against possible minimum and maximum values for
> > its respective ID_AA64MMFR
On Tue, Dec 06, 2022 at 01:59:18PM +, Ryan Roberts wrote:
> (appologies, I'm resending this series as I managed to send the cover letter
> to
> all but the following patches only to myself on first attempt).
>
> This is my first upstream feature submission so please go easy ;-)
Welcome :)
>
On Tue, Dec 06, 2022 at 01:59:19PM +, Ryan Roberts wrote:
> From: Anshuman Khandual
>
> PAGE_SIZE support is tested against possible minimum and maximum values for
> its respective ID_AA64MMFR0.TGRAN field, depending on whether it is signed
> or unsigned. But then FEAT_LPA2 implementation nee
Hi Akihiko,
On Sun, Dec 11, 2022 at 02:16:57PM +0900, Akihiko Odaki wrote:
> Before this change, the cache configuration of the physical CPU was
> exposed to vcpus. This is problematic because the cache configuration a
> vcpu sees varies when it migrates between vcpus with different cache
> config
On Mon, Dec 12, 2022 at 05:39:38PM +, Sean Christopherson wrote:
> On Fri, Dec 09, 2022, David Matlack wrote:
> > On Fri, Dec 9, 2022 at 9:25 AM Oliver Upton wrote:
> > >
> > > On Fri, Dec 09, 2022 at 10:37:47AM +0800, Yang, Weijiang wrote:
> > > > >
he guest into an infinite loop.
>
> Use -1 as the magic value, as a real ucall struct should never wrap.
>
> Reported-by: Oliver Upton
> Signed-off-by: Sean Christopherson
> ---
> tools/testing/selftests/kvm/lib/ucall_common.c | 16 ++--
> 1 file changed, 14 ins
On Fri, Dec 09, 2022 at 08:45:01PM +, Sean Christopherson wrote:
> On Fri, Dec 09, 2022, Oliver Upton wrote:
> > An interesting feature of the Arm architecture is that the stage-1 MMU
> > supports two distinct VA regions, controlled by TTBR{0,1}_EL1. As KVM
> > selftes
On Thu, Dec 08, 2022 at 11:38:20AM -0800, David Matlack wrote:
> [ mm folks: You are being cc'd since this series includes a mm patch
> ("mm: Introduce architecture-neutral PG_LEVEL macros"), but general
> feedback is also welcome. I imagine there are a lot of lessons KVM can
> learn from mm
On Fri, Dec 09, 2022 at 09:57:15AM -0800, David Matlack wrote:
> On Fri, Dec 9, 2022 at 9:32 AM Oliver Upton wrote:
> >
> > Hey David,
> >
> > On Thu, Dec 08, 2022 at 11:38:43AM -0800, David Matlack wrote:
> > > Move VM-level TDP MMU state to struct kvm so it
gt;
> target/arm/helper.c:1813: pmevcntr_rawwrite: Assertion `counter <
> pmu_num_counters(env)' failed.
>
> Fixes: 292e8f149476 ("KVM: arm64: PMU: Simplify PMCR_EL0 reset handling")
> Signed-off-by: James Clark
Reviewed-by: Oliver Upton
--
Thanks,
Oliver
&
Hey David,
On Thu, Dec 08, 2022 at 11:38:43AM -0800, David Matlack wrote:
> Move VM-level TDP MMU state to struct kvm so it can be accessed by
> common code in a future commit.
>
> No functional change intended.
Could you instead introduce a structure to hold all of the MMU state and
stick that
On Fri, Dec 09, 2022 at 10:37:47AM +0800, Yang, Weijiang wrote:
>
> On 12/9/2022 3:38 AM, David Matlack wrote:
> > Rename kvm_mmu_page_role.smm with kvm_mmu_page_role.as_id and use it
> > directly as the address space ID throughout the KVM MMU code. This
> > eliminates a needless level of indirect
Hey Paolo,
On Fri, Dec 09, 2022 at 05:56:50PM +0100, Paolo Bonzini wrote:
> On 12/7/22 22:51, Oliver Upton wrote:
> > >
> > > I haven't pushed to kvm/next yet to give you time to check, so the
> > > merge is currently in kvm/queue only.
> > Have a look a
On Fri, Dec 09, 2022 at 09:24:23AM +0100, Andrew Jones wrote:
> On Fri, Dec 09, 2022 at 01:52:59AM +0000, Oliver Upton wrote:
> > base-commit: 89b2395859651113375101bb07cd6340b1ba3637
>
> This commit doesn't seem to exist linux-next or kvm/queue, but the patch
> context
callsite and an
associated comment about why assertions don't work here. It isn't
perfect, at least the poor developer gets some signal out of the
guest...
Fixes: 426729b2cf2e ("KVM: selftests: Add ucall pool based implementation")
Signed-off-by: Oliver Upton
---
tools/testi
MEM_REGION_TEST_DATA is meant to hold data explicitly used by a
selftest, not implicit allocations due to the selftests infrastructure.
Allocate the ucall pool from MEM_REGION_DATA much like the rest of the
selftests library allocations.
Reviewed-by: Sean Christopherson
Signed-off-by: Oliver
map() instead to guarantee that the chosen VA isn't to something
else.
Signed-off-by: Oliver Upton
---
tools/testing/selftests/kvm/lib/aarch64/ucall.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/kvm/lib/aarch64/ucall.c
b/tools/testing/selftests
addressing schemes with a
comment describing each.
Signed-off-by: Oliver Upton
---
.../selftests/kvm/include/kvm_util_base.h | 1 +
tools/testing/selftests/kvm/lib/kvm_util.c| 49 ---
2 files changed, 44 insertions(+), 6 deletions(-)
diff --git a/tools/testing/selftests/k
park the ucall
MMIO addr after MEM_REGION_TEST_DATA.
Signed-off-by: Oliver Upton
---
tools/testing/selftests/kvm/aarch64/page_fault_test.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/kvm/aarch64/page_fault_test.c
b/tools/testing/selftest
The loop marks vaddr as mapped after incrementing it by page size,
thereby marking the *next* page as mapped. Set the bit in vpages_mapped
first instead.
Fixes: 56fc7732031d ("KVM: selftests: Fill in vm->vpages_mapped bitmap in
virt_map() too")
Signed-off-by: Oliver Upton
---
"KVM: selftests: Drop now-unnecessary ucall_uninit()")
Fixes: 35c581015712 ("KVM: selftests: aarch64: Add aarch64/page_fault_test")
Signed-off-by: Mark Brown
Cc: Sean Christopherson
Cc: Ricardo Koller
Cc: Marc Zyngier
Signed-off-by: Oliver Upton
---
tools/testing/selftest
Mark Brown (1):
KVM: selftests: Fix build due to ucall_uninit() removal
Oliver Upton (6):
KVM: selftests: Setup ucall after loading program into guest memory
KVM: selftests: Mark correct page as mapped in virt_map()
KVM: selftests: Correctly initialize the VA space for TTBR0_EL1
KVM:
On Thu, Dec 08, 2022 at 12:24:20AM +, Sean Christopherson wrote:
> On Thu, Dec 08, 2022, Oliver Upton wrote:
> > On Wed, Dec 07, 2022 at 11:57:27PM +, Sean Christopherson wrote:
> > > > diff --git a/tools/testing/selftests/kvm/aarch64/page_fault_test.c
> > &g
On Thu, Dec 08, 2022 at 12:18:07AM +, Sean Christopherson wrote:
[...]
> Together, what about? The #ifdef is a bit gross, especially around
> "hi_start",
> but it's less duplicate code. And IMO, having things bundled in the same
> place
> makes it a lot easier for newbies (to arm64 or ker
On Wed, Dec 07, 2022 at 11:57:27PM +, Sean Christopherson wrote:
> On Wed, Dec 07, 2022, Oliver Upton wrote:
> > The new ucall infrastructure needs to update a couple of guest globals
> > to pass through the ucall MMIO addr and pool of ucall structs. A
> > precondition of
On Wed, Dec 07, 2022 at 11:44:50PM +, Sean Christopherson wrote:
> On Wed, Dec 07, 2022, Oliver Upton wrote:
> > MEM_REGION_TEST_DATA is meant to hold data explicitly used by a
> > selftest, not implicit allocations due to the selftests infrastructure.
> > Allocat
On Tue, Dec 06, 2022 at 06:41:21PM +0100, Paolo Bonzini wrote:
> On 12/5/22 16:58, Marc Zyngier wrote:
> > - There is a lot of selftest conflicts with your own branch, see:
> >
> >https://lore.kernel.org/r/20221201112432.4cb9a...@canb.auug.org.au
> >https://lore.kernel.org/r/20221201113626
based implementation")
Signed-off-by: Oliver Upton
---
tools/testing/selftests/kvm/lib/ucall_common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/kvm/lib/ucall_common.c
b/tools/testing/selftests/kvm/lib/ucall_common.c
index 820ce6c82829..0c
t VA space layout. Make use of
the override to align vpages_valid with the behavior of TTBR0 on arm64.
Signed-off-by: Oliver Upton
---
.../testing/selftests/kvm/include/kvm_util_base.h | 1 +
.../testing/selftests/kvm/lib/aarch64/processor.c | 10 ++
tools/testing/selftests/kvm/lib/
the ucall
MMIO addr after MEM_REGION_TEST_DATA.
Signed-off-by: Oliver Upton
---
tools/testing/selftests/kvm/aarch64/page_fault_test.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/kvm/aarch64/page_fault_test.c
b/tools/testing/selftests/kvm
"KVM: selftests: Drop now-unnecessary ucall_uninit()")
Fixes: 35c581015712 ("KVM: selftests: aarch64: Add aarch64/page_fault_test")
Signed-off-by: Mark Brown
Cc: Sean Christopherson
Cc: Ricardo Koller
Cc: Marc Zyngier
Signed-off-by: Oliver Upton
---
tools/testing/selftest
lo's merge resolution, if desired.
Mark Brown (1):
KVM: selftests: Fix build due to ucall_uninit() removal
Oliver Upton (3):
KVM: selftests: Setup ucall after loading program into guest memory
KVM: arm64: selftests: Align VA space allocator with TTBR0
KVM: selftests: Allocate
Hi Mingwei,
On Mon, Dec 05, 2022 at 05:51:13AM +, Mingwei Zhang wrote:
> On Mon, Nov 14, 2022, Oliver Upton wrote:
[...]
> > As hyp stage-1 is protected by a spinlock there is no actual need for
> > RCU in that case. I'll post something later on today that add
On Thu, Dec 01, 2022 at 11:14:43PM +, Marc Zyngier wrote:
> On Thu, 01 Dec 2022 18:29:51 +,
> Oliver Upton wrote:
> > Could we extend your suggestion about accepting different topologies to
> > effectively tolerate _any_ topology provided by userspace? KVM can
> >
the stage-2 access fault path on Armv8.1+ implementations.
Signed-off-by: Oliver Upton
---
arch/arm64/kvm/hyp/pgtable.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm64/kvm/hyp/pgtable.c b/arch/arm64/kvm/hyp/pgtable.c
index 30575b5f5dcd..3d61bd3e591d 100644
--- a/arch/arm64/kvm/hyp
As the underlying software walkers are able to traverse and update
stage-2 in parallel there is no need to serialize access faults.
Only take the read lock when handling an access fault.
Signed-off-by: Oliver Upton
---
arch/arm64/kvm/hyp/pgtable.c | 3 ++-
arch/arm64/kvm/mmu.c | 4
Return EAGAIN for invalid PTEs in the attr walker, signaling to the
caller that any serialization and/or invalidation can be elided.
Signed-off-by: Oliver Upton
---
arch/arm64/kvm/hyp/pgtable.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/kvm/hyp/pgtable.c b
behavior is undesirable for walkers that operate
outside a fault handler. Suppress EAGAIN and continue the walk if
operating outside a fault handler.
Signed-off-by: Oliver Upton
---
arch/arm64/include/asm/kvm_pgtable.h | 3 +++
arch/arm64/kvm/hyp/pgtable.c | 30
Of course, if the PTE wasn't changed then there are absolutely no
serialization requirements. Skip the DSB for an unsuccessful update to
the access flag.
Signed-off-by: Oliver Upton
---
arch/arm64/kvm/hyp/pgtable.c | 12
1 file changed, 8 insertions(+), 4 deletions(-)
diff --
abled.
v1 -> v2:
- Don't serialize if attr walker fails due to an invalid PTE (Ricardo)
- Rejig the error handling path in the table walker to suppress EAGAIN
in non-fault handling paths
v1:
https://lore.kernel.org/kvmarm/20221129191946.1735662-1-oliver.up...@linux.dev
Oliver Upt
Consistently use KVM's own pte types and helpers in
handle_access_fault().
No functional change intended.
Signed-off-by: Oliver Upton
---
arch/arm64/include/asm/kvm_pgtable.h | 5 +
arch/arm64/kvm/mmu.c | 10 --
2 files changed, 9 insertions(+), 6 dele
On Thu, Dec 01, 2022 at 11:06:50AM +, Marc Zyngier wrote:
[...]
> It would be a lot better to expose a virtual topology
> (one set, one way, one level). It would also save us from the CCSIDRX
> silliness.
>
> The only complexity would be to still accept different topologies from
> userspace
On Tue, Nov 29, 2022 at 09:15:21PM +, Oliver Upton wrote:
> Hi Ricardo,
>
> Thanks for having a look.
>
> On Tue, Nov 29, 2022 at 12:52:12PM -0800, Ricardo Koller wrote:
> > On Tue, Nov 29, 2022 at 07:19:44PM +, Oliver Upton wrote:
>
> [...]
>
> > &g
Hi Ricardo,
Thanks for having a look.
On Tue, Nov 29, 2022 at 12:52:12PM -0800, Ricardo Koller wrote:
> On Tue, Nov 29, 2022 at 07:19:44PM +0000, Oliver Upton wrote:
[...]
> > + ret = stage2_update_leaf_attrs(pgt, addr, 1,
> > KVM_PTE_LEAF_A
the stage-2 access fault path on Armv8.1+ implementations.
Signed-off-by: Oliver Upton
---
arch/arm64/kvm/hyp/pgtable.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm64/kvm/hyp/pgtable.c b/arch/arm64/kvm/hyp/pgtable.c
index 1a3dd9774707..9c651b6d4092 100644
--- a/arch/arm64/kvm/hyp
Of course, if the PTE wasn't changed then there are absolutely no
serialization requirements. Skip the DSB for an unsuccessful update to
the access flag.
Signed-off-by: Oliver Upton
---
arch/arm64/kvm/hyp/pgtable.c | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --
As the underlying software walkers are able to traverse and update
stage-2 in parallel there is no need to serialize access faults.
Only take the read lock when handling an access fault.
Signed-off-by: Oliver Upton
---
arch/arm64/kvm/hyp/pgtable.c | 2 +-
arch/arm64/kvm/mmu.c | 4
Consistently use KVM's own pte types and helpers in
handle_access_fault().
No functional change intended.
Signed-off-by: Oliver Upton
---
arch/arm64/include/asm/kvm_pgtable.h | 5 +
arch/arm64/kvm/mmu.c | 10 --
2 files changed, 9 insertions(+), 6 dele
d that, I won't throw a
fit if it gets dropped either.
Applies to kvmarm/next due to the dependency on the larger parallel
faults series. Tested on Ampere Altra w/ VTCR_EL2.HA=0 as well as a
Raspberry Pi 4.
Oliver Upton (4):
KVM: arm64: Use KVM's pte type/helpers in handle_access_faul
the exact opposite problem, where
subsequent test runs complete immediately as 'run_vcpus' remains false.
Co-developed-by: Sean Christopherson
Signed-off-by: Sean Christopherson
[oliver: added commit message, preserve spin_wait_for_next_iteration()]
Signed-off-by: Oliver Upton
---
left off Gavin's R-b on
the first patch as it was retooled.
v1:
https://lore.kernel.org/kvmarm/2022231946.944807-1-oliver.up...@linux.dev/
Oliver Upton (2):
KVM: selftests: Have perf_test_util signal when to stop vCPUs
KVM: selftests: Build access_tracking_perf_test for arm64
Does exactly what it says on the tin.
Reviewed-by: Gavin Shan
Signed-off-by: Oliver Upton
---
tools/testing/selftests/kvm/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/kvm/Makefile
b/tools/testing/selftests/kvm/Makefile
index 0172eb6cb6ee..4c0ff91a8964
Exclusive table walks are the only supported table walk in the hyp, as
there is no construct like RCU available in the hypervisor code. Reject
any attempt to do a shared table walk by returning an error and allowing
the caller to clean up the mess.
Suggested-by: Will Deacon
Signed-off-by: Oliver
kernel_init+0x24/0x130
ret_from_fork+0x10/0x20
Since the hyp stage-1 table walkers are serialized by kvm_hyp_pgd_mutex,
RCU protection really doesn't add anything. Don't acquire the RCU read
lock for an exclusive walk.
Reported-by: Marek Szyprowski
Signed-off-by: Oliver Upton
---
arch/arm
their use.
No functional change intended.
Signed-off-by: Oliver Upton
---
arch/arm64/include/asm/kvm_pgtable.h | 144 ++-
arch/arm64/kvm/hyp/pgtable.c | 6 +-
2 files changed, 76 insertions(+), 74 deletions(-)
diff --git a/arch/arm64/include/asm/kvm_pgtable.h
} and
lockdep. Applies on top of the parallel faults series picked up last
week.
v3:
https://lore.kernel.org/kvmarm/20221116165655.2649475-1-oliver.up...@linux.dev/
v3 -> v4:
- Return an error instead of WARN() in hyp for shared walks (Will)
Oliver Upton (3):
KVM: arm64: Take a pointer to wal
On Fri, Nov 18, 2022 at 12:19:50PM +, Will Deacon wrote:
> On Thu, Nov 17, 2022 at 06:23:23PM +0000, Oliver Upton wrote:
> > On Thu, Nov 17, 2022 at 05:49:52PM +, Will Deacon wrote:
> > > On Wed, Nov 16, 2022 at 04:56:55PM +, Oliver Upton wrote:
> >
> &
On Fri, Nov 18, 2022 at 02:56:38PM +, Will Deacon wrote:
> On Thu, Nov 10, 2022 at 01:53:26AM +0000, Oliver Upton wrote:
> > As the SMCCC (and related specifications) march towards an
> > 'everything and the kitchen sink' interface for interacting with a
> > sys
Hi Will,
Thanks for having a look.
On Thu, Nov 17, 2022 at 05:49:52PM +, Will Deacon wrote:
> On Wed, Nov 16, 2022 at 04:56:55PM +0000, Oliver Upton wrote:
[...]
> > -static inline void kvm_pgtable_walk_begin(void) {}
> > -static inline void kvm_pgtable_walk_end(void) {}
>
will hang as the local exclusive monitor is reset by eret,
> i.e. the stlxr will always fail due to the VM-Exit for the debug
> exception.
... due to the debug exception taken to EL2.
What's a VM-Exit anyways? ;-)
> Link: https://lore.kernel.org/all/20221006003409.649993-8-sea...@g
effectively disables single-step debug.
>
> No functional change intended.
>
> Cc: Reiji Watanabe
> Fixes: b18e4d4aebdd ("KVM: arm64: selftests: Add a test case for
> KVM_GUESTDBG_SINGLESTEP")
> Signed-off-by: Sean Christopherson
Re
Sorry, hit send a bit too early. Reviewing the patch itself:
On Wed, Nov 16, 2022 at 05:03:26PM +, Quentin Perret wrote:
[...]
> +static bool ffa_call_unsupported(u64 func_id)
> +{
> + switch (func_id) {
> + /* Unsupported memory management calls */
> + case FFA_FN64_MEM_RETRIEVE
On Wed, Nov 16, 2022 at 05:03:26PM +, Quentin Perret wrote:
> From: Will Deacon
>
> When KVM is initialised in protected mode, we must take care to filter
> certain FFA calls from the host kernel so that the integrity of guest
> and hypervisor memory is maintained and is not made available to
d walks in the hypervisor code.
Reported-by: Marek Szyprowski
Signed-off-by: Oliver Upton
---
arch/arm64/include/asm/kvm_pgtable.h | 22 --
arch/arm64/kvm/hyp/pgtable.c | 4 ++--
2 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/arch/arm64/include/asm/kvm
their use.
No functional change intended.
Signed-off-by: Oliver Upton
---
arch/arm64/include/asm/kvm_pgtable.h | 144 ++-
arch/arm64/kvm/hyp/pgtable.c | 6 +-
2 files changed, 76 insertions(+), 74 deletions(-)
diff --git a/arch/arm64/include/asm/kvm_pgtable.h
}.
Applies to the parallel faults series picked up last week.
v2:
https://lore.kernel.org/kvmarm/20221115225502.2240227-1-oliver.up...@linux.dev/
v2 -> v3:
- Pass a pointer to the walker instead of a bool (Marc)
- Apply the aforementioned change to kvm_dereference_pteref()
Oliver Upton (2):
On Wed, Nov 16, 2022 at 07:27:27AM +, Oliver Upton wrote:
> On Wed, Nov 16, 2022 at 03:08:49AM +, Marc Zyngier wrote:
> > I'm not crazy about this sort of parameters. I think it would make a
> > lot more sense to pass a pointer to the walker structure and do the
>
On Wed, Nov 16, 2022 at 03:08:49AM +, Marc Zyngier wrote:
> I'm not crazy about this sort of parameters. I think it would make a
> lot more sense to pass a pointer to the walker structure and do the
> flag check inside the helper.
>
> That way, we avoid extra churn if/when we need extra state
On Tue, Nov 15, 2022 at 03:27:18PM -0800, Ricardo Koller wrote:
> On Tue, Nov 15, 2022 at 03:03:42PM -0800, Ricardo Koller wrote:
> > On Mon, Nov 14, 2022 at 08:54:52PM +0000, Oliver Upton wrote:
[...]
> > > > diff --git a/arch/arm64/kvm/hyp/pgtable.c b/arch/arm64/kvm/hyp/pg
d walks in the hypervisor code.
Reported-by: Marek Szyprowski
Signed-off-by: Oliver Upton
---
Applies on top of the parallel faults series that was picked up last
week. Tested with kvm-arm.mode={nvhe,protected} on an Ampere Altra
system.
v1 -> v2:
- Took Will's suggestion of conditio
On Tue, Nov 15, 2022 at 10:47:37AM -0800, Ricardo Koller wrote:
> On Wed, Nov 09, 2022 at 11:55:31PM +0000, Oliver Upton wrote:
> > On Wed, Nov 09, 2022 at 09:53:45PM +, Sean Christopherson wrote:
> > > On Mon, Nov 07, 2022, Oliver Upton wrote:
> > > > Use RCU t
Hey Will,
On Tue, Nov 15, 2022 at 01:25:34PM +, Will Deacon wrote:
[...]
> On Mon, Nov 14, 2022 at 08:11:27PM +0000, Oliver Upton wrote:
> > +int kvm_pgtable_hyp_walk(struct kvm_pgtable *pgt, u64 addr, u64 size,
> > +struct kvm_pgtable_walker *walker);
On Mon, Nov 14, 2022 at 05:12:48PM +, Sean Christopherson wrote:
> On Fri, Nov 11, 2022, Oliver Upton wrote:
> > As the name implies, for_each_guest_mode() will run the test case for
> > all supported guest addressing modes. On x86 that doesn't amount to
> > anythin
Hi Ricardo,
On Sat, Nov 12, 2022 at 08:17:03AM +, Ricardo Koller wrote:
> stage2_make_pte() throws a warning when used in a non-shared walk, as PTEs
> are not "locked" when walking non-shared. Add a check so it can be used
> non-shared.
>
> Signed-off-by: Ricardo Koller
I would very much pr
Hi Ricardo,
On Sat, Nov 12, 2022 at 08:17:06AM +, Ricardo Koller wrote:
[...]
> +/**
> + * kvm_pgtable_stage2_split() - Split a range of huge pages into leaf PTEs
> pointing
> + * to PAGE_SIZE guest pages.
> + * @pgt: Page-table structure initialised by kvm_pgt
hyp
stage-1 tables. Call directly into __kvm_pgtable_walk() as table
concatenation is not a supported feature at stage-1.
No functional change intended.
Signed-off-by: Oliver Upton
---
arch/arm64/include/asm/kvm_pgtable.h | 24
arch/arm64/kvm/hyp/nvhe/setup.c | 2
.26861-1-w...@kernel.org/
Oliver Upton (1):
KVM: arm64: Use a separate function for hyp stage-1 walks
arch/arm64/include/asm/kvm_pgtable.h | 24
arch/arm64/kvm/hyp/nvhe/setup.c | 2 +-
arch/arm64/kvm/hyp/pgtable.c | 18 +++---
3 files c
On Sat, Nov 12, 2022 at 08:17:08AM +, Ricardo Koller wrote:
> Breaking a huge-page block PTE into an equivalent table of smaller PTEs
> does not require using break-before-make (BBM) when FEAT_BBM level 2 is
> implemented. Add the respective check for eager page splitting and avoid
> using BBM.
On Sat, Nov 12, 2022 at 08:17:04AM +, Ricardo Koller wrote:
> The page table walker does not visit block PTEs in post-order. But there
> are some cases where doing so would be beneficial, for example: breaking a
> 1G block PTE into a full tree in post-order avoids visiting the new tree.
>
> Al
is that this ioctl takes ranges, and not complete
> memslots like when enabling dirty logging. This means that the cost of
> splitting (mainly broadcasted TLBIs) can be throttled: split a range, wait
> for a bit, split another range, etc. The benefits of this approach were
> presented
Hi Marek,
On Mon, Nov 14, 2022 at 03:29:14PM +0100, Marek Szyprowski wrote:
> This patch landed in today's linux-next (20221114) as commit
> c3119ae45dfb ("KVM: arm64: Protect stage-2 traversal with RCU").
> Unfortunately it introduces a following warning:
Thanks for the bug report :) I had fai
On Fri, Nov 11, 2022 at 08:26:02AM +, Marc Zyngier wrote:
> On Thu, 10 Nov 2022 21:13:54 +0000, Oliver Upton
> wrote:
> > The goal of what I was trying to get at is that either the kernel or
> > userspace takes ownership of a range that has an ABI, but not both. i.e.
>
Small series to add support for arm64 to access_tracking_perf_test.
Well, really this corrects a bug that is benign on x86, but you get the
point.
Tested on an Ampere Altra system w/ all supported guest modes for that
platform.
Oliver Upton (2):
KVM: selftests: Allow >1 guest mode
Does exactly what it says on the tin.
Signed-off-by: Oliver Upton
---
tools/testing/selftests/kvm/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/kvm/Makefile
b/tools/testing/selftests/kvm/Makefile
index 0172eb6cb6ee..4c0ff91a8964 100644
--- a/tools/testing
n
the second test case, as the 'done' global remains set between test
iterations. Clear it after VM teardown in anticipation of a subsequent
test case.
Signed-off-by: Oliver Upton
---
tools/testing/selftests/kvm/access_tracking_perf_test.c | 3 +++
1 file changed, 3 insertions(+)
dif
On Thu, Nov 10, 2022 at 12:22:12PM +, Marc Zyngier wrote:
> > diff --git a/arch/arm64/include/asm/kvm_host.h
> > b/arch/arm64/include/asm/kvm_host.h
> > index e33ed7c09a28..cc3872f1900c 100644
> > --- a/arch/arm64/include/asm/kvm_host.h
> > +++ b/arch/arm64/include/asm/kvm_host.h
> > @@ -52,6
On Thu, Nov 10, 2022 at 01:30:08PM +0800, Gavin Shan wrote:
> Hi Oliver,
>
> On 11/8/22 5:56 AM, Oliver Upton wrote:
> > In order to tear down page tables from outside the context of
> > kvm_pgtable (such as an RCU callback), stop passing a pointer through
> > kvm_pgt
1 - 100 of 623 matches
Mail list logo