search for: virtballoon_restore

Displaying 20 results from an estimated 108 matches for "virtballoon_restore".

2016 Jan 01
1
[PATCH v4 1/2] virtio_balloon: Restore the entire balloon after the system freeze
...restored. It means that most of the balloon stays leaked after > the system freeze and restore. Right, but refilling might take a long while. In fact, we sleep for 200msec on refill failure, stalling system resume - which is already a bug. > This patch adds the missing while cycle also into virtballoon_restore(). > Also it makes fill_balloon() to return the number of really modified > pages. Note that leak_balloon() already did this. > > Signed-off-by: Petr Mladek <pmladek at suse.com> This is a replacement for: virtio_balloon: Restore the entire balloon after the system freeze >...
2016 Jan 01
1
[PATCH v4 1/2] virtio_balloon: Restore the entire balloon after the system freeze
...restored. It means that most of the balloon stays leaked after > the system freeze and restore. Right, but refilling might take a long while. In fact, we sleep for 200msec on refill failure, stalling system resume - which is already a bug. > This patch adds the missing while cycle also into virtballoon_restore(). > Also it makes fill_balloon() to return the number of really modified > pages. Note that leak_balloon() already did this. > > Signed-off-by: Petr Mladek <pmladek at suse.com> This is a replacement for: virtio_balloon: Restore the entire balloon after the system freeze >...
2015 Dec 04
0
[PATCH v4 1/2] virtio_balloon: Restore the entire balloon after the system freeze
...lloon() in a while cycle. remove_common() is called also when the system is being frozen. But fill_balloon() is called only once when the system is being restored. It means that most of the balloon stays leaked after the system freeze and restore. This patch adds the missing while cycle also into virtballoon_restore(). Also it makes fill_balloon() to return the number of really modified pages. Note that leak_balloon() already did this. Signed-off-by: Petr Mladek <pmladek at suse.com> --- drivers/virtio/virtio_balloon.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/driv...
2020 Jul 10
4
[PATCH] virtio_balloon: clear modern features under legacy
...irtio/virtio_balloon.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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)) { +...
2020 Jul 10
4
[PATCH] virtio_balloon: clear modern features under legacy
...irtio/virtio_balloon.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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)) { +...
2016 Jan 01
2
[PATCH RFC] virtio_balloon: refill by config handler
...vers/virtio/virtio_balloon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index 7efc329..ee29473 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c @@ -589,7 +589,7 @@ static int virtballoon_restore(struct virtio_device *vdev) virtio_device_ready(vdev); - fill_balloon(vb, towards_target(vb)); + wake_up(&vb->config_change); update_balloon_size(vb); return 0; } -- MST
2016 Jan 01
2
[PATCH RFC] virtio_balloon: refill by config handler
...vers/virtio/virtio_balloon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index 7efc329..ee29473 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c @@ -589,7 +589,7 @@ static int virtballoon_restore(struct virtio_device *vdev) virtio_device_ready(vdev); - fill_balloon(vb, towards_target(vb)); + wake_up(&vb->config_change); update_balloon_size(vb); return 0; } -- MST
2012 Apr 26
4
[PATCH 0/3] virtio: balloon: cleanups and a fix
Hello, The main fix is to update the host with the current balloon value on module removal after deflating the balloon. Without the fix, the host has the wrong idea of the ballooned memory in the guest. This is patch 2. Patches 1 and 3 are cleanups with no effective code change. Please apply, Amit Shah (3): virtio: balloon: drop restore_common() virtio: balloon: let host know of updated
2012 Apr 26
4
[PATCH 0/3] virtio: balloon: cleanups and a fix
Hello, The main fix is to update the host with the current balloon value on module removal after deflating the balloon. Without the fix, the host has the wrong idea of the ballooned memory in the guest. This is patch 2. Patches 1 and 3 are cleanups with no effective code change. Please apply, Amit Shah (3): virtio: balloon: drop restore_common() virtio: balloon: let host know of updated
2015 Dec 04
4
[PATCH v4 0/2] virtio_balloon: Fix restore and convert to workqueue
It has been long since I have sent v3 of the balloon conversion from a kthread to a workqueue. I have gained some more experience with the APIs in the meantime. I hope that you would like the outcome. I have added one more patch that fixes a separate problem with restoring the balloon after the system freeze. I have found this when testing the conversion. Changes against v3: + rebased on
2015 Dec 04
4
[PATCH v4 0/2] virtio_balloon: Fix restore and convert to workqueue
It has been long since I have sent v3 of the balloon conversion from a kthread to a workqueue. I have gained some more experience with the APIs in the meantime. I hope that you would like the outcome. I have added one more patch that fixes a separate problem with restoring the balloon after the system freeze. I have found this when testing the conversion. Changes against v3: + rebased on
2020 May 08
2
[PATCH v2 resubmit] virtio-balloon: Disable free page reporting if page poison reporting is not enabled
...n.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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...
2020 May 08
2
[PATCH v2 resubmit] virtio-balloon: Disable free page reporting if page poison reporting is not enabled
...n.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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...
2017 Jun 13
1
[PATCH] virtio_balloon: disable VIOMMU support
...--- drivers/virtio/virtio_balloon.c | 7 +++++++ 1 file changed, 7 insertions(+) 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 @@ stat...
2017 Jun 13
1
[PATCH] virtio_balloon: disable VIOMMU support
...--- drivers/virtio/virtio_balloon.c | 7 +++++++ 1 file changed, 7 insertions(+) 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 @@ stat...
2020 Apr 24
2
[PATCH v2] virtio-balloon: Disable free page reporting if page poison reporting is not enabled
...n.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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...
2020 Apr 24
2
[PATCH v2] virtio-balloon: Disable free page reporting if page poison reporting is not enabled
...n.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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...
2012 Feb 29
1
[PATCH 1/1] virtio: balloon: leak / fill balloon across S4
...+ int ret; + + ret = init_vqs(vdev->priv); + if (ret) + return ret; + + fill_balloon(vb, towards_target(vb)); + update_balloon_size(vb); + return 0; +} + static int virtballoon_thaw(struct virtio_device *vdev) { - return init_vqs(vdev->priv); + return restore_common(vdev); } static int virtballoon_restore(struct virtio_device *vdev) { struct virtio_balloon *vb = vdev->priv; - struct page *page, *page2; - - /* We're starting from a clean slate */ - vb->num_pages = 0; /* * If a request wasn't complete at the time of freezing, this @@ -397,12 +413,7 @@ static int virtballoon_res...
2012 Feb 29
1
[PATCH 1/1] virtio: balloon: leak / fill balloon across S4
...+ int ret; + + ret = init_vqs(vdev->priv); + if (ret) + return ret; + + fill_balloon(vb, towards_target(vb)); + update_balloon_size(vb); + return 0; +} + static int virtballoon_thaw(struct virtio_device *vdev) { - return init_vqs(vdev->priv); + return restore_common(vdev); } static int virtballoon_restore(struct virtio_device *vdev) { struct virtio_balloon *vb = vdev->priv; - struct page *page, *page2; - - /* We're starting from a clean slate */ - vb->num_pages = 0; /* * If a request wasn't complete at the time of freezing, this @@ -397,12 +413,7 @@ static int virtballoon_res...
2012 Mar 29
5
[PATCH 0/5] virtio: S3 support, use PM API macro for init
Hello, Turns out S3 is not different from S4 for virtio devices: the device is assumed to be reset, so the host and guest state are to be assumed to be out of sync upon resume. We handle the S4 case with exactly the same scenario, so just point the suspend/resume routines to the freeze/restore ones. Once that is done, we also use the PM API's macro to initialise the sleep functions. A