search for: virtio_config_s_features_ok

Displaying 20 results from an estimated 150 matches for "virtio_config_s_features_ok".

2014 Dec 11
0
[PATCH 1/3] virtio: set VIRTIO_CONFIG_S_FEATURES_OK on restore
virtio 1.0 devices require that drivers set VIRTIO_CONFIG_S_FEATURES_OK after finalizing features. virtio core missed doing this on restore, fix it up. Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- drivers/virtio/virtio.c | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/drivers/virtio/virtio...
2014 Nov 25
2
[PATCH v4 09/42] virtio: set FEATURES_OK
...71 100644 --- a/include/uapi/linux/virtio_config.h +++ b/include/uapi/linux/virtio_config.h @@ -38,6 +38,8 @@ #define VIRTIO_CONFIG_S_DRIVER 2 /* Driver has used its parts of the config, and is happy */ #define VIRTIO_CONFIG_S_DRIVER_OK 4 +/* Driver has finished configuring features */ +#define VIRTIO_CONFIG_S_FEATURES_OK 8 /* We've given up on this device. */ #define VIRTIO_CONFIG_S_FAILED 0x80 diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index d213567..a3df817 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c @@ -160,6 +160,7 @@ static int virtio_dev_probe(struct device...
2014 Nov 25
2
[PATCH v4 09/42] virtio: set FEATURES_OK
...71 100644 --- a/include/uapi/linux/virtio_config.h +++ b/include/uapi/linux/virtio_config.h @@ -38,6 +38,8 @@ #define VIRTIO_CONFIG_S_DRIVER 2 /* Driver has used its parts of the config, and is happy */ #define VIRTIO_CONFIG_S_DRIVER_OK 4 +/* Driver has finished configuring features */ +#define VIRTIO_CONFIG_S_FEATURES_OK 8 /* We've given up on this device. */ #define VIRTIO_CONFIG_S_FAILED 0x80 diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index d213567..a3df817 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c @@ -160,6 +160,7 @@ static int virtio_dev_probe(struct device...
2014 Dec 11
4
[PATCH 0/3] minor virtio 1.0 fixups
Here are some fixup patches on top of my latest pull request. Will include in the next pull request. Michael S. Tsirkin (3): virtio: set VIRTIO_CONFIG_S_FEATURES_OK on restore virtio_config: fix virtio_cread_bytes virtio_pci_common.h: drop VIRTIO_PCI_NO_LEGACY drivers/virtio/virtio_pci_common.h | 1 - include/linux/virtio_config.h | 5 ++++- drivers/virtio/virtio.c | 37 +++++++++++++++++++++++-------------- 3 files changed, 27 insertio...
2014 Dec 11
4
[PATCH 0/3] minor virtio 1.0 fixups
Here are some fixup patches on top of my latest pull request. Will include in the next pull request. Michael S. Tsirkin (3): virtio: set VIRTIO_CONFIG_S_FEATURES_OK on restore virtio_config: fix virtio_cread_bytes virtio_pci_common.h: drop VIRTIO_PCI_NO_LEGACY drivers/virtio/virtio_pci_common.h | 1 - include/linux/virtio_config.h | 5 ++++- drivers/virtio/virtio.c | 37 +++++++++++++++++++++++-------------- 3 files changed, 27 insertio...
2014 Oct 22
2
[PATCH RFC v3 09/16] virtio: set FEATURES_OK
...de 100644 --- a/include/uapi/linux/virtio_config.h +++ b/include/uapi/linux/virtio_config.h @@ -38,6 +38,8 @@ #define VIRTIO_CONFIG_S_DRIVER 2 /* Driver has used its parts of the config, and is happy */ #define VIRTIO_CONFIG_S_DRIVER_OK 4 +/* Driver has finished configuring features */ +#define VIRTIO_CONFIG_S_FEATURES_OK 8 /* We've given up on this device. */ #define VIRTIO_CONFIG_S_FAILED 0x80 diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index d213567..a3df817 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c @@ -160,6 +160,7 @@ static int virtio_dev_probe(struct device...
2014 Oct 22
2
[PATCH RFC v3 09/16] virtio: set FEATURES_OK
...de 100644 --- a/include/uapi/linux/virtio_config.h +++ b/include/uapi/linux/virtio_config.h @@ -38,6 +38,8 @@ #define VIRTIO_CONFIG_S_DRIVER 2 /* Driver has used its parts of the config, and is happy */ #define VIRTIO_CONFIG_S_DRIVER_OK 4 +/* Driver has finished configuring features */ +#define VIRTIO_CONFIG_S_FEATURES_OK 8 /* We've given up on this device. */ #define VIRTIO_CONFIG_S_FAILED 0x80 diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index d213567..a3df817 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c @@ -160,6 +160,7 @@ static int virtio_dev_probe(struct device...
2020 Jun 15
3
[PATCH] s390: protvirt: virtio: Refuse device without IOMMU
...??? if (!ccw) >>>> ????????? return; >>>> +??? /* Protected Virtualisation guest needs IOMMU */ >>>> +??? if (is_prot_virt_guest() && >>>> +??????? !__virtio_test_bit(vdev, VIRTIO_F_IOMMU_PLATFORM)) >>>> +??????????? status &= ~VIRTIO_CONFIG_S_FEATURES_OK; >>>> + >>>> ????? /* Write the status to the host. */ >>>> ????? vcdev->dma_area->status = status; >>>> ????? ccw->cmd_code = CCW_CMD_WRITE_STATUS; >>> >>> >>> I wonder whether we need move it to virtio core instea...
2020 Jun 15
3
[PATCH] s390: protvirt: virtio: Refuse device without IOMMU
...??? if (!ccw) >>>> ????????? return; >>>> +??? /* Protected Virtualisation guest needs IOMMU */ >>>> +??? if (is_prot_virt_guest() && >>>> +??????? !__virtio_test_bit(vdev, VIRTIO_F_IOMMU_PLATFORM)) >>>> +??????????? status &= ~VIRTIO_CONFIG_S_FEATURES_OK; >>>> + >>>> ????? /* Write the status to the host. */ >>>> ????? vcdev->dma_area->status = status; >>>> ????? ccw->cmd_code = CCW_CMD_WRITE_STATUS; >>> >>> >>> I wonder whether we need move it to virtio core instea...
2020 Jun 29
3
[PATCH v3 1/1] s390: virtio: let arch accept devices without IOMMU feature
...+ if (arch_needs_virtio_iommu_platform(dev) && > + !virtio_has_feature(dev, VIRTIO_F_IOMMU_PLATFORM)) { > + dev_warn(&dev->dev, > + "virtio: device must provide VIRTIO_F_IOMMU_PLATFORM\n"); > + return -ENODEV; > + } > + > virtio_add_status(dev, VIRTIO_CONFIG_S_FEATURES_OK); > status = dev->config->get_status(dev); > if (!(status & VIRTIO_CONFIG_S_FEATURES_OK)) { Well don't you need to check it *before* VIRTIO_F_VERSION_1, not after? > diff --git a/include/linux/virtio.h b/include/linux/virtio.h > index a493eac08393..e8526ae3463e 100...
2020 Jun 29
3
[PATCH v3 1/1] s390: virtio: let arch accept devices without IOMMU feature
...+ if (arch_needs_virtio_iommu_platform(dev) && > + !virtio_has_feature(dev, VIRTIO_F_IOMMU_PLATFORM)) { > + dev_warn(&dev->dev, > + "virtio: device must provide VIRTIO_F_IOMMU_PLATFORM\n"); > + return -ENODEV; > + } > + > virtio_add_status(dev, VIRTIO_CONFIG_S_FEATURES_OK); > status = dev->config->get_status(dev); > if (!(status & VIRTIO_CONFIG_S_FEATURES_OK)) { Well don't you need to check it *before* VIRTIO_F_VERSION_1, not after? > diff --git a/include/linux/virtio.h b/include/linux/virtio.h > index a493eac08393..e8526ae3463e 100...
2020 Jul 02
2
[PATCH v3 1/1] s390: virtio: let arch accept devices without IOMMU feature
...gt;>> + !virtio_has_feature(dev, VIRTIO_F_IOMMU_PLATFORM)) { >>> + dev_warn(&dev->dev, >>> + "virtio: device must provide VIRTIO_F_IOMMU_PLATFORM\n"); >>> + return -ENODEV; >>> + } >>> + >>> virtio_add_status(dev, VIRTIO_CONFIG_S_FEATURES_OK); >>> status = dev->config->get_status(dev); >>> if (!(status & VIRTIO_CONFIG_S_FEATURES_OK)) { >> >> Well don't you need to check it *before* VIRTIO_F_VERSION_1, not after? > > But it's only available with VERSION_1 anyway, isn't it?...
2020 Jul 02
2
[PATCH v3 1/1] s390: virtio: let arch accept devices without IOMMU feature
...gt;>> + !virtio_has_feature(dev, VIRTIO_F_IOMMU_PLATFORM)) { >>> + dev_warn(&dev->dev, >>> + "virtio: device must provide VIRTIO_F_IOMMU_PLATFORM\n"); >>> + return -ENODEV; >>> + } >>> + >>> virtio_add_status(dev, VIRTIO_CONFIG_S_FEATURES_OK); >>> status = dev->config->get_status(dev); >>> if (!(status & VIRTIO_CONFIG_S_FEATURES_OK)) { >> >> Well don't you need to check it *before* VIRTIO_F_VERSION_1, not after? > > But it's only available with VERSION_1 anyway, isn't it?...
2020 Jun 12
2
[PATCH] s390: protvirt: virtio: Refuse device without IOMMU
...tio_device *vdev, u8 status) >> ????? if (!ccw) >> ????????? return; >> +??? /* Protected Virtualisation guest needs IOMMU */ >> +??? if (is_prot_virt_guest() && >> +??????? !__virtio_test_bit(vdev, VIRTIO_F_IOMMU_PLATFORM)) >> +??????????? status &= ~VIRTIO_CONFIG_S_FEATURES_OK; >> + >> ????? /* Write the status to the host. */ >> ????? vcdev->dma_area->status = status; >> ????? ccw->cmd_code = CCW_CMD_WRITE_STATUS; > > > I wonder whether we need move it to virtio core instead of ccw. > > I think the other memory protecti...
2020 Jun 12
2
[PATCH] s390: protvirt: virtio: Refuse device without IOMMU
...tio_device *vdev, u8 status) >> ????? if (!ccw) >> ????????? return; >> +??? /* Protected Virtualisation guest needs IOMMU */ >> +??? if (is_prot_virt_guest() && >> +??????? !__virtio_test_bit(vdev, VIRTIO_F_IOMMU_PLATFORM)) >> +??????????? status &= ~VIRTIO_CONFIG_S_FEATURES_OK; >> + >> ????? /* Write the status to the host. */ >> ????? vcdev->dma_area->status = status; >> ????? ccw->cmd_code = CCW_CMD_WRITE_STATUS; > > > I wonder whether we need move it to virtio core instead of ccw. > > I think the other memory protecti...
2020 Jun 15
4
[PATCH v2 0/1] s390: virtio: let's arch choose to accept devices without IOMMU feature
An architecture protecting the guest memory against unauthorized host access may want to enforce VIRTIO I/O device protection through the use of VIRTIO_F_IOMMU_PLATFORM. Let's give a chance to the architecture to accept or not devices without VIRTIO_F_IOMMU_PLATFORM. Pierre Morel (1): s390: virtio: let arch accept devices without IOMMU feature arch/s390/mm/init.c | 6 ++++++
2014 Nov 25
1
[PATCH v4 09/42] virtio: set FEATURES_OK
...> include/uapi/linux/virtio_config.h | 2 ++ > > drivers/virtio/virtio.c | 29 ++++++++++++++++++++++------- > > 2 files changed, 24 insertions(+), 7 deletions(-) > > > > > + if (virtio_has_feature(dev, VIRTIO_F_VERSION_1)) { > > + add_status(dev, VIRTIO_CONFIG_S_FEATURES_OK); > > + status = dev->config->get_status(dev); > > + if (!(status & VIRTIO_CONFIG_S_FEATURES_OK)) { > > + printk(KERN_ERR "virtio: device refuses features: %x\n", > > + status); > > Can you use dev_err() to include the information whic...
2014 Nov 25
1
[PATCH v4 09/42] virtio: set FEATURES_OK
...> include/uapi/linux/virtio_config.h | 2 ++ > > drivers/virtio/virtio.c | 29 ++++++++++++++++++++++------- > > 2 files changed, 24 insertions(+), 7 deletions(-) > > > > > + if (virtio_has_feature(dev, VIRTIO_F_VERSION_1)) { > > + add_status(dev, VIRTIO_CONFIG_S_FEATURES_OK); > > + status = dev->config->get_status(dev); > > + if (!(status & VIRTIO_CONFIG_S_FEATURES_OK)) { > > + printk(KERN_ERR "virtio: device refuses features: %x\n", > > + status); > > Can you use dev_err() to include the information whic...
2020 Jun 10
5
[PATCH] s390: protvirt: virtio: Refuse device without IOMMU
...io/virtio_ccw.c @@ -986,6 +986,11 @@ static void virtio_ccw_set_status(struct virtio_device *vdev, u8 status) if (!ccw) return; + /* Protected Virtualisation guest needs IOMMU */ + if (is_prot_virt_guest() && + !__virtio_test_bit(vdev, VIRTIO_F_IOMMU_PLATFORM)) + status &= ~VIRTIO_CONFIG_S_FEATURES_OK; + /* Write the status to the host. */ vcdev->dma_area->status = status; ccw->cmd_code = CCW_CMD_WRITE_STATUS; -- 2.25.1
2020 Jun 10
5
[PATCH] s390: protvirt: virtio: Refuse device without IOMMU
...io/virtio_ccw.c @@ -986,6 +986,11 @@ static void virtio_ccw_set_status(struct virtio_device *vdev, u8 status) if (!ccw) return; + /* Protected Virtualisation guest needs IOMMU */ + if (is_prot_virt_guest() && + !__virtio_test_bit(vdev, VIRTIO_F_IOMMU_PLATFORM)) + status &= ~VIRTIO_CONFIG_S_FEATURES_OK; + /* Write the status to the host. */ vcdev->dma_area->status = status; ccw->cmd_code = CCW_CMD_WRITE_STATUS; -- 2.25.1