All of lore.kernel.org
 help / color / mirror / Atom feed
* question about "struct kvm_segment"
@ 2014-05-20  2:25 Jidong Xiao
  2014-05-30 20:49 ` Paolo Bonzini
  0 siblings, 1 reply; 3+ messages in thread
From: Jidong Xiao @ 2014-05-20  2:25 UTC (permalink / raw)
  To: virtualization

Hi,

The structure kvm_segment is defined as follows:

struct kvm_segment {
        __u64 base;
        __u32 limit;
        __u16 selector;
        __u8  type;
        __u8  present, dpl, db, s, l, g, avl;
        __u8  unusable;
        __u8  padding;
};

Since the VMX spec defines base is 64 bits, limit is 32bits, selector
is 16bits, understandably, __u64, __u32, __u16 is used for them
respectively.

However, the VMX spec defines that the access rights is 32bits, which
includes a 4 bits type, 2 bits dpl, and 1 bit for the
present,dpl,db,s,l,g,avl. So why here they are all defined as __u8? It
means that, each of them is represented by 8bits? This looks
inconsistent with the VMX spec.

Hope someone can explain this, thanks!

-Jidong

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-06-01  1:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-20  2:25 question about "struct kvm_segment" Jidong Xiao
2014-05-30 20:49 ` Paolo Bonzini
2014-06-01  1:41   ` Jidong Xiao

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.