From: Paolo Bonzini <pbonzini@redhat.com>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: "Chao Peng" <chao.p.peng@linux.intel.com>,
qemu-devel@nongnu.org, kvm@vger.kernel.org,
"Michael S. Tsirkin" <mst@redhat.com>,
"Marcelo Tosatti" <mtosatti@redhat.com>,
"Vadim Rozenfeld" <vrozenfe@redhat.com>,
"Laszlo Ersek" <lersek@redhat.com>,
"Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [PATCH] target-i386: add Intel AVX-512 support
Date: Mon, 27 Oct 2014 16:53:01 +0100 [thread overview]
Message-ID: <544E6A5D.5060406@redhat.com> (raw)
In-Reply-To: <20141027154854.GA10848@thinpad.lan.raisama.net>
On 10/27/2014 04:48 PM, Eduardo Habkost wrote:
> 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.)
Yes, exactly---or even sooner, if we start dumping the 256 or 512 byte
registers. I think the current separation of xmm/ymmh/zmmh/zmm_hi16 is
a KVM-ism.
Let's see what the patches look like, once they are ready.
Paolo
WARNING: multiple messages have this Message-ID (diff)
From: Paolo Bonzini <pbonzini@redhat.com>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: kvm@vger.kernel.org, "Michael S. Tsirkin" <mst@redhat.com>,
"Marcelo Tosatti" <mtosatti@redhat.com>,
qemu-devel@nongnu.org, "Vadim Rozenfeld" <vrozenfe@redhat.com>,
"Chao Peng" <chao.p.peng@linux.intel.com>,
"Laszlo Ersek" <lersek@redhat.com>,
"Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [PATCH] target-i386: add Intel AVX-512 support
Date: Mon, 27 Oct 2014 16:53:01 +0100 [thread overview]
Message-ID: <544E6A5D.5060406@redhat.com> (raw)
In-Reply-To: <20141027154854.GA10848@thinpad.lan.raisama.net>
On 10/27/2014 04:48 PM, Eduardo Habkost wrote:
> 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.)
Yes, exactly---or even sooner, if we start dumping the 256 or 512 byte
registers. I think the current separation of xmm/ymmh/zmmh/zmm_hi16 is
a KVM-ism.
Let's see what the patches look like, once they are ready.
Paolo
next prev parent reply other threads:[~2014-10-27 15:53 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-23 3:02 [PATCH] target-i386: add Intel AVX-512 support Chao Peng
2014-10-23 3:02 ` [Qemu-devel] " Chao Peng
2014-10-23 14:34 ` Paolo Bonzini
2014-10-23 14:34 ` [Qemu-devel] " Paolo Bonzini
2014-10-24 16:38 ` Eduardo Habkost
2014-10-24 16:38 ` Eduardo Habkost
2014-10-23 19:49 ` Eduardo Habkost
2014-10-23 19:49 ` Eduardo Habkost
2014-10-24 1:27 ` Chao Peng
2014-10-24 1:27 ` Chao Peng
2014-10-24 5:55 ` Paolo Bonzini
2014-10-24 5:55 ` Paolo Bonzini
2014-10-24 11:12 ` Eduardo Habkost
2014-10-24 11:12 ` Eduardo Habkost
2014-10-24 11:38 ` Paolo Bonzini
2014-10-24 11:38 ` Paolo Bonzini
2014-10-27 15:48 ` Eduardo Habkost
2014-10-27 15:48 ` Eduardo Habkost
2014-10-27 15:53 ` Paolo Bonzini [this message]
2014-10-27 15:53 ` Paolo Bonzini
2014-10-24 16:01 ` Eduardo Habkost
2014-10-24 16:01 ` Eduardo Habkost
2014-10-27 2:07 ` Chao Peng
2014-10-27 2:07 ` Chao Peng
2014-11-02 10:19 ` Michael S. Tsirkin
2014-11-02 10:19 ` [Qemu-devel] " Michael S. Tsirkin
2014-11-03 1:53 ` Chao Peng
2014-11-03 11:31 ` Paolo Bonzini
2014-11-03 11:31 ` [Qemu-devel] " Paolo Bonzini
2014-11-03 12:34 ` Michael S. Tsirkin
2014-11-03 12:34 ` [Qemu-devel] " Michael S. Tsirkin
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=544E6A5D.5060406@redhat.com \
--to=pbonzini@redhat.com \
--cc=afaerber@suse.de \
--cc=chao.p.peng@linux.intel.com \
--cc=ehabkost@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=lersek@redhat.com \
--cc=mst@redhat.com \
--cc=mtosatti@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=vrozenfe@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.