From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH 4/5] KVM: x86: Wrong register masking in 64-bit mode Date: Wed, 07 May 2014 17:52:35 +0200 Message-ID: <536A56C3.7050907@redhat.com> References: <1399465972-4026-1-git-send-email-namit@cs.technion.ac.il> <1399465972-4026-5-git-send-email-namit@cs.technion.ac.il> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Cc: gleb@kernel.org, tglx@linutronix.de, mingo@redhat.com, x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org To: Nadav Amit , mtosatti@redhat.com, hpa@zytor.com Return-path: In-Reply-To: <1399465972-4026-5-git-send-email-namit@cs.technion.ac.il> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org Il 07/05/2014 14:32, Nadav Amit ha scritto: > 32-bit operations are zero extended in 64-bit mode. Currently, the code does > not handle them correctly and keeps the high bits. In 16-bit mode, the high > 32-bits are kept intact. > > In addition, although it is not well-documented, when address override prefix > is used with REP-string instruction, RCX high half is zeroed even if ECX was > zero on the first iteration (as if an assignment was performed to ECX). Is this true even for REPZ and ZF=0 or REPNZ and ZF=1? Paolo