[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [Patch RFC 07/13] vt-d: If the qi_flag is Set, the domain's vCPUs are not allowed to
> -----Original Message----- > From: Julien Grall [mailto:julien.grall@xxxxxxxxxx] > Sent: Wednesday, September 16, 2015 5:44 PM > To: Xu, Quan; andrew.cooper3@xxxxxxxxxx; Dong, Eddie; ian.campbell@xxxxxxxxxx; > ian.jackson@xxxxxxxxxxxxx; jbeulich@xxxxxxxx; Nakajima, Jun; keir@xxxxxxx; > Tian, Kevin; tim@xxxxxxx; Zhang, Yang Z; george.dunlap@xxxxxxxxxxxxx > Cc: xen-devel@xxxxxxxxxxxxx > Subject: Re: [Xen-devel] [Patch RFC 07/13] vt-d: If the qi_flag is Set, the > domain's > vCPUs are not allowed to > > Hi Quan, > > On 16/09/2015 14:24, Quan Xu wrote: > > diff --git a/xen/arch/x86/x86_64/asm-offsets.c > > b/xen/arch/x86/x86_64/asm-offsets.c > > index 447c650..d26b026 100644 > > --- a/xen/arch/x86/x86_64/asm-offsets.c > > +++ b/xen/arch/x86/x86_64/asm-offsets.c > > @@ -116,6 +116,7 @@ void __dummy__(void) > > BLANK(); > > > > OFFSET(DOMAIN_is_32bit_pv, struct domain, arch.is_32bit_pv); > > + OFFSET(QI_flag, struct domain, > > + arch.hvm_domain.hvm_iommu.qi_flag); > > BLANK(); > > > > OFFSET(VMCB_rax, struct vmcb_struct, rax); diff --git > > a/xen/common/domain.c b/xen/common/domain.c index 1b9fcfc..1f62e3b > > 100644 > > --- a/xen/common/domain.c > > +++ b/xen/common/domain.c > > @@ -1479,6 +1479,11 @@ int continue_hypercall_on_cpu( > > return 0; > > } > > > > +void do_qi_flushing(struct domain *d) { > > + do_sched_op(SCHEDOP_yield, guest_handle_from_ptr(NULL, void)); > > SCHEDOP_yield is as wrapper to vcpu_yield() to would be called by the guest. > > It would be simpler to use the latter. You may even be able to call it > directly from > the assembly code rather than introducing is a wrapper. > Agreed. I will test it. if it is working, I will modify it in next version. > If not, this function should go in x86 specific code (maybe arch/x86/domain.c > ?) > > > > +} > > + > > /* > > * Local variables: > > * mode: C > > diff --git a/xen/include/xen/hvm/iommu.h b/xen/include/xen/hvm/iommu.h > > index e838905..e40fc7b 100644 > > --- a/xen/include/xen/hvm/iommu.h > > +++ b/xen/include/xen/hvm/iommu.h > > @@ -57,6 +57,8 @@ struct hvm_iommu { > > DECLARE_BITMAP(features, IOMMU_FEAT_count); > > }; > > > > +void do_qi_flushing(struct domain *d); > > + > > If you declare the function in file.c you should add the prototype in > file.h. > > I.e as you defined the function in common/domain.c, the prototype should > go in xen/domain.h. In general, I should define these function/macro for x86 only.. Thanks Julien. Quan > > > #define iommu_set_feature(d, f) set_bit((f), > domain_hvm_iommu(d)->features) > > #define iommu_clear_feature(d, f) clear_bit((f), > domain_hvm_iommu(d)->features) > > > > > > Regards, > > -- > Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |