From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965373Ab2LFWVT (ORCPT ); Thu, 6 Dec 2012 17:21:19 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35359 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755038Ab2LFWVQ (ORCPT ); Thu, 6 Dec 2012 17:21:16 -0500 Subject: [PATCH 08/10] kvm: struct kvm_memory_slot.flags -> u32 To: mtosatti@redhat.com, gleb@redhat.com From: Alex Williamson Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org Date: Thu, 06 Dec 2012 15:21:15 -0700 Message-ID: <20121206222114.24968.3735.stgit@bling.home> In-Reply-To: <20121206214722.24968.6043.stgit@bling.home> References: <20121206214722.24968.6043.stgit@bling.home> User-Agent: StGit/0.16 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org struct kvm_userspace_memory_region.flags is a u32 with a comment that bits 0 ~ 15 are visible to userspace and the other bits are reserved for kvm internal use. KVM_MEMSLOT_INVALID is the only internal use flag and it has a comment that bits 16 ~ 31 are internally used and the other bits are visible to userspace. Therefore, let's define this as a u32 so we don't waste bytes on LP64 systems. Move to the end of the struct for alignment. Signed-off-by: Alex Williamson --- include/linux/kvm_host.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 9ff30f2..641f5fb 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h @@ -251,10 +251,10 @@ static inline int kvm_vcpu_exiting_guest_mode(struct kvm_vcpu *vcpu) struct kvm_memory_slot { gfn_t base_gfn; unsigned long npages; - unsigned long flags; unsigned long *dirty_bitmap; struct kvm_arch_memory_slot arch; unsigned long userspace_addr; + u32 flags; int id; bool user_alloc; };