Let userspace check if there is kvm ptp service in host.
Before VMs migrate to another host, VMM may check if this
cap is available to determine the next behavior.
Signed-off-by: Jianyong Wu
Suggested-by: Marc Zyngier
---
arch/arm64/kvm/arm.c | 1 +
include/uapi/linux/kvm.h | 1 +
2 files c
PTP_KVM implementation depends on hypercall using SMCCC. So we
introduce a new SMCCC service ID. This doc explains how does the
ID define and how does PTP_KVM works on arm/arm64.
Signed-off-by: Jianyong Wu
---
Documentation/virt/kvm/api.rst | 9 +++
Documentation/virt/kvm/arm/index.
Currently, there is no mechanism to keep time sync between guest and host
in arm/arm64 virtualization environment. Time in guest will drift compared
with host after boot up as they may both use third party time sources
to correct their time respectively. The time deviation will be in order
of milli
ptp_kvm will get this service through SMCC call.
The service offers wall time and cycle count of host to guest.
The caller must specify whether they want the host cycle count
or the difference between host cycle count and cntvoff.
Signed-off-by: Jianyong Wu
---
arch/arm64/kvm/hypercalls.c | 59 +
Add clocksource id for arm arch counter to let it be identified easily and
elegantly in ptp_kvm implementation for arm.
Signed-off-by: Jianyong Wu
---
drivers/clocksource/arm_arch_timer.c | 2 ++
include/linux/clocksource_ids.h | 1 +
2 files changed, 3 insertions(+)
diff --git a/drivers/c
From: Thomas Gleixner
System time snapshots are not conveying information about the current
clocksource which was used, but callers like the PTP KVM guest
implementation have the requirement to evaluate the clocksource type to
select the appropriate mechanism.
Introduce a clocksource id field in
Currently, ptp_kvm modules implementation is only for x86 which includes
large part of arch-specific code. This patch moves all of this code
into a new arch related file in the same directory.
Signed-off-by: Jianyong Wu
---
drivers/ptp/Makefile| 1 +
drivers/ptp/{ptp_kv
From: Will Deacon
We can advertise ourselves to guests as KVM and provide a basic features
bitmap for discoverability of future hypervisor services.
Cc: Marc Zyngier
Signed-off-by: Will Deacon
Signed-off-by: Jianyong Wu
---
arch/arm64/kvm/hypercalls.c | 27 ++-
1 file
From: Will Deacon
Although the SMCCC specification provides some limited functionality for
describing the presence of hypervisor and firmware services, this is
generally applicable only to functions designated as "Arm Architecture
Service Functions" and no portable discovery mechanism is provided
Currently, we offen use ntp (sync time with remote network clock)
to sync time in VM. But the precision of ntp is subject to network delay
so it's difficult to sync time in a high precision.
kvm virtual ptp clock (ptp_kvm) offers another way to sync time in VM,
as the remote clock locates in the h
On Fri, Sep 11, 2020 at 4:58 AM Sergey Senozhatsky
wrote:
>
> My apologies for the slow reply.
>
> On (20/08/17 13:25), Marc Zyngier wrote:
> >
> > It really isn't the same thing at all. You are exposing PV spinlocks,
> > while Sergey exposes preemption to vcpus.
> >
>
> Correct, we see vcpu preem
Hey Marc,
On Thu, Dec 03, 2020 at 07:23:19PM +, Marc Zyngier wrote:
> On Wed, 2 Dec 2020 18:40:56 +, David Brazdil wrote:
> > As we progress towards being able to keep guest state private to the
> > host running nVHE hypervisor, this series allows the hypervisor to
> > install itself on ne
On Tue, 08 Dec 2020 19:14:47 +,
David Brazdil wrote:
>
> Hey Marc,
>
> On Thu, Dec 03, 2020 at 07:23:19PM +, Marc Zyngier wrote:
> > On Wed, 2 Dec 2020 18:40:56 +, David Brazdil wrote:
> > > As we progress towards being able to keep guest state private to the
> > > host running nVHE
Minor cleanup removing unused includes.
Signed-off-by: David Brazdil
---
arch/arm64/kvm/hyp/nvhe/psci-relay.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/arch/arm64/kvm/hyp/nvhe/psci-relay.c
b/arch/arm64/kvm/hyp/nvhe/psci-relay.c
index 0d6f4aa39621..1f7237e45148 100644
--- a/arch/arm6
Move function for skipping host instruction in the host trap handler to
a header file containing analogical helpers for guests.
Signed-off-by: David Brazdil
---
arch/arm64/kvm/hyp/include/hyp/adjust_pc.h | 9 +
arch/arm64/kvm/hyp/nvhe/hyp-main.c | 12 ++--
2 files change
init_hyp_physvirt_offset() computes PA from a kernel VA. Conversion to
kernel linear-map is required first but the code used kvm_ksym_ref() for
this purpose. Under VHE that is a NOP and resulted in a runtime warning.
Replace kvm_ksym_ref with lm_alias.
Reported-by: Qian Cai
Signed-off-by: David B
Small cleanup moving declarations of hyp-exported variables to
kvm_host.h and using macros to avoid having to refer to them with
kvm_nvhe_sym() in host.
No functional change intended.
Signed-off-by: David Brazdil
---
arch/arm64/include/asm/kvm_host.h | 6 ++
arch/arm64/kvm/arm.c
Computing the hyp VA layout is redundant when the kernel runs in EL2 and
hyp shares its VA mappings. Make calling kvm_compute_layout()
conditional on not just CONFIG_KVM but also !is_kernel_in_hyp_mode().
Signed-off-by: David Brazdil
---
arch/arm64/kernel/smp.c | 2 +-
1 file changed, 1 insertio
Small batch of improvements for the 'Opt-in always-on nVHE hypervisor'
series, now merged in kvmarm/next.
Patch #1 fixes potential use of invalid v0.1 functions IDs reported
by Mark Rutland, patch #2 fixes a warning reported by Qian Cai.
Patch #3 avoids a code path not used in VHE, can be dropped
PSCI driver exposes a struct containing the PSCI v0.1 function IDs
configured in the DT. However, the struct does not convey the
information whether these were set from DT or contain the default value
zero. This could be a problem for PSCI proxy in KVM protected mode.
Extend config passed to KVM w
On 2020-12-08 17:21, Catalin Marinas wrote:
On Mon, Dec 07, 2020 at 07:03:13PM +, Marc Zyngier wrote:
On Mon, 07 Dec 2020 16:34:05 +,
Catalin Marinas wrote:
> On Mon, Dec 07, 2020 at 04:05:55PM +, Marc Zyngier wrote:
> > What I'd really like to see is a description of how shared mem
On Tue, Dec 08, 2020 at 03:56:39PM +, Marc Zyngier wrote:
> On 2020-12-08 14:24, David Brazdil wrote:
> > PSCI driver exposes a struct containing the PSCI v0.1 function IDs
> > configured in the DT. However, the struct does not convey the
> > information whether these were set from DT or contai
On Mon, Dec 07, 2020 at 07:03:13PM +, Marc Zyngier wrote:
> On Mon, 07 Dec 2020 16:34:05 +,
> Catalin Marinas wrote:
> > On Mon, Dec 07, 2020 at 04:05:55PM +, Marc Zyngier wrote:
> > > What I'd really like to see is a description of how shared memory
> > > is, in general, supposed to w
On 2020-12-08 14:24, David Brazdil wrote:
PSCI driver exposes a struct containing the PSCI v0.1 function IDs
configured in the DT. However, the struct does not convey the
information whether these were set from DT or contain the default value
zero. This could be a problem for PSCI proxy in KVM pr
Hi Qian,
> > +/*
> > + * Store a hyp VA <-> PA offset into a hyp-owned variable.
> > + */
> > +static void init_hyp_physvirt_offset(void)
> > +{
> > + extern s64 kvm_nvhe_sym(hyp_physvirt_offset);
> > + u64 kern_va, hyp_va;
> > +
> > + /* Compute the offset from the hyp VA and PA of a random
On Tue, 8 Dec 2020 at 18:01, Marc Zyngier wrote:
>
> On 2020-12-08 09:51, Haibo Xu wrote:
> > On Mon, 7 Dec 2020 at 22:48, Steven Price wrote:
> >>
>
> [...]
>
> >> Sounds like you are making good progress - thanks for the update. Have
> >> you thought about how the PROT_MTE mappings might work i
On Tue, 8 Dec 2020 at 00:44, Dr. David Alan Gilbert wrote:
>
> * Steven Price (steven.pr...@arm.com) wrote:
> > On 07/12/2020 15:27, Peter Maydell wrote:
> > > On Mon, 7 Dec 2020 at 14:48, Steven Price wrote:
> > > > Sounds like you are making good progress - thanks for the update. Have
> > > > y
On 2020-12-08 09:51, Haibo Xu wrote:
On Mon, 7 Dec 2020 at 22:48, Steven Price wrote:
[...]
Sounds like you are making good progress - thanks for the update. Have
you thought about how the PROT_MTE mappings might work if QEMU itself
were to use MTE? My worry is that we end up with MTE in a
On Mon, 7 Dec 2020 at 22:48, Steven Price wrote:
>
> On 04/12/2020 08:25, Haibo Xu wrote:
> > On Fri, 20 Nov 2020 at 17:51, Steven Price wrote:
> >>
> >> On 19/11/2020 19:11, Marc Zyngier wrote:
> >>> On 2020-11-19 18:42, Andrew Jones wrote:
> On Thu, Nov 19, 2020 at 03:45:40PM +, Peter
On Mon, Dec 07, 2020 at 02:11:20PM +, Quentin Perret wrote:
> On Monday 07 Dec 2020 at 13:40:52 (+), Will Deacon wrote:
> > Why not use the RESERVEDMEM_OF_DECLARE() interface for the hypervisor
> > memory? That way, the hypervisor memory can either be statically partitioned
> > as a carveou
On 2020/12/1 20:15, Shenming Lu wrote:
> On 2020/12/1 19:50, Marc Zyngier wrote:
>> On 2020-12-01 11:40, Shenming Lu wrote:
>>> On 2020/12/1 18:55, Marc Zyngier wrote:
On 2020-11-30 07:23, Shenming Lu wrote:
Hi Shenming,
> We are pondering over this problem these days, but s
On Wed, 2020-12-02 at 18:41 +, David Brazdil wrote:
> Add a host-initialized constant to KVM nVHE hyp code for converting
> between EL2 linear map virtual addresses and physical addresses.
> Also add `__hyp_pa` macro that performs the conversion.
>
> Signed-off-by: David Brazdil
> ---
> arch
32 matches
Mail list logo