Re: [Xen-devel] [v8][PATCH 02/17] introduce XEN_DOMCTL_set_rdm

2014-12-09 Thread Konrad Rzeszutek Wilk
On Tue, Dec 09, 2014 at 08:33:56AM +, Jan Beulich wrote: > >>> On 09.12.14 at 02:06, wrote: > Also how does this work with 32-bit dom0s? Is there a need to use the > compat layer? > >>> > >>> Are you saying in xsm case? Others? > >>> > >>> Actually this new DOMCTL is similar with XEN

Re: [Xen-devel] [v8][PATCH 02/17] introduce XEN_DOMCTL_set_rdm

2014-12-09 Thread Jan Beulich
>>> On 09.12.14 at 02:06, wrote: Also how does this work with 32-bit dom0s? Is there a need to use the compat layer? >>> >>> Are you saying in xsm case? Others? >>> >>> Actually this new DOMCTL is similar with XEN_DOMCTL_assign_device in some >>> senses but I don't see such an issue you'

Re: [Xen-devel] [v8][PATCH 02/17] introduce XEN_DOMCTL_set_rdm

2014-12-08 Thread Jan Beulich
>>> On 09.12.14 at 03:38, wrote: > On 2014/12/8 16:43, Jan Beulich wrote: > On 08.12.14 at 07:06, wrote: >>> I take a quick look at this but looks we have no this exact value that >>> we can get directly. >> >> You need some upper bound. Whether you introduce a properly > > In theory, we may

Re: [Xen-devel] [v8][PATCH 02/17] introduce XEN_DOMCTL_set_rdm

2014-12-08 Thread Chen, Tiejun
On 2014/12/8 16:43, Jan Beulich wrote: On 08.12.14 at 07:06, wrote: On 2014/12/4 23:33, Jan Beulich wrote: On 01.12.14 at 10:24, wrote: Looks this could be fine, d->arch.hvm_domain.pci_force = xdsr->flags & PCI_DEV_RDM_CHECK; Which is correct only because PCI_DEV_RDM_CHECK happens to be 1

Re: [Xen-devel] [v8][PATCH 02/17] introduce XEN_DOMCTL_set_rdm

2014-12-08 Thread Chen, Tiejun
--- a/xen/drivers/passthrough/pci.c +++ b/xen/drivers/passthrough/pci.c @@ -34,6 +34,7 @@ #include #include #include +#include struct pci_seg { struct list_head alldevs_list; @@ -1553,6 +1554,44 @@ int iommu_do_pci_domctl( } break; +case XEN_DOMCTL_set_r

Re: [Xen-devel] [v8][PATCH 02/17] introduce XEN_DOMCTL_set_rdm

2014-12-08 Thread Konrad Rzeszutek Wilk
On Mon, Dec 08, 2014 at 11:16:07AM +0800, Chen, Tiejun wrote: > > On 2014/12/3 3:39, Konrad Rzeszutek Wilk wrote: > >On Mon, Dec 01, 2014 at 05:24:20PM +0800, Tiejun Chen wrote: > >>This should be based on a new parameter globally, 'pci_rdmforce'. > >> > >>pci_rdmforce = 1 => Of course this should

Re: [Xen-devel] [v8][PATCH 02/17] introduce XEN_DOMCTL_set_rdm

2014-12-08 Thread Jan Beulich
>>> On 08.12.14 at 07:06, wrote: > On 2014/12/4 23:33, Jan Beulich wrote: > On 01.12.14 at 10:24, wrote: > Looks this could be fine, > > d->arch.hvm_domain.pci_force = xdsr->flags & PCI_DEV_RDM_CHECK; Which is correct only because PCI_DEV_RDM_CHECK happens to be 1. Such hidden dependencies

Re: [Xen-devel] [v8][PATCH 02/17] introduce XEN_DOMCTL_set_rdm

2014-12-07 Thread Chen, Tiejun
On 2014/12/4 23:33, Jan Beulich wrote: On 01.12.14 at 10:24, wrote: --- a/xen/drivers/passthrough/pci.c +++ b/xen/drivers/passthrough/pci.c @@ -34,6 +34,7 @@ #include #include #include +#include Please don't - we use bool_t in the hypervisor, not bool. The header Yes. only exist

Re: [Xen-devel] [v8][PATCH 02/17] introduce XEN_DOMCTL_set_rdm

2014-12-07 Thread Chen, Tiejun
On 2014/12/3 3:39, Konrad Rzeszutek Wilk wrote: On Mon, Dec 01, 2014 at 05:24:20PM +0800, Tiejun Chen wrote: This should be based on a new parameter globally, 'pci_rdmforce'. pci_rdmforce = 1 => Of course this should be 0 by default. '1' means we should force check to reserve all ranges. If f

Re: [Xen-devel] [v8][PATCH 02/17] introduce XEN_DOMCTL_set_rdm

2014-12-07 Thread Chen, Tiejun
On 2014/12/2 16:33, Tian, Kevin wrote: From: Chen, Tiejun Sent: Monday, December 01, 2014 5:24 PM This should be based on a new parameter globally, 'pci_rdmforce'. pci_rdmforce = 1 => Of course this should be 0 by default. '1' means we should force check to reserve all ranges. If failed VM wou

Re: [Xen-devel] [v8][PATCH 02/17] introduce XEN_DOMCTL_set_rdm

2014-12-04 Thread Tian, Kevin
> From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: Thursday, December 04, 2014 11:33 PM > > +if ( pcidevs == NULL ) > > +{ > > +rcu_unlock_domain(d); > > +return -ENOMEM; > > +} > > + > > +if ( copy_from_guest(pcide

Re: [Xen-devel] [v8][PATCH 02/17] introduce XEN_DOMCTL_set_rdm

2014-12-04 Thread Jan Beulich
>>> On 01.12.14 at 10:24, wrote: > --- a/xen/drivers/passthrough/pci.c > +++ b/xen/drivers/passthrough/pci.c > @@ -34,6 +34,7 @@ > #include > #include > #include > +#include Please don't - we use bool_t in the hypervisor, not bool. The header only exists for source code shared with the too

Re: [Xen-devel] [v8][PATCH 02/17] introduce XEN_DOMCTL_set_rdm

2014-12-02 Thread Konrad Rzeszutek Wilk
On Mon, Dec 01, 2014 at 05:24:20PM +0800, Tiejun Chen wrote: > This should be based on a new parameter globally, 'pci_rdmforce'. > > pci_rdmforce = 1 => Of course this should be 0 by default. > > '1' means we should force check to reserve all ranges. If failed > VM wouldn't be created successfull

Re: [Xen-devel] [v8][PATCH 02/17] introduce XEN_DOMCTL_set_rdm

2014-12-02 Thread Tian, Kevin
> From: Chen, Tiejun > Sent: Monday, December 01, 2014 5:24 PM > > This should be based on a new parameter globally, 'pci_rdmforce'. > > pci_rdmforce = 1 => Of course this should be 0 by default. > > '1' means we should force check to reserve all ranges. If failed > VM wouldn't be created succes