[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 1/2] VMX: also use proper instruction mnemonic for VMREAD
On 16/09/2013 12:06, Jan Beulich wrote: > vmx_vmcs_enter(v); > > switch ( seg ) > { > case x86_seg_cs: > - reg->sel = __vmread(GUEST_CS_SELECTOR); > - reg->limit = __vmread(GUEST_CS_LIMIT); > - reg->base = __vmread(GUEST_CS_BASE); > - attr = __vmread(GUEST_CS_AR_BYTES); > + __vmread(GUEST_CS_SELECTOR, &sel); > + __vmread(GUEST_CS_LIMIT, &limit); > + __vmread(GUEST_CS_BASE, ®->base); > + __vmread(GUEST_CS_AR_BYTES, &attr); > break; > case x86_seg_ds: > - reg->sel = __vmread(GUEST_DS_SELECTOR); > - reg->limit = __vmread(GUEST_DS_LIMIT); > - reg->base = __vmread(GUEST_DS_BASE); > - attr = __vmread(GUEST_DS_AR_BYTES); > + __vmread(GUEST_DS_SELECTOR, &sel); > + __vmread(GUEST_DS_LIMIT, &limit); > + __vmread(GUEST_DS_BASE, ®->base); > + __vmread(GUEST_DS_AR_BYTES, &attr); > break; > case x86_seg_es: > - reg->sel = __vmread(GUEST_ES_SELECTOR); > - reg->limit = __vmread(GUEST_ES_LIMIT); > - reg->base = __vmread(GUEST_ES_BASE); > - attr = __vmread(GUEST_ES_AR_BYTES); > + __vmread(GUEST_ES_SELECTOR, &sel); > + __vmread(GUEST_ES_LIMIT, &limit); > + __vmread(GUEST_ES_BASE, ®->base); > + __vmread(GUEST_ES_AR_BYTES, &attr); > break; > case x86_seg_fs: > - reg->sel = __vmread(GUEST_FS_SELECTOR); > - reg->limit = __vmread(GUEST_FS_LIMIT); > - reg->base = __vmread(GUEST_FS_BASE); > - attr = __vmread(GUEST_FS_AR_BYTES); > + __vmread(GUEST_FS_SELECTOR, &sel); > + __vmread(GUEST_FS_LIMIT, &limit); > + __vmread(GUEST_FS_BASE, ®->base); > + __vmread(GUEST_FS_AR_BYTES, &attr); > break; > case x86_seg_gs: > - reg->sel = __vmread(GUEST_GS_SELECTOR); > - reg->limit = __vmread(GUEST_GS_LIMIT); > - reg->base = __vmread(GUEST_GS_BASE); > - attr = __vmread(GUEST_GS_AR_BYTES); > + __vmread(GUEST_GS_SELECTOR, &sel); > + __vmread(GUEST_GS_LIMIT, &limit); > + __vmread(GUEST_GS_BASE, ®->base); > + __vmread(GUEST_GS_AR_BYTES, &attr); > break; > case x86_seg_ss: > - reg->sel = __vmread(GUEST_SS_SELECTOR); > - reg->limit = __vmread(GUEST_SS_LIMIT); > - reg->base = __vmread(GUEST_SS_BASE); > - attr = __vmread(GUEST_SS_AR_BYTES); > + __vmread(GUEST_SS_SELECTOR, &sel); > + __vmread(GUEST_SS_LIMIT, &limit); > + __vmread(GUEST_SS_BASE, ®->base); > + __vmread(GUEST_SS_AR_BYTES, &attr); > break; > case x86_seg_tr: > - reg->sel = __vmread(GUEST_TR_SELECTOR); > - reg->limit = __vmread(GUEST_TR_LIMIT); > - reg->base = __vmread(GUEST_TR_BASE); > - attr = __vmread(GUEST_TR_AR_BYTES); > + __vmread(GUEST_TR_SELECTOR, &sel); > + __vmread(GUEST_TR_LIMIT, &limit); > + __vmread(GUEST_TR_BASE, ®->base); > + __vmread(GUEST_TR_AR_BYTES, &attr); > break; > case x86_seg_gdtr: > - reg->limit = __vmread(GUEST_GDTR_LIMIT); > - reg->base = __vmread(GUEST_GDTR_BASE); > + __vmread(GUEST_GDTR_LIMIT, &limit); > + __vmread(GUEST_GDTR_BASE, ®->base); > break; > case x86_seg_idtr: > - reg->limit = __vmread(GUEST_IDTR_LIMIT); > - reg->base = __vmread(GUEST_IDTR_BASE); > + __vmread(GUEST_IDTR_LIMIT, &limit); > + __vmread(GUEST_IDTR_BASE, ®->base); > break; > case x86_seg_ldtr: > - reg->sel = __vmread(GUEST_LDTR_SELECTOR); > - reg->limit = __vmread(GUEST_LDTR_LIMIT); > - reg->base = __vmread(GUEST_LDTR_BASE); > - attr = __vmread(GUEST_LDTR_AR_BYTES); > + __vmread(GUEST_LDTR_SELECTOR, &sel); > + __vmread(GUEST_LDTR_LIMIT, &limit); > + __vmread(GUEST_LDTR_BASE, ®->base); > + __vmread(GUEST_LDTR_AR_BYTES, &attr); > break; > default: > BUG(); > + return; This return is dead code. Otherwise, Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |