From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Otte Subject: Re: RFC/patch portability: split kvm_vm_ioctl v3 Date: Tue, 30 Oct 2007 13:31:12 +0100 Message-ID: <47272410.9020502@de.ibm.com> References: <1192192452.7630.16.camel@cotte.boeblingen.de.ibm.com><1193327325.8345.9.camel@cotte.boeblingen.de.ibm.com> <1193400099.10970.8.camel@cotte.boeblingen.de.ibm.com> <10EA09EFD8728347A513008B6B0DA77A024CEC4D@pdsmsx411.ccr.corp.intel.com> <47270F9E.5080007@qumranet.com> <10EA09EFD8728347A513008B6B0DA77A024CEC54@pdsmsx411.ccr.corp.intel.com> <47271C9B.1050804@de.ibm.com> <4727204E.6000606@qumranet.com> Reply-To: carsteno-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, carsteno-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org, "Zhang, Xiantao" , Hollis Blanchard To: Avi Kivity Return-path: In-Reply-To: <4727204E.6000606-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 Avi Kivity wrote: > But that doesn't make the code portable. The s390 userspace has to know > how to encode the number, and x86 will do it differently. > > If it's really different, let's keep it different. Unless you can push > the encoding so far back it's transparent to userspace (e.g. qemu). I agree that we should keep it seperate unless it makes sense to have commonality. A paravirt driver for example could make use of this abstraction: it could request an interrupt, and hand the __u64 that it got back to a function that actually sends the interrupt over. But for now, I agree we should keep it seperate. I am just thinking loud here. >> In addition, I would love to be able to specify which target CPUs may >> receive that interrupt because our IPI equivalent comes out just like >> a regular interrupt on just one target CPU. >> >> That boils down to something like this: >> struct kvm_interrupt_data { >> __u64 interrupt_number; >> cpuset_t possible_target_cpus; >> } >> and an KVM_INJECT_INTERRUPT common ioctl for the vm to provide this. > > Are cpusets exported to userspace? > > x86 has something similar (IPI to a set of cpus) but it's handled 100% > in the kernel these days. > No they are'nt. We'd need to come up with a different data structure for that. Does IPI have an interrupt number too? ------------------------------------------------------------------------- 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/