From: Avi Kivity <avi@redhat.com>
To: Wen Congyang <wency@cn.fujitsu.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
Isaku Yamahata <yamahata@valinux.co.jp>,
qemu-devel@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] pci: implement bridge filtering
Date: Tue, 20 Sep 2011 14:44:26 +0300 [thread overview]
Message-ID: <4E787C9A.6050505@redhat.com> (raw)
In-Reply-To: <4E784A33.7040302@cn.fujitsu.com>
On 09/20/2011 11:09 AM, Wen Congyang wrote:
> At 09/14/2011 09:48 AM, Wen Congyang Write:
> > At 09/05/2011 02:13 AM, Michael S. Tsirkin Write:
> >> Support bridge filtering on top of the memory
> >> API as suggested by Avi Kivity:
> >>
> >> Create a memory region for the bridge's address space. This region is
> >> not directly added to system_memory or its descendants. Devices under
> >> the bridge see this region as its pci_address_space(). The region is
> >> as large as the entire address space - it does not take into account
> >> any windows.
> >>
> >> For each of the three windows (pref, non-pref, vga), create an alias
> >> with the appropriate start and size. Map the alias into the bridge's
> >> parent's pci_address_space(), as subregions.
> >>
> >> Signed-off-by: Michael S. Tsirkin<mst@redhat.com>
> >> ---
> >>
> >> The below seems to work fine for me so I applied this.
> >> Still need to test bridge filtering, any help with this
> >> appreciated.
> >>
> >
> >
> > I test bridge filtering, and the BAR still can be visible on guest even if
> > I change the memory region.
>
> Hi Michael S. Tsirkin:
> I test pci bridge filtering on real hardware, and I find that I can mmap
> the resource after I change the memory base and memory limit(The BAR should
> be not visible on OS after changing the memory region).
>
> So I try to write and read to the BAR. Here is my test result:
> 1. Before changing the pci bridge's memory region, I can read and write to the memory, and
> I can get the same value that I write.
>
> 2. After changing the pci bridge's memory region, I can still read and write to the memory,
> but it is very slow, and I can not get the same value that I write(The value is always 0).
>
> Does this result means that pci bridge filtering works fine?
>
Yes. Instead of hitting the BAR, you hit the default mmio handler.
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2011-09-20 11:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-04 18:13 [Qemu-devel] [PATCH] pci: implement bridge filtering Michael S. Tsirkin
2011-09-14 1:48 ` Wen Congyang
2011-09-20 8:09 ` Wen Congyang
2011-09-20 11:44 ` Avi Kivity [this message]
2011-09-20 12:22 ` Michael S. Tsirkin
2011-09-20 12:26 ` Avi Kivity
2011-09-20 11:55 ` Michael S. Tsirkin
2011-09-20 12:12 ` Avi Kivity
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=4E787C9A.6050505@redhat.com \
--to=avi@redhat.com \
--cc=kwolf@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=wency@cn.fujitsu.com \
--cc=yamahata@valinux.co.jp \
/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;
as well as URLs for NNTP newsgroup(s).