From: Wei Liu <wei.liu2@citrix.com>
To: Xen-devel <xen-devel@lists.xenproject.org>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
Wei Liu <wei.liu2@citrix.com>, Jan Beulich <JBeulich@suse.com>
Subject: [PATCH 2/2] x86/pv: drop gate_op prefix in emul-gate-op.c
Date: Thu, 31 Aug 2017 12:45:06 +0100 [thread overview]
Message-ID: <20170831114506.9610-3-wei.liu2@citrix.com> (raw)
In-Reply-To: <20170831114506.9610-1-wei.liu2@citrix.com>
There is only one function gate_op_read that needs to be modified.
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
xen/arch/x86/pv/emul-gate-op.c | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/xen/arch/x86/pv/emul-gate-op.c b/xen/arch/x86/pv/emul-gate-op.c
index 0a7381a094..002fb782f2 100644
--- a/xen/arch/x86/pv/emul-gate-op.c
+++ b/xen/arch/x86/pv/emul-gate-op.c
@@ -117,12 +117,8 @@ struct gate_op_ctxt {
bool insn_fetch;
};
-static int gate_op_read(
- enum x86_segment seg,
- unsigned long offset,
- void *p_data,
- unsigned int bytes,
- struct x86_emulate_ctxt *ctxt)
+static int read(enum x86_segment seg, unsigned long offset, void *p_data,
+ unsigned int bytes, struct x86_emulate_ctxt *ctxt)
{
const struct gate_op_ctxt *goc =
container_of(ctxt, struct gate_op_ctxt, ctxt);
@@ -230,7 +226,7 @@ void pv_emulate_gate_op(struct cpu_user_regs *regs)
ctxt.ctxt.addr_size = ar & _SEGMENT_DB ? 32 : 16;
/* Leave zero in ctxt.ctxt.sp_size, as it's not needed for decoding. */
- state = x86_decode_insn(&ctxt.ctxt, gate_op_read);
+ state = x86_decode_insn(&ctxt.ctxt, read);
ctxt.insn_fetch = false;
if ( IS_ERR_OR_NULL(state) )
{
@@ -265,9 +261,8 @@ void pv_emulate_gate_op(struct cpu_user_regs *regs)
case 3:
++jump;
base = x86_insn_operand_ea(state, &seg);
- rc = gate_op_read(seg,
- base + (x86_insn_opsize(state) >> 3),
- &opnd_sel, sizeof(opnd_sel), &ctxt.ctxt);
+ rc = read(seg, base + (x86_insn_opsize(state) >> 3),
+ &opnd_sel, sizeof(opnd_sel), &ctxt.ctxt);
break;
}
break;
--
2.11.0
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-08-31 11:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-31 11:45 [PATCH 0/2] x86/pv: drop unnecessary prefixes Wei Liu
2017-08-31 11:45 ` [PATCH 1/2] x86/pv: drop priv_op prefix in emul-priv-op.c Wei Liu
2017-08-31 12:02 ` Jan Beulich
2017-08-31 11:45 ` Wei Liu [this message]
2017-08-31 12:03 ` [PATCH 2/2] x86/pv: drop gate_op prefix in emul-gate-op.c Jan Beulich
2017-08-31 12:36 ` Andrew Cooper
2017-08-31 15:04 ` Wei Liu
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=20170831114506.9610-3-wei.liu2@citrix.com \
--to=wei.liu2@citrix.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=xen-devel@lists.xenproject.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;
as well as URLs for NNTP newsgroup(s).