public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Avi Kivity <avi@qumranet•com>, Marcelo Tosatti <mtosatti@redhat•com>
Cc: linux-next@vger•kernel.org, linux-kernel@vger•kernel.org,
	Martin Schwidefsky <schwidefsky@de•ibm.com>,
	Heiko Carstens <heiko.carstens@de•ibm.com>,
	Alexander Graf <agraf@suse•de>
Subject: linux-next: manual merge of the kvm tree with the s390 tree
Date: Thu, 21 Oct 2010 12:16:23 +1100	[thread overview]
Message-ID: <20101021121623.fedb389e.sfr@canb.auug.org.au> (raw)

Hi all,

Today's linux-next merge of the kvm tree got a conflict in
drivers/s390/kvm/kvm_virtio.c between commit
b154e491c5d11f44a4804ec6d073312db06e97ef ("[S390] cleanup lowcore access
from external interrupts") from the s390 tree and commit
d9ca0637f9ab805ab7b23b0dc8362bf68f22fed0 ("KVM: S390: take a full byte as
ext_param indicator") from the kvm tree.

I fixed it up (hopefully - see below) and can carry the fix as necessary.
-- 
Cheers,
Stephen Rothwell                    sfr@canb•auug.org.au

diff --cc drivers/s390/kvm/kvm_virtio.c
index a264e1c,5a46b8c..0000000
--- a/drivers/s390/kvm/kvm_virtio.c
+++ b/drivers/s390/kvm/kvm_virtio.c
@@@ -328,27 -329,68 +329,69 @@@ static void scan_devices(void
  }
  
  /*
+  * match for a kvm device with a specific desc pointer
+  */
+ static int match_desc(struct device *dev, void *data)
+ {
+ 	if ((ulong)to_kvmdev(dev_to_virtio(dev))->desc == (ulong)data)
+ 		return 1;
+ 
+ 	return 0;
+ }
+ 
+ /*
+  * hotplug_device tries to find changes in the device page.
+  */
+ 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)) {
+ 		d = kvm_devices + i;
+ 
+ 		/* end of list */
+ 		if (d->type == 0)
+ 			break;
+ 
+ 		/* device already exists */
+ 		dev = device_find_child(kvm_root, d, match_desc);
+ 		if (dev) {
+ 			/* XXX check for hotplug remove */
+ 			put_device(dev);
+ 			continue;
+ 		}
+ 
+ 		/* new device */
+ 		printk(KERN_INFO "Adding new virtio device %p\n", d);
+ 		add_kvm_device(d, i);
+ 	}
+ }
+ 
+ /*
   * we emulate the request_irq behaviour on top of s390 extints
   */
 -static void kvm_extint_handler(u16 code)
 +static void kvm_extint_handler(unsigned int ext_int_code,
 +			       unsigned int param32, unsigned long param64)
  {
  	struct virtqueue *vq;
  	u16 subcode;
- 	int config_changed;
+ 	u32 param;
  
 -	subcode = S390_lowcore.cpu_addr;
 +	subcode = ext_int_code >> 16;
  	if ((subcode & 0xff00) != VIRTIO_SUBCODE_64)
  		return;
  
  	/* The LSB might be overloaded, we have to mask it */
 -	vq = (struct virtqueue *)(S390_lowcore.ext_params2 & ~1UL);
 +	vq = (struct virtqueue *)(param64 & ~1UL);
  
- 	/* We use the LSB of extparam, to decide, if this interrupt is a config
- 	 * change or a "standard" interrupt */
- 	config_changed = param32 & 1;
+ 	/* We use ext_params to decide what this interrupt means */
 -	param = S390_lowcore.ext_params & VIRTIO_PARAM_MASK;
++	param = param32 & 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);

             reply	other threads:[~2010-10-21  1:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-21  1:16 Stephen Rothwell [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-09-21  3:55 linux-next: manual merge of the kvm tree with the s390 tree Stephen Rothwell
2012-08-16  3:49 Stephen Rothwell
2013-01-03  1:06 Stephen Rothwell
2013-01-03  7:31 ` Martin Schwidefsky
2013-01-03 10:56   ` Stephen Rothwell
2013-06-06  3:55 Stephen Rothwell
2014-10-07  4:59 Stephen Rothwell
2016-06-29  4:36 Stephen Rothwell
2016-06-29  5:47 ` Heiko Carstens
2016-07-14  4:03 Stephen Rothwell
2016-07-14  6:58 ` David Hildenbrand
2020-05-29  6:46 Stephen Rothwell
2020-06-04  3:05 ` Stephen Rothwell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101021121623.fedb389e.sfr@canb.auug.org.au \
    --to=sfr@canb$(echo .)auug.org.au \
    --cc=agraf@suse$(echo .)de \
    --cc=avi@qumranet$(echo .)com \
    --cc=heiko.carstens@de$(echo .)ibm.com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=mtosatti@redhat$(echo .)com \
    --cc=schwidefsky@de$(echo .)ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox