Files
kvmtool/include/kvm/segment.h
T
Sasha Levin 3fdf659d95 kvm tools: Abolishment of uint*_t types
Clean uint*_t type from the code.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
2015-06-01 16:39:43 +01:00

17 lines
267 B
C

#ifndef KVM_SEGMENT_H
#define KVM_SEGMENT_H
#include <linux/types.h>
static inline u16 flat_to_seg16(u32 address)
{
return address >> 4;
}
static inline u16 flat_to_off16(u32 address, u32 segment)
{
return address - (segment << 4);
}
#endif /* KVM_SEGMENT_H */