public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: caglar-caicS1wCkhO6A22drWdTBw@public.gmane.org
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
	lkml <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] KVM: 'asm' operand has impossible constraints
Date: Sat, 27 Jan 2007 11:05:53 +0200	[thread overview]
Message-ID: <45BB15F1.6020600@qumranet.com> (raw)
In-Reply-To: <200701260140.47760.caglar-caicS1wCkhO6A22drWdTBw@public.gmane.org>

S.Çağlar Onur wrote:
> Hi;
>
> -rc6 fails with latest gcc 4.2 snapshot as following;
>
> CC [M]  drivers/kvm/svm.o
> drivers/kvm/svm.c:206: warning: 'inject_db' defined but not used
> drivers/kvm/svm.c: In function 'svm_vcpu_run':
> drivers/kvm/kvm.h:560: error: 'asm' operand has impossible constraints
> make[2]: *** [drivers/kvm/svm.o] Error 1
> make[1]: *** [drivers/kvm] Error 2
> make: *** [drivers] Error 2
>
> And according to this thread http://lkml.org/lkml/2006/11/11/129, solution is 
> converting g to rm, patch follows
>
>   

The patch looks correct, but I don't understand the gcc error message.  
Are we sure this isn't a gcc 4.2 bug?

"g" appears to be equivalent to "rmi", if "i" is impossible, gcc is free 
to use "r" or "m", no?


> Signed-off-by: S.Çağlar Onur <caglar@pardus.org.tr>
>
> Index: linux-2.6/drivers/kvm/kvm.h
> ===================================================================
> --- linux-2.6.orig/drivers/kvm/kvm.h	2007-01-26 01:38:35.000000000 +0200
> +++ linux-2.6/drivers/kvm/kvm.h	2007-01-26 01:37:48.000000000 +0200
> @@ -557,7 +557,7 @@
>  #ifndef load_ldt
>  static inline void load_ldt(u16 sel)
>  {
> -	asm ("lldt %0" : : "g"(sel));
> +	asm ("lldt %0" : : "rm"(sel));
>  }
>  #endif
>
>
>   


-- 
Do not meddle in the internals of kernels, for they are subtle and quick to panic.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

  parent reply	other threads:[~2007-01-27  9:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-25 23:40 [PATCH] KVM: 'asm' operand has impossible constraints S.Çağlar Onur
     [not found] ` <200701260140.47760.caglar-caicS1wCkhO6A22drWdTBw@public.gmane.org>
2007-01-27  9:05   ` Avi Kivity [this message]
2007-01-27 16:36     ` Paweł Sikora
     [not found]       ` <200701271736.30271.pluto-PIIpFW8S9c0@public.gmane.org>
2007-01-28  9:41         ` Avi Kivity
2007-01-27 21:28     ` S.Çağlar Onur
2007-01-27 21:46       ` D. Hazelton
2007-01-28  7:55       ` H. Peter Anvin
     [not found]       ` <200701272328.31532.caglar-caicS1wCkhO6A22drWdTBw@public.gmane.org>
2007-01-28  9:45         ` Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45BB15F1.6020600@qumranet.com \
    --to=avi-atkuwr5tajbwk0htik3j/w@public.gmane.org \
    --cc=caglar-caicS1wCkhO6A22drWdTBw@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox