kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marius Vlad <mv@sec.uni-passau.de>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: "kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH] kvm-unit-tests: Fix GCC's 4.8 labels as values for nVMX tests.
Date: Mon, 24 Feb 2014 18:09:32 +0100	[thread overview]
Message-ID: <20140224170931.GA7783@lea.sec.uni-passau.de> (raw)
In-Reply-To: <530B6C35.2090605@siemens.com>

[-- Attachment #1: Type: text/plain, Size: 2312 bytes --]

On Mon, Feb 24, 2014 at 04:58:45PM +0100, Jan Kiszka wrote:
> On 2014-02-24 16:25, Marius Vlad wrote:
> > Commit 3b1274463fa8d074dd3bc77efe25b59a4ddd491e uses GCCs extension
> > labels as values to handle exceptions, but GCC 4.8 ``mistakingly''
> > uses the next body function as a jump label, for functions which
> > do not return. Fixed by returning a int value for those functions.
> > 
> > See http://thread.gmane.org/gmane.comp.emulators.kvm.devel/119186
> > 
> > Signed-off-by: Marius Vlad <mv@sec.uni-passau.de>
> > ---
> >  x86/vmx.c | 10 +++++-----
> >  1 file changed, 5 insertions(+), 5 deletions(-)
> > 
> > diff --git a/x86/vmx.c b/x86/vmx.c
> > index fe950e6..0c895af 100644
> > --- a/x86/vmx.c
> > +++ b/x86/vmx.c
> > @@ -548,7 +548,7 @@ static void exception_handler(struct ex_regs *regs)
> >  	regs->rip = (u64)exception_return;
> >  }
> >  
> > -static int test_for_exception(unsigned int ex, void (*func)(void))
> > +static int test_for_exception(unsigned int ex, int (*func)(void))
> >  {
> >  	handle_exception(ex, exception_handler);
> >  	exception = false;
> > @@ -557,23 +557,23 @@ static int test_for_exception(unsigned int ex, void (*func)(void))
> >  	return exception;
> >  }
> >  
> > -static void do_vmxon_off(void)
> > +static int do_vmxon_off(void)
> >  {
> >  	exception_return = &&resume;
> >  	barrier();
> >  	vmx_on();
> >  	vmx_off();
> >  resume:
> > -	return;
> > +	return 0;
> >  }
> >  
> > -static void do_write_feature_control(void)
> > +static int do_write_feature_control(void)
> >  {
> >  	exception_return = &&resume;
> >  	barrier();
> >  	wrmsr(MSR_IA32_FEATURE_CONTROL, 0);
> >  resume:
> > -	return;
> > +	return 0;
> >  }
> >  
> >  static int test_vmx_feature_control(void)
> > 
> 

 I see, no biggie, my fault for not looking on the list before going any deeper :-).

> Argh, getting old. I remembered that issue but forgot that I already had
> a fix for this queued:
> 
> http://thread.gmane.org/gmane.comp.emulators.kvm.devel/117866
> 
> I don't mind which version to pick, but maybe Paolo has mine already in
> his queue.
> 
> Sorry for the duplicate work.
> 
> Jan
> 
> -- 
> Siemens AG, Corporate Technology, CT RTC ITP SES-DE
> Corporate Competence Center Embedded Linux
> 

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2014-02-24 17:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-24 15:25 [PATCH] kvm-unit-tests: Fix GCC's 4.8 labels as values for nVMX tests Marius Vlad
2014-02-24 15:58 ` Jan Kiszka
2014-02-24 17:09   ` Marius Vlad [this message]
2014-02-25 14:26   ` Paolo Bonzini
2014-02-25 15:05     ` Jan Kiszka

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=20140224170931.GA7783@lea.sec.uni-passau.de \
    --to=mv@sec.uni-passau.de \
    --cc=jan.kiszka@siemens.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    /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;
as well as URLs for NNTP newsgroup(s).