Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 123985
b: refs/heads/master
c: be3c583
h: refs/heads/master
i:
  123983: 96e4dbe
v: v3
  • Loading branch information
Christian Borntraeger authored and Rusty Russell committed Dec 29, 2008
1 parent f205aec commit cb1c63d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 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: c29834584ea4eafccf2f62a0b8a32e64f792044c
refs/heads/master: be3c5832d51174ef7f21cefd6ad612dabdcb62fd
22 changes: 19 additions & 3 deletions trunk/drivers/s390/kvm/kvm_virtio.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,13 +299,29 @@ static void scan_devices(void)
*/
static void kvm_extint_handler(u16 code)
{
void *data = (void *) *(long *) __LC_PFAULT_INTPARM;
u16 subcode = S390_lowcore.cpu_addr;
struct virtqueue *vq;
u16 subcode;
int config_changed;

subcode = S390_lowcore.cpu_addr;
if ((subcode & 0xff00) != VIRTIO_SUBCODE_64)
return;

vring_interrupt(0, data);
/* The LSB might be overloaded, we have to mask it */
vq = (struct virtqueue *) ((*(long *) __LC_PFAULT_INTPARM) & ~1UL);

/* We use the LSB of extparam, to decide, if this interrupt is a config
* change or a "standard" interrupt */
config_changed = (*(int *) __LC_EXT_PARAMS & 1);

if (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
vring_interrupt(0, vq);
}

/*
Expand Down

0 comments on commit cb1c63d

Please sign in to comment.