search for: want_init_on_free

Displaying 20 results from an estimated 25 matches for "want_init_on_free".

2020 Apr 27
2
[PATCH v2] virtio-balloon: Disable free page reporting if page poison reporting is not enabled
...> + * 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 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)) > &g...
2020 Apr 27
2
[PATCH v2] virtio-balloon: Disable free page reporting if page poison reporting is not enabled
...> + * 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 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)) > &g...
2020 Apr 24
2
[PATCH v2] virtio-balloon: Disable free page reporting if page poison reporting is not enabled
...ice *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 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_...
2020 Apr 24
2
[PATCH v2] virtio-balloon: Disable free page reporting if page poison reporting is not enabled
...ice *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 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_...
2020 Apr 27
1
[PATCH v2] virtio-balloon: Disable free page reporting if page poison reporting is not enabled
...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 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...
2020 Apr 27
0
[PATCH v2] virtio-balloon: Disable free page reporting if page poison reporting is not enabled
...nform 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 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_POIS...
2020 Apr 16
3
[PATCH] virtio-balloon: Disable free page hinting/reporting if page poison is disabled
...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_PAGE_POISON); + } else if (!virtio_has_feature(vdev, VIRTIO_BALLOON_F_PAGE_POISON)) { + __virtio_clear_bit(vdev, V...
2020 Apr 16
3
[PATCH] virtio-balloon: Disable free page hinting/reporting if page poison is disabled
...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_PAGE_POISON); + } else if (!virtio_has_feature(vdev, VIRTIO_BALLOON_F_PAGE_POISON)) { + __virtio_clear_bit(vdev, V...
2020 May 08
2
[PATCH v2 resubmit] virtio-balloon: Disable free page reporting if page poison reporting is not enabled
...ice *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 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_...
2020 May 08
2
[PATCH v2 resubmit] virtio-balloon: Disable free page reporting if page poison reporting is not enabled
...ice *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 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_...
2020 Apr 27
0
[PATCH v2] virtio-balloon: Disable free page reporting if page poison reporting is not enabled
...ether 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 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_...
2020 May 26
1
[PATCH v2 resubmit] virtio-balloon: Disable free page reporting if page poison reporting is not enabled
...* 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 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))...
2020 Jul 12
2
[PATCH] virtio_balloon: clear modern features under legacy
.../* Start with poison val of 0 representing general init */ __u32 poison_val = 0; /* * Let the hypervisor know that we are expecting a * specific value to be written back in balloon pages. */ if (!want_init_on_free()) memset(&poison_val, PAGE_POISON, sizeof(poison_val)); virtio_cwrite(vb->vdev, struct virtio_balloon_config, poison_val, &poison_val); actually this writes a native endian-ness value. All bytes happen to be the sa...
2020 Jul 12
2
[PATCH] virtio_balloon: clear modern features under legacy
.../* Start with poison val of 0 representing general init */ __u32 poison_val = 0; /* * Let the hypervisor know that we are expecting a * specific value to be written back in balloon pages. */ if (!want_init_on_free()) memset(&poison_val, PAGE_POISON, sizeof(poison_val)); virtio_cwrite(vb->vdev, struct virtio_balloon_config, poison_val, &poison_val); actually this writes a native endian-ness value. All bytes happen to be the sa...
2020 Apr 16
0
[PATCH] virtio-balloon: Disable free page hinting/reporting if page poison is disabled
...n.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_PAGE_POISON); > + } else if (!virtio_has_feature(vdev, VIRTIO_BALLOON_F_PAGE_POISON)) { >...
2020 May 15
0
[PATCH v2 resubmit] virtio-balloon: Disable free page reporting if page poison reporting is not enabled
...; + /* > + * 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 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)) > +...
2020 Aug 05
0
[PATCH v3 29/38] virtio_balloon: use LE config space accesses
...__le32)vb->cmd_id_received_cache); + virtio_cread_le(vb->vdev, struct virtio_balloon_config, + free_page_hint_cmd_id, + &vb->cmd_id_received_cache); } return vb->cmd_id_received_cache; @@ -987,8 +979,8 @@ static int virtballoon_probe(struct virtio_device *vdev) if (!want_init_on_free()) memset(&poison_val, PAGE_POISON, sizeof(poison_val)); - virtio_cwrite(vb->vdev, struct virtio_balloon_config, - poison_val, &poison_val); + virtio_cwrite_le(vb->vdev, struct virtio_balloon_config, + poison_val, &poison_val); } vb->pr_dev_info.report...
2020 Jul 13
0
[PATCH] virtio_balloon: clear modern features under legacy
...representing general init */ > __u32 poison_val = 0; > > /* > * Let the hypervisor know that we are expecting a > * specific value to be written back in balloon pages. > */ > if (!want_init_on_free()) > memset(&poison_val, PAGE_POISON, sizeof(poison_val)); > > virtio_cwrite(vb->vdev, struct virtio_balloon_config, > poison_val, &poison_val); > > > actually this writes a native endian-ness valu...
2020 Apr 20
2
[virtio-dev] Re: [PATCH] virtio-balloon: Disable free page hinting/reporting if page poison is disabled
...*will* get migrated, even if 4) happens after 3). That's guaranteed by the 2-bitmap magic. Now, assume the following happens (in some future Linux version) (due to your "simply not migrating it" comment): 1) Guest balloon allocates and hints a page. Assume the page is zero due to want_init_on_free(). 2) Hypervisor processes the hinting request. 3) Guest frees the page. Assume we are implementing some magic to "skip" zeroing, as we assume it is still zero. Due to 2), the page won't get migrated. In 3) we expect the page to be 0. QEMU would have to make sure that we always get e...
2020 Jul 10
4
[PATCH] virtio_balloon: clear modern features under legacy
Page reporting features were never supported by legacy hypervisors. Supporting them poses a problem: should we use native endian-ness (like current code assumes)? Or little endian-ness like the virtio spec says? Rather than try to figure out, and since results of incorrect endian-ness are dire, let's just block this configuration. Cc: stable at vger.kernel.org Signed-off-by: Michael S.