search for: virtballoon_valid

Displaying 20 results from an estimated 85 matches for "virtballoon_valid".

2017 Jun 13
1
[PATCH] virtio_balloon: disable VIOMMU support
...tions(+) diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index 408c174..22caf80 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c @@ -663,6 +663,12 @@ static int virtballoon_restore(struct virtio_device *vdev) } #endif +static int virtballoon_validate(struct virtio_device *vdev) +{ + __virtio_clear_bit(vdev, VIRTIO_F_IOMMU_PLATFORM); + return 0; +} + static unsigned int features[] = { VIRTIO_BALLOON_F_MUST_TELL_HOST, VIRTIO_BALLOON_F_STATS_VQ, @@ -675,6 +681,7 @@ static struct virtio_driver virtio_balloon_driver = { .driver.name = KBUI...
2017 Jun 13
1
[PATCH] virtio_balloon: disable VIOMMU support
...tions(+) diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index 408c174..22caf80 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c @@ -663,6 +663,12 @@ static int virtballoon_restore(struct virtio_device *vdev) } #endif +static int virtballoon_validate(struct virtio_device *vdev) +{ + __virtio_clear_bit(vdev, VIRTIO_F_IOMMU_PLATFORM); + return 0; +} + static unsigned int features[] = { VIRTIO_BALLOON_F_MUST_TELL_HOST, VIRTIO_BALLOON_F_STATS_VQ, @@ -675,6 +681,7 @@ static struct virtio_driver virtio_balloon_driver = { .driver.name = KBUI...
2020 Jul 10
4
[PATCH] virtio_balloon: clear modern features under legacy
...ions(+) diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index 5d4b891bf84f..b9bc03345157 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c @@ -1107,6 +1107,15 @@ static int virtballoon_restore(struct 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);...
2020 Jul 10
4
[PATCH] virtio_balloon: clear modern features under legacy
...ions(+) diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index 5d4b891bf84f..b9bc03345157 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c @@ -1107,6 +1107,15 @@ static int virtballoon_restore(struct 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);...
2020 Apr 16
3
[PATCH] virtio-balloon: Disable free page hinting/reporting if page poison is disabled
...lloon.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index 95d9c2f0a7be..08bc86a6e468 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c @@ -1110,8 +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...
2020 Apr 16
3
[PATCH] virtio-balloon: Disable free page hinting/reporting if page poison is disabled
...lloon.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index 95d9c2f0a7be..08bc86a6e468 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c @@ -1110,8 +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...
2020 May 08
2
[PATCH v2 resubmit] virtio-balloon: Disable free page reporting if page poison reporting is not enabled
...ion(-) diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index 51086a5afdd4..1f157d2f4952 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c @@ -1107,11 +1107,18 @@ static int virtballoon_restore(struct virtio_device *vdev) static int virtballoon_validate(struct virtio_device *vdev) { - /* Tell the host whether we care about poisoned pages. */ + /* + * Inform the hypervisor that our pages are poisoned or + * initialized. If we cannot do that then we should disable + * page reporting as it could potentially change the contents + * of our free...
2020 May 08
2
[PATCH v2 resubmit] virtio-balloon: Disable free page reporting if page poison reporting is not enabled
...ion(-) diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index 51086a5afdd4..1f157d2f4952 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c @@ -1107,11 +1107,18 @@ static int virtballoon_restore(struct virtio_device *vdev) static int virtballoon_validate(struct virtio_device *vdev) { - /* Tell the host whether we care about poisoned pages. */ + /* + * Inform the hypervisor that our pages are poisoned or + * initialized. If we cannot do that then we should disable + * page reporting as it could potentially change the contents + * of our free...
2020 Apr 24
2
[PATCH v2] virtio-balloon: Disable free page reporting if page poison reporting is not enabled
...ion(-) diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index 51086a5afdd4..1f157d2f4952 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c @@ -1107,11 +1107,18 @@ static int virtballoon_restore(struct virtio_device *vdev) static int virtballoon_validate(struct virtio_device *vdev) { - /* Tell the host whether we care about poisoned pages. */ + /* + * Inform the hypervisor that our pages are poisoned or + * initialized. If we cannot do that then we should disable + * page reporting as it could potentially change the contents + * of our free...
2020 Apr 24
2
[PATCH v2] virtio-balloon: Disable free page reporting if page poison reporting is not enabled
...ion(-) diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index 51086a5afdd4..1f157d2f4952 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c @@ -1107,11 +1107,18 @@ static int virtballoon_restore(struct virtio_device *vdev) static int virtballoon_validate(struct virtio_device *vdev) { - /* Tell the host whether we care about poisoned pages. */ + /* + * Inform the hypervisor that our pages are poisoned or + * initialized. If we cannot do that then we should disable + * page reporting as it could potentially change the contents + * of our free...
2020 May 26
1
[PATCH v2 resubmit] virtio-balloon: Disable free page reporting if page poison reporting is not enabled
...vers/virtio/virtio_balloon.c > > index 51086a5afdd4..1f157d2f4952 100644 > > --- a/drivers/virtio/virtio_balloon.c > > +++ b/drivers/virtio/virtio_balloon.c > > @@ -1107,11 +1107,18 @@ static int virtballoon_restore(struct virtio_device *vdev) > > > > static int virtballoon_validate(struct virtio_device *vdev) > > { > > - /* Tell the host whether we care about poisoned pages. */ > > + /* > > + * Inform the hypervisor that our pages are poisoned or > > + * initialized. If we cannot do that then we should disable > &...
2020 Apr 27
2
[PATCH v2] virtio-balloon: Disable free page reporting if page poison reporting is not enabled
...vers/virtio/virtio_balloon.c > > index 51086a5afdd4..1f157d2f4952 100644 > > --- a/drivers/virtio/virtio_balloon.c > > +++ b/drivers/virtio/virtio_balloon.c > > @@ -1107,11 +1107,18 @@ static int virtballoon_restore(struct virtio_device *vdev) > > > > static int virtballoon_validate(struct virtio_device *vdev) > > { > > - /* Tell the host whether we care about poisoned pages. */ > > + /* > > + * Inform the hypervisor that our pages are poisoned or > > + * initialized. If we cannot do that then we should disable > > +...
2020 Apr 27
2
[PATCH v2] virtio-balloon: Disable free page reporting if page poison reporting is not enabled
...vers/virtio/virtio_balloon.c > > index 51086a5afdd4..1f157d2f4952 100644 > > --- a/drivers/virtio/virtio_balloon.c > > +++ b/drivers/virtio/virtio_balloon.c > > @@ -1107,11 +1107,18 @@ static int virtballoon_restore(struct virtio_device *vdev) > > > > static int virtballoon_validate(struct virtio_device *vdev) > > { > > - /* Tell the host whether we care about poisoned pages. */ > > + /* > > + * Inform the hypervisor that our pages are poisoned or > > + * initialized. If we cannot do that then we should disable > > +...
2020 Jul 14
2
[PATCH] virtio_balloon: clear modern features under legacy
...891bf84f..b9bc03345157 100644 > > > > --- a/drivers/virtio/virtio_balloon.c > > > > +++ b/drivers/virtio/virtio_balloon.c > > > > @@ -1107,6 +1107,15 @@ static int virtballoon_restore(struct 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. > > > > +...
2020 Jul 14
2
[PATCH] virtio_balloon: clear modern features under legacy
...891bf84f..b9bc03345157 100644 > > > > --- a/drivers/virtio/virtio_balloon.c > > > > +++ b/drivers/virtio/virtio_balloon.c > > > > @@ -1107,6 +1107,15 @@ static int virtballoon_restore(struct 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. > > > > +...
2020 Jul 12
2
[PATCH] virtio_balloon: clear modern features under legacy
...ivers/virtio/virtio_balloon.c > > index 5d4b891bf84f..b9bc03345157 100644 > > --- a/drivers/virtio/virtio_balloon.c > > +++ b/drivers/virtio/virtio_balloon.c > > @@ -1107,6 +1107,15 @@ static int virtballoon_restore(struct 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(...
2020 Jul 12
2
[PATCH] virtio_balloon: clear modern features under legacy
...ivers/virtio/virtio_balloon.c > > index 5d4b891bf84f..b9bc03345157 100644 > > --- a/drivers/virtio/virtio_balloon.c > > +++ b/drivers/virtio/virtio_balloon.c > > @@ -1107,6 +1107,15 @@ static int virtballoon_restore(struct 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(...
2020 Jun 24
1
[PATCH] virtio: VIRTIO_F_IOMMU_PLATFORM -> VIRTIO_F_ACCESS_PLATFORM
...IO_F_ORDER_PLATFORM) | (1ULL << VIRTIO_RING_F_INDIRECT_DESC) | diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index 1f157d2f4952..fc7301406540 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c @@ -1120,7 +1120,7 @@ static int virtballoon_validate(struct virtio_device *vdev) 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); + __virtio_clear_bit(vdev, VIRTIO_F_ACCESS_PLATFORM); return 0; } diff --git a/driv...
2018 Feb 08
0
[PATCH v28 4/4] virtio-balloon: VIRTIO_BALLOON_F_PAGE_POISON
...on_val, poison_val, sizeof(poison_val)); + virtio_cwrite(vb->vdev, struct virtio_balloon_config, + poison_val, &poison_val); + } } vb->nb.notifier_call = virtballoon_oom_notify; @@ -846,6 +853,11 @@ static int virtballoon_restore(struct virtio_device *vdev) static int virtballoon_validate(struct virtio_device *vdev) { + uint8_t unused; + + if (!page_poison_val_get(&unused)) + __virtio_clear_bit(vdev, VIRTIO_BALLOON_F_PAGE_POISON); + __virtio_clear_bit(vdev, VIRTIO_F_IOMMU_PLATFORM); return 0; } @@ -855,6 +867,7 @@ static unsigned int features[] = { VIRTIO_BALLOON_F_S...
2020 Apr 16
0
[PATCH] virtio-balloon: Disable free page hinting/reporting if page poison is disabled
...changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c > index 95d9c2f0a7be..08bc86a6e468 100644 > --- a/drivers/virtio/virtio_balloon.c > +++ b/drivers/virtio/virtio_balloon.c > @@ -1110,8 +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_cl...