Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 215779
b: refs/heads/master
c: fc678d6
h: refs/heads/master
i:
  215777: de22c6e
  215775: 4dadaa2
v: v3
  • Loading branch information
Alexander Graf authored and Avi Kivity committed Oct 24, 2010
1 parent ed4af14 commit 1bf9153
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 189be38db3dde12699a8b9dc22d33e8c95efe110
refs/heads/master: fc678d67fee1acccf21322318dd833b892a572e4
6 changes: 6 additions & 0 deletions trunk/arch/s390/include/asm/kvm_virtio.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
19 changes: 13 additions & 6 deletions trunk/drivers/s390/kvm/kvm_virtio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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;
}
}

/*
Expand Down

0 comments on commit 1bf9153

Please sign in to comment.