From: Alex Williamson <alex.williamson@redhat.com>
To: mtosatti@redhat.com, gleb@redhat.com
Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Subject: [PATCH v2 08/10] kvm: struct kvm_memory_slot.flags -> u32
Date: Mon, 10 Dec 2012 10:33:26 -0700 [thread overview]
Message-ID: <20121210173326.10461.74366.stgit@bling.home> (raw)
In-Reply-To: <20121210171417.10461.20079.stgit@bling.home>
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 <alex.williamson@redhat.com>
---
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;
};
next prev parent reply other threads:[~2012-12-10 17:33 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-10 17:32 [PATCH v2 00/10] kvm: memory slot cleanups, fix, and increase Alex Williamson
2012-12-10 17:32 ` [PATCH v2 01/10] kvm: Restrict non-existing slot state transitions Alex Williamson
2012-12-12 1:29 ` Marcelo Tosatti
2012-12-12 1:39 ` Marcelo Tosatti
2012-12-12 4:30 ` Alex Williamson
2012-12-10 17:32 ` [PATCH v2 02/10] kvm: Check userspace_addr when modifying a memory slot Alex Williamson
2012-12-10 17:32 ` [PATCH v2 03/10] kvm: Fix iommu map/unmap to handle memory slot moves Alex Williamson
2012-12-10 17:33 ` [PATCH v2 04/10] kvm: Minor memory slot optimization Alex Williamson
2012-12-10 17:33 ` [PATCH v2 05/10] kvm: Rename KVM_MEMORY_SLOTS -> KVM_USER_MEM_SLOTS Alex Williamson
2012-12-10 17:33 ` [PATCH v2 06/10] kvm: Make KVM_PRIVATE_MEM_SLOTS optional Alex Williamson
2012-12-10 17:33 ` [PATCH v2 07/10] kvm: struct kvm_memory_slot.user_alloc -> bool Alex Williamson
2012-12-10 17:33 ` Alex Williamson [this message]
2012-12-10 17:33 ` [PATCH v2 09/10] kvm: struct kvm_memory_slot.id -> short Alex Williamson
2012-12-10 17:33 ` [PATCH v2 10/10] kvm: Increase user memory slots on x86 to 125 Alex Williamson
2012-12-12 2:11 ` [PATCH v2 00/10] kvm: memory slot cleanups, fix, and increase Marcelo Tosatti
2012-12-12 14:13 ` Gleb Natapov
2012-12-15 1:03 ` Marcelo Tosatti
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=20121210173326.10461.74366.stgit@bling.home \
--to=alex.williamson@redhat.com \
--cc=gleb@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mtosatti@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.