From: Marc Zyngier <marc.zyngier@arm.com>
To: Christoffer Dall <cdall@linaro.org>
Cc: "Radim Krčmář" <rkrcmar@redhat.com>,
"Christoffer Dall" <christoffer.dall@linaro.org>,
"Paolo Bonzini" <pbonzini@redhat.com>,
kvm@vger.kernel.org, "Rik van Riel" <riel@redhat.com>
Subject: Re: vtime accounting
Date: Tue, 14 Mar 2017 08:55:09 +0000 [thread overview]
Message-ID: <87zigos0eq.fsf@on-the-bus.cambridge.arm.com> (raw)
In-Reply-To: <20170314082601.GC1277@cbox> (Christoffer Dall's message of "Tue, 14 Mar 2017 09:26:01 +0100")
On Tue, Mar 14 2017 at 8:26:01 am GMT, Christoffer Dall <cdall@linaro.org> wrote:
> On ARM, I think the main benefits of implementing something like
> handle_external_intr would come from two things: (1) You'd avoid the
> context synchronization and associated cost of taking an exception on
> the CPU, and (2) you'd also (potentially) avoid the additional
> save/restore of all the GP regiters from the kernel exception entry path
> to create a usable gp_regs.
>
> I have to look more careful at whether or not (2) is possible, because
> it would mean we'd have to store the guest register state on a pt_regs
> structure in the first place and pass that directly to
> arch_handle_irq.
For that to be useful on pre-VHE HW and avoid the extra exception
handling, we'd also have to perform that arch_handle_irq call as part of
the exception return to EL1. That's not going to be very pretty, as we
need to build two return contexts (EL2->EL1 IRQ on the host, followed by
EL1->EL1).
This is all perfectly doable, but as always, we need numbers.
I had similar stuff for VHE a long while ago (back when I wrote WSINC),
but faking the pt_regs was absolutely horrible. But maybe it is time to
exhume this again...
> Additionally, if we had something like handle_external_intr, the
> guest_exit thing would be kinda moot, since we'd do our ticks like
> x86...
Indeed. Which brings the obvious question: are we the only ones not
taking the interrupt early?
Thanks,
M.
--
Jazz is not dead, it just smell funny.
next prev parent reply other threads:[~2017-03-14 8:55 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-08 10:57 vtime accounting Christoffer Dall
2017-03-09 8:16 ` Paolo Bonzini
2017-03-13 17:28 ` Radim Krčmář
2017-03-14 8:26 ` Christoffer Dall
2017-03-14 8:55 ` Marc Zyngier [this message]
2017-03-14 11:12 ` Christoffer Dall
2017-03-14 11:46 ` Marc Zyngier
2017-03-14 16:58 ` Radim Krčmář
2017-03-14 17:09 ` Paolo Bonzini
2017-03-14 18:41 ` Christoffer Dall
2017-03-14 19:32 ` Radim Krčmář
2017-03-14 20:01 ` Christoffer Dall
2017-03-14 21:52 ` Radim Krčmář
2017-03-15 8:09 ` Paolo Bonzini
2017-03-15 8:05 ` Paolo Bonzini
2017-03-15 8:30 ` Christoffer Dall
2017-03-14 18:39 ` Christoffer Dall
2017-03-14 20:27 ` Radim Krčmář
2017-03-14 21:53 ` Radim Krčmář
2017-03-15 8:43 ` Christoffer Dall
2017-03-15 15:57 ` Radim Krčmář
2017-03-15 16:48 ` Christoffer Dall
2017-03-15 17:09 ` Radim Krčmář
2017-03-24 15:04 ` Rik van Riel
2017-03-27 12:29 ` Wanpeng Li
2017-03-24 14:55 ` Rik van Riel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zigos0eq.fsf@on-the-bus.cambridge.arm.com \
--to=marc.zyngier@arm.com \
--cc=cdall@linaro.org \
--cc=christoffer.dall@linaro.org \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=riel@redhat.com \
--cc=rkrcmar@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.