Skip to contentSkip to conversation

S390: take a full byte as ext_param indicator

PATCH Applied Alexander Graf 6 participants 27 messages Aug 24, 2010 – Sep 13, 2010

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 S390: take a full byte as ext_param indicator

Currenty the ext_param field only distinguishes between "config change" and "vring interrupt". We can do a lot more with it though, so let's enable a full byte of possible values and constants to #defines while at it.

---

v1 -> v2:

- move defines to virtio_s390.h

---
 arch/s390/include/asm/kvm_virtio.h |    6 ++++++
 drivers/s390/kvm/kvm_virtio.c      |   19 +++++++++++++------
 2 files changed, 19 insertions(+), 6 deletions(-)
arch/s390/include/asm/kvm_virtio.h +6 -0
index acdfdff..3f5d100 100644
@@ -54,4 +54,10 @@ struct kvm_vqconfig {
  * This is pagesize for historical reasons. */
 #define KVM_S390_VIRTIO_RING_ALIGN	4096
 
+
+/* These values are supposed to be in ext_params on an interrupt */
+#define VIRTIO_PARAM_MASK		0xff
+#define VIRTIO_PARAM_VRING_INTERRUPT	0x0
+#define VIRTIO_PARAM_CONFIG_CHANGED	0x1
+
 #endif
drivers/s390/kvm/kvm_virtio.c +13 -6
index 4e298bc..68cef4d 100644
@@ -334,7 +334,7 @@ static void kvm_extint_handler(u16 code)
 {
 	struct virtqueue *vq;
 	u16 subcode;
-	int config_changed;
+	u32 param;
 
 	subcode = S390_lowcore.cpu_addr;
 	if ((subcode & 0xff00) != VIRTIO_SUBCODE_64)
@@ -343,18 +343,25 @@ static void kvm_extint_handler(u16 code)
 	/* The LSB might be overloaded, we have to mask it */
 	vq = (struct virtqueue *)(S390_lowcore.ext_params2 & ~1UL);
 
-	/* We use the LSB of extparam, to decide, if this interrupt is a config
-	 * change or a "standard" interrupt */
-	config_changed = S390_lowcore.ext_params & 1;
+	/* We use ext_params to decide what this interrupt means */
+	param = S390_lowcore.ext_params & VIRTIO_PARAM_MASK;
 
-	if (config_changed) {
+	switch (param) {
+	case VIRTIO_PARAM_CONFIG_CHANGED:
+	{
 		struct virtio_driver *drv;
 		drv = container_of(vq->vdev->dev.driver,
 				   struct virtio_driver, driver);
 		if (drv->config_changed)
 			drv->config_changed(vq->vdev);
-	} else
+
+		break;
+	}
+	case VIRTIO_PARAM_VRING_INTERRUPT:
+	default:
 		vring_interrupt(0, vq);
+		break;
+	}
 }
 
 /*
Signature · 1 line
1.6.0.2
#1 lore raw

PATCH 2/3 S390: Add virtio hotplug add support

The one big missing feature in s390-virtio was hotplugging. This is no more. This patch implements hotplug add support, so you can on the fly add new devices in the guest.

Keep in mind that this needs a patch for qemu to actually leverage the functionality.

---

v1 -> v2:

- move dev_add to kvm_virtio.h

---
 arch/s390/include/asm/kvm_virtio.h |    1 +
 drivers/s390/kvm/kvm_virtio.c      |   47 ++++++++++++++++++++++++++++++++++++
 2 files changed, 48 insertions(+), 0 deletions(-)
arch/s390/include/asm/kvm_virtio.h +1 -0
index 3f5d100..72f6141 100644
@@ -59,5 +59,6 @@ struct kvm_vqconfig {
 #define VIRTIO_PARAM_MASK		0xff
 #define VIRTIO_PARAM_VRING_INTERRUPT	0x0
 #define VIRTIO_PARAM_CONFIG_CHANGED	0x1
+#define VIRTIO_PARAM_DEV_ADD		0x2
 
 #endif
drivers/s390/kvm/kvm_virtio.c +47 -0

71 lines not on this page · raw message

Signature · 1 line
1.6.0.2
#2 lore raw

Re: [PATCH 2/3] S390: Add virtio hotplug add support

drivers/s390/kvm/kvm_virtio.c static void scan_devices(void) · line 351

Quoted 7 lines · Alexander Graf
drivers/s390/kvm/kvm_virtio.c +7 -0
+static void hotplug_devices(struct work_struct *dummy)
+{
+	unsigned int i;
+	struct kvm_device_desc *d;
+	struct device *dev;
+
+	for (i = 0; i < PAGE_SIZE; i += desc_size(d)) {

This should be

	for (i = 0; i + desc_size(d) <= PAGE_SIZE; i += desc_size(d)) {

otherwise you might have memory accesses beyond the device page...

drivers/s390/kvm/kvm_virtio.c static void scan_devices(void) · line 356

Quoted 5 lines
drivers/s390/kvm/kvm_virtio.c +5 -0
+		d = kvm_devices + i;
+
+		/* end of list */
+		if (d->type == 0)
+			break;

...even if that should not happen if everything works. But let's be paranoid.

#3 lore raw

Re: [PATCH 2/3] S390: Add virtio hotplug add support

Quoted 11 lines · Heiko Carstens

drivers/s390/kvm/kvm_virtio.c static void scan_devices(void) · line 351

Quoted 7 lines · Alexander Graf
drivers/s390/kvm/kvm_virtio.c +7 -0
+static void hotplug_devices(struct work_struct *dummy)
+{
+	unsigned int i;
+	struct kvm_device_desc *d;
+	struct device *dev;
+
+	for (i = 0; i < PAGE_SIZE; i += desc_size(d)) {

This should be

Quoted 3 lines
	for (i = 0; i + desc_size(d) <= PAGE_SIZE; i += desc_size(d)) {

otherwise you might have memory accesses beyond the device page...

Oh, this is a simple copy&paste from the original search method. Is d valid in the first part of the loop already?

Quoted 9 lines

drivers/s390/kvm/kvm_virtio.c static void scan_devices(void) · line 356

Quoted 6 lines
drivers/s390/kvm/kvm_virtio.c +5 -0
+		d = kvm_devices + i;
+
+		/* end of list */
+		if (d->type == 0)
+			break;

...even if that should not happen if everything works. But let's be paranoid.

Yeah :). I like paranoid.

Alex

#4 lore raw

Re: [PATCH 2/3] S390: Add virtio hotplug add support

Quoted 12 lines · Alexander Graf
Quoted 11 lines · Heiko Carstens

drivers/s390/kvm/kvm_virtio.c static void scan_devices(void) · line 351

Quoted 7 lines · Alexander Graf
drivers/s390/kvm/kvm_virtio.c +7 -0
+static void hotplug_devices(struct work_struct *dummy)
+{
+	unsigned int i;
+	struct kvm_device_desc *d;
+	struct device *dev;
+
+	for (i = 0; i < PAGE_SIZE; i += desc_size(d)) {

This should be

Quoted 6 lines
Quoted 3 lines
	for (i = 0; i + desc_size(d) <= PAGE_SIZE; i += desc_size(d)) {

otherwise you might have memory accesses beyond the device page...

Oh, this is a simple copy&paste from the original search method. Is d valid in the first part of the loop already?

No, you would need to initialize it with kvm_devices if you change the loop.

#5 lore raw

Re: [PATCH 2/3] S390: Add virtio hotplug add support

Quoted 15 lines · Heiko Carstens
Quoted 14 lines · Alexander Graf
Quoted 13 lines · Heiko Carstens

drivers/s390/kvm/kvm_virtio.c static void scan_devices(void) · line 351

Quoted 7 lines · Alexander Graf
drivers/s390/kvm/kvm_virtio.c +7 -0
+static void hotplug_devices(struct work_struct *dummy)
+{
+	unsigned int i;
+	struct kvm_device_desc *d;
+	struct device *dev;
+
+	for (i = 0; i < PAGE_SIZE; i += desc_size(d)) {

This should be

	for (i = 0; i + desc_size(d) <= PAGE_SIZE; i += desc_size(d)) {
Quoted 7 lines
Quoted 4 lines
Quoted 1 line

otherwise you might have memory accesses beyond the device page...

Oh, this is a simple copy&paste from the original search method. Is d valid in the first part of the loop already?

No, you would need to initialize it with kvm_devices if you change the loop.

But even then it would take the size of the current entry, not the next one we're actually looking for, no? Maybe it'd be easier to just convert this into a while loop and explicitly open code everything.

Alex

#6 lore raw

Re: [PATCH 2/3] S390: Add virtio hotplug add support

Quoted 21 lines · Alexander Graf
Quoted 20 lines · Heiko Carstens
Quoted 18 lines · Alexander Graf
Quoted 11 lines · Heiko Carstens

drivers/s390/kvm/kvm_virtio.c static void scan_devices(void) · line 351

Quoted 7 lines · Alexander Graf
drivers/s390/kvm/kvm_virtio.c +7 -0
+static void hotplug_devices(struct work_struct *dummy)
+{
+	unsigned int i;
+	struct kvm_device_desc *d;
+	struct device *dev;
+
+	for (i = 0; i < PAGE_SIZE; i += desc_size(d)) {

This should be

Quoted 3 lines
	for (i = 0; i + desc_size(d) <= PAGE_SIZE; i += desc_size(d)) {

otherwise you might have memory accesses beyond the device page...

Oh, this is a simple copy&paste from the original search method. Is d valid in the first part of the loop already?

Quoted 6 lines
Quoted 2 lines

No, you would need to initialize it with kvm_devices if you change the loop.

But even then it would take the size of the current entry, not the next one we're actually looking for, no? Maybe it'd be easier to just convert this into a while loop and explicitly open code everything.

Yes indeed. It's going to be quite ugly if you want to make sure that at no time you're going to access memory beyond the device page. Eeek.. :)

#7 lore raw

Re: [PATCH 2/3] S390: Add virtio hotplug add support

Quoted 25 lines · Heiko Carstens
Quoted 24 lines · Alexander Graf
Quoted 22 lines · Heiko Carstens
Quoted 12 lines · Alexander Graf
Quoted 11 lines · Heiko Carstens

drivers/s390/kvm/kvm_virtio.c static void scan_devices(void) · line 351

Quoted 7 lines · Alexander Graf
drivers/s390/kvm/kvm_virtio.c +7 -0
+static void hotplug_devices(struct work_struct *dummy)
+{
+	unsigned int i;
+	struct kvm_device_desc *d;
+	struct device *dev;
+
+	for (i = 0; i < PAGE_SIZE; i += desc_size(d)) {

This should be

Quoted 6 lines
Quoted 3 lines
	for (i = 0; i + desc_size(d) <= PAGE_SIZE; i += desc_size(d)) {

otherwise you might have memory accesses beyond the device page...

Oh, this is a simple copy&paste from the original search method. Is d valid in the first part of the loop already?

No, you would need to initialize it with kvm_devices if you change the loop.

Quoted 6 lines
Quoted 3 lines

But even then it would take the size of the current entry, not the next one we're actually looking for, no? Maybe it'd be easier to just convert this into a while loop and explicitly open code everything.

Yes indeed. It's going to be quite ugly if you want to make sure that at no time you're going to access memory beyond the device page. Eeek.. :)

Thinking about this a bit more ... it's no problem to access beyond the device page. After the device page follow the rings and we always have rings because we always have a virtio console :).

Alex

#8 lore raw

Re: [PATCH 2/3] S390: Add virtio hotplug add support

In reply to Heiko Carstens
Quoted 25 lines · Heiko Carstens
Quoted 24 lines · Alexander Graf
Quoted 22 lines · Heiko Carstens
Quoted 12 lines · Alexander Graf
Quoted 11 lines · Heiko Carstens

drivers/s390/kvm/kvm_virtio.c static void scan_devices(void) · line 351

Quoted 7 lines · Alexander Graf
drivers/s390/kvm/kvm_virtio.c +7 -0
+static void hotplug_devices(struct work_struct *dummy)
+{
+	unsigned int i;
+	struct kvm_device_desc *d;
+	struct device *dev;
+
+	for (i = 0; i < PAGE_SIZE; i += desc_size(d)) {

This should be

Quoted 6 lines
Quoted 3 lines
	for (i = 0; i + desc_size(d) <= PAGE_SIZE; i += desc_size(d)) {

otherwise you might have memory accesses beyond the device page...

Oh, this is a simple copy&paste from the original search method. Is d valid in the first part of the loop already?

No, you would need to initialize it with kvm_devices if you change the loop.

Quoted 6 lines
Quoted 3 lines

But even then it would take the size of the current entry, not the next one we're actually looking for, no? Maybe it'd be easier to just convert this into a while loop and explicitly open code everything.

Yes indeed. It's going to be quite ugly if you want to make sure that at no time you're going to access memory beyond the device page. Eeek.. :)

Thinking about this a bit more ... it's no problem to access beyond the device page. After the device page follow the rings and we always have rings because we always have a virtio console :).

Alex

#9 lore raw

Re: [PATCH 2/3] S390: Add virtio hotplug add support

In reply to Alexander Graf
Quoted 21 lines · Alexander Graf
Quoted 20 lines · Heiko Carstens
Quoted 18 lines · Alexander Graf
Quoted 11 lines · Heiko Carstens

drivers/s390/kvm/kvm_virtio.c static void scan_devices(void) · line 351

Quoted 7 lines · Alexander Graf
drivers/s390/kvm/kvm_virtio.c +7 -0
+static void hotplug_devices(struct work_struct *dummy)
+{
+	unsigned int i;
+	struct kvm_device_desc *d;
+	struct device *dev;
+
+	for (i = 0; i < PAGE_SIZE; i += desc_size(d)) {

This should be

Quoted 3 lines
	for (i = 0; i + desc_size(d) <= PAGE_SIZE; i += desc_size(d)) {

otherwise you might have memory accesses beyond the device page...

Oh, this is a simple copy&paste from the original search method. Is d valid in the first part of the loop already?

Quoted 6 lines
Quoted 2 lines

No, you would need to initialize it with kvm_devices if you change the loop.

But even then it would take the size of the current entry, not the next one we're actually looking for, no? Maybe it'd be easier to just convert this into a while loop and explicitly open code everything.

Yes indeed. It's going to be quite ugly if you want to make sure that at no time you're going to access memory beyond the device page. Eeek.. :)

#10 lore raw

Re: [PATCH 2/3] S390: Add virtio hotplug add support

In reply to Heiko Carstens
Quoted 15 lines · Heiko Carstens
Quoted 14 lines · Alexander Graf
Quoted 13 lines · Heiko Carstens

drivers/s390/kvm/kvm_virtio.c static void scan_devices(void) · line 351

Quoted 7 lines · Alexander Graf
drivers/s390/kvm/kvm_virtio.c +7 -0
+static void hotplug_devices(struct work_struct *dummy)
+{
+	unsigned int i;
+	struct kvm_device_desc *d;
+	struct device *dev;
+
+	for (i = 0; i < PAGE_SIZE; i += desc_size(d)) {

This should be

	for (i = 0; i + desc_size(d) <= PAGE_SIZE; i += desc_size(d)) {
Quoted 7 lines
Quoted 4 lines
Quoted 1 line

otherwise you might have memory accesses beyond the device page...

Oh, this is a simple copy&paste from the original search method. Is d valid in the first part of the loop already?

No, you would need to initialize it with kvm_devices if you change the loop.

But even then it would take the size of the current entry, not the next one we're actually looking for, no? Maybe it'd be easier to just convert this into a while loop and explicitly open code everything.

Alex

#11 lore raw

Re: [PATCH 2/3] S390: Add virtio hotplug add support

In reply to Alexander Graf
Quoted 12 lines · Alexander Graf
Quoted 11 lines · Heiko Carstens

drivers/s390/kvm/kvm_virtio.c static void scan_devices(void) · line 351

Quoted 7 lines · Alexander Graf
drivers/s390/kvm/kvm_virtio.c +7 -0
+static void hotplug_devices(struct work_struct *dummy)
+{
+	unsigned int i;
+	struct kvm_device_desc *d;
+	struct device *dev;
+
+	for (i = 0; i < PAGE_SIZE; i += desc_size(d)) {

This should be

Quoted 6 lines
Quoted 3 lines
	for (i = 0; i + desc_size(d) <= PAGE_SIZE; i += desc_size(d)) {

otherwise you might have memory accesses beyond the device page...

Oh, this is a simple copy&paste from the original search method. Is d valid in the first part of the loop already?

No, you would need to initialize it with kvm_devices if you change the loop.

#12 lore raw

Re: [PATCH 2/3] S390: Add virtio hotplug add support

In reply to Heiko Carstens
Quoted 11 lines · Heiko Carstens

drivers/s390/kvm/kvm_virtio.c static void scan_devices(void) · line 351

Quoted 7 lines · Alexander Graf
drivers/s390/kvm/kvm_virtio.c +7 -0
+static void hotplug_devices(struct work_struct *dummy)
+{
+	unsigned int i;
+	struct kvm_device_desc *d;
+	struct device *dev;
+
+	for (i = 0; i < PAGE_SIZE; i += desc_size(d)) {

This should be

Quoted 3 lines
	for (i = 0; i + desc_size(d) <= PAGE_SIZE; i += desc_size(d)) {

otherwise you might have memory accesses beyond the device page...

Oh, this is a simple copy&paste from the original search method. Is d valid in the first part of the loop already?

Quoted 9 lines

drivers/s390/kvm/kvm_virtio.c static void scan_devices(void) · line 356

Quoted 6 lines
drivers/s390/kvm/kvm_virtio.c +5 -0
+		d = kvm_devices + i;
+
+		/* end of list */
+		if (d->type == 0)
+			break;

...even if that should not happen if everything works. But let's be paranoid.

Yeah :). I like paranoid.

Alex

#13 lore raw

Re: [PATCH 2/3] S390: Add virtio hotplug add support

In reply to Alexander Graf

drivers/s390/kvm/kvm_virtio.c static void scan_devices(void) · line 351

Quoted 7 lines · Alexander Graf
drivers/s390/kvm/kvm_virtio.c +7 -0
+static void hotplug_devices(struct work_struct *dummy)
+{
+	unsigned int i;
+	struct kvm_device_desc *d;
+	struct device *dev;
+
+	for (i = 0; i < PAGE_SIZE; i += desc_size(d)) {

This should be

	for (i = 0; i + desc_size(d) <= PAGE_SIZE; i += desc_size(d)) {

otherwise you might have memory accesses beyond the device page...

drivers/s390/kvm/kvm_virtio.c static void scan_devices(void) · line 356

Quoted 5 lines
drivers/s390/kvm/kvm_virtio.c +5 -0
+		d = kvm_devices + i;
+
+		/* end of list */
+		if (d->type == 0)
+			break;

...even if that should not happen if everything works. But let's be paranoid.

#14 lore raw

Re: [PATCH 2/3] S390: Add virtio hotplug add support

In reply to Alexander Graf
Quoted 8 lines · Alexander Graf

The one big missing feature in s390-virtio was hotplugging. This is no more. This patch implements hotplug add support, so you can on the fly add new devices in the guest.

Keep in mind that this needs a patch for qemu to actually leverage the functionality.

ping (on the patch set)?

Alex

#15 lore raw

Re: [PATCH 2/3] S390: Add virtio hotplug add support

Quoted 6 lines · Alexander Graf
Quoted 4 lines · Alexander Graf

The one big missing feature in s390-virtio was hotplugging. This is no more. This patch implements hotplug add support, so you can on the fly add new devices in the guest.

Quoted 6 lines
Quoted 4 lines

Keep in mind that this needs a patch for qemu to actually leverage the functionality.

ping (on the patch set)?

Actually Marcelo applied it. But the natural place for it is Rusty's virtio tree. Rusty, if you want to take it, let me know and I'll drop it from kvm.git.

Signature · 1 line
error compiling committee.c: too many arguments to function
#16 lore raw

Re: [PATCH 2/3] S390: Add virtio hotplug add support

Quoted 10 lines · Avi Kivity
Quoted 9 lines · Alexander Graf
Quoted 7 lines · Alexander Graf

The one big missing feature in s390-virtio was hotplugging. This is no more. This patch implements hotplug add support, so you can on the fly add new devices in the guest.

Keep in mind that this needs a patch for qemu to actually leverage the functionality.

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

ping (on the patch set)?

Actually Marcelo applied it. But the natural place for it is Rusty's virtio tree. Rusty, if you want to take it, let me know and I'll drop it from kvm.git.

I thought it would be in the s390 tree, which is why I didn't take it...

But I'm *always* happy to let do the work!

Thanks,
Rusty.

#17 lore raw

Re: [PATCH 2/3] S390: Add virtio hotplug add support

Quoted 15 lines · On Mon, 13 Sep 2010 13:05:57 +0930 Rusty Russell <[email protected]> wrote:
Quoted 14 lines · Avi Kivity
Quoted 12 lines · Alexander Graf
Quoted 8 lines · Alexander Graf

The one big missing feature in s390-virtio was hotplugging. This is no more. This patch implements hotplug add support, so you can on the fly add new devices in the guest.

Keep in mind that this needs a patch for qemu to actually leverage the functionality.

ping (on the patch set)?

Quoted 7 lines
Quoted 3 lines

Actually Marcelo applied it. But the natural place for it is Rusty's virtio tree. Rusty, if you want to take it, let me know and I'll drop it from kvm.git.

I thought it would be in the s390 tree, which is why I didn't take it...

But I'm *always* happy to let do the work!

I didn't pick them up after I saw that Marcelo took them. If others want to do the work, be my guest..

Signature · 4 lines
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.
#18 lore raw

Re: [PATCH 2/3] S390: Add virtio hotplug add support

Quoted 9 lines · Martin Schwidefsky
Quoted 6 lines
Quoted 3 lines

Actually Marcelo applied it. But the natural place for it is Rusty's virtio tree. Rusty, if you want to take it, let me know and I'll drop it from kvm.git.

I thought it would be in the s390 tree, which is why I didn't take it...

But I'm *always* happy to let do the work!

I didn't pick them up after I saw that Marcelo took them. If others want to do the work, be my guest..

I just hope that all this generosity doesn't lead to merge conflicts later, or people basing their stuff on stale code. But it isn't like this is a high churn area.

Signature · 1 line
error compiling committee.c: too many arguments to function
#19 lore raw

Re: [PATCH 2/3] S390: Add virtio hotplug add support

In reply to Martin Schwidefsky
Quoted 9 lines · Martin Schwidefsky
Quoted 6 lines
Quoted 3 lines

Actually Marcelo applied it. But the natural place for it is Rusty's virtio tree. Rusty, if you want to take it, let me know and I'll drop it from kvm.git.

I thought it would be in the s390 tree, which is why I didn't take it...

But I'm *always* happy to let do the work!

I didn't pick them up after I saw that Marcelo took them. If others want to do the work, be my guest..

I just hope that all this generosity doesn't lead to merge conflicts later, or people basing their stuff on stale code. But it isn't like this is a high churn area.

Signature · 1 line
error compiling committee.c: too many arguments to function
#20 lore raw

Re: [PATCH 2/3] S390: Add virtio hotplug add support

In reply to Rusty Russell
Quoted 15 lines · On Mon, 13 Sep 2010 13:05:57 +0930 Rusty Russell <[email protected]> wrote:
Quoted 14 lines · Avi Kivity
Quoted 12 lines · Alexander Graf
Quoted 8 lines · Alexander Graf

The one big missing feature in s390-virtio was hotplugging. This is no more. This patch implements hotplug add support, so you can on the fly add new devices in the guest.

Keep in mind that this needs a patch for qemu to actually leverage the functionality.

ping (on the patch set)?

Quoted 7 lines
Quoted 3 lines

Actually Marcelo applied it. But the natural place for it is Rusty's virtio tree. Rusty, if you want to take it, let me know and I'll drop it from kvm.git.

I thought it would be in the s390 tree, which is why I didn't take it...

But I'm *always* happy to let do the work!

I didn't pick them up after I saw that Marcelo took them. If others want to do the work, be my guest..

Signature · 4 lines
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.
#21 lore raw

Re: [PATCH 2/3] S390: Add virtio hotplug add support

In reply to Avi Kivity
Quoted 10 lines · Avi Kivity
Quoted 9 lines · Alexander Graf
Quoted 7 lines · Alexander Graf

The one big missing feature in s390-virtio was hotplugging. This is no more. This patch implements hotplug add support, so you can on the fly add new devices in the guest.

Keep in mind that this needs a patch for qemu to actually leverage the functionality.

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

ping (on the patch set)?

Actually Marcelo applied it. But the natural place for it is Rusty's virtio tree. Rusty, if you want to take it, let me know and I'll drop it from kvm.git.

I thought it would be in the s390 tree, which is why I didn't take it...

But I'm *always* happy to let do the work!

Thanks,
Rusty.

#22 lore raw

Re: [PATCH 2/3] S390: Add virtio hotplug add support

In reply to Alexander Graf
Quoted 6 lines · Alexander Graf
Quoted 4 lines · Alexander Graf

The one big missing feature in s390-virtio was hotplugging. This is no more. This patch implements hotplug add support, so you can on the fly add new devices in the guest.

Quoted 6 lines
Quoted 4 lines

Keep in mind that this needs a patch for qemu to actually leverage the functionality.

ping (on the patch set)?

Actually Marcelo applied it. But the natural place for it is Rusty's virtio tree. Rusty, if you want to take it, let me know and I'll drop it from kvm.git.

Signature · 1 line
error compiling committee.c: too many arguments to function
#23 lore raw

Re: [PATCH 2/3] S390: Add virtio hotplug add support

In reply to Alexander Graf
Quoted 8 lines · Alexander Graf

The one big missing feature in s390-virtio was hotplugging. This is no more. This patch implements hotplug add support, so you can on the fly add new devices in the guest.

Keep in mind that this needs a patch for qemu to actually leverage the functionality.

ping (on the patch set)?

Alex

#24 lore raw

PATCH 3/3 S390: Export kvm_virtio.h

In reply to Alexander Graf

As suggested by Christian, we should expose headers to user space with information that might be valuable there. The s390 virtio interface is one of those cases. It defines an ABI between hypervisor and guest, so it should be exposed to user space.

---
 arch/s390/include/asm/Kbuild |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/s390/include/asm/Kbuild +1 -0
index 63a2341..ee7937d 100644
@@ -8,6 +8,7 @@ header-y += ucontext.h
 header-y += vtoc.h
 header-y += zcrypt.h
 header-y += chsc.h
+header-y += kvm_virtio.h
 
 unifdef-y += cmb.h
 unifdef-y += debug.h
Signature · 1 line
1.6.0.2
#25 lore raw
In reply to Alexander Graf
Quoted 8 lines · Alexander Graf

Currenty the ext_param field only distinguishes between "config change" and "vring interrupt". We can do a lot more with it though, so let's enable a full byte of possible values and constants to #defines while at it.

---

Quoted 7 lines

v1 -> v2:

- move defines to virtio_s390.h

---
 arch/s390/include/asm/kvm_virtio.h |    6 ++++++
 drivers/s390/kvm/kvm_virtio.c      |   19 +++++++++++++------
 2 files changed, 19 insertions(+), 6 deletions(-)

Applied, thanks.

#26 lore raw
In reply to Alexander Graf
Quoted 8 lines · Alexander Graf

Currenty the ext_param field only distinguishes between "config change" and "vring interrupt". We can do a lot more with it though, so let's enable a full byte of possible values and constants to #defines while at it.

---

Quoted 7 lines

v1 -> v2:

- move defines to virtio_s390.h

---
 arch/s390/include/asm/kvm_virtio.h |    6 ++++++
 drivers/s390/kvm/kvm_virtio.c      |   19 +++++++++++++------
 2 files changed, 19 insertions(+), 6 deletions(-)

Applied, thanks.