From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Julien Grall <julien.grall@arm.com>,
Paul Durrant <paul.durrant@citrix.com>, Tim Deegan <tim@xen.org>,
Xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH v2 for-4.9 3/6] x86/hvm: Fix segmentation logic for system segments
Date: Thu, 6 Apr 2017 10:06:54 +0100 [thread overview]
Message-ID: <0809cc60-12be-998d-e6c7-e739ae93bc0f@citrix.com> (raw)
In-Reply-To: <58E61EC6020000780014DC93@prv-mh.provo.novell.com>
On 06/04/17 09:56, Jan Beulich wrote:
>>>> On 05.04.17 at 19:33, <andrew.cooper3@citrix.com> wrote:
>> --- a/xen/arch/x86/hvm/emulate.c
>> +++ b/xen/arch/x86/hvm/emulate.c
>> @@ -549,7 +549,7 @@ static int hvmemul_virtual_to_linear(
>> okay = hvm_virtual_to_linear_addr(
>> seg, reg, offset - (*reps - 1) * bytes_per_rep,
>> *reps * bytes_per_rep, access_type,
>> - hvmemul_ctxt->ctxt.addr_size, linear);
>> + hvmemul_get_seg_reg(x86_seg_cs, hvmemul_ctxt), linear);
>> *linear += (*reps - 1) * bytes_per_rep;
>> if ( hvmemul_ctxt->ctxt.addr_size != 64 )
>> *linear = (uint32_t)*linear;
>> @@ -558,7 +558,7 @@ static int hvmemul_virtual_to_linear(
>> {
>> okay = hvm_virtual_to_linear_addr(
>> seg, reg, offset, *reps * bytes_per_rep, access_type,
>> - hvmemul_ctxt->ctxt.addr_size, linear);
>> + hvmemul_get_seg_reg(x86_seg_cs, hvmemul_ctxt), linear);
> Is there a particular reason why you use the function call in the
> above two cases, but ...
>
>> @@ -2075,7 +2075,7 @@ void hvm_emulate_init_per_insn(
>> hvmemul_ctxt->insn_buf_eip,
>> sizeof(hvmemul_ctxt->insn_buf),
>> hvm_access_insn_fetch,
>> - hvmemul_ctxt->ctxt.addr_size,
>> + &hvmemul_ctxt->seg_reg[x86_seg_cs],
> ... the cheaper array reference here?
Consistency with the surrounding code.
>
> In any event
>
> Reviewed-by: Jan Beulich <jbeulich@suse.com>
Thanks.
~Andrew
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-04-06 9:06 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-05 17:32 [PATCH v2 for-4.9 0/6] x86/emul: Fixes Andrew Cooper
2017-04-05 17:32 ` [PATCH v2 for-4.9 1/6] x86/hvm: Correct some address space terminology Andrew Cooper
2017-04-06 8:35 ` Tim Deegan
2017-04-06 8:47 ` Jan Beulich
2017-04-05 17:33 ` [PATCH v2 for-4.9 2/6] x86/hvm: Correct long mode predicate Andrew Cooper
2017-04-05 18:55 ` Boris Ostrovsky
2017-04-05 17:33 ` [PATCH v2 for-4.9 3/6] x86/hvm: Fix segmentation logic for system segments Andrew Cooper
2017-04-06 8:56 ` Jan Beulich
2017-04-06 9:06 ` Andrew Cooper [this message]
2017-04-05 17:33 ` [PATCH v2 for-4.9 4/6] x86/svm: Introduce svm_emul_swint_injection() Andrew Cooper
2017-04-05 18:58 ` Boris Ostrovsky
2017-04-05 18:59 ` Andrew Cooper
2017-04-06 9:00 ` Jan Beulich
2017-04-05 17:33 ` [PATCH v2 for-4.9 5/6] x86/emul: Drop swint_emulate infrastructure Andrew Cooper
2017-04-06 7:30 ` Jan Beulich
2017-04-06 9:07 ` Andrew Cooper
2017-04-05 17:33 ` [PATCH v2 for-4.9 6/6] x86/emul: Require callers to provide LMA in the emulation context Andrew Cooper
2017-04-06 9:08 ` Jan Beulich
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=0809cc60-12be-998d-e6c7-e739ae93bc0f@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=julien.grall@arm.com \
--cc=paul.durrant@citrix.com \
--cc=tim@xen.org \
--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 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).