repo.or.cz
/
linux-2.6
/
next.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
kvm tools: Add ivshmem device
[linux-2.6/next.git]
/
tools
/
kvm
/
include
/
kvm
/
segment.h
blob
362e46d00b1488ddd348ce5b26378755503891cc
1
#ifndef KVM_SEGMENT_H
2
#define KVM_SEGMENT_H
3
4
#include <linux/types.h>
5
6
static
inline
u16
flat_to_seg16
(
u32 address
)
7
{
8
return
address
>>
4
;
9
}
10
11
static
inline
u16
flat_to_off16
(
u32 address
,
u32 segment
)
12
{
13
return
address
- (
segment
<<
4
);
14
}
15
16
#endif
/* KVM_SEGMENT_H */