All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petre Ovidiu PIRCALABU <ppircalabu@bitdefender.com>
To: "Paul.Durrant@citrix.com" <Paul.Durrant@citrix.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Cc: "kevin.tian@intel.com" <kevin.tian@intel.com>,
	"sstabellini@kernel.org" <sstabellini@kernel.org>,
	"wei.liu2@citrix.com" <wei.liu2@citrix.com>,
	"jun.nakajima@intel.com" <jun.nakajima@intel.com>,
	"rcojocaru@bitdefender.com" <rcojocaru@bitdefender.com>,
	"Andrew.Cooper3@citrix.com" <Andrew.Cooper3@citrix.com>,
	"tim@xen.org" <tim@xen.org>,
	"George.Dunlap@citrix.com" <George.Dunlap@citrix.com>,
	"tamas@tklengyel.com" <tamas@tklengyel.com>,
	"jbeulich@suse.com" <jbeulich@suse.com>,
	"Ian.Jackson@citrix.com" <Ian.Jackson@citrix.com>
Subject: Re: [PATCH v12 1/4] x86emul: New return code for unimplemented instruction
Date: Sat, 23 Sep 2017 18:56:53 +0000	[thread overview]
Message-ID: <1506192980.1835.10.camel@bitdefender.com> (raw)
In-Reply-To: <a58519000334488db8a5f6c7cf23e4dc@AMSPEX02CL03.citrite.net>

On Thu, 2017-09-21 at 08:53 +0000, Paul Durrant wrote:
> >      }
> > +    case X86EMUL_UNIMPLEMENTED:
> > +        ASSERT_UNREACHABLE();
> > +        /* Fall-through */
>
> Kind of surprised you need the fall-through if you assert the code is
> unreachable... but analysis tools can be a bit temperamental so ok.
>
> >      default:
> >          BUG();
> >      }
> >
> > +    ASSERT(rc != X86EMUL_UNIMPLEMENTED);
> > +
>
> Isn't this assertion redundant given the ASSERT_UNREACHABLE() above?
>
>
> >   Paul

The second ASSERT statement is used to make sure the return value of
hvm_process_io_intercept or hvm_send_ioreq (called from the "case
X86EMUL_UNHANDLEABLE:" branch of the switch statement above) cannot
be X86EMUL_UNIMPLEMENTED.

> hvm_process_io_intercept
> >      if ( rc != X86EMUL_OKAY )
> >          return rc;
> >
> >
//Petre

________________________
This email was scanned by Bitdefender
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  reply	other threads:[~2017-09-23 18:56 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-21  5:12 [PATCH v12 0/4] Notify monitor when emulating an unimplemented instruction Petre Pircalabu
2017-09-21  5:12 ` [PATCH v12 1/4] x86emul: New return code for " Petre Pircalabu
2017-09-21  8:53   ` Paul Durrant
2017-09-23 18:56     ` Petre Ovidiu PIRCALABU [this message]
2017-09-25  7:54       ` Paul Durrant
2017-09-21 12:42   ` Jan Beulich
2017-09-25  9:16     ` Petre Ovidiu PIRCALABU
2017-09-25 10:36       ` Jan Beulich
2017-09-22  9:10   ` Jan Beulich
2017-09-21  5:12 ` [PATCH v12 2/4] x86emul: Add return code information to error messages Petre Pircalabu
2017-09-21  5:12 ` [PATCH v12 3/4] x86/monitor: Notify monitor if an emulation fails Petre Pircalabu
2017-09-21  5:12 ` [PATCH v12 4/4] x86emul: Raise #UD when emulating an unrecognized instruction Petre Pircalabu
2017-09-21  8:57   ` Paul Durrant
2017-09-21 12:44     ` Jan Beulich
2017-09-25  6:22       ` Petre Ovidiu PIRCALABU

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=1506192980.1835.10.camel@bitdefender.com \
    --to=ppircalabu@bitdefender.com \
    --cc=Andrew.Cooper3@citrix.com \
    --cc=George.Dunlap@citrix.com \
    --cc=Ian.Jackson@citrix.com \
    --cc=Paul.Durrant@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=jun.nakajima@intel.com \
    --cc=kevin.tian@intel.com \
    --cc=rcojocaru@bitdefender.com \
    --cc=sstabellini@kernel.org \
    --cc=tamas@tklengyel.com \
    --cc=tim@xen.org \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.