Re: [Qemu-devel] [PATCH] pci: do not pci_update_mappings when guest gets bar size

2014-10-14 Thread Michael S. Tsirkin
On Tue, Oct 14, 2014 at 08:59:56PM +0800, ChenLiang wrote: > On 2014/10/14 20:27, Michael S. Tsirkin wrote: > > > On Tue, Oct 14, 2014 at 08:15:10PM +0800, ChenLiang wrote: > >> On 2014/10/14 19:48, Michael S. Tsirkin wrote: > >> > >>> On Tue, Oct 14, 2014 at 07:41:14PM +0800, ChenLiang wrote: > >

Re: [Qemu-devel] [PATCH] pci: do not pci_update_mappings when guest gets bar size

2014-10-14 Thread Michael S. Tsirkin
On Tue, Oct 14, 2014 at 08:27:25PM +0800, ChenLiang wrote: > On 2014/10/14 20:28, Michael S. Tsirkin wrote: > > > On Tue, Oct 14, 2014 at 08:19:56PM +0800, ChenLiang wrote: > >> On 2014/10/14 19:58, Michael S. Tsirkin wrote: > >> > >>> On Tue, Oct 14, 2014 at 07:41:14PM +0800, ChenLiang wrote: > >

Re: [Qemu-devel] [PATCH] pci: do not pci_update_mappings when guest gets bar size

2014-10-14 Thread ChenLiang
On 2014/10/14 20:27, Michael S. Tsirkin wrote: > On Tue, Oct 14, 2014 at 08:15:10PM +0800, ChenLiang wrote: >> On 2014/10/14 19:48, Michael S. Tsirkin wrote: >> >>> On Tue, Oct 14, 2014 at 07:41:14PM +0800, ChenLiang wrote: We find overlap when the size of pci bar is bigger then 16MB, it over

Re: [Qemu-devel] [PATCH] pci: do not pci_update_mappings when guest gets bar size

2014-10-14 Thread ChenLiang
On 2014/10/14 20:28, Michael S. Tsirkin wrote: > On Tue, Oct 14, 2014 at 08:19:56PM +0800, ChenLiang wrote: >> On 2014/10/14 19:58, Michael S. Tsirkin wrote: >> >>> On Tue, Oct 14, 2014 at 07:41:14PM +0800, ChenLiang wrote: We find overlap when the size of pci bar is bigger then 16MB, it over

Re: [Qemu-devel] [PATCH] pci: do not pci_update_mappings when guest gets bar size

2014-10-14 Thread Michael S. Tsirkin
On Tue, Oct 14, 2014 at 08:23:08PM +0800, Gonglei wrote: > On 2014/10/14 20:15, chenliang (T) wrote: > > > On 2014/10/14 19:48, Michael S. Tsirkin wrote: > > > >> On Tue, Oct 14, 2014 at 07:41:14PM +0800, ChenLiang wrote: > >>> We find overlap when the size of pci bar is bigger then 16MB, it over

Re: [Qemu-devel] [PATCH] pci: do not pci_update_mappings when guest gets bar size

2014-10-14 Thread Michael S. Tsirkin
On Tue, Oct 14, 2014 at 08:19:56PM +0800, ChenLiang wrote: > On 2014/10/14 19:58, Michael S. Tsirkin wrote: > > > On Tue, Oct 14, 2014 at 07:41:14PM +0800, ChenLiang wrote: > >> We find overlap when the size of pci bar is bigger then 16MB, it overlaps > >> with private > >> memslot in the kmod. B

Re: [Qemu-devel] [PATCH] pci: do not pci_update_mappings when guest gets bar size

2014-10-14 Thread Michael S. Tsirkin
On Tue, Oct 14, 2014 at 08:15:10PM +0800, ChenLiang wrote: > On 2014/10/14 19:48, Michael S. Tsirkin wrote: > > > On Tue, Oct 14, 2014 at 07:41:14PM +0800, ChenLiang wrote: > >> We find overlap when the size of pci bar is bigger then 16MB, it overlaps > >> with private > >> memslot in the kmod. B

Re: [Qemu-devel] [PATCH] pci: do not pci_update_mappings when guest gets bar size

2014-10-14 Thread Gonglei
On 2014/10/14 20:15, chenliang (T) wrote: > On 2014/10/14 19:48, Michael S. Tsirkin wrote: > >> On Tue, Oct 14, 2014 at 07:41:14PM +0800, ChenLiang wrote: >>> We find overlap when the size of pci bar is bigger then 16MB, it overlaps >>> with private >>> memslot in the kmod. By the way, the new k

Re: [Qemu-devel] [PATCH] pci: do not pci_update_mappings when guest gets bar size

2014-10-14 Thread ChenLiang
On 2014/10/14 19:58, Michael S. Tsirkin wrote: > On Tue, Oct 14, 2014 at 07:41:14PM +0800, ChenLiang wrote: >> We find overlap when the size of pci bar is bigger then 16MB, it overlaps >> with private >> memslot in the kmod. By the way, the new kmod skip private memslot. But I >> think if the si

Re: [Qemu-devel] [PATCH] pci: do not pci_update_mappings when guest gets bar size

2014-10-14 Thread ChenLiang
On 2014/10/14 19:58, Michael S. Tsirkin wrote: > On Tue, Oct 14, 2014 at 07:41:14PM +0800, ChenLiang wrote: >> We find overlap when the size of pci bar is bigger then 16MB, it overlaps >> with private >> memslot in the kmod. By the way, the new kmod skip private memslot. But I >> think if the si

Re: [Qemu-devel] [PATCH] pci: do not pci_update_mappings when guest gets bar size

2014-10-14 Thread ChenLiang
On 2014/10/14 19:48, Michael S. Tsirkin wrote: > On Tue, Oct 14, 2014 at 07:41:14PM +0800, ChenLiang wrote: >> We find overlap when the size of pci bar is bigger then 16MB, it overlaps >> with private >> memslot in the kmod. By the way, the new kmod skip private memslot. But I >> think if the si

Re: [Qemu-devel] [PATCH] pci: do not pci_update_mappings when guest gets bar size

2014-10-14 Thread Michael S. Tsirkin
On Tue, Oct 14, 2014 at 07:41:14PM +0800, ChenLiang wrote: > We find overlap when the size of pci bar is bigger then 16MB, it overlaps > with private > memslot in the kmod. By the way, the new kmod skip private memslot. But I > think if the size > of pci bar is enough big, it also overlaps with

Re: [Qemu-devel] [PATCH] pci: do not pci_update_mappings when guest gets bar size

2014-10-14 Thread Michael S. Tsirkin
On Tue, Oct 14, 2014 at 07:41:14PM +0800, ChenLiang wrote: > We find overlap when the size of pci bar is bigger then 16MB, it overlaps > with private > memslot in the kmod. By the way, the new kmod skip private memslot. But I > think if the size > of pci bar is enough big, it also overlaps with

Re: [Qemu-devel] [PATCH] pci: do not pci_update_mappings when guest gets bar size

2014-10-14 Thread ChenLiang
We find overlap when the size of pci bar is bigger then 16MB, it overlaps with private memslot in the kmod. By the way, the new kmod skip private memslot. But I think if the size of pci bar is enough big, it also overlaps with other memslots. the root cause is: pci_default_write_config will do

Re: [Qemu-devel] [PATCH] pci: do not pci_update_mappings when guest gets bar size

2014-10-14 Thread Michael S. Tsirkin
On Tue, Oct 14, 2014 at 07:04:14PM +0800, arei.gong...@huawei.com wrote: > From: ChenLiang > > Power-up software can determine how much address space the device > requires by writing a value of all 1's to the register and then > reading the value back(PCI specification). Qemu should not do > pci_

[Qemu-devel] [PATCH] pci: do not pci_update_mappings when guest gets bar size

2014-10-14 Thread arei.gonglei
From: ChenLiang Power-up software can determine how much address space the device requires by writing a value of all 1's to the register and then reading the value back(PCI specification). Qemu should not do pci_update_mappings. Qemu may exit, because the wrong address of this bar is overlap with