From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 16/17] kvm-userspace: Provide compat wrapper for set_debugreg Date: Tue, 07 Oct 2008 14:17:30 +0200 Message-ID: <48EB535A.8020305@redhat.com> References: <20081006091415.095241851@mchn012c.ww002.siemens.net> <20081006091418.034225550@mchn012c.ww002.siemens.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Jan Kiszka Return-path: Received: from mx2.redhat.com ([66.187.237.31]:37086 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752662AbYJGMRf (ORCPT ); Tue, 7 Oct 2008 08:17:35 -0400 In-Reply-To: <20081006091418.034225550@mchn012c.ww002.siemens.net> Sender: kvm-owner@vger.kernel.org List-ID: Jan Kiszka wrote: > Older set_debugreg macros did not allow to pass the register number as > constant (without additional typcasting). Catch this as the latest kvm > debug changes make use of this property. > > Signed-off-by: Jan Kiszka > --- > kernel/external-module-compat-comm.h | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > Index: b/kernel/external-module-compat-comm.h > =================================================================== > --- a/kernel/external-module-compat-comm.h > +++ b/kernel/external-module-compat-comm.h > @@ -539,6 +539,16 @@ struct pci_dev *pci_get_bus_and_slot(uns > > #endif > > +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25) && defined(__x86_64__) > + > +#undef set_debugreg > +#define set_debugreg(value, register) \ > + __asm__("movq %0,%%db" #register \ > + : /* no output */ \ > + :"r" ((unsigned long)value)) > + > +#endif > + > #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,21) > > Should be in the x86 specific file (kernel/x86/external-module.h) -- error compiling committee.c: too many arguments to function