From: Jan Kiszka <jan.kiszka@web.de>
To: Abel Gordon <ABELG@il.ibm.com>
Cc: Alex Landau <LALEX@il.ibm.com>,
Dan Tsafrir <dan.tsafrir@gmail.com>,
sheng qiu <herbert1984106@gmail.com>, kvm <kvm@vger.kernel.org>,
Muli Ben-Yehuda <muli@cs.technion.ac.il>,
Nadav Har'El <NYH@il.ibm.com>, Nadav Amit <nadav.amit@gmail.com>
Subject: Re: KVM handling external interrupts
Date: Thu, 07 Jun 2012 14:11:24 +0200 [thread overview]
Message-ID: <4FD09A6C.4000601@web.de> (raw)
In-Reply-To: <OF0813AA65.D4B43A03-ONC2257A16.003E03A1-C2257A16.0040FC13@il.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 2120 bytes --]
On 2012-06-07 13:49, Abel Gordon wrote:
>
>
> Jan Kiszka <jan.kiszka@web.de> wrote on 07/06/2012 14:10:32:
>
>>> BTW, the shadow IDT has to be put in the guest address space, right? So
>>> we need to make it read-only for the guest?
>>
>> Just found your solution: Append to a PCI bar. That's nasty. Better
>> reserve some memory via e820. There is a paravirtual channel from QEMU
>> to the BIOS to communicate such reservations.
>
> We will take a look at e820 and consider your suggestion, thanks!
> The PCI BAR worked well to obtain an "unused" and "mapped" memory area
> for unmodified guests.
>
> Nasty ? Well, as usual, depends who you ask and the alternatives you
> compare with.
> For us, it was an elegant and easy way to achieve the goal.
It's nasty as it requires more interaction between KVM and the userspace
hypervisor and relies on PCI, which has nothing to do with the x86
architecture. Consider you only want to forward non-PCI interrupts (e.g.
the LAPIC timer) and have no assigned device...
>
>> BTW, the IDTR holds a linear address, not a virtual one. Unless I
>> misremember, there is no need to map the IDT via the page table. The
>> processor will not consult it for reading its entries.
>
> As I understand and as we noticed in our runs using ELI, the processor
> uses the page tables to translate the IDTR (linear address) into physical
> address (guest physical in this case).
>
> (1) Logical addresses are converted to linear addresses using segments (not
> relevant in our case)
> (2) Linear addresses are converted to physical addresses using page tables
> (this is our case)
>
> Am I missing something ? In your case, I assume, [virtual = logical] and
> [linear = linear]
> or you are using some different semantics ?
No, you are right, the descriptor tables run through paging as well.
But how do you ensure that the shadow IDT is mapped where you expect it?
How do you detect where it is mapped? That reminds me of our KVM VAPIC
and the hoops that code has to jump through to ensure this just for
32-bit XP guests...
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
next prev parent reply other threads:[~2012-06-07 12:11 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-07 0:12 KVM handling external interrupts sheng qiu
2012-06-07 7:51 ` Abel Gordon
2012-06-07 8:13 ` Jan Kiszka
2012-06-07 9:02 ` Jan Kiszka
2012-06-07 10:47 ` Abel Gordon
2012-06-07 10:51 ` Jan Kiszka
2012-06-07 11:05 ` Abel Gordon
2012-06-07 11:13 ` Jan Kiszka
2012-06-07 11:51 ` Abel Gordon
2012-06-07 11:54 ` Jan Kiszka
2012-06-07 12:02 ` Abel Gordon
2012-06-07 11:10 ` Jan Kiszka
2012-06-07 11:49 ` Abel Gordon
2012-06-07 12:11 ` Jan Kiszka [this message]
2012-06-07 12:25 ` Abel Gordon
2012-06-07 15:05 ` Jan Kiszka
2012-06-10 8:41 ` Abel Gordon
2012-06-10 10:16 ` Jan Kiszka
2012-06-10 10:43 ` Abel Gordon
2012-06-10 12:16 ` Jan Kiszka
2012-06-10 13:30 ` Abel Gordon
2012-06-07 9:55 ` Abel Gordon
2012-06-07 10:23 ` Jan Kiszka
2012-06-07 10:34 ` Nadav Har'El
2012-06-07 10:48 ` Jan Kiszka
2012-06-07 11:40 ` Jan Kiszka
2012-06-07 12:17 ` Abel Gordon
2012-06-07 12:19 ` Jan Kiszka
2012-06-07 12:32 ` Abel Gordon
2012-06-07 15:07 ` Jan Kiszka
2012-06-10 10:12 ` Abel Gordon
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=4FD09A6C.4000601@web.de \
--to=jan.kiszka@web.de \
--cc=ABELG@il.ibm.com \
--cc=LALEX@il.ibm.com \
--cc=NYH@il.ibm.com \
--cc=dan.tsafrir@gmail.com \
--cc=herbert1984106@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=muli@cs.technion.ac.il \
--cc=nadav.amit@gmail.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