Re: [Xen-devel] [RFC v2 07/15] vt-d: Add API to update IRTE when VT-d PI is used

2015-06-15 Thread Wu, Feng
> -Original Message- > From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: Monday, June 15, 2015 5:35 PM > To: Wu, Feng > Cc: andrew.coop...@citrix.com; george.dun...@eu.citrix.com; Tian, Kevin; > Zhang, Yang Z; xen-devel@lists.xen.org; k...@xen.org > Subject: RE: [RFC v2 07/15] vt-d: Ad

Re: [Xen-devel] [RFC v2 07/15] vt-d: Add API to update IRTE when VT-d PI is used

2015-06-15 Thread Jan Beulich
>>> On 15.06.15 at 11:20, wrote: > >> -Original Message- >> From: Jan Beulich [mailto:jbeul...@suse.com] >> Sent: Friday, June 12, 2015 6:35 PM >> To: Wu, Feng >> Cc: andrew.coop...@citrix.com; george.dun...@eu.citrix.com; Tian, Kevin; >> Zhang, Yang Z; xen-devel@lists.xen.org; k...@xen.

Re: [Xen-devel] [RFC v2 07/15] vt-d: Add API to update IRTE when VT-d PI is used

2015-06-15 Thread Wu, Feng
> -Original Message- > From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: Friday, June 12, 2015 6:35 PM > To: Wu, Feng > Cc: andrew.coop...@citrix.com; george.dun...@eu.citrix.com; Tian, Kevin; > Zhang, Yang Z; xen-devel@lists.xen.org; k...@xen.org > Subject: RE: [RFC v2 07/15] vt-d: Ad

Re: [Xen-devel] [RFC v2 07/15] vt-d: Add API to update IRTE when VT-d PI is used

2015-06-12 Thread Jan Beulich
>>> On 12.06.15 at 11:40, wrote: >> -Original Message- >> From: Jan Beulich [mailto:jbeul...@suse.com] >> >>> On 08.05.15 at 11:07, wrote: >> > +static inline void setup_posted_irte( >> > +struct iremap_entry *new_ire, struct pi_desc *pi_desc, uint8_t gvec) >> > +{ >> > +new_ire->

Re: [Xen-devel] [RFC v2 07/15] vt-d: Add API to update IRTE when VT-d PI is used

2015-06-12 Thread Jan Beulich
>>> On 12.06.15 at 11:40, wrote: >> From: Jan Beulich [mailto:jbeul...@suse.com] >> Sent: Tuesday, June 09, 2015 10:33 PM >> >>> On 08.05.15 at 11:07, wrote: >> > +remap_index = msi_desc->remap_index; >> > +drhd = acpi_find_matched_drhd_unit(pci_dev); >> > +if ( !drhd ) >> > +{ >>

Re: [Xen-devel] [RFC v2 07/15] vt-d: Add API to update IRTE when VT-d PI is used

2015-06-12 Thread Wu, Feng
> -Original Message- > From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: Tuesday, June 09, 2015 10:33 PM > To: Wu, Feng > Cc: andrew.coop...@citrix.com; george.dun...@eu.citrix.com; Tian, Kevin; > Zhang, Yang Z; xen-devel@lists.xen.org; k...@xen.org > Subject: Re: [RFC v2 07/15] vt-d:

Re: [Xen-devel] [RFC v2 07/15] vt-d: Add API to update IRTE when VT-d PI is used

2015-06-12 Thread Wu, Feng
> -Original Message- > From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: Wednesday, June 10, 2015 2:18 PM > To: Wu, Feng > Cc: andrew.coop...@citrix.com; george.dun...@eu.citrix.com; Tian, Kevin; > Zhang, Yang Z; xen-devel@lists.xen.org; k...@xen.org > Subject: Re: [RFC v2 07/15] vt-d:

Re: [Xen-devel] [RFC v2 07/15] vt-d: Add API to update IRTE when VT-d PI is used

2015-06-09 Thread Jan Beulich
>>> On 08.05.15 at 11:07, wrote: > +static inline void setup_posted_irte( > +struct iremap_entry *new_ire, struct pi_desc *pi_desc, uint8_t gvec) > +{ > +new_ire->post.urg = 0; > +new_ire->post.vector = gvec; > +new_ire->post.pda_l = (((u64)virt_to_maddr(pi_desc)) >> > +

Re: [Xen-devel] [RFC v2 07/15] vt-d: Add API to update IRTE when VT-d PI is used

2015-06-09 Thread Jan Beulich
>>> On 08.05.15 at 11:07, wrote: > +bool_t pi_update_irte(struct vcpu *v, struct pirq *pirq, uint8_t gvec) Without seeing the caller right away it's hard to judge, but generally I'd prefer functions to return -E... values as error indicators, i.e. > +{ > +struct irq_desc *desc; > +struct