From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [Qemu-devel] [PATCH 28/35] kvm: x86: Introduce kvmclock device to save/restore its state Date: Wed, 12 Jan 2011 12:22:37 +0200 Message-ID: <4D2D80ED.8030405@redhat.com> References: <4D2B6CB5.9050602@codemonkey.ws> <4D2B74D8.4080309@web.de> <4D2B8662.9060909@web.de> <4D2C60FB.7030009@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Markus Armbruster , Jan Kiszka , Marcelo Tosatti , Glauber Costa , kvm@vger.kernel.org, qemu-devel@nongnu.org To: Anthony Liguori Return-path: Received: from mx1.redhat.com ([209.132.183.28]:27659 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750942Ab1ALKWu (ORCPT ); Wed, 12 Jan 2011 05:22:50 -0500 In-Reply-To: <4D2C60FB.7030009@linux.vnet.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: On 01/11/2011 03:54 PM, Anthony Liguori wrote: > > Right, we should introduce a KVMBus that KVM devices are created on. > The devices can get at KVMState through the BusState. There is no kvm bus in a PC (I looked). We're bending the device model here because a device is implemented in the kernel and not in userspace. An implementation detail is magnified beyond all proportions. An ioapic that is implemented by kvm lives in exactly the same place that the qemu ioapic lives in. An assigned pci device lives on the PCI bus, not a KVMBus. If we need a pointer to KVMState, then we must find it elsewhere, not through creating imaginary buses that don't exist. -- error compiling committee.c: too many arguments to function