From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andre Przywara Subject: Re: [PATCH 4/6] add syscall emulation Date: Thu, 18 Jun 2009 12:27:13 +0200 Message-ID: <4A3A1681.7040404@amd.com> References: <1245246636-30760-1-git-send-email-andre.przywara@amd.com> <1245246636-30760-5-git-send-email-andre.przywara@amd.com> <4A39FF1E.6090203@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Cc: Christoph Egger , kvm@vger.kernel.org To: Avi Kivity Return-path: Received: from tx2ehsobe004.messaging.microsoft.com ([65.55.88.14]:22356 "EHLO TX2EHSOBE008.bigfish.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756218AbZFRKYQ (ORCPT ); Thu, 18 Jun 2009 06:24:16 -0400 In-Reply-To: <4A39FF1E.6090203@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: 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