Displaying 19 results from an estimated 19 matches for "virtio_balloon_config_read_cmd_id".
2020 Jul 27
3
[PATCH] virtio_balloon: fix up endian-ness for free cmd id
...virtio_balloon.c
index 774deb65a9bb..798ec304fe3e 100644
--- a/drivers/virtio/virtio_balloon.c
+++ b/drivers/virtio/virtio_balloon.c
@@ -578,10 +578,14 @@ static int init_vqs(struct virtio_balloon *vb)
static u32 virtio_balloon_cmd_id_received(struct virtio_balloon *vb)
{
if (test_and_clear_bit(VIRTIO_BALLOON_CONFIG_READ_CMD_ID,
- &vb->config_read_bitmap))
+ &vb->config_read_bitmap)) {
virtio_cread(vb->vdev, struct virtio_balloon_config,
free_page_hint_cmd_id,
&vb->cmd_id_received_cache);
+ /* Legacy balloon config space is LE, unlike all other devices. */
+...
2019 Jan 04
4
[PATCH v2 0/2] virtio-balloon: tweak config_changed
Since virtio-ccw doesn't work with accessing to the config space
inside an interrupt context, this patch series avoids that issue by
moving the config register accesses to the related workqueue contexts.
v1->v2 ChangeLog:
- add config_read_bitmap to indicate to the workqueue callbacks about
the necessity of reading the related config fields.
Wei Wang (2):
virtio-balloon: tweak
2019 Jan 04
0
[PATCH v2 1/2] virtio-balloon: tweak config_changed implementation
...-)
diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
index 728ecd1..35ee762 100644
--- a/drivers/virtio/virtio_balloon.c
+++ b/drivers/virtio/virtio_balloon.c
@@ -61,6 +61,10 @@ enum virtio_balloon_vq {
VIRTIO_BALLOON_VQ_MAX
};
+enum virtio_balloon_config_read {
+ VIRTIO_BALLOON_CONFIG_READ_CMD_ID = 0,
+};
+
struct virtio_balloon {
struct virtio_device *vdev;
struct virtqueue *inflate_vq, *deflate_vq, *stats_vq, *free_page_vq;
@@ -77,6 +81,8 @@ struct virtio_balloon {
/* Prevent updating balloon when it is being canceled. */
spinlock_t stop_update_lock;
bool stop_update;
+ /* Bitm...
2019 Jan 07
3
[PATCH v3 0/3] virtio-balloon: tweak config_changed
Since virtio-ccw doesn't work with accessing to the config space
inside an interrupt context, this patch series avoids that issue by
moving the config register accesses to the related workqueue contexts.
v2->v3 ChangeLog:
- rename cmd_id_received to cmd_id_received_cache, and have call sites
read the latest value via virtio_balloon_cmd_id_received. (Still
kept Cornelia and
2020 Apr 15
2
[PATCH] virtio-balloon: Avoid using the word 'report' when referring to free page hinting
...t a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
index 0ef16566c3f3..95d9c2f0a7be 100644
--- a/drivers/virtio/virtio_balloon.c
+++ b/drivers/virtio/virtio_balloon.c
@@ -580,7 +580,7 @@ static u32 virtio_balloon_cmd_id_received(struct virtio_balloon *vb)
if (test_and_clear_bit(VIRTIO_BALLOON_CONFIG_READ_CMD_ID,
&vb->config_read_bitmap))
virtio_cread(vb->vdev, struct virtio_balloon_config,
- free_page_report_cmd_id,
+ free_page_hint_cmd_id,
&vb->cmd_id_received_cache);
return vb->cmd_id_received_cache;
diff --git a/include/uapi/linux/virtio_ball...
2020 Apr 15
2
[PATCH] virtio-balloon: Avoid using the word 'report' when referring to free page hinting
...t a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
index 0ef16566c3f3..95d9c2f0a7be 100644
--- a/drivers/virtio/virtio_balloon.c
+++ b/drivers/virtio/virtio_balloon.c
@@ -580,7 +580,7 @@ static u32 virtio_balloon_cmd_id_received(struct virtio_balloon *vb)
if (test_and_clear_bit(VIRTIO_BALLOON_CONFIG_READ_CMD_ID,
&vb->config_read_bitmap))
virtio_cread(vb->vdev, struct virtio_balloon_config,
- free_page_report_cmd_id,
+ free_page_hint_cmd_id,
&vb->cmd_id_received_cache);
return vb->cmd_id_received_cache;
diff --git a/include/uapi/linux/virtio_ball...
2019 Jan 04
2
[PATCH v2 1/2] virtio-balloon: tweak config_changed implementation
...n.c b/drivers/virtio/virtio_balloon.c
> index 728ecd1..35ee762 100644
> --- a/drivers/virtio/virtio_balloon.c
> +++ b/drivers/virtio/virtio_balloon.c
> @@ -61,6 +61,10 @@ enum virtio_balloon_vq {
> VIRTIO_BALLOON_VQ_MAX
> };
>
> +enum virtio_balloon_config_read {
> + VIRTIO_BALLOON_CONFIG_READ_CMD_ID = 0,
> +};
> +
> struct virtio_balloon {
> struct virtio_device *vdev;
> struct virtqueue *inflate_vq, *deflate_vq, *stats_vq, *free_page_vq;
> @@ -77,6 +81,8 @@ struct virtio_balloon {
> /* Prevent updating balloon when it is being canceled. */
> spinlock_t stop_up...
2019 Jan 04
2
[PATCH v2 1/2] virtio-balloon: tweak config_changed implementation
...n.c b/drivers/virtio/virtio_balloon.c
> index 728ecd1..35ee762 100644
> --- a/drivers/virtio/virtio_balloon.c
> +++ b/drivers/virtio/virtio_balloon.c
> @@ -61,6 +61,10 @@ enum virtio_balloon_vq {
> VIRTIO_BALLOON_VQ_MAX
> };
>
> +enum virtio_balloon_config_read {
> + VIRTIO_BALLOON_CONFIG_READ_CMD_ID = 0,
> +};
> +
> struct virtio_balloon {
> struct virtio_device *vdev;
> struct virtqueue *inflate_vq, *deflate_vq, *stats_vq, *free_page_vq;
> @@ -77,6 +81,8 @@ struct virtio_balloon {
> /* Prevent updating balloon when it is being canceled. */
> spinlock_t stop_up...
2020 Apr 15
1
[PATCH v2] virtio-balloon: Avoid using the word 'report' when referring to free page hinting
...t a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
index 0ef16566c3f3..95d9c2f0a7be 100644
--- a/drivers/virtio/virtio_balloon.c
+++ b/drivers/virtio/virtio_balloon.c
@@ -580,7 +580,7 @@ static u32 virtio_balloon_cmd_id_received(struct virtio_balloon *vb)
if (test_and_clear_bit(VIRTIO_BALLOON_CONFIG_READ_CMD_ID,
&vb->config_read_bitmap))
virtio_cread(vb->vdev, struct virtio_balloon_config,
- free_page_report_cmd_id,
+ free_page_hint_cmd_id,
&vb->cmd_id_received_cache);
return vb->cmd_id_received_cache;
diff --git a/include/uapi/linux/virtio_ball...
2020 Jul 14
2
[PATCH] virtio_balloon: clear modern features under legacy
...s! But not yet - I am poking at the endian-ness things right now!
> > As you say correctly the command id is actually assumed native endian:
> >
> >
> > static u32 virtio_balloon_cmd_id_received(struct virtio_balloon *vb)
> > {
> > if (test_and_clear_bit(VIRTIO_BALLOON_CONFIG_READ_CMD_ID,
> > &vb->config_read_bitmap))
> > virtio_cread(vb->vdev, struct virtio_balloon_config,
> > free_page_hint_cmd_id,
> > &vb->cmd_id_received_cache);
>...
2020 Jul 14
2
[PATCH] virtio_balloon: clear modern features under legacy
...s! But not yet - I am poking at the endian-ness things right now!
> > As you say correctly the command id is actually assumed native endian:
> >
> >
> > static u32 virtio_balloon_cmd_id_received(struct virtio_balloon *vb)
> > {
> > if (test_and_clear_bit(VIRTIO_BALLOON_CONFIG_READ_CMD_ID,
> > &vb->config_read_bitmap))
> > virtio_cread(vb->vdev, struct virtio_balloon_config,
> > free_page_hint_cmd_id,
> > &vb->cmd_id_received_cache);
>...
2020 Jul 12
2
[PATCH] virtio_balloon: clear modern features under legacy
...y this writes a native endian-ness value. All bytes happen to be
the same though, and host only cares about 0 or non 0 ATM.
As you say correctly the command id is actually assumed native endian:
static u32 virtio_balloon_cmd_id_received(struct virtio_balloon *vb)
{
if (test_and_clear_bit(VIRTIO_BALLOON_CONFIG_READ_CMD_ID,
&vb->config_read_bitmap))
virtio_cread(vb->vdev, struct virtio_balloon_config,
free_page_hint_cmd_id,
&vb->cmd_id_received_cache);
return vb->cmd_id_received_cache;...
2020 Jul 12
2
[PATCH] virtio_balloon: clear modern features under legacy
...y this writes a native endian-ness value. All bytes happen to be
the same though, and host only cares about 0 or non 0 ATM.
As you say correctly the command id is actually assumed native endian:
static u32 virtio_balloon_cmd_id_received(struct virtio_balloon *vb)
{
if (test_and_clear_bit(VIRTIO_BALLOON_CONFIG_READ_CMD_ID,
&vb->config_read_bitmap))
virtio_cread(vb->vdev, struct virtio_balloon_config,
free_page_hint_cmd_id,
&vb->cmd_id_received_cache);
return vb->cmd_id_received_cache;...
2020 Apr 15
0
[PATCH] virtio-balloon: Avoid using the word 'report' when referring to free page hinting
..._balloon.c b/drivers/virtio/virtio_balloon.c
> index 0ef16566c3f3..95d9c2f0a7be 100644
> --- a/drivers/virtio/virtio_balloon.c
> +++ b/drivers/virtio/virtio_balloon.c
> @@ -580,7 +580,7 @@ static u32 virtio_balloon_cmd_id_received(struct virtio_balloon *vb)
> if (test_and_clear_bit(VIRTIO_BALLOON_CONFIG_READ_CMD_ID,
> &vb->config_read_bitmap))
> virtio_cread(vb->vdev, struct virtio_balloon_config,
> - free_page_report_cmd_id,
> + free_page_hint_cmd_id,
> &vb->cmd_id_received_cache);
>
> return vb->cmd_id_received_cache;
> dif...
2020 Aug 05
0
[PATCH v3 29/38] virtio_balloon: use LE config space accesses
...&actual);
+ virtio_cwrite_le(vb->vdev, struct virtio_balloon_config, actual,
+ &actual);
}
static void update_balloon_stats_func(struct work_struct *work)
@@ -579,12 +573,10 @@ static u32 virtio_balloon_cmd_id_received(struct virtio_balloon *vb)
{
if (test_and_clear_bit(VIRTIO_BALLOON_CONFIG_READ_CMD_ID,
&vb->config_read_bitmap)) {
- virtio_cread(vb->vdev, struct virtio_balloon_config,
- free_page_hint_cmd_id,
- &vb->cmd_id_received_cache);
/* Legacy balloon config space is LE, unlike all other devices. */
- if (!virtio_has_feature(vb->vdev, VIRTIO...
2020 Jul 14
0
[PATCH] virtio_balloon: clear modern features under legacy
...; > > > >
<snip>
> > > As you say correctly the command id is actually assumed native endian:
> > >
> > >
> > > static u32 virtio_balloon_cmd_id_received(struct virtio_balloon *vb)
> > > {
> > > if (test_and_clear_bit(VIRTIO_BALLOON_CONFIG_READ_CMD_ID,
> > > &vb->config_read_bitmap))
> > > virtio_cread(vb->vdev, struct virtio_balloon_config,
> > > free_page_hint_cmd_id,
> > > &vb->cmd_id_re...
2020 Jul 13
0
[PATCH] virtio_balloon: clear modern features under legacy
...ess
maybe we should make certain to cast this as a le32 value. I can
submit a patch to do that.
> As you say correctly the command id is actually assumed native endian:
>
>
> static u32 virtio_balloon_cmd_id_received(struct virtio_balloon *vb)
> {
> if (test_and_clear_bit(VIRTIO_BALLOON_CONFIG_READ_CMD_ID,
> &vb->config_read_bitmap))
> virtio_cread(vb->vdev, struct virtio_balloon_config,
> free_page_hint_cmd_id,
> &vb->cmd_id_received_cache);
>
> return...
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.
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.