>>> On 31.03.17 at 21:50, <andrew.coop...@citrix.com> wrote: > +static void svm_emul_swint_injection(struct x86_event *event) > +{ > + struct vcpu *curr = current; > + struct vmcb_struct *vmcb = curr->arch.hvm_svm.vmcb; > + struct cpu_user_regs *regs = guest_cpu_user_regs();
All three look like they can be const. > + > + unsigned int trap = event->vector, type = event->type; Stray blank line in the middle of declarations. > + unsigned int fault = TRAP_gp_fault, ec = 0; > + > + if ( vmcb->_cr0 & X86_CR0_PE ) /* TODO: support real-mode injection? */ vmcb_get_cr0() (also for EFER and CPL below). > + { > + pagefault_info_t pf; > + struct segment_register idtr; > + unsigned int idte_size, idte_offset; > + unsigned long idte_linear_addr; > + struct { uint32_t a, b, c, d; } idte = {}; > + bool lm = vmcb->_efer & EFER_LMA; > + enum hvm_segmentation_mode seg_mode = > + lm ? hvm_seg_mode_long : hvm_seg_mode_prot; This open coding is, I think, another hint that the helper function in the other patch would perhaps better be dropped. Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel