From: Alexandru Stefan ISAILA <aisaila@bitdefender.com>
To: "JBeulich@suse.com" <JBeulich@suse.com>,
"andrew.cooper3@citrix.com" <andrew.cooper3@citrix.com>
Cc: "boris.ostrovsky@oracle.com" <boris.ostrovsky@oracle.com>,
"tamas@tklengyel.com" <tamas@tklengyel.com>,
"rcojocaru@bitdefender.com" <rcojocaru@bitdefender.com>,
"suravee.suthikulpanit@amd.com" <suravee.suthikulpanit@amd.com>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH v2] hvm/svm: Implement Debug events
Date: Tue, 20 Mar 2018 16:33:28 +0000 [thread overview]
Message-ID: <1521563607.3535.2.camel@bitdefender.com> (raw)
In-Reply-To: <0538060e-a0bc-5155-0505-5b7b69ba458b@citrix.com>
On Ma, 2018-03-20 at 16:14 +0000, Andrew Cooper wrote:
> On 20/03/18 16:05, Jan Beulich wrote:
> >
> > >
> > > >
> > > > >
> > > > > On 20.03.18 at 16:53, <andrew.cooper3@citrix.com> wrote:
> > > On 20/03/18 09:40, Alexandru Isaila wrote:
> > > >
> > > > @@ -2438,16 +2439,15 @@ static bool
> > > > svm_get_pending_event(struct vcpu *v, struct x86_event *info)
> > > > return true;
> > > > }
> > > >
> > > > -static void svm_propagate_intr(struct vcpu *v, unsigned long
> > > > insn_len)
> > > > +static void svm_propagate_intr(unsigned long insn_len, int16_t
> > > > vector,
> > > uint8_t type)
> > >
> > > Hmm - not sure where the old unsigned long came from, but it
> > > isn't
> > > really correct. Also, as this function no longer propagates the
> > > contents of the vmcb, it is now mis-named.
> > >
> > > Please could you delete this function and use:
> > >
> > > diff --git a/xen/include/asm-x86/hvm/hvm.h b/xen/include/asm-
> > > x86/hvm/hvm.h
> > > index 2376ed6..843dafe 100644
> > > --- a/xen/include/asm-x86/hvm/hvm.h
> > > +++ b/xen/include/asm-x86/hvm/hvm.h
> > > @@ -407,6 +407,19 @@ void hvm_migrate_pirqs(struct vcpu *v);
> > >
> > > void hvm_inject_event(const struct x86_event *event);
> > >
> > > +static inline void hvm_inject_exception(
> > > + unsigned int vector, unsigned int type, unsigned int
> > > insn_len)
> > > +{
> > > + struct x86_event event = {
> > > + .vector = vector,
> > > + .type = type,
> > > + .insn_len = insn_len,
> > > + .error_code = X86_EVENT_NO_EC,
> > > + };
> > > +
> > > + hvm_inject_event(&event);
> > > +}
> > > +
> > > static inline void hvm_inject_hw_exception(unsigned int vector,
> > > int
> > > errcode)
> > > {
> > > struct x86_event event = {
> > >
> > > as a new common helper. (I'm not terribly happy with the name,
> > > but I
> > > can't think of a better alternative, seeing as it is needed for
> > > both
> > > software and hardware exceptions.)
> > We'll need some better name though - "exception" together with
> > an unconditional X86_EVENT_NO_EC is not really a reasonable
> > combination.
> Alternatively, keep the current name, extend the parameter list with
> an
> "int error_code" and have the new callers pass X86_EVENT_NO_EC in?
>
> ~Andrew
>
Keeping the name with an extra parameter sounds better to me.
Then hvm_inject_exception is it.
~Alex
________________________
This email was scanned by Bitdefender
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2018-03-20 16:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-20 9:40 [PATCH v2] hvm/svm: Implement Debug events Alexandru Isaila
2018-03-20 15:53 ` Andrew Cooper
2018-03-20 16:05 ` Jan Beulich
2018-03-20 16:14 ` Andrew Cooper
2018-03-20 16:33 ` Alexandru Stefan ISAILA [this message]
2018-03-20 16:44 ` Jan Beulich
2018-03-20 16:49 ` Tamas K Lengyel
2018-03-20 16:57 ` Andrew Cooper
2018-03-20 17:07 ` Alexandru Stefan ISAILA
2018-03-20 18:28 ` Tamas K Lengyel
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=1521563607.3535.2.camel@bitdefender.com \
--to=aisaila@bitdefender.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=boris.ostrovsky@oracle.com \
--cc=rcojocaru@bitdefender.com \
--cc=suravee.suthikulpanit@amd.com \
--cc=tamas@tklengyel.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.