Displaying 10 results from an estimated 10 matches for "request_capability".
2015 Jun 18
1
[PATCH v2] virtio-pci: alloc only resources actually used.
...= limit;
> > +
>
> I'll have to review the above carefully. Hopefully next week.
> Any reason you didn't just move code out map_capability to a helper,
> without changes? Would have made review easier.
Doesn't work that easily as there are different things to check.
request_capability verifies the capability itself only, map_capability
has a bunch of additional range checks because it supports partial maps.
> I don't see reasons to request regions that we aren't going to
> claim ...
I had it that way first, simply calling request_mem_region from
map_capability....
2015 Jun 18
1
[PATCH v2] virtio-pci: alloc only resources actually used.
...= limit;
> > +
>
> I'll have to review the above carefully. Hopefully next week.
> Any reason you didn't just move code out map_capability to a helper,
> without changes? Would have made review easier.
Doesn't work that easily as there are different things to check.
request_capability verifies the capability itself only, map_capability
has a bunch of additional range checks because it supports partial maps.
> I don't see reasons to request regions that we aren't going to
> claim ...
I had it that way first, simply calling request_mem_region from
map_capability....
2015 Jun 18
2
[PATCH v2] virtio-pci: alloc only resources actually used.
...io/virtio_pci_modern.c b/drivers/virtio/virtio_pci_modern.c
index e88e099..d9976ad 100644
--- a/drivers/virtio/virtio_pci_modern.c
+++ b/drivers/virtio/virtio_pci_modern.c
@@ -64,6 +64,37 @@ static void vp_iowrite64_twopart(u64 val,
vp_iowrite32(val >> 32, hi);
}
+static struct resource *request_capability(struct pci_dev *dev, int off,
+ int limit, const char *name)
+{
+ u8 bar;
+ u32 offset, length;
+
+ pci_read_config_byte(dev, off + offsetof(struct virtio_pci_cap,
+ bar),
+ &bar);
+ pci_read_config_dword(dev, off + offsetof(struct virtio_pci_cap, offset),
+ &offs...
2015 Jun 18
2
[PATCH v2] virtio-pci: alloc only resources actually used.
...io/virtio_pci_modern.c b/drivers/virtio/virtio_pci_modern.c
index e88e099..d9976ad 100644
--- a/drivers/virtio/virtio_pci_modern.c
+++ b/drivers/virtio/virtio_pci_modern.c
@@ -64,6 +64,37 @@ static void vp_iowrite64_twopart(u64 val,
vp_iowrite32(val >> 32, hi);
}
+static struct resource *request_capability(struct pci_dev *dev, int off,
+ int limit, const char *name)
+{
+ u8 bar;
+ u32 offset, length;
+
+ pci_read_config_byte(dev, off + offsetof(struct virtio_pci_cap,
+ bar),
+ &bar);
+ pci_read_config_dword(dev, off + offsetof(struct virtio_pci_cap, offset),
+ &offs...
2015 Jun 16
2
[PATCH] virtio-pci: alloc only resources actually used.
...io/virtio_pci_modern.c b/drivers/virtio/virtio_pci_modern.c
index e88e099..b4bd92b 100644
--- a/drivers/virtio/virtio_pci_modern.c
+++ b/drivers/virtio/virtio_pci_modern.c
@@ -64,6 +64,24 @@ static void vp_iowrite64_twopart(u64 val,
vp_iowrite32(val >> 32, hi);
}
+static struct resource *request_capability(struct pci_dev *dev, int off,
+ const char *name)
+{
+ u8 bar;
+ u32 offset, length;
+
+ pci_read_config_byte(dev, off + offsetof(struct virtio_pci_cap,
+ bar),
+ &bar);
+ pci_read_config_dword(dev, off + offsetof(struct virtio_pci_cap, offset),
+ &offset);
+ pci_...
2015 Jun 16
2
[PATCH] virtio-pci: alloc only resources actually used.
...io/virtio_pci_modern.c b/drivers/virtio/virtio_pci_modern.c
index e88e099..b4bd92b 100644
--- a/drivers/virtio/virtio_pci_modern.c
+++ b/drivers/virtio/virtio_pci_modern.c
@@ -64,6 +64,24 @@ static void vp_iowrite64_twopart(u64 val,
vp_iowrite32(val >> 32, hi);
}
+static struct resource *request_capability(struct pci_dev *dev, int off,
+ const char *name)
+{
+ u8 bar;
+ u32 offset, length;
+
+ pci_read_config_byte(dev, off + offsetof(struct virtio_pci_cap,
+ bar),
+ &bar);
+ pci_read_config_dword(dev, off + offsetof(struct virtio_pci_cap, offset),
+ &offset);
+ pci_...
2015 Jun 16
0
[PATCH] virtio-pci: alloc only resources actually used.
...virtio_pci_modern.c
> index e88e099..b4bd92b 100644
> --- a/drivers/virtio/virtio_pci_modern.c
> +++ b/drivers/virtio/virtio_pci_modern.c
> @@ -64,6 +64,24 @@ static void vp_iowrite64_twopart(u64 val,
> vp_iowrite32(val >> 32, hi);
> }
>
> +static struct resource *request_capability(struct pci_dev *dev, int off,
> + const char *name)
> +{
> + u8 bar;
> + u32 offset, length;
> +
> + pci_read_config_byte(dev, off + offsetof(struct virtio_pci_cap,
> + bar),
> + &bar);
> + pci_read_config_dword(dev, off + offsetof(struct virtio_pc...
2015 Jun 18
1
[PATCH] virtio-pci: alloc only resources actually used.
Hi,
> > +static struct resource *request_capability(struct pci_dev *dev, int off,
> > + const char *name)
> > +{
> > + u8 bar;
> > + u32 offset, length;
> > +
> > + pci_read_config_byte(dev, off + offsetof(struct virtio_pci_cap,
> > + bar),
> > + &bar);
> > + pci_read_conf...
2015 Jun 18
1
[PATCH] virtio-pci: alloc only resources actually used.
Hi,
> > +static struct resource *request_capability(struct pci_dev *dev, int off,
> > + const char *name)
> > +{
> > + u8 bar;
> > + u32 offset, length;
> > +
> > + pci_read_config_byte(dev, off + offsetof(struct virtio_pci_cap,
> > + bar),
> > + &bar);
> > + pci_read_conf...
2015 Jun 18
0
[PATCH v2] virtio-pci: alloc only resources actually used.
...virtio_pci_modern.c
> index e88e099..d9976ad 100644
> --- a/drivers/virtio/virtio_pci_modern.c
> +++ b/drivers/virtio/virtio_pci_modern.c
> @@ -64,6 +64,37 @@ static void vp_iowrite64_twopart(u64 val,
> vp_iowrite32(val >> 32, hi);
> }
>
> +static struct resource *request_capability(struct pci_dev *dev, int off,
> + int limit, const char *name)
> +{
> + u8 bar;
> + u32 offset, length;
> +
> + pci_read_config_byte(dev, off + offsetof(struct virtio_pci_cap,
> + bar),
> + &bar);
> + pci_read_config_dword(dev, off + offsetof(struc...