[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCHv1 4/5] x86/viridian: set x87 FIP width to 4 for Windows guests
On 18/02/16 18:52, David Vrabel wrote: > diff --git a/xen/arch/x86/hvm/viridian.c b/xen/arch/x86/hvm/viridian.c > index 6bd844b..fb9f044 100644 > --- a/xen/arch/x86/hvm/viridian.c > +++ b/xen/arch/x86/hvm/viridian.c > @@ -148,6 +148,30 @@ static void dump_guest_os_id(const struct domain *d) > goi->fields.service_pack, goi->fields.build_number); > } > > +static void set_guest_os_id(struct domain *d, uint64_t val) > +{ > + const union viridian_guest_os_id *goi; > + > + d->arch.hvm_domain.viridian.guest_os_id.raw = val; > + goi = &d->arch.hvm_domain.viridian.guest_os_id; > + > + /* > + * Microsoft Windows only saves the lower 32-bits of FIP/FDP and > + * can get upset if the selectors are not saved/restored by the > + * hypervisor. > + * > + * Only do this if the FIP width is not in auto-mode, so this > + * heuristic can be overriden by the toolstack. > + */ > + if ( !d->arch.x87_fip_width ) > + { > + if ( goi->fields.vendor == 1 && goi->fields.os == 4 ) Are there any named parameters we could use here? In principle, Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> (allowing for the potential change of x86_fip_width per the discussion on patch 3). > + d->arch.x87_fip_width = 4; > + } > + > + dump_guest_os_id(d); > +} > + > static void dump_hypercall(const struct domain *d) > { > const union viridian_hypercall_gpa *hg; _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |