From: Jan Kiszka <jan.kiszka@web.de>
To: 张智 <zhangzhi2022@hotmail.com>
Cc: kvm@vger.kernel.org
Subject: Re: kvm_external interrupt
Date: Thu, 21 Feb 2013 09:58:04 +0100 [thread overview]
Message-ID: <5125E19C.5030803@web.de> (raw)
In-Reply-To: <BLU170-W493F76C5E280F56A32BE87CCF70@phx.gbl>
[-- Attachment #1: Type: text/plain, Size: 1719 bytes --]
On 2013-02-21 09:43, 张智 wrote:
>
>
>
>> Date: Thu, 21 Feb 2013 08:39:40 +0100
>> From: jan.kiszka@web.de
>> To: zhangzhi2022@hotmail.com
>> Subject: Re: kvm_external interrupt
>>
>> On 2013-02-21 06:49, zhang zhi wrote:
>>> Hi Dear Jan,
>>>
>>> I have one question to ask : when I'm using the guest os to do some keyboard
>>> input, I feel no time delay as if guest os were on the bare-metal machine.
>>
>> Your "measurement" can't reveal the existing delay. It's in the order of
>> milliseconds, at most.
>>
> So regardless of ELI and posted interrupts, when user is using keyboard input to interact with guest os, the keyboard event is still intercepted by vmm, which handles the interrupt according to interrupt descriptor table of vmm. After that, vmm finally delivers the corresponding interrupt to guest os using inter-processor interrupt.
> Is that so?
In general (independent of KVM), if the hypervisor has to share a device
between different guests or between itself (in case of KVM, the Linux
host is the hypervisor) and a guest, it has to intercept access to and
events from that device.
The PC keyboard is usually shared (and you can't allow a guest direct
access to it as that I/O port can reset the host). So its interrupt is
in first handled by the host and then potentially forwarded to a guest.
That may happen via posted interrupts in the future or via event
injection into the VCPU. If the physical interrupt triggered on a
different CPU than the target VCPU is running on (and you don't have
posted interrupts), you also need a host-side IPI to kick the VCPU out
of guest mode, enabling the injection of the virtual interrupt on re-entry.
HTH,
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]
parent reply other threads:[~2013-02-21 8:58 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <BLU170-W493F76C5E280F56A32BE87CCF70@phx.gbl>]
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=5125E19C.5030803@web.de \
--to=jan.kiszka@web.de \
--cc=kvm@vger.kernel.org \
--cc=zhangzhi2022@hotmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox