On 27 November 2015 at 00:54, Christian Borntraeger
wrote:
> On 11/26/2015 09:47 PM, Christian Borntraeger wrote:
>> On 11/26/2015 05:17 PM, Tyler Baker wrote:
>>> Hi Christian,
>>>
>>> The kernelci.org bot recently has been reporting kvm guest boot
>>> failures[1] on
Implement the TLB handling as a direct translation of the assembly
code version.
Signed-off-by: Marc Zyngier
---
arch/arm64/kvm/hyp/Makefile | 1 +
arch/arm64/kvm/hyp/tlb.c| 72 +
2 files changed, 73 insertions(+)
create
Add the entry points for HYP mode (both for hypercalls and
exception handling).
Signed-off-by: Marc Zyngier
---
arch/arm64/kvm/hyp/Makefile| 1 +
arch/arm64/kvm/hyp/hyp-entry.S | 198 +
2 files changed, 199 insertions(+)
Implement the system registe save restore as a direct translation of
the assembly code version.
Signed-off-by: Marc Zyngier
---
arch/arm64/kvm/hyp/Makefile| 1 +
arch/arm64/kvm/hyp/hyp.h | 3 ++
arch/arm64/kvm/hyp/sysreg-sr.c | 90
Add the panic handler, together with the small bits of assembly
code to call the kernel's panic implementation.
Signed-off-by: Marc Zyngier
---
arch/arm64/kvm/hyp/hyp-entry.S | 11 ++-
arch/arm64/kvm/hyp/hyp.h | 1 +
arch/arm64/kvm/hyp/switch.c| 30
As we've now rewritten most of our code-base in C, most of the
KVM-specific code in asm-offset.c is useless. Delete-time again!
Signed-off-by: Marc Zyngier
---
arch/arm64/kernel/asm-offsets.c | 39 ---
1 file changed, 39 deletions(-)
Implement the core of the world switch in C. Not everything is there
yet, and there is nothing to re-enter the world switch either.
But this already outlines the code structure well enough.
Signed-off-by: Marc Zyngier
---
arch/arm64/kvm/hyp/Makefile | 1 +
Implement the debug save restore as a direct translation of
the assembly code version.
Signed-off-by: Marc Zyngier
---
arch/arm64/kvm/hyp/Makefile | 1 +
arch/arm64/kvm/hyp/debug-sr.c | 130 ++
arch/arm64/kvm/hyp/hyp.h | 9
Having the system register numbers as #defines has been a pain
since day one, as the ordering is pretty fragile, and moving
things around leads to renumbering and epic conflict resolutions.
Now that we're mostly acessing the sysreg file in C, an enum is
a much better type to use, and we can clean
Once upon a time, the KVM/arm64 world switch was a nice, clean, lean
and mean piece of hand-crafted assembly code. Over time, features have
crept in, the code has become harder to maintain, and the smallest
change is a pain to introduce. The VHE patches are a prime example of
why this doesn't work
Implement the vgic-v2 save restore (mostly) as a direct translation
of the assembly code version.
Signed-off-by: Marc Zyngier
---
arch/arm64/kvm/Makefile | 1 +
arch/arm64/kvm/hyp/Makefile | 5 +++
arch/arm64/kvm/hyp/hyp.h| 3 ++
In order to expose the various EL2 services that are private to
the hypervisor, add a new hyp.h file.
So far, it only contains mundane things such as section annotation
and VA manipulation.
Signed-off-by: Marc Zyngier
---
arch/arm64/kvm/hyp/hyp.h | 31
From: Mark Rutland
Rather than crafting custom macros for reading/writing each system
register provide generics accessors, read_sysreg and write_sysreg, for
this purpose.
Unlike read_cpuid, calls to read_exception_reg are never expected
to be optimized away or replaced
Contrary to the previous patch, the guest entry is fairly different
from its assembly counterpart, mostly because it is only concerned
with saving/restoring the GP registers, and nothing else.
Signed-off-by: Marc Zyngier
---
arch/arm64/kvm/hyp/Makefile | 1 +
Implement the timer save restore as a direct translation of
the assembly code version.
Signed-off-by: Marc Zyngier
---
arch/arm64/kvm/hyp/Makefile | 1 +
arch/arm64/kvm/hyp/hyp.h | 3 ++
arch/arm64/kvm/hyp/timer-sr.c| 71
In order to run C code in HYP, we must make sure that the kernel's
RO section in mapped into HYP (otherwise things break badly).
Signed-off-by: Marc Zyngier
---
arch/arm/kvm/arm.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/arch/arm/kvm/arm.c
So far, we've implemented the new world switch with a completely
different namespace, so that we could have both implementation
compiled in.
Let's take things one step further by adding weak aliases that
have the same names as the original implementation. The weak
attributes allows the new
Implement the vgic-v3 save restore as a direct translation of
the assembly code version.
Signed-off-by: Marc Zyngier
---
arch/arm64/kvm/hyp/Makefile | 1 +
arch/arm64/kvm/hyp/hyp.h| 3 +
arch/arm64/kvm/hyp/vgic-v3-sr.c | 222
Implement the 32bit system register save restore as a direct
translation of the assembly code version.
Signed-off-by: Marc Zyngier
---
arch/arm64/kvm/hyp/hyp.h | 2 ++
arch/arm64/kvm/hyp/sysreg-sr.c | 41 +
2 files changed, 43
Implement the fpsimd save restore, keeping the lazy part in
assembler (as returning to C would be overkill).
Signed-off-by: Marc Zyngier
---
arch/arm64/kvm/hyp/Makefile| 1 +
arch/arm64/kvm/hyp/entry.S | 32 +++-
This is it. We remove all of the code that has now been rewritten.
Signed-off-by: Marc Zyngier
---
arch/arm64/kvm/Makefile |2 -
arch/arm64/kvm/hyp.S| 1081 +--
arch/arm64/kvm/vgic-v2-switch.S | 134 -
As we've now switched to the new world switch implementation,
remove the weak attributes, as nobody is supposed to override
it anymore.
Signed-off-by: Marc Zyngier
---
arch/arm64/kvm/hyp/debug-sr.c | 5 ++---
arch/arm64/kvm/hyp/hyp-entry.S | 3 ---
KVM so far relies on code patching, and is likely to use it more
in the future. The main issue is that our alternative system works
at the instruction level, while we'd like to have alternatives at
the function level.
In order to cope with this, add the "hyp_alternate_select" macro that
outputs a
On 27 November 2015 at 09:08, Tyler Baker wrote:
> On 27 November 2015 at 00:54, Christian Borntraeger
> wrote:
>> On 11/26/2015 09:47 PM, Christian Borntraeger wrote:
>>> On 11/26/2015 05:17 PM, Tyler Baker wrote:
Hi Christian,
The
> -Original Message-
> From: Andrey Smetanin [mailto:asmeta...@virtuozzo.com]
> Sent: Wednesday, November 25, 2015 7:20 AM
> To: kvm@vger.kernel.org
> Cc: Gleb Natapov ; Paolo Bonzini
> ; KY Srinivasan ; Haiyang
> Zhang
> -Original Message-
> From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo
> Bonzini
> Sent: Friday, November 27, 2015 1:35 AM
> To: Andrey Smetanin ; kvm@vger.kernel.org
> Cc: Gleb Natapov ; KY Srinivasan
On 26/11/2015 17:29, Andrey Smetanin wrote:
> The test checks Hyper-V SynIC timers functionality.
> The test runs on every vCPU and performs start/stop
> of periodic/one-shot timers (with period=1ms) and checks
> validity of received expiration messages in appropriate
> ISR's.
>
>
On 27/11/2015 12:30, Andrey Smetanin wrote:
>>>
>>> +
>>> +static void stimer_test_cleanup(void *ctx)
>>> +{
>>> +irq_enable();
>>
>> Why enable again?
> I'll remove it.
I guess you can remove the one in stimer_test_prepare too. If the
interrupts are disabled you don't get the IPI either,
On 11/27/2015 12:34 PM, Paolo Bonzini wrote:
On 25/11/2015 16:20, Andrey Smetanin wrote:
This struct is required for Hyper-V SynIC timers implementation inside KVM
and for upcoming Hyper-V VMBus support by userspace(QEMU). So place it into
Hyper-V UAPI header.
Signed-off-by: Andrey
The test logic is good, but the glue can be improved a bit so that the
output is more useful if it breaks.
On 26/11/2015 17:29, Andrey Smetanin wrote:
> The test checks Hyper-V SynIC timers functionality.
> The test runs on every vCPU and performs start/stop
> of periodic/one-shot timers (with
On 11/27/2015 01:49 PM, Paolo Bonzini wrote:
On 27/11/2015 09:12, Roman Kagan wrote:
+ n = div64_u64(time_now - stimer->exp_time, stimer->count) + 1;
+ stimer->exp_time += n * stimer->count;
This is actually just a reminder calculation so I'd rather do it
directly with
On 11/27/2015 02:17 PM, Paolo Bonzini wrote:
On 26/11/2015 17:29, Andrey Smetanin wrote:
The test checks Hyper-V SynIC timers functionality.
The test runs on every vCPU and performs start/stop
of periodic/one-shot timers (with period=1ms) and checks
validity of received expiration messages
On 11/27/2015 02:17 PM, Paolo Bonzini wrote:
The test logic is good, but the glue can be improved a bit so that the
output is more useful if it breaks.
Thanks for comments below. I'll redo this patch.
On 26/11/2015 17:29, Andrey Smetanin wrote:
The test checks Hyper-V SynIC timers
On 27 November 2015 at 10:53, Tyler Baker wrote:
> On 27 November 2015 at 09:08, Tyler Baker wrote:
>> On 27 November 2015 at 00:54, Christian Borntraeger
>> wrote:
>>> On 11/26/2015 09:47 PM, Christian Borntraeger wrote:
On 25/11/2015 16:20, Andrey Smetanin wrote:
> This struct is required for Hyper-V SynIC timers implementation inside KVM
> and for upcoming Hyper-V VMBus support by userspace(QEMU). So place it into
> Hyper-V UAPI header.
>
> Signed-off-by: Andrey Smetanin
>
On Wed, Nov 25, 2015 at 06:20:21PM +0300, Andrey Smetanin wrote:
> Per Hyper-V specification (and as required by Hyper-V-aware guests),
> SynIC provides 4 per-vCPU timers. Each timer is programmed via a pair
> of MSRs, and signals expiration by delivering a special format message
> to the
On Wed, Nov 25, 2015 at 06:20:20PM +0300, Andrey Smetanin wrote:
> The SynIC message protocol mandates that the message slot is claimed
> by atomically setting message type to something other than HVMSG_NONE.
> If another message is to be delivered while the slot is still busy,
> message pending
On 11/26/2015 09:47 PM, Christian Borntraeger wrote:
> On 11/26/2015 05:17 PM, Tyler Baker wrote:
>> Hi Christian,
>>
>> The kernelci.org bot recently has been reporting kvm guest boot
>> failures[1] on various arm64 platforms in next-20151126. The bot
>> bisected[2] the failures to the commit in
On 27/11/2015 09:12, Roman Kagan wrote:
>> > + n = div64_u64(time_now - stimer->exp_time, stimer->count) + 1;
>> > + stimer->exp_time += n * stimer->count;
> This is actually just a reminder calculation so I'd rather do it
> directly with div64_u64_rem().
It took me a while to understand why
39 matches
Mail list logo