Displaying 20 results from an estimated 250 matches for "__virtio_clear_bit".
2020 Apr 16
3
[PATCH] virtio-balloon: Disable free page hinting/reporting if page poison is disabled
...+1110,12 @@ static int virtballoon_validate(struct virtio_device *vdev)
/* Tell the host whether we care about poisoned pages. */
if (!want_init_on_free() &&
(IS_ENABLED(CONFIG_PAGE_POISONING_NO_SANITY) ||
- !page_poisoning_enabled()))
+ !page_poisoning_enabled())) {
__virtio_clear_bit(vdev, VIRTIO_BALLOON_F_PAGE_POISON);
+ } else if (!virtio_has_feature(vdev, VIRTIO_BALLOON_F_PAGE_POISON)) {
+ __virtio_clear_bit(vdev, VIRTIO_BALLOON_F_FREE_PAGE_HINT);
+ __virtio_clear_bit(vdev, VIRTIO_BALLOON_F_REPORTING);
+ }
__virtio_clear_bit(vdev, VIRTIO_F_IOMMU_PLATFORM);
return 0;
2020 Apr 16
3
[PATCH] virtio-balloon: Disable free page hinting/reporting if page poison is disabled
...+1110,12 @@ static int virtballoon_validate(struct virtio_device *vdev)
/* Tell the host whether we care about poisoned pages. */
if (!want_init_on_free() &&
(IS_ENABLED(CONFIG_PAGE_POISONING_NO_SANITY) ||
- !page_poisoning_enabled()))
+ !page_poisoning_enabled())) {
__virtio_clear_bit(vdev, VIRTIO_BALLOON_F_PAGE_POISON);
+ } else if (!virtio_has_feature(vdev, VIRTIO_BALLOON_F_PAGE_POISON)) {
+ __virtio_clear_bit(vdev, VIRTIO_BALLOON_F_FREE_PAGE_HINT);
+ __virtio_clear_bit(vdev, VIRTIO_BALLOON_F_REPORTING);
+ }
__virtio_clear_bit(vdev, VIRTIO_F_IOMMU_PLATFORM);
return 0;
2020 Jul 10
4
[PATCH] virtio_balloon: clear modern features under legacy
...truct virtio_device *vdev)
static int virtballoon_validate(struct virtio_device *vdev)
{
+ /*
+ * Legacy devices never specified how modern features should behave.
+ * E.g. which endian-ness to use? Better not to assume anything.
+ */
+ if (!virtio_has_feature(vdev, VIRTIO_F_VERSION_1)) {
+ __virtio_clear_bit(vdev, VIRTIO_BALLOON_F_FREE_PAGE_HINT);
+ __virtio_clear_bit(vdev, VIRTIO_BALLOON_F_PAGE_POISON);
+ __virtio_clear_bit(vdev, VIRTIO_BALLOON_F_REPORTING);
+ }
/*
* Inform the hypervisor that our pages are poisoned or
* initialized. If we cannot do that then we should disable
--
MST
2020 Jul 10
4
[PATCH] virtio_balloon: clear modern features under legacy
...truct virtio_device *vdev)
static int virtballoon_validate(struct virtio_device *vdev)
{
+ /*
+ * Legacy devices never specified how modern features should behave.
+ * E.g. which endian-ness to use? Better not to assume anything.
+ */
+ if (!virtio_has_feature(vdev, VIRTIO_F_VERSION_1)) {
+ __virtio_clear_bit(vdev, VIRTIO_BALLOON_F_FREE_PAGE_HINT);
+ __virtio_clear_bit(vdev, VIRTIO_BALLOON_F_PAGE_POISON);
+ __virtio_clear_bit(vdev, VIRTIO_BALLOON_F_REPORTING);
+ }
/*
* Inform the hypervisor that our pages are poisoned or
* initialized. If we cannot do that then we should disable
--
MST
2016 Nov 02
0
[PATCH kernel v4 7/7] virtio-balloon: tell host vm's unused page info
...ev, VIRTIO_BALLOON_F_STATS_VQ) ? 3 : 2;
+ if (virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_HOST_REQ_VQ))
+ nvqs = 4;
+ else if (virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_STATS_VQ))
+ nvqs = 3;
+ else
+ nvqs = 2;
+
+ if (!virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_STATS_VQ)) {
+ __virtio_clear_bit(vb->vdev, VIRTIO_BALLOON_F_PAGE_BITMAP);
+ __virtio_clear_bit(vb->vdev, VIRTIO_BALLOON_F_HOST_REQ_VQ);
+ }
+
err = vb->vdev->config->find_vqs(vb->vdev, nvqs, vqs, callbacks, names);
if (err)
return err;
@@ -718,6 +815,18 @@ static int init_vqs(struct virtio_balloon *vb)...
2020 May 08
2
[PATCH v2 resubmit] virtio-balloon: Disable free page reporting if page poison reporting is not enabled
...e poisoned or
+ * initialized. If we cannot do that then we should disable
+ * page reporting as it could potentially change the contents
+ * of our free pages.
+ */
if (!want_init_on_free() &&
(IS_ENABLED(CONFIG_PAGE_POISONING_NO_SANITY) ||
!page_poisoning_enabled()))
__virtio_clear_bit(vdev, VIRTIO_BALLOON_F_PAGE_POISON);
+ else if (!virtio_has_feature(vdev, VIRTIO_BALLOON_F_PAGE_POISON))
+ __virtio_clear_bit(vdev, VIRTIO_BALLOON_F_REPORTING);
__virtio_clear_bit(vdev, VIRTIO_F_IOMMU_PLATFORM);
return 0;
2020 May 08
2
[PATCH v2 resubmit] virtio-balloon: Disable free page reporting if page poison reporting is not enabled
...e poisoned or
+ * initialized. If we cannot do that then we should disable
+ * page reporting as it could potentially change the contents
+ * of our free pages.
+ */
if (!want_init_on_free() &&
(IS_ENABLED(CONFIG_PAGE_POISONING_NO_SANITY) ||
!page_poisoning_enabled()))
__virtio_clear_bit(vdev, VIRTIO_BALLOON_F_PAGE_POISON);
+ else if (!virtio_has_feature(vdev, VIRTIO_BALLOON_F_PAGE_POISON))
+ __virtio_clear_bit(vdev, VIRTIO_BALLOON_F_REPORTING);
__virtio_clear_bit(vdev, VIRTIO_F_IOMMU_PLATFORM);
return 0;
2020 Apr 24
2
[PATCH v2] virtio-balloon: Disable free page reporting if page poison reporting is not enabled
...e poisoned or
+ * initialized. If we cannot do that then we should disable
+ * page reporting as it could potentially change the contents
+ * of our free pages.
+ */
if (!want_init_on_free() &&
(IS_ENABLED(CONFIG_PAGE_POISONING_NO_SANITY) ||
!page_poisoning_enabled()))
__virtio_clear_bit(vdev, VIRTIO_BALLOON_F_PAGE_POISON);
+ else if (!virtio_has_feature(vdev, VIRTIO_BALLOON_F_PAGE_POISON))
+ __virtio_clear_bit(vdev, VIRTIO_BALLOON_F_REPORTING);
__virtio_clear_bit(vdev, VIRTIO_F_IOMMU_PLATFORM);
return 0;
2020 Apr 24
2
[PATCH v2] virtio-balloon: Disable free page reporting if page poison reporting is not enabled
...e poisoned or
+ * initialized. If we cannot do that then we should disable
+ * page reporting as it could potentially change the contents
+ * of our free pages.
+ */
if (!want_init_on_free() &&
(IS_ENABLED(CONFIG_PAGE_POISONING_NO_SANITY) ||
!page_poisoning_enabled()))
__virtio_clear_bit(vdev, VIRTIO_BALLOON_F_PAGE_POISON);
+ else if (!virtio_has_feature(vdev, VIRTIO_BALLOON_F_PAGE_POISON))
+ __virtio_clear_bit(vdev, VIRTIO_BALLOON_F_REPORTING);
__virtio_clear_bit(vdev, VIRTIO_F_IOMMU_PLATFORM);
return 0;
2016 Nov 30
0
[PATCH kernel v5 5/5] virtio-balloon: tell host vm's unused page info
...ev, VIRTIO_BALLOON_F_STATS_VQ) ? 3 : 2;
+ if (virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_HOST_REQ_VQ))
+ nvqs = 4;
+ else if (virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_STATS_VQ))
+ nvqs = 3;
+ else
+ nvqs = 2;
+
+ if (!virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_STATS_VQ)) {
+ __virtio_clear_bit(vb->vdev, VIRTIO_BALLOON_F_PAGE_BITMAP);
+ __virtio_clear_bit(vb->vdev, VIRTIO_BALLOON_F_HOST_REQ_VQ);
+ }
+
err = vb->vdev->config->find_vqs(vb->vdev, nvqs, vqs, callbacks, names);
if (err)
return err;
@@ -717,6 +811,18 @@ static int init_vqs(struct virtio_balloon *vb)...
2017 Mar 16
0
[PATCH kernel v8 4/4] virtio-balloon: VIRTIO_BALLOON_F_HOST_REQ_VQ
...ev, VIRTIO_BALLOON_F_STATS_VQ) ? 3 : 2;
+ if (virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_HOST_REQ_VQ))
+ nvqs = 4;
+ else if (virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_STATS_VQ))
+ nvqs = 3;
+ else
+ nvqs = 2;
+
+ if (!virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_STATS_VQ)) {
+ __virtio_clear_bit(vb->vdev, VIRTIO_BALLOON_F_CHUNK_TRANSFER);
+ __virtio_clear_bit(vb->vdev, VIRTIO_BALLOON_F_HOST_REQ_VQ);
+ }
+
err = vb->vdev->config->find_vqs(vb->vdev, nvqs, vqs, callbacks, names);
if (err)
return err;
@@ -699,6 +811,20 @@ static int init_vqs(struct virtio_balloon *vb)...
2020 May 26
1
[PATCH v2 resubmit] virtio-balloon: Disable free page reporting if page poison reporting is not enabled
...ould potentially change the contents
> > + * of our free pages.
> > + */
> > if (!want_init_on_free() &&
> > (IS_ENABLED(CONFIG_PAGE_POISONING_NO_SANITY) ||
> > !page_poisoning_enabled()))
> > __virtio_clear_bit(vdev, VIRTIO_BALLOON_F_PAGE_POISON);
> > + else if (!virtio_has_feature(vdev, VIRTIO_BALLOON_F_PAGE_POISON))
> > + __virtio_clear_bit(vdev, VIRTIO_BALLOON_F_REPORTING);
> >
> > __virtio_clear_bit(vdev, VIRTIO_F_IOMMU_PLATFORM);
> > r...
2020 Apr 27
2
[PATCH v2] virtio-balloon: Disable free page reporting if page poison reporting is not enabled
...ting as it could potentially change the contents
> > + * of our free pages.
> > + */
> > if (!want_init_on_free() &&
> > (IS_ENABLED(CONFIG_PAGE_POISONING_NO_SANITY) ||
> > !page_poisoning_enabled()))
> > __virtio_clear_bit(vdev, VIRTIO_BALLOON_F_PAGE_POISON);
> > + else if (!virtio_has_feature(vdev, VIRTIO_BALLOON_F_PAGE_POISON))
> > + __virtio_clear_bit(vdev, VIRTIO_BALLOON_F_REPORTING);
> >
> > __virtio_clear_bit(vdev, VIRTIO_F_IOMMU_PLATFORM);
> > return 0;...
2020 Apr 27
2
[PATCH v2] virtio-balloon: Disable free page reporting if page poison reporting is not enabled
...ting as it could potentially change the contents
> > + * of our free pages.
> > + */
> > if (!want_init_on_free() &&
> > (IS_ENABLED(CONFIG_PAGE_POISONING_NO_SANITY) ||
> > !page_poisoning_enabled()))
> > __virtio_clear_bit(vdev, VIRTIO_BALLOON_F_PAGE_POISON);
> > + else if (!virtio_has_feature(vdev, VIRTIO_BALLOON_F_PAGE_POISON))
> > + __virtio_clear_bit(vdev, VIRTIO_BALLOON_F_REPORTING);
> >
> > __virtio_clear_bit(vdev, VIRTIO_F_IOMMU_PLATFORM);
> > return 0;...
2020 Jul 14
2
[PATCH] virtio_balloon: clear modern features under legacy
...evices never specified how modern features should behave.
> > > > + * E.g. which endian-ness to use? Better not to assume anything.
> > > > + */
> > > > + if (!virtio_has_feature(vdev, VIRTIO_F_VERSION_1)) {
> > > > + __virtio_clear_bit(vdev, VIRTIO_BALLOON_F_FREE_PAGE_HINT);
> > > > + __virtio_clear_bit(vdev, VIRTIO_BALLOON_F_PAGE_POISON);
> > > > + __virtio_clear_bit(vdev, VIRTIO_BALLOON_F_REPORTING);
> > > > + }
> > > > /*
> > > &...
2020 Jul 14
2
[PATCH] virtio_balloon: clear modern features under legacy
...evices never specified how modern features should behave.
> > > > + * E.g. which endian-ness to use? Better not to assume anything.
> > > > + */
> > > > + if (!virtio_has_feature(vdev, VIRTIO_F_VERSION_1)) {
> > > > + __virtio_clear_bit(vdev, VIRTIO_BALLOON_F_FREE_PAGE_HINT);
> > > > + __virtio_clear_bit(vdev, VIRTIO_BALLOON_F_PAGE_POISON);
> > > > + __virtio_clear_bit(vdev, VIRTIO_BALLOON_F_REPORTING);
> > > > + }
> > > > /*
> > > &...
2020 Apr 16
0
[PATCH] virtio-balloon: Disable free page hinting/reporting if page poison is disabled
...lloon_validate(struct virtio_device *vdev)
> /* Tell the host whether we care about poisoned pages. */
> if (!want_init_on_free() &&
> (IS_ENABLED(CONFIG_PAGE_POISONING_NO_SANITY) ||
> - !page_poisoning_enabled()))
> + !page_poisoning_enabled())) {
> __virtio_clear_bit(vdev, VIRTIO_BALLOON_F_PAGE_POISON);
> + } else if (!virtio_has_feature(vdev, VIRTIO_BALLOON_F_PAGE_POISON)) {
> + __virtio_clear_bit(vdev, VIRTIO_BALLOON_F_FREE_PAGE_HINT);
> + __virtio_clear_bit(vdev, VIRTIO_BALLOON_F_REPORTING);
> + }
>
> __virtio_clear_bit(vdev, VIRTIO_F...
2020 Jul 12
2
[PATCH] virtio_balloon: clear modern features under legacy
...+ /*
> > + * Legacy devices never specified how modern features should behave.
> > + * E.g. which endian-ness to use? Better not to assume anything.
> > + */
> > + if (!virtio_has_feature(vdev, VIRTIO_F_VERSION_1)) {
> > + __virtio_clear_bit(vdev, VIRTIO_BALLOON_F_FREE_PAGE_HINT);
> > + __virtio_clear_bit(vdev, VIRTIO_BALLOON_F_PAGE_POISON);
> > + __virtio_clear_bit(vdev, VIRTIO_BALLOON_F_REPORTING);
> > + }
> > /*
> > * Inform the hypervisor that our page...
2020 Jul 12
2
[PATCH] virtio_balloon: clear modern features under legacy
...+ /*
> > + * Legacy devices never specified how modern features should behave.
> > + * E.g. which endian-ness to use? Better not to assume anything.
> > + */
> > + if (!virtio_has_feature(vdev, VIRTIO_F_VERSION_1)) {
> > + __virtio_clear_bit(vdev, VIRTIO_BALLOON_F_FREE_PAGE_HINT);
> > + __virtio_clear_bit(vdev, VIRTIO_BALLOON_F_PAGE_POISON);
> > + __virtio_clear_bit(vdev, VIRTIO_BALLOON_F_REPORTING);
> > + }
> > /*
> > * Inform the hypervisor that our page...
2018 Jul 10
1
[PATCH net-next v1 5/5] virtio_ring: enable packed ring
...44
> --- a/drivers/s390/virtio/virtio_ccw.c
> +++ b/drivers/s390/virtio/virtio_ccw.c
> @@ -765,6 +765,11 @@ static u64 virtio_ccw_get_features(struct virtio_device *vdev)
> return rc;
> }
>
> +static void ccw_transport_features(struct virtio_device *vdev)
> +{
> + __virtio_clear_bit(vdev, VIRTIO_F_RING_PACKED);
> +}
I think we need a better comment to explain why it was disabled here.
Thanks
> +
> static int virtio_ccw_finalize_features(struct virtio_device *vdev)
> {
> struct virtio_ccw_device *vcdev = to_vc_device(vdev);
> @@ -791,6 +796,9 @@ stat...