From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [PATCH 5/7] KVM/userspace: Device Assignment: Support for assigning PCI devices to guests Date: Tue, 23 Sep 2008 14:58:04 -0500 Message-ID: <48D94A4C.3050105@codemonkey.ws> References: <1222181695-23418-1-git-send-email-amit.shah@redhat.com> <1222181695-23418-2-git-send-email-amit.shah@redhat.com> <1222181695-23418-3-git-send-email-amit.shah@redhat.com> <1222181695-23418-4-git-send-email-amit.shah@redhat.com> <1222181695-23418-5-git-send-email-amit.shah@redhat.com> <1222181695-23418-6-git-send-email-amit.shah@redhat.com> <48D919A8.8040409@codemonkey.ws> <20080923183207.GA6922@il.ibm.com> <48D9411B.8040905@codemonkey.ws> <20080923194302.GF6922@il.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Amit Shah , avi@redhat.com, kvm@vger.kernel.org, Ben-Ami Yassour1 , weidong.han@intel.com, allen.m.kay@intel.com To: Muli Ben-Yehuda Return-path: Received: from fg-out-1718.google.com ([72.14.220.154]:20832 "EHLO fg-out-1718.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751665AbYIWT7F (ORCPT ); Tue, 23 Sep 2008 15:59:05 -0400 Received: by fg-out-1718.google.com with SMTP id 19so1833829fgg.17 for ; Tue, 23 Sep 2008 12:59:04 -0700 (PDT) In-Reply-To: <20080923194302.GF6922@il.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: Muli Ben-Yehuda wrote: > On Tue, Sep 23, 2008 at 02:18:51PM -0500, Anthony Liguori wrote: > > >> Make sure you issue iopl() before any of the VCPU threads are >> spawned. Otherwise, you may be running into issues when something >> other than VCPU-0 is doing PIO/MMIO and you haven't iopl()'d for >> that thread. >> > > Yeah, we thought of that, but as far as I can recall this happened > with a single VCPU. In any case, we'll look into it again. > The io thread runs in a separate thread than the VCPU. So if you were doing iopl(3) in the io thread (for instance, when called from machine_init), then the VCPU thread wouldn't necessarily have inherited the iopl(). You could also do it explicitly on vcpu thread construction. Regards, Anthony Liguori > Cheers, > Muli >