From: Cyrill Gorcunov <gorcunov@gmail.com>
To: Pekka Enberg <penberg@kernel.org>
Cc: Sasha Levin <levinsasha928@gmail.com>,
kvm@vger.kernel.org, mingo@elte.hu, asias.hejun@gmail.com,
prasadjoshi124@gmail.com
Subject: Re: [PATCH 2/4] kvm tools: Fix PCI probing
Date: Thu, 28 Jul 2011 13:38:27 +0400 [thread overview]
Message-ID: <20110728093826.GJ27137@sun> (raw)
In-Reply-To: <CAOJsxLFvdOx2KJRqcai=G2P=X+RWSTQQKiXvuUXBE=jOaba10g@mail.gmail.com>
On Thu, Jul 28, 2011 at 12:31:51PM +0300, Pekka Enberg wrote:
> On Thu, Jul 28, 2011 at 12:01 PM, Sasha Levin <levinsasha928@gmail.com> wrote:
> > PCI BAR probing is done in four steps:
> >
> > 1. Read address (and flags).
> > 2. Mask BAR.
> > 3. Read BAR again - Now the expected result is the size of the BAR.
> > 4. Mask BAR with address.
> >
> > So far, we have only took care of the first step. This means that the kernel
> > was using address as the size, causing a PCI allocation blunder.
> >
> > This patch fixes the issue by passing a proper size after masking.
> >
> > Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
> > ---
> > tools/kvm/include/kvm/pci.h | 1 +
> > tools/kvm/pci.c | 57 +++++++++++++++++++++++++++++++++++++++----
> > 2 files changed, 53 insertions(+), 5 deletions(-)
> >
> > diff --git a/tools/kvm/include/kvm/pci.h b/tools/kvm/include/kvm/pci.h
> > index 6ad4426..a7532e3 100644
> > --- a/tools/kvm/include/kvm/pci.h
> > +++ b/tools/kvm/include/kvm/pci.h
> > @@ -51,5 +51,6 @@ struct pci_device_header {
> >
> > void pci__init(void);
> > void pci__register(struct pci_device_header *dev, u8 dev_num);
> > +u32 pci_get_io_space_block(void);
>
> s/pci_get_io_space_block/pci__get_io_space_block/
>
Pekka, can we drop this idea with double underscopes? iirc perf is about
to drop them too.
next prev parent reply other threads:[~2011-07-28 9:38 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-28 9:01 [PATCH 1/4] kvm tools: Use GSI routing Sasha Levin
2011-07-28 9:01 ` [PATCH 2/4] kvm tools: Fix PCI probing Sasha Levin
2011-07-28 9:31 ` Pekka Enberg
2011-07-28 9:38 ` Cyrill Gorcunov [this message]
2011-07-28 9:43 ` Pekka Enberg
2011-07-28 9:01 ` [PATCH 3/4] kvm tools: Add a void ptr to be passed to mmio callback Sasha Levin
2011-07-28 9:42 ` Cyrill Gorcunov
2011-07-28 9:43 ` Pekka Enberg
2011-07-28 9:01 ` [PATCH 4/4] kvm tools: Implement MSI-X for virtio-rng Sasha Levin
2011-07-28 9:33 ` Pekka Enberg
2011-07-28 9:27 ` [PATCH 1/4] kvm tools: Use GSI routing Pekka Enberg
2011-07-28 9:43 ` Cyrill Gorcunov
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=20110728093826.GJ27137@sun \
--to=gorcunov@gmail.com \
--cc=asias.hejun@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=levinsasha928@gmail.com \
--cc=mingo@elte.hu \
--cc=penberg@kernel.org \
--cc=prasadjoshi124@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox