From: Casey Leedom <leedom@chelsio.com>
To: Sheng Yang <sheng@linux.intel.com>
Cc: kvm@vger.kernel.org, linux-pci@vger.kernel.org, qemu-devel@nongnu.org
Subject: Re: KVM vs. PCI-E Function Level Reset (FLR) ...
Date: Fri, 16 Jul 2010 10:29:31 -0700 [thread overview]
Message-ID: <201007161029.31768.leedom@chelsio.com> (raw)
In-Reply-To: <201007160856.10622.sheng@linux.intel.com>
| From: Sheng Yang <sheng@linux.intel.com>
| Date: Thursday, July 15, 2010 05:56 pm
|
| Yeah, the detection of reset is not that straightforward... Maybe we need
| an ioctl for reset event in qemu-kvm kvm_reset_vcpu().
|
| We don't need assign/deassign device when reboot/reset, we only need to
| notify KVM that the reset is happening, then KVM know what's to do.
I'm not familiar enough with the KVM/QEmu to know where how to make these
changes easily. I'd be happy to test such changes or even take a whack at
making the changes if someone could point me at the relevant repositories/files.
Alternatively, I could file a bug if KVM has its own bug database ...
| > [Calling pci_reset_function() in our driver->probe() routine] was
| > mostly for device driver load/unload support. I.e. being able
| > to issue a Function Level Reset to a PCI Device Function (regardless of
| > it being an SR-IOV Virtual Function or not) is a nice way to zap the
| > device back to a canonical state.
|
| OK.
|
| What I meant was, before your driver, there is no such requirement in the
| code. And no one can predict every usage of the code in the future, so
| it's quite reasonable you called the "deadlock" is there. And I can't say
| it's a "deadlock" because there is no code in the current tree make it
| "deadlock" IIUR.
|
| So now you have this requirement, you can modify it to fit your need.
| That's quite straightforward...
|
| > Oh, and the driver has been posted to net-next. I'm guessing that it
| >
| > _should_ get merged into 2.6.35 ... or maybe 2.6.36 ... I'm really not
| > sure of how the merge schedule between net-next and the core kernel runs
| > ...
|
| That's good. So you can modify the function to provide a lockless version.
| That make sense now. :)
Okay, I'll ask Yu Zhao why he added the lock in pci_dev_reset() (changeset
8c1c699fec9e9021bf6ff0285dee086bb27aec90) and if he feels that adding a non-
locking path would make sense -- this is an area of the kernel which I've only
perused so I don't want to propose random changes ... :-)
Casey
WARNING: multiple messages have this Message-ID (diff)
From: Casey Leedom <leedom@chelsio.com>
To: Sheng Yang <sheng@linux.intel.com>
Cc: linux-pci@vger.kernel.org, qemu-devel@nongnu.org, kvm@vger.kernel.org
Subject: [Qemu-devel] Re: KVM vs. PCI-E Function Level Reset (FLR) ...
Date: Fri, 16 Jul 2010 10:29:31 -0700 [thread overview]
Message-ID: <201007161029.31768.leedom@chelsio.com> (raw)
In-Reply-To: <201007160856.10622.sheng@linux.intel.com>
| From: Sheng Yang <sheng@linux.intel.com>
| Date: Thursday, July 15, 2010 05:56 pm
|
| Yeah, the detection of reset is not that straightforward... Maybe we need
| an ioctl for reset event in qemu-kvm kvm_reset_vcpu().
|
| We don't need assign/deassign device when reboot/reset, we only need to
| notify KVM that the reset is happening, then KVM know what's to do.
I'm not familiar enough with the KVM/QEmu to know where how to make these
changes easily. I'd be happy to test such changes or even take a whack at
making the changes if someone could point me at the relevant repositories/files.
Alternatively, I could file a bug if KVM has its own bug database ...
| > [Calling pci_reset_function() in our driver->probe() routine] was
| > mostly for device driver load/unload support. I.e. being able
| > to issue a Function Level Reset to a PCI Device Function (regardless of
| > it being an SR-IOV Virtual Function or not) is a nice way to zap the
| > device back to a canonical state.
|
| OK.
|
| What I meant was, before your driver, there is no such requirement in the
| code. And no one can predict every usage of the code in the future, so
| it's quite reasonable you called the "deadlock" is there. And I can't say
| it's a "deadlock" because there is no code in the current tree make it
| "deadlock" IIUR.
|
| So now you have this requirement, you can modify it to fit your need.
| That's quite straightforward...
|
| > Oh, and the driver has been posted to net-next. I'm guessing that it
| >
| > _should_ get merged into 2.6.35 ... or maybe 2.6.36 ... I'm really not
| > sure of how the merge schedule between net-next and the core kernel runs
| > ...
|
| That's good. So you can modify the function to provide a lockless version.
| That make sense now. :)
Okay, I'll ask Yu Zhao why he added the lock in pci_dev_reset() (changeset
8c1c699fec9e9021bf6ff0285dee086bb27aec90) and if he feels that adding a non-
locking path would make sense -- this is an area of the kernel which I've only
perused so I don't want to propose random changes ... :-)
Casey
next prev parent reply other threads:[~2010-07-16 17:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-13 20:41 KVM vs. PCI-E Function Level Reset (FLR) Casey Leedom
2010-07-14 0:53 ` Sheng Yang
2010-07-14 18:01 ` Casey Leedom
2010-07-15 1:31 ` Sheng Yang
[not found] ` <201007150839.37130.leedom@chelsio.com>
2010-07-15 16:06 ` Casey Leedom
2010-07-16 0:56 ` Sheng Yang
2010-07-16 0:56 ` [Qemu-devel] " Sheng Yang
2010-07-16 17:29 ` Casey Leedom [this message]
2010-07-16 17:29 ` Casey Leedom
[not found] <201007150033.o6F0XUBj024880@stargate.chelsio.com>
2010-07-15 0:55 ` Casey Leedom
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=201007161029.31768.leedom@chelsio.com \
--to=leedom@chelsio.com \
--cc=kvm@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=qemu-devel@nongnu.org \
--cc=sheng@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.