All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Radim Krčmář" <rkrcmar@redhat.com>
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
Date: Thu, 21 May 2015 23:21:54 +0200	[thread overview]
Message-ID: <555E4C72.2070301@redhat.com> (raw)
In-Reply-To: <20150521162658.GB7525@potion.brq.redhat.com>



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 ...
> 

  reply	other threads:[~2015-05-21 21:21 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-08 11:20 [PATCH 00/12] KVM: x86: SMM support Paolo Bonzini
2015-05-08 11:20 ` [PATCH 01/12] KVM: export __gfn_to_pfn_memslot, drop gfn_to_pfn_async Paolo Bonzini
2015-05-08 11:20 ` [PATCH 02/12] KVM: x86: introduce num_emulated_msrs Paolo Bonzini
2015-05-08 11:20 ` [PATCH 03/12] KVM: remove unnecessary arg from mark_page_dirty_in_slot, export it Paolo Bonzini
2015-05-08 11:20 ` [PATCH 04/12] KVM: x86: pass host_initiated to functions that read MSRs Paolo Bonzini
2015-05-08 11:20 ` [PATCH 05/12] KVM: x86: pass the whole hflags field to emulator and back Paolo Bonzini
2015-05-08 11:20 ` [PATCH 06/12] KVM: x86: API changes for SMM support Paolo Bonzini
2015-05-21 14:49   ` Radim Krčmář
2015-05-21 14:59     ` Paolo Bonzini
2015-05-21 16:26       ` Radim Krčmář
2015-05-21 21:21         ` Paolo Bonzini [this message]
2015-05-08 11:20 ` [PATCH 07/12] KVM: x86: stubs " Paolo Bonzini
2015-05-21 14:55   ` Radim Krčmář
2015-05-08 11:20 ` [PATCH 08/12] KVM: x86: save/load state on SMM switch Paolo Bonzini
2015-05-21 16:20   ` Radim Krčmář
2015-05-21 16:21     ` Paolo Bonzini
2015-05-21 16:33       ` Radim Krčmář
2015-05-21 20:24         ` Paolo Bonzini
2015-05-22 13:13           ` Radim Krčmář
2015-05-21 16:23     ` Paolo Bonzini
2015-05-21 17:00       ` Radim Krčmář
2015-05-21 21:21         ` Paolo Bonzini
2015-05-22 14:17           ` Radim Krčmář
2015-05-25 12:46             ` Paolo Bonzini
2015-05-08 11:20 ` [PATCH 09/12] KVM: x86: add vcpu-specific functions to read/write/translate GFNs Paolo Bonzini
2015-05-08 11:20 ` [PATCH 10/12] KVM: x86: add SMM to the MMU role Paolo Bonzini
2015-05-08 11:20 ` [PATCH 11/12] KVM: x86: add KVM_MEM_X86_SMRAM memory slot flag Paolo Bonzini
2015-05-26 18:45   ` Avi Kivity
2015-05-27  9:26     ` Paolo Bonzini
2015-05-08 11:20 ` [PATCH 12/12] KVM: x86: advertise KVM_CAP_X86_SMM Paolo Bonzini

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=555E4C72.2070301@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=bsd@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rkrcmar@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.