diff mbox

kvm unit test fails to build on 32 bit systems

Message ID 20131111165951.GA15084@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Gleb Natapov Nov. 11, 2013, 4:59 p.m. UTC
On Mon, Nov 11, 2013 at 06:34:01PM +0200, Michael S. Tsirkin wrote:
> x86/eventinj.c: Assembler messages:
> x86/eventinj.c:151: Error: bad register name `%rsp'
> x86/eventinj.c:152: Error: bad register name `%rsp'
> 
How about that?

--
			Gleb.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Michael S. Tsirkin Nov. 11, 2013, 6:47 p.m. UTC | #1
On Mon, Nov 11, 2013 at 06:59:51PM +0200, Gleb Natapov wrote:
> On Mon, Nov 11, 2013 at 06:34:01PM +0200, Michael S. Tsirkin wrote:
> > x86/eventinj.c: Assembler messages:
> > x86/eventinj.c:151: Error: bad register name `%rsp'
> > x86/eventinj.c:152: Error: bad register name `%rsp'
> > 
> How about that?


works for me.

Tested-by: Michael S. Tsirkin <mst@redhat.com>


> diff --git a/x86/eventinj.c b/x86/eventinj.c
> index 3d36b37..9d4392c 100644
> --- a/x86/eventinj.c
> +++ b/x86/eventinj.c
> @@ -148,8 +148,8 @@ static void nmi_iret_isr(struct ex_regs *r)
>  	s[2] = read_rflags();
>  	s[1] = read_cs();
>  	s[0] = after_iret_addr = (unsigned long)&&after_iret;
> -	asm ("mov %%rsp, %0\n\t"
> -	     "mov %1, %%rsp\n\t"
> +	asm ("mov %%" R "sp, %0\n\t"
> +	     "mov %1, %%" R "sp\n\t"
>  	     "outl %2, $0xe4\n\t" /* flush stack page */
>  #ifdef __x86_64__
>  	     "iretq\n\t"
> --
> 			Gleb.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Gleb Natapov Nov. 11, 2013, 6:48 p.m. UTC | #2
On Mon, Nov 11, 2013 at 08:47:15PM +0200, Michael S. Tsirkin wrote:
> On Mon, Nov 11, 2013 at 06:59:51PM +0200, Gleb Natapov wrote:
> > On Mon, Nov 11, 2013 at 06:34:01PM +0200, Michael S. Tsirkin wrote:
> > > x86/eventinj.c: Assembler messages:
> > > x86/eventinj.c:151: Error: bad register name `%rsp'
> > > x86/eventinj.c:152: Error: bad register name `%rsp'
> > > 
> > How about that?
> 
> 
> works for me.
> 
> Tested-by: Michael S. Tsirkin <mst@redhat.com>
> 
> 

Signed-off-by: Gleb Natapov <gleb@redhat.com>
> > diff --git a/x86/eventinj.c b/x86/eventinj.c
> > index 3d36b37..9d4392c 100644
> > --- a/x86/eventinj.c
> > +++ b/x86/eventinj.c
> > @@ -148,8 +148,8 @@ static void nmi_iret_isr(struct ex_regs *r)
> >  	s[2] = read_rflags();
> >  	s[1] = read_cs();
> >  	s[0] = after_iret_addr = (unsigned long)&&after_iret;
> > -	asm ("mov %%rsp, %0\n\t"
> > -	     "mov %1, %%rsp\n\t"
> > +	asm ("mov %%" R "sp, %0\n\t"
> > +	     "mov %1, %%" R "sp\n\t"
> >  	     "outl %2, $0xe4\n\t" /* flush stack page */
> >  #ifdef __x86_64__
> >  	     "iretq\n\t"
> > --
> > 			Gleb.

--
			Gleb.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Michael S. Tsirkin Nov. 18, 2013, 7:02 p.m. UTC | #3
On Mon, Nov 11, 2013 at 08:48:23PM +0200, Gleb Natapov wrote:
> On Mon, Nov 11, 2013 at 08:47:15PM +0200, Michael S. Tsirkin wrote:
> > On Mon, Nov 11, 2013 at 06:59:51PM +0200, Gleb Natapov wrote:
> > > On Mon, Nov 11, 2013 at 06:34:01PM +0200, Michael S. Tsirkin wrote:
> > > > x86/eventinj.c: Assembler messages:
> > > > x86/eventinj.c:151: Error: bad register name `%rsp'
> > > > x86/eventinj.c:152: Error: bad register name `%rsp'
> > > > 
> > > How about that?
> > 
> > 
> > works for me.
> > 
> > Tested-by: Michael S. Tsirkin <mst@redhat.com>
> > 
> > 
> 
> Signed-off-by: Gleb Natapov <gleb@redhat.com>

Can this be applied please?

> > > diff --git a/x86/eventinj.c b/x86/eventinj.c
> > > index 3d36b37..9d4392c 100644
> > > --- a/x86/eventinj.c
> > > +++ b/x86/eventinj.c
> > > @@ -148,8 +148,8 @@ static void nmi_iret_isr(struct ex_regs *r)
> > >  	s[2] = read_rflags();
> > >  	s[1] = read_cs();
> > >  	s[0] = after_iret_addr = (unsigned long)&&after_iret;
> > > -	asm ("mov %%rsp, %0\n\t"
> > > -	     "mov %1, %%rsp\n\t"
> > > +	asm ("mov %%" R "sp, %0\n\t"
> > > +	     "mov %1, %%" R "sp\n\t"
> > >  	     "outl %2, $0xe4\n\t" /* flush stack page */
> > >  #ifdef __x86_64__
> > >  	     "iretq\n\t"
> > > --
> > > 			Gleb.
> 
> --
> 			Gleb.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Gleb Natapov Nov. 18, 2013, 7:05 p.m. UTC | #4
On Mon, Nov 18, 2013 at 09:02:39PM +0200, Michael S. Tsirkin wrote:
> On Mon, Nov 11, 2013 at 08:48:23PM +0200, Gleb Natapov wrote:
> > On Mon, Nov 11, 2013 at 08:47:15PM +0200, Michael S. Tsirkin wrote:
> > > On Mon, Nov 11, 2013 at 06:59:51PM +0200, Gleb Natapov wrote:
> > > > On Mon, Nov 11, 2013 at 06:34:01PM +0200, Michael S. Tsirkin wrote:
> > > > > x86/eventinj.c: Assembler messages:
> > > > > x86/eventinj.c:151: Error: bad register name `%rsp'
> > > > > x86/eventinj.c:152: Error: bad register name `%rsp'
> > > > > 
> > > > How about that?
> > > 
> > > 
> > > works for me.
> > > 
> > > Tested-by: Michael S. Tsirkin <mst@redhat.com>
> > > 
> > > 
> > 
> > Signed-off-by: Gleb Natapov <gleb@redhat.com>
> 
> Can this be applied please?
> 
I applied, but haven't pushed. Will do.

> > > > diff --git a/x86/eventinj.c b/x86/eventinj.c
> > > > index 3d36b37..9d4392c 100644
> > > > --- a/x86/eventinj.c
> > > > +++ b/x86/eventinj.c
> > > > @@ -148,8 +148,8 @@ static void nmi_iret_isr(struct ex_regs *r)
> > > >  	s[2] = read_rflags();
> > > >  	s[1] = read_cs();
> > > >  	s[0] = after_iret_addr = (unsigned long)&&after_iret;
> > > > -	asm ("mov %%rsp, %0\n\t"
> > > > -	     "mov %1, %%rsp\n\t"
> > > > +	asm ("mov %%" R "sp, %0\n\t"
> > > > +	     "mov %1, %%" R "sp\n\t"
> > > >  	     "outl %2, $0xe4\n\t" /* flush stack page */
> > > >  #ifdef __x86_64__
> > > >  	     "iretq\n\t"
> > > > --
> > > > 			Gleb.
> > 
> > --
> > 			Gleb.

--
			Gleb.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/x86/eventinj.c b/x86/eventinj.c
index 3d36b37..9d4392c 100644
--- a/x86/eventinj.c
+++ b/x86/eventinj.c
@@ -148,8 +148,8 @@  static void nmi_iret_isr(struct ex_regs *r)
 	s[2] = read_rflags();
 	s[1] = read_cs();
 	s[0] = after_iret_addr = (unsigned long)&&after_iret;
-	asm ("mov %%rsp, %0\n\t"
-	     "mov %1, %%rsp\n\t"
+	asm ("mov %%" R "sp, %0\n\t"
+	     "mov %1, %%" R "sp\n\t"
 	     "outl %2, $0xe4\n\t" /* flush stack page */
 #ifdef __x86_64__
 	     "iretq\n\t"