From: Andre Przywara <andre.przywara@amd.com>
To: Avi Kivity <avi@redhat.com>
Cc: Christoph Egger <christoph.egger@amd.com>, kvm@vger.kernel.org
Subject: Re: [PATCH 4/6] add syscall emulation
Date: Thu, 18 Jun 2009 12:27:13 +0200 [thread overview]
Message-ID: <4A3A1681.7040404@amd.com> (raw)
In-Reply-To: <4A39FF1E.6090203@redhat.com>
Avi Kivity wrote:
> On 06/17/2009 04:50 PM, Andre Przywara wrote:
>>
>> +static inline void
>> +setup_syscalls_segments(struct x86_emulate_ctxt *ctxt,
>> + struct kvm_segment *cs, struct kvm_segment *ss)
>> +{
>> + memset(cs, 0, sizeof(struct kvm_segment));
>> + kvm_x86_ops->get_segment(ctxt->vcpu, cs, VCPU_SREG_CS);
>> + memset(ss, 0, sizeof(struct kvm_segment));
>> +
>> + cs->l = 0; /* will be adjusted later */
>> + cs->base = 0; /* flat segment */
>> + cs->g = 1; /* 4kb granularity */
>> + cs->limit = 0xfffff; /* 4GB limit */
>>
> ...
>> + ss->limit = 0xfffff; /* 4GB limit */
>>
>
> limit in kvm_segment is expanded, so 4GB is 0xffffffff.
You are right. This was probably a leftover from this cross vendor
migration g-bit issue.
Beside the fix here this removes some code in the separate paths, so I
remade patch 4-6/6 and will resend them.
Thanks for spotting this.
Regards,
Andre.
--
Andre Przywara
AMD-OSRC (Dresden)
Tel: x29712
next prev parent reply other threads:[~2009-06-18 10:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-17 13:50 [PATCH 0/6] add sysenter/syscall emulation for 32bit compat mode Andre Przywara
2009-06-17 13:50 ` [PATCH 1/6] allow emulation of syscalls instructions on #UD Andre Przywara
2009-06-17 13:50 ` [PATCH 2/6] add missing EFLAGS bit definitions Andre Przywara
2009-06-17 13:50 ` [PATCH 3/6] prepare for emulation of syscall instructions Andre Przywara
2009-06-17 13:50 ` [PATCH 4/6] add syscall emulation Andre Przywara
2009-06-18 8:47 ` Avi Kivity
2009-06-18 10:27 ` Andre Przywara [this message]
2009-06-22 8:43 ` Avi Kivity
2009-06-17 13:50 ` [PATCH 5/6] add sysenter emulation Andre Przywara
2009-06-17 13:50 ` [PATCH 6/6] add sysexit emulation Andre Przywara
2009-06-18 8:48 ` [PATCH 0/6] add sysenter/syscall emulation for 32bit compat mode Avi Kivity
2009-06-18 10:56 ` [PATCH 4/6 v2] add syscall emulation Andre Przywara
2009-06-18 10:56 ` [PATCH 5/6 v2] add sysenter emulation Andre Przywara
2009-06-18 10:56 ` [PATCH 6/6 v2] add sysexit emulation Andre Przywara
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=4A3A1681.7040404@amd.com \
--to=andre.przywara@amd.com \
--cc=avi@redhat.com \
--cc=christoph.egger@amd.com \
--cc=kvm@vger.kernel.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