|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 4/4] xen/public: arm: rework the macro set_xen_guest_handle_raw
Ian Jackson writes ("Re: [Xen-devel] [PATCH 4/4] xen/public: arm: rework the
macro set_xen_guest_handle_raw"):
> Stefano Stabellini writes ("Re: [Xen-devel] [PATCH 4/4] xen/public: arm:
> rework the macro set_xen_guest_handle_raw"):
> > Finally, based on the defect report #283 [2], the behavior of writing
> > from one member and reading from another is not clear.
>
> Because the hypervisor is compiled with -fno-strict-aliasing.
Incidentally, it is _necessary_ to write to the uint64_t last. C99
6.2.6.1(5) says that if you write to the 32-bit pointer, the upper
bits (corresponding to the uint64 but not part of the pointer) take on
unspecified values.
So writing the 32-bit pointer always invalidates the top bits, so if
you write to the uint64_t first, the 32-bit write makes the 64-bit
write a dead store.
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |