]> xenbits.xensource.com Git - people/iwj/xen.git/commit
viridian: separately allocate domain and vcpu structures
authorPaul Durrant <paul.durrant@citrix.com>
Tue, 19 Mar 2019 15:25:00 +0000 (16:25 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 5 Apr 2019 08:22:13 +0000 (10:22 +0200)
commite7a9b5e72f2667f7025bbfa587e9fc7b60ef54cf
treead18f72134811b041d8a5094c055fe510c041759
parent40a4a9d72d161b9ff3b13fe879220b9d326c0ab8
viridian: separately allocate domain and vcpu structures

Currently the viridian_domain and viridian_vcpu structures are inline in
the hvm_domain and hvm_vcpu structures respectively. Subsequent patches
will need to add sizable extra fields to the viridian structures which
will cause the PAGE_SIZE limit of the overall vcpu structure to be
exceeded. This patch, therefore, uses the new init hooks to separately
allocate the structures and converts the 'viridian' fields in hvm_domain
and hvm_cpu to be pointers to these allocations. These separate allocations
also allow some vcpu and domain pointers to become const.

Ideally, now that they are no longer inline, the allocations of the
viridian structures could be made conditional on whether the toolstack
is going to configure the viridian enlightenments. However the toolstack
is currently unable to convey this information to the domain creation code
so such an enhancement is deferred until that becomes possible.

NOTE: The patch also introduced the 'is_viridian_vcpu' macro to avoid
      introducing a second evaluation of 'is_viridian_domain' with an
      open-coded 'v->domain' argument. This macro will also be further
      used in a subsequent patch.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/hvm/viridian/private.h
xen/arch/x86/hvm/viridian/synic.c
xen/arch/x86/hvm/viridian/time.c
xen/arch/x86/hvm/viridian/viridian.c
xen/include/asm-x86/hvm/domain.h
xen/include/asm-x86/hvm/hvm.h
xen/include/asm-x86/hvm/vcpu.h
xen/include/asm-x86/hvm/viridian.h