Re: [Xen-devel] [PATCH] xen/pass-through: ROM BAR handling adjustments

2015-06-08 Thread Stefano Stabellini
On Mon, 8 Jun 2015, Jan Beulich wrote: > >>> On 05.06.15 at 18:41, wrote: > > On Fri, 5 Jun 2015, Jan Beulich wrote: > >> >>> On 05.06.15 at 13:32, wrote: > >> >> --- a/hw/xen/xen_pt.c > >> >> +++ b/hw/xen/xen_pt.c > >> >> @@ -248,7 +248,9 @@ static void xen_pt_pci_write_config(PCID > >> >> > >

Re: [Xen-devel] [PATCH] xen/pass-through: ROM BAR handling adjustments

2015-06-08 Thread Jan Beulich
>>> On 05.06.15 at 18:41, wrote: > On Fri, 5 Jun 2015, Jan Beulich wrote: >> >>> On 05.06.15 at 13:32, wrote: >> >> --- a/hw/xen/xen_pt.c >> >> +++ b/hw/xen/xen_pt.c >> >> @@ -248,7 +248,9 @@ static void xen_pt_pci_write_config(PCID >> >> >> >> /* check unused BAR register */ >> >> in

Re: [Xen-devel] [PATCH] xen/pass-through: ROM BAR handling adjustments

2015-06-05 Thread Stefano Stabellini
On Fri, 5 Jun 2015, Jan Beulich wrote: > >>> On 05.06.15 at 13:32, wrote: > >> --- a/hw/xen/xen_pt.c > >> +++ b/hw/xen/xen_pt.c > >> @@ -248,7 +248,9 @@ static void xen_pt_pci_write_config(PCID > >> > >> /* check unused BAR register */ > >> index = xen_pt_bar_offset_to_index(addr); > >

Re: [Xen-devel] [PATCH] xen/pass-through: ROM BAR handling adjustments

2015-06-05 Thread Jan Beulich
>>> On 05.06.15 at 13:32, wrote: >> --- a/hw/xen/xen_pt.c >> +++ b/hw/xen/xen_pt.c >> @@ -248,7 +248,9 @@ static void xen_pt_pci_write_config(PCID >> >> /* check unused BAR register */ >> index = xen_pt_bar_offset_to_index(addr); >> -if ((index >= 0) && (val > 0 && val < XEN_PT_BAR

Re: [Xen-devel] [PATCH] xen/pass-through: ROM BAR handling adjustments

2015-06-05 Thread Stefano Stabellini
On Fri, 15 May 2015, Jan Beulich wrote: > Expecting the ROM BAR to be written with an all ones value when sizing > the region is wrong - the low bit has another meaning (enable/disable) > and bits 1..10 are reserved. The PCI spec also mandates writing all > ones to just the address portion of the r

[Xen-devel] [PATCH] xen/pass-through: ROM BAR handling adjustments

2015-05-15 Thread Jan Beulich
Expecting the ROM BAR to be written with an all ones value when sizing the region is wrong - the low bit has another meaning (enable/disable) and bits 1..10 are reserved. The PCI spec also mandates writing all ones to just the address portion of the register. Use suitable constants also for initia