From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: KVM-49 - XP crash on startup/install Date: Tue, 30 Oct 2007 05:48:13 +0200 Message-ID: <4726A97D.3080202@qumranet.com> References: <200710291806.07959.tdempsey42@charter.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------030703080208070008020406" Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: tdempsey42-xwVYE8SWAR3R7s880joybQ@public.gmane.org Return-path: In-Reply-To: <200710291806.07959.tdempsey42-xwVYE8SWAR3R7s880joybQ@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. --------------030703080208070008020406 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit tdempsey42-xwVYE8SWAR3R7s880joybQ@public.gmane.org wrote: > Hello again, > > I attempted to install Windows XP(sp2) as a guest and it crashes with a blank > window and "QEMU/KVM[Stopped]" in the title. The install starts fine > with -no-kvm. Below is the output from /proc/version, /proc/cpuinfo and > dmesg. I am using kvm-49. Also, the only way to get rid of qemu > dmesg output: > BUG: using smp_processor_id() in preemptible [00000001] code: > qemu-system-x86/9551 > caller is kvm_flush_remote_tlbs+0x6c/0x140 [kvm] > [] debug_smp_processor_id+0xad/0xb0 > [] kvm_flush_remote_tlbs+0x6c/0x140 [kvm] > Does the attached patch help? -- Any sufficiently difficult bug is indistinguishable from a feature. --------------030703080208070008020406 Content-Type: text/x-patch; name="fix-smp_call_function_mask-emulation.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="fix-smp_call_function_mask-emulation.patch" diff --git a/kernel/external-module-compat.h b/kernel/external-module-compat.h index 6fd0ef6..5d5fd60 100644 --- a/kernel/external-module-compat.h +++ b/kernel/external-module-compat.h @@ -464,15 +464,17 @@ static inline int kvm_smp_call_function_mask(cpumask_t mask, cpumask_t allbutself; int cpus; int cpu; + int me; + me = get_cpu(); allbutself = cpu_online_map; - cpu_clear(smp_processor_id(), allbutself); + cpu_clear(me, allbutself); cpus_and(mask, mask, allbutself); cpus = cpus_weight(mask); if (!cpus) - return 0; + goto out; data.func = func; data.info = info; @@ -490,12 +492,14 @@ static inline int kvm_smp_call_function_mask(cpumask_t mask, } if (!wait) - return 0; + goto out; while (atomic_read(&data.finished) != cpus) { cpu_relax(); barrier(); } +out: + put_cpu(); return 0; } --------------030703080208070008020406 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ --------------030703080208070008020406 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 --------------030703080208070008020406--