From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] RFC: simplify kvm-userspace to qemu-kvm callback structure Date: Thu, 06 Dec 2007 16:50:03 +0200 Message-ID: <47580C1B.4090708@qumranet.com> References: <4756BB14.1080708@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: "kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org" , kvm-ppc-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, Jerone Young , Hollis Blanchard To: Christian Ehrhardt Return-path: In-Reply-To: <4756BB14.1080708-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@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 Christian Ehrhardt wrote: > Background: > In our ppc code for the demo we only needed a call to > cpu_physical_memory_rw to handle all kind of mmio we needed. Looking > at all the callback pointers for read/write mmio in kvm_callbacks I > wondered if this can be simplified with cpu_physical_memory_rw for x86 > too. So I tested it today and it works fine on with kvm-svm on my > opteron. > The only code that did not just redirect to another function was a > workaround for a Redhat 7.1 issue, so I merged it in the central call > making it easier to find and maintain (was split before) anyway. > If everyone agrees with it I will create a new patch also affecting > the other implementations of this interface e.g. user/main.c and a > rebased version of this one. > But maybe there was a reason to do it that split way with all the > callback pointers that was not obvious to me, so please comment. It may be worthwhile to unify all the reads into a single read, but read and write are fundamentally different. The fact that qemu implements it in one function is a detail; libkvm aims to satisfy more than just qemu. -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4