Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756709AbbEUVWD (ORCPT ); Thu, 21 May 2015 17:22:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47290 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755334AbbEUVV6 (ORCPT ); Thu, 21 May 2015 17:21:58 -0400 Message-ID: <555E4C72.2070301@redhat.com> Date: Thu, 21 May 2015 23:21:54 +0200 From: Paolo Bonzini User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= CC: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, bsd@redhat.com Subject: Re: [PATCH 06/12] KVM: x86: API changes for SMM support References: <1431084034-8425-1-git-send-email-pbonzini@redhat.com> <1431084034-8425-7-git-send-email-pbonzini@redhat.com> <20150521144954.GA10453@potion.brq.redhat.com> <555DF2E6.1020003@redhat.com> <20150521162658.GB7525@potion.brq.redhat.com> In-Reply-To: <20150521162658.GB7525@potion.brq.redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1567 Lines: 45 On 21/05/2015 18:26, Radim Krčmář wrote: > 2015-05-21 16:59+0200, Paolo Bonzini: >> On 21/05/2015 16:49, Radim Krčmář wrote: >>> 2015-05-08 13:20+0200, Paolo Bonzini: >>>> diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h >>>> @@ -202,7 +202,7 @@ struct kvm_run { >>>> __u32 exit_reason; >>>> __u8 ready_for_interrupt_injection; >>>> __u8 if_flag; >>>> - __u8 padding2[2]; >>>> + __u16 flags; >>> >>> (It got lost last review and I'd really like to know ... >>> what is the advantage of giving both bytes to flags?) >> >> No advantage. You just should leave padding2[1] in the middle so that >> the offset of &run->padding2[0] doesn't change. > > I don't get that. The position of padding should be decided by > comparing probabilities of extending 'if_flag' and 'flags'. > >> Since it's not obvious >> I gave two bytes to flags, but I can do it either way. > > if_flag seems to be set in stone as one bit, so I'd vote for > > __u8 flags; > __u8 padding2; > > (Or 'padding3', to prevent the same class of errors that removing it > altogether does; which we didn't do for other tailed padding). You're right that we didn't do it. I'll change it to flags + padding2. Paolo > For there isn't much space left in struct kvm ... > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/