trafgen-libs = $(shell pkg-config --libs libnl-3.0) \
$(shell pkg-config --libs libnl-genl-3.0) \
-lm
trafgen-objs = xmalloc.o \
ioops.o \
privs.o \
proc.o \
dev.o \
irq.o \
link.o \
str.o \
sig.o \
sock.o \
mac80211.o \
ring_tx.o \
ring.o \
timer.o \
trafgen_lexer.yy.o \
trafgen_parser.tab.o \
trafgen.o
trafgen-lex = trafgen_lexer.yy.o
trafgen-yaac = trafgen_parser.tab.o
trafgen-eflags = $(shell pkg-config --cflags libnl-3.0) \
$(shell pkg-config --cflags libnl-genl-3.0) \
-DHAVE_DISSECTOR_PROTOS -I..
trafgen-confs = trafgen_stddef.h
trafgen_post_install:
$(Q)mv $(ETCDIRE)/trafgen_stddef.h $(ETCDIRE)/stddef.h
trafgen_clean_custom:
$(Q)$(call RM,$(BUILD_DIR)/*.h $(BUILD_DIR)/*.c)
cgit.png' alt='cgit logo'/>
pvclock: Add CPU barriers to get correct version value
Protocol for the "version" fields is: hypervisor raises it (making it
uneven) before it starts updating the fields and raises it again (making
it even) when it is done. Thus the guest can make sure the time values
it got are consistent by checking the version before and after reading
them.
Add CPU barries after getting version value just like what function
vread_pvclock does, because all of callees in this function is inline.
Fixes: 502dfeff239e8313bfbe906ca0a1a6827ac8481b
Cc: stable@vger.kernel.org
Signed-off-by: Minfei Huang <mnghuan@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>