From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: trivial Makefile patch + problem report Date: Wed, 29 Nov 2006 14:38:35 +0200 Message-ID: <456D7F4B.1000307@qumranet.com> References: <456D76B2.3040001@qumranet.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------040006020406080001010102" Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Return-path: To: Roland Dreier In-Reply-To: <456D76B2.3040001-atKUWr5tajBWk0Htik3J/w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org This is a multi-part message in MIME format. --------------040006020406080001010102 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 --------------040006020406080001010102 Content-Type: text/x-patch; name="kvm-handle-external-interrupts-explicitly.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="kvm-handle-external-interrupts-explicitly.patch" 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; } --------------040006020406080001010102 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- 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 --------------040006020406080001010102 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ kvm-devel mailing list kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/kvm-devel --------------040006020406080001010102--