From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: Roland Dreier <rdreier-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: trivial Makefile patch + problem report
Date: Wed, 29 Nov 2006 14:38:35 +0200 [thread overview]
Message-ID: <456D7F4B.1000307@qumranet.com> (raw)
In-Reply-To: <456D76B2.3040001-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 246 bytes --]
Avi Kivity wrote:
>
> I'll try to cook up an experimental patch to modify interrupt handling
> to be more like Xen's.
>
>
Patch attached. It's for the external module, not -mm.
--
error compiling committee.c: too many arguments to function
[-- Attachment #2: kvm-handle-external-interrupts-explicitly.patch --]
[-- Type: text/x-patch, Size: 1090 bytes --]
Index: vmx.c
===================================================================
--- vmx.c (revision 3989)
+++ vmx.c (working copy)
@@ -1163,6 +1163,7 @@
vmcs_writel(VM_EXIT_MSR_LOAD_ADDR,
virt_to_phys(vcpu->host_msrs + NR_BAD_MSRS));
vmcs_write32_fixedbits(MSR_IA32_VMX_EXIT_CTLS_MSR, VM_EXIT_CONTROLS,
+ VM_EXIT_ACK_INTR_ON_EXIT |
(HOST_IS_64 << 9)); /* 22.2,1, 20.7.1 */
vmcs_write32(VM_EXIT_MSR_STORE_COUNT, nr_good_msrs); /* 22.2.2 */
vmcs_write32(VM_EXIT_MSR_LOAD_COUNT, nr_good_msrs); /* 22.2.2 */
@@ -1380,7 +1381,24 @@
static int handle_external_interrupt(struct kvm_vcpu *vcpu,
struct kvm_run *kvm_run)
{
+ unsigned long irq;
+
++kvm_stat.irq_exits;
+ irq = vmcs_read32(VM_EXIT_INTR_INFO) & 0xff;
+ asm volatile (
+ "lea irq_dispatch(%0,%0,2), %0 \n\t"
+ "call *%0 \n\t"
+ "jmp out \n\t"
+ "irq_dispatch: \n\t"
+ "irq = 0 \n\t"
+ ".rept 256 \n\t"
+ " .byte 0xcd, irq \n\t" /* avoid int $3 -- one byte opcode */
+ " ret \n\t"
+ " irq = irq + 1 \n\t"
+ ".endr \n\t"
+ "out:"
+ : "+r"(irq) );
+
return 1;
}
[-- Attachment #3: Type: text/plain, Size: 347 bytes --]
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
[-- Attachment #4: Type: text/plain, Size: 186 bytes --]
_______________________________________________
kvm-devel mailing list
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/kvm-devel
next prev parent reply other threads:[~2006-11-29 12:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-28 23:23 trivial Makefile patch + problem report Roland Dreier
[not found] ` <aday7pvrw97.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2006-11-28 23:28 ` Roland Dreier
[not found] ` <adau00jrw0g.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2006-11-29 12:03 ` Avi Kivity
2006-11-29 12:01 ` Avi Kivity
[not found] ` <456D76B2.3040001-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2006-11-29 12:38 ` Avi Kivity [this message]
[not found] ` <456D7F4B.1000307-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2006-11-29 16:06 ` Roland Dreier
2006-11-29 22:29 ` Roland Dreier
2006-11-29 22:38 ` Roland Dreier
[not found] ` <adavekxq3ou.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2006-11-30 8:29 ` Dor Laor
[not found] ` <64F9B87B6B770947A9F8391472E03216094CB09E-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org>
2006-11-30 14:48 ` Roland Dreier
2006-11-29 15:30 ` Roland Dreier
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=456D7F4B.1000307@qumranet.com \
--to=avi-atkuwr5tajbwk0htik3j/w@public.gmane.org \
--cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=rdreier-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org \
/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