struct x86_emulate_ctxt ctxt = {
.data = &state,
.regs = &input.regs,
- .cpu_policy = &cp,
.addr_size = 8 * sizeof(void *),
.sp_size = 8 * sizeof(void *),
};
int rc;
+ /* Not part of the initializer, for old gcc to cope. */
+ ctxt.cpu_policy = &cp;
+
/* Reset all global state variables */
memset(&input, 0, sizeof(input));
struct domain *currd = curr->domain;
struct priv_op_ctxt ctxt = {
.ctxt.regs = regs,
- .ctxt.cpu_policy = currd->arch.cpu_policy,
.ctxt.lma = !is_pv_32bit_domain(currd),
};
int rc;
unsigned int eflags, ar;
+ /* Not part of the initializer, for old gcc to cope. */
+ ctxt.ctxt.cpu_policy = currd->arch.cpu_policy;
+
if ( !pv_emul_read_descriptor(regs->cs, curr, &ctxt.cs.base,
&ctxt.cs.limit, &ar, 1) ||
!(ar & _SEGMENT_S) ||
unsigned int addr_size = is_pv_32bit_domain(currd) ? 32 : BITS_PER_LONG;
struct x86_emulate_ctxt ctxt = {
.regs = regs,
- .cpu_policy = currd->arch.cpu_policy,
.addr_size = addr_size,
.sp_size = addr_size,
.lma = addr_size > 32,
int rc;
bool mmio_ro;
+ /* Not part of the initializer, for old gcc to cope. */
+ ctxt.cpu_policy = currd->arch.cpu_policy;
+
/* Attempt to read the PTE that maps the VA being accessed. */
pte = guest_get_eff_kern_l1e(addr);