Hi,

On Fri, Feb 15, 2019 at 4:23 PM Andrii Anisov <andrii.ani...@gmail.com> wrote:
> On 14.02.19 18:29, Roger Pau Monné wrote:
> > In order to simplify stuff the new interface could require runstate
> > areas to be page aligned, but I think the check can be relaxed to
> > simply require runstate areas to not cross a page boundary.
>
> My idea so far is to keep the same `struct vcpu_runstate_info` but harden it 
> with `__attribute__((aligned(64)))` right in the interface file vcpu.h. Also 
> add some guard asserts verifying that its actual size is less than 64 bytes.

Why? Is it because you want to be cache-aligned?  If so, requiring the
structure to be 64-bytes is not enough. You also want the address to
be 64-bytes aligned.
However, I am not sure why we should bother with that in the
interface.... The cacheline varies between architectures and even SoC.
If an OS cares about it, then it can aligned itself here.

Cheers,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to