From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rusty Russell Subject: Re: VM id in KVM? Date: Tue, 24 Jul 2007 08:55:55 +1000 Message-ID: <1185231355.1803.22.camel@localhost.localdomain> References: <46A48B63.2030202@qumranet.com> <46A48D0E.1040803@de.ibm.com> <46A48E65.6090105@qumranet.com> <46A48ECD.7020809@qumranet.com> <20070723133234.GA31631@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: carsteno-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org, kvm-devel To: "Daniel P. Berrange" Return-path: In-Reply-To: <20070723133234.GA31631-H+wXaHxf7aLQT0dZR+AlfA@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 On Mon, 2007-07-23 at 14:32 +0100, Daniel P. Berrange wrote: > As Avi > says I dont't see how a individual QEMU process could provide any meaningful > identifier itself aside from its PID whose uniqueness is guarenteed by the > OS on its behalf. Indeed. I use it in my pr_guest() patch which replaces all those printks with: +/* The guest did something wrong/strange. */ +#define pr_guest(vcpu, fmt, ...) \ + do { \ + if (__printk_ratelimit(5*HZ, 10)) \ + printk(KERN_WARNING "kvm: %i: cpu%i " fmt, \ + (vcpu)->kvm->pid, (vcpu)->vcpu_id \ + , ## __VA_ARGS__); \ + } while(0) I'll polish it up and send it on. I don't want Avi getting bored. Cheers, Rusty. ------------------------------------------------------------------------- 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/