Re: [PATCH] KVM: arm64: Ratelimit error log during guest debug exception

2021-08-20 Thread Raghavendra Rao Ananta
On Fri, Aug 20, 2021 at 2:29 AM Marc Zyngier wrote: > > On Thu, 19 Aug 2021 23:34:06 +0100, > Raghavendra Rao Ananta wrote: > > > > Potentially, the guests could trigger a debug exception that's > > outside the exception class range. > > How? All the exception classes that lead to this functions

Re: [PATCH v7 1/6] KVM: x86: Fix potential race in KVM_GET_CLOCK

2021-08-20 Thread Oliver Upton
On Thu, Aug 19, 2021 at 11:43 AM Marcelo Tosatti wrote: > > On Mon, Aug 16, 2021 at 12:11:25AM +, Oliver Upton wrote: > > Sean noticed that KVM_GET_CLOCK was checking kvm_arch.use_master_clock > > outside of the pvclock sync lock. This is problematic, as the clock > > value written to the

Re: [PATCH v7 3/6] KVM: x86: Report host tsc and realtime values in KVM_GET_CLOCK

2021-08-20 Thread Marcelo Tosatti
On Mon, Aug 16, 2021 at 12:11:27AM +, Oliver Upton wrote: > Handling the migration of TSCs correctly is difficult, in part because > Linux does not provide userspace with the ability to retrieve a (TSC, > realtime) clock pair for a single instant in time. In lieu of a more > convenient

[PATCH] KVM: arm64: Ratelimit error log during guest debug exception

2021-08-20 Thread Raghavendra Rao Ananta
Potentially, the guests could trigger a debug exception that's outside the exception class range. This could lead to an excessive syslog flooding. Hence, ratelimit the error message. Signed-off-by: Raghavendra Rao Ananta --- arch/arm64/kvm/handle_exit.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: (subset) [PATCH 0/2] Fix off-by-one in range_is_memory

2021-08-20 Thread Marc Zyngier
On Wed, 28 Jul 2021 15:32:30 +, David Brazdil wrote: > the range_is_memory function in hyp. > > David Brazdil (2): > KVM: arm64: Fix off-by-one in range_is_memory > KVM: arm64: Minor optimization of range_is_memory > > arch/arm64/kvm/hyp/nvhe/mem_protect.c | 11 --- > 1 file

Re: [PATCH v4 00/15] KVM: arm64: Fixed features for protected VMs

2021-08-20 Thread Marc Zyngier
On Tue, 17 Aug 2021 09:11:19 +0100, Fuad Tabba wrote: > Changes since v3 [1]: > - Redid calculating restricted values of feature register fields, ensuring > that > the code distinguishes between unsigned and (potentially in the future) > signed fields (Will) > - Refactoring and fixes (Drew,

Re: [PATCH] KVM: arm64: Ratelimit error log during guest debug exception

2021-08-20 Thread Marc Zyngier
On Thu, 19 Aug 2021 23:34:06 +0100, Raghavendra Rao Ananta wrote: > > Potentially, the guests could trigger a debug exception that's > outside the exception class range. How? All the exception classes that lead to this functions are already handled in the switch/case statement. > This could

Re: [PATCH 3/4] KVM: arm64: Convert the host S2 over to __load_guest_stage2()

2021-08-20 Thread Marc Zyngier
On Fri, 06 Aug 2021 14:40:00 +0100, Quentin Perret wrote: > > On Friday 06 Aug 2021 at 12:31:07 (+0100), Will Deacon wrote: > > From: Marc Zyngier > > > > The protected mode relies on a separate helper to load the > > S2 context. Move over to the __load_guest_stage2() helper > > instead. > >

Re: [PATCH v2] KVM: arm64: vgic: Resample HW pending state on deactivation

2021-08-20 Thread Marc Zyngier
On Thu, 19 Aug 2021 19:03:05 +0100, Marc Zyngier wrote: > When a mapped level interrupt (a timer, for example) is deactivated > by the guest, the corresponding host interrupt is equally deactivated. > However, the fate of the pending state still needs to be dealt > with in SW. > > This is