From: Eduardo Habkost Subject: Re: [Qemu-devel] [PATCH] target-i386: add Intel AVX-512 support Date: Mon, 27 Oct 2014 13:48:54 -0200 Message-ID: <20141027154854.GA10848@thinpad.lan.raisama.net> References: <1414033363-31032-1-git-send-email-chao.p.peng@linux.intel.com> <20141023194923.GA25413@thinpad.lan.raisama.net> <20141024012716.GB3135@pengc-linux.bj.intel.com> <5449E9BE.9050900@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Chao Peng , qemu-devel@nongnu.org, kvm@vger.kernel.org, "Michael S. Tsirkin" , Marcelo Tosatti , Vadim Rozenfeld , Laszlo Ersek , Andreas =?iso-8859-1?Q?F=E4rber?= To: Paolo Bonzini Return-path: Received: from mx1.redhat.com ([209.132.183.28]:55827 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750958AbaJ0PtE (ORCPT ); Mon, 27 Oct 2014 11:49:04 -0400 Content-Disposition: inline In-Reply-To: <5449E9BE.9050900@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Fri, Oct 24, 2014 at 07:55:10AM +0200, Paolo Bonzini wrote: [...] > I think we can keep the macros. The actual cleanup would be to have a > single member for the 32 512-bit ZMM registers, instead of splitting > xmm/ymmh/zmmh/zmm_hi16. This will get rid of the YMM_* and ZMM_* > registers. However, we could not use simple memcpy()s to marshal in and > out of the XSAVE data. We can do it in 2.2. Now, about the actual 2.3 plans: I believe the xmm/ymmh/zmmh/zmm_hi16 separation actually makes the code simpler, because the only code touching those registers inside QEMU is xsave/vmstate state loading/saving, where the bits of the ZMM registers are split into different sections/fields exactly in the same way. We can still eliminate the YMM_* and ZMM_* macros while keeping xmm/ymmh/zmmh/zmm_hi16 as separate fields, and having a single zmm_regs member would just add unnecessary complexity to the XSAVE<->CPUX86State<->VMState translation code. (But if one day TCG starts implementing AVX or AVX512, then it may be worthwhile to move the ZMM registers into a single field.) -- Eduardo