Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-06-01 Thread Alexey G
On Thu, 31 May 2018 23:30:35 -0600 "Jan Beulich" wrote: Alexey G 05/31/18 7:15 AM >>> >>On Wed, 30 May 2018 02:12:37 -0600 "Jan Beulich" wrote: >> On 29.05.18 at 20:47, wrote: On Wed, 30 May 2018 03:56:07 +1000 Alexey G wrote: >On Tue, 29 May 2018 08:23:51

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-05-31 Thread Jan Beulich
>>> Alexey G 05/31/18 7:15 AM >>> >On Wed, 30 May 2018 02:12:37 -0600 "Jan Beulich" wrote: > On 29.05.18 at 20:47, wrote: >>> On Wed, 30 May 2018 03:56:07 +1000 >>> Alexey G wrote: On Tue, 29 May 2018 08:23:51 -0600 "Jan Beulich" wrote: On 12.03.18 at 19:33, wrote:

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-05-30 Thread Alexey G
On Wed, 30 May 2018 02:12:37 -0600 "Jan Beulich" wrote: On 29.05.18 at 20:47, wrote: >> On Wed, 30 May 2018 03:56:07 +1000 >> Alexey G wrote: >>>On Tue, 29 May 2018 08:23:51 -0600 >>>"Jan Beulich" wrote: >>> On 12.03.18 at 19:33, wrote: > @@ -172,10 +173,14 @@ void

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-05-30 Thread Alexey G
On Wed, 30 May 2018 02:13:30 -0600 "Jan Beulich" wrote: On 30.05.18 at 06:32, wrote: >>> On Wed, 30 May 2018 03:56:07 +1000 >>>Alexey G wrote: >>> On Tue, 29 May 2018 08:23:51 -0600 "Jan Beulich" wrote: On 12.03.18 at 19:33, wrote: >> ---

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-05-30 Thread Jan Beulich
>>> On 30.05.18 at 06:32, wrote: >> On Wed, 30 May 2018 03:56:07 +1000 >>Alexey G wrote: >> >>>On Tue, 29 May 2018 08:23:51 -0600 >>>"Jan Beulich" wrote: >>> >>> On 12.03.18 at 19:33, wrote: > --- a/tools/firmware/hvmloader/config.h > +++ b/tools/firmware/hvmloader/config.h

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-05-29 Thread Alexey G
>On Wed, 30 May 2018 03:56:07 +1000 >Alexey G wrote: > >>On Tue, 29 May 2018 08:23:51 -0600 >>"Jan Beulich" wrote: >> >> On 12.03.18 at 19:33, wrote: --- a/tools/firmware/hvmloader/config.h +++ b/tools/firmware/hvmloader/config.h @@ -53,10 +53,14 @@ extern uint8_t

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-05-29 Thread Alexey G
On Wed, 30 May 2018 03:56:07 +1000 Alexey G wrote: >On Tue, 29 May 2018 08:23:51 -0600 >"Jan Beulich" wrote: > > On 12.03.18 at 19:33, wrote: >>> --- a/tools/firmware/hvmloader/config.h >>> +++ b/tools/firmware/hvmloader/config.h >>> @@ -53,10 +53,14 @@ extern uint8_t ioapic_version;

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-05-29 Thread Alexey G
On Tue, 29 May 2018 08:23:51 -0600 "Jan Beulich" wrote: On 12.03.18 at 19:33, wrote: >> --- a/tools/firmware/hvmloader/config.h >> +++ b/tools/firmware/hvmloader/config.h >> @@ -53,10 +53,14 @@ extern uint8_t ioapic_version; >> #define PCI_ISA_DEVFN 0x08/* dev 1, fn 0 */ >>

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-05-29 Thread Jan Beulich
>>> On 12.03.18 at 19:33, wrote: > --- a/tools/firmware/hvmloader/config.h > +++ b/tools/firmware/hvmloader/config.h > @@ -53,10 +53,14 @@ extern uint8_t ioapic_version; > #define PCI_ISA_DEVFN 0x08/* dev 1, fn 0 */ > #define PCI_ISA_IRQ_MASK0x0c20U /* ISA IRQs 5,10,11 are PCI

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-28 Thread Alexey G
On Wed, 28 Mar 2018 10:03:29 + Paul Durrant wrote: >> >IMO a single entity should be in control of the memory layout, and >> >that's the toolstack. >> > >> >Ideally we should not allow the firmware to change the layout at >> >all. >> >> This approach is terribly

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-28 Thread Paul Durrant
> -Original Message- > > I think we must all agree which approach to implement next. Basically, > whether we need to completely discard the option #1 for this series and > move on with #2. That lengthy requirements/risks email was an attempt to > provide some ground for comparison. > >

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-28 Thread Alexey G
On Wed, 28 Mar 2018 10:30:32 +0100 Roger Pau Monné wrote: >On Wed, Mar 28, 2018 at 01:37:29AM +1000, Alexey G wrote: >> On Tue, 27 Mar 2018 09:45:30 +0100 >> Roger Pau Monné wrote: >> >> >On Tue, Mar 27, 2018 at 05:42:11AM +1000, Alexey G wrote:

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-28 Thread Paul Durrant
> -Original Message- > >IMO a single entity should be in control of the memory layout, and > >that's the toolstack. > > > >Ideally we should not allow the firmware to change the layout at all. > > This approach is terribly wrong, I don't know why opinions like this > so common at Citrix.

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-28 Thread Roger Pau Monné
On Wed, Mar 28, 2018 at 01:37:29AM +1000, Alexey G wrote: > On Tue, 27 Mar 2018 09:45:30 +0100 > Roger Pau Monné wrote: > > >On Tue, Mar 27, 2018 at 05:42:11AM +1000, Alexey G wrote: > >> On Mon, 26 Mar 2018 10:24:38 +0100 > >> Roger Pau Monné wrote:

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-27 Thread Alexey G
On Tue, 27 Mar 2018 09:45:30 +0100 Roger Pau Monné wrote: >On Tue, Mar 27, 2018 at 05:42:11AM +1000, Alexey G wrote: >> On Mon, 26 Mar 2018 10:24:38 +0100 >> Roger Pau Monné wrote: >> >> >On Sat, Mar 24, 2018 at 08:32:44AM +1000, Alexey G wrote:

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-27 Thread Roger Pau Monné
On Tue, Mar 27, 2018 at 05:42:11AM +1000, Alexey G wrote: > On Mon, 26 Mar 2018 10:24:38 +0100 > Roger Pau Monné wrote: > > >On Sat, Mar 24, 2018 at 08:32:44AM +1000, Alexey G wrote: > [...] > >> In fact, the emulated chipset (NB+SB combo without supplemental > >> devices)

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-26 Thread Alexey G
On Mon, 26 Mar 2018 10:24:38 +0100 Roger Pau Monné wrote: >On Sat, Mar 24, 2018 at 08:32:44AM +1000, Alexey G wrote: [...] >> In fact, the emulated chipset (NB+SB combo without supplemental >> devices) itself is a small part of required emulation. It's >> relatively easy to

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-26 Thread Roger Pau Monné
On Sat, Mar 24, 2018 at 08:32:44AM +1000, Alexey G wrote: > On Fri, 23 Mar 2018 13:57:11 + > Paul Durrant wrote: > [...] > >> Few related thoughts: > >> > >> 1. MMCONFIG address is chipset-specific. On Q35 it's a PCIEXBAR, on > >> other x86 systems it may be HECBASE

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-23 Thread Alexey G
On Fri, 23 Mar 2018 13:57:11 + Paul Durrant wrote: [...] >> Few related thoughts: >> >> 1. MMCONFIG address is chipset-specific. On Q35 it's a PCIEXBAR, on >> other x86 systems it may be HECBASE or else. So we can assume it is >> bound to the emulated machine > >Xen

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-23 Thread Paul Durrant
@citrix.com>; Paul > Durrant <paul.durr...@citrix.com>; Roger Pau Monne > <roger@citrix.com>; Wei Liu <wei.l...@citrix.com>; StefanoStabellini > <sstabell...@kernel.org>; xen-devel@lists.xenproject.org > Subject: Re: [Xen-devel] [RFC PATCH 07/12] hvmloader:

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-23 Thread Paul Durrant
;wei.l...@citrix.com>; Andrew Cooper <andrew.coop...@citrix.com>; > 'Alexey G' <x19...@gmail.com>; xen-devel@lists.xenproject.org; Anthony > Perard <anthony.per...@citrix.com>; Ian Jackson <ian.jack...@citrix.com>; > Roger Pau Monne <roger@citrix.com> &g

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-23 Thread Jan Beulich
>>> On 23.03.18 at 11:29, wrote: > No, that's not quite right. Only qemu-trad (and stubdom) are 'default' ioreq > servers. Upstream QEMU has registered individual PCI devices with Xen for > some time now, and hence gets proper PCI config IOREQs. Also we really really >

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-23 Thread Paul Durrant
;wei.l...@citrix.com>; Andrew Cooper <andrew.coop...@citrix.com>; Ian > Jackson <ian.jack...@citrix.com>; Paul Durrant <paul.durr...@citrix.com>; > Jan Beulich <jbeul...@suse.com>; Anthony Perard > <anthony.per...@citrix.com>; xen-devel@lists.xenproject.org &g

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-22 Thread Alexey G
On Thu, 22 Mar 2018 12:44:02 + Roger Pau Monné wrote: >On Thu, Mar 22, 2018 at 10:29:22PM +1000, Alexey G wrote: >> On Thu, 22 Mar 2018 09:57:16 + >> Roger Pau Monné wrote: >> [...] >> >> Yes, and it is still needed as we have two distinct

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-22 Thread Alexey G
On Thu, 22 Mar 2018 08:42:09 -0600 "Jan Beulich" wrote: On 22.03.18 at 15:34, wrote: >> On Thu, 22 Mar 2018 07:20:00 -0600 >> "Jan Beulich" wrote: >> >> On 22.03.18 at 14:05, wrote: On Thu, 22 Mar

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-22 Thread Jan Beulich
>>> On 22.03.18 at 15:34, wrote: > On Thu, 22 Mar 2018 07:20:00 -0600 > "Jan Beulich" wrote: > > On 22.03.18 at 14:05, wrote: >>> On Thu, 22 Mar 2018 06:09:44 -0600 >>> "Jan Beulich" wrote: >>> >>> On

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-22 Thread Alexey G
On Thu, 22 Mar 2018 07:20:00 -0600 "Jan Beulich" wrote: On 22.03.18 at 14:05, wrote: >> On Thu, 22 Mar 2018 06:09:44 -0600 >> "Jan Beulich" wrote: >> >> On 22.03.18 at 12:56, wrote: I really don't

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-22 Thread Jan Beulich
>>> On 22.03.18 at 14:05, wrote: > On Thu, 22 Mar 2018 06:09:44 -0600 > "Jan Beulich" wrote: > > On 22.03.18 at 12:56, wrote: >>> I really don't understand why some people have that fear of emulated >>> MMCONFIG -- it's really the

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-22 Thread Alexey G
On Thu, 22 Mar 2018 06:09:44 -0600 "Jan Beulich" wrote: On 22.03.18 at 12:56, wrote: >> I really don't understand why some people have that fear of emulated >> MMCONFIG -- it's really the same thing as any other MMIO range QEMU >> already emulates via

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-22 Thread Roger Pau Monné
On Thu, Mar 22, 2018 at 10:29:22PM +1000, Alexey G wrote: > On Thu, 22 Mar 2018 09:57:16 + > Roger Pau Monné wrote: > [...] > >> Yes, and it is still needed as we have two distinct (and not equal) > >> interfaces to PCI conf space. Apart from 0..FFh range overlapping >

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-22 Thread Alexey G
On Thu, 22 Mar 2018 09:57:16 + Roger Pau Monné wrote: [...] >> Yes, and it is still needed as we have two distinct (and not equal) >> interfaces to PCI conf space. Apart from 0..FFh range overlapping >> they can be considered very different interfaces. And whether it is

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-22 Thread Jan Beulich
>>> On 22.03.18 at 12:56, wrote: > I really don't understand why some people have that fear of emulated > MMCONFIG -- it's really the same thing as any other MMIO range QEMU > already emulates via map_io_range_to_ioreq_server(). No sensitive > information exposed. It is related

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-22 Thread Alexey G
ini <sstabell...@kernel.org>; xen-devel@lists.xenproject.org >> Subject: Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate >> MMCONFIG area in the MMIO hole + minor code refactoring >> >> On Thu, 22 Mar 2018 03:04:16 -0600 >> "Jan Beulich" &l

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-22 Thread Alexey G
On Thu, 22 Mar 2018 10:09:16 + Paul Durrant wrote: [...] >> > I don't think we even want QEMU to have the freedom to say where >> > the MMCONFIG areas are located, do we? >> >> Sadly this how the chipset works. The PCIEXBAR register contains the >> position of

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-22 Thread Alexey G
On Thu, 22 Mar 2018 09:29:44 + Paul Durrant wrote: >> -Original Message- [...] >> >In both cases Xen would have to do the MCFG access decoding in order >> >to figure out which IOREQ server will handle the request. At which >> >point the only step that you

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-22 Thread Paul Durrant
an.jack...@citrix.com>; Jan Beulich <jbeul...@suse.com>; Wei Liu > <wei.l...@citrix.com>; Anthony Perard <anthony.per...@citrix.com>; > Stefano Stabellini <sstabell...@kernel.org> > Subject: Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG > area

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-22 Thread Roger Pau Monné
On Thu, Mar 22, 2018 at 09:29:44AM +, Paul Durrant wrote: > > The more I think about it, the more I like the existing > > map_io_range_to_ioreq_server() approach. :( It works without doing > > anything, no hacks, no new interfaces, both MMCONFIG and CF8/CFC are > > working as expected. There

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-22 Thread Paul Durrant
@citrix.com>; Paul > Durrant <paul.durr...@citrix.com>; Roger Pau Monne > <roger@citrix.com>; Wei Liu <wei.l...@citrix.com>; Stefano Stabellini > <sstabell...@kernel.org>; xen-devel@lists.xenproject.org > Subject: Re: [Xen-devel] [RFC PATCH 07/12] hvmloader:

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-22 Thread Roger Pau Monné
On Thu, Mar 22, 2018 at 08:49:58AM +1000, Alexey G wrote: > On Wed, 21 Mar 2018 17:15:04 + > Roger Pau Monné wrote: > [...] > >> Above scenario makes it obvious that at least for QEMU the MMIO->PCI > >> conf translation is a redundant step. Why not to allow specifying >

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-22 Thread Alexey G
On Thu, 22 Mar 2018 03:04:16 -0600 "Jan Beulich" wrote: On 22.03.18 at 01:31, wrote: >> On Wed, 21 Mar 2018 17:06:28 + >> Paul Durrant wrote: >> [...] Well, this might work actually. Although the overall scenario

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-22 Thread Paul Durrant
t;; Jan > Beulich <jbeul...@suse.com>; Wei Liu <wei.l...@citrix.com>; Paul Durrant > <paul.durr...@citrix.com>; Anthony Perard <anthony.per...@citrix.com>; > Stefano Stabellini <sstabell...@kernel.org> > Subject: Re: [Xen-devel] [RFC PATCH 07/12] hvmloader:

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-22 Thread Jan Beulich
>>> On 22.03.18 at 01:31, wrote: > On Wed, 21 Mar 2018 17:06:28 + > Paul Durrant wrote: > [...] >>> Well, this might work actually. Although the overall scenario will be >>> overcomplicated a bit for _PCI_CONFIG ioreqs. Here is how it will >>> look:

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-21 Thread Alexey G
On Wed, 21 Mar 2018 17:06:28 + Paul Durrant wrote: [...] >> Well, this might work actually. Although the overall scenario will be >> overcomplicated a bit for _PCI_CONFIG ioreqs. Here is how it will >> look: >> >> QEMU receives PCIEXBAR update -> calls the new dmop

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-21 Thread Alexey G
On Wed, 21 Mar 2018 17:15:04 + Roger Pau Monné wrote: [...] >> Above scenario makes it obvious that at least for QEMU the MMIO->PCI >> conf translation is a redundant step. Why not to allow specifying >> for DM whether it prefers to receive MMCONFIG accesses as native >>

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-21 Thread Alexey G
@citrix.com>; Stefano Stabellini >> <sstabell...@kernel.org> Subject: Re: [Xen-devel] [RFC PATCH 07/12] >> hvmloader: allocate MMCONFIG area in the MMIO hole + minor code >> refactoring >> >> On Wed, 21 Mar 2018 09:09:11 + >> Roger Pau Monné

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-21 Thread Roger Pau Monné
On Thu, Mar 22, 2018 at 02:56:56AM +1000, Alexey G wrote: > On Wed, 21 Mar 2018 15:20:17 + > Roger Pau Monné wrote: > > >On Thu, Mar 22, 2018 at 12:25:40AM +1000, Alexey G wrote: > >> 8. As these MMCONFIG PCI conf reads occur out of context (just > >> address/len/data

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-21 Thread Paul Durrant
t;; Jan > Beulich <jbeul...@suse.com>; Wei Liu <wei.l...@citrix.com>; Paul Durrant > <paul.durr...@citrix.com>; Anthony Perard <anthony.per...@citrix.com>; > Stefano Stabellini <sstabell...@kernel.org> > Subject: Re: [Xen-devel] [RFC PATCH 07/12] hvmloader:

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-21 Thread Alexey G
On Wed, 21 Mar 2018 15:20:17 + Roger Pau Monné wrote: >On Thu, Mar 22, 2018 at 12:25:40AM +1000, Alexey G wrote: >> Roger, Paul, >> >> Here is what you suggest, just to clarify: >> >> 1. Add to Xen a new hypercall (+corresponding dmop) so QEMU can tell >> Xen where

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-21 Thread Roger Pau Monné
On Thu, Mar 22, 2018 at 12:25:40AM +1000, Alexey G wrote: > Roger, Paul, > > Here is what you suggest, just to clarify: > > 1. Add to Xen a new hypercall (+corresponding dmop) so QEMU can tell > Xen where QEMU emulates machine's MMCONFIG (chipset-specific emulation > of PCIEXBAR/HECBASE/etc

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-21 Thread Paul Durrant
rix.com>; > Ian Jackson <ian.jack...@citrix.com>; Jan Beulich <jbeul...@suse.com>; > Wei Liu <wei.l...@citrix.com> > Subject: Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG > area in the MMIO hole + minor code refactoring > > On Wed, 2

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-21 Thread Paul Durrant
t;; Jan > Beulich <jbeul...@suse.com>; Wei Liu <wei.l...@citrix.com>; Paul Durrant > <paul.durr...@citrix.com>; Anthony Perard <anthony.per...@citrix.com>; > Stefano Stabellini <sstabell...@kernel.org> > Subject: Re: [Xen-devel] [RFC PATCH 07/12] hvmloader:

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-21 Thread Alexey G
On Wed, 21 Mar 2018 09:36:04 + Paul Durrant wrote: >> >> Although this is the most common scenario, it's not the only one >> supported by Xen. Your proposed solution breaks the usage of multiple >> IOREQ servers as PCI device emulators. > >Indeed it will, and that is

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-21 Thread Alexey G
On Wed, 21 Mar 2018 09:09:11 + Roger Pau Monné wrote: >On Wed, Mar 21, 2018 at 10:58:40AM +1000, Alexey G wrote: [...] >> According to public slides for the feature, both PCI conf and MMIO >> accesses can be routed to the designated device model. It looks like >> for

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-21 Thread Paul Durrant
> -Original Message- > > > The question is why IOREQ_TYPE_COPY -> IOREQ_TYPE_PCI_CONFIG > > translation is a must have thing at all? It won't make handling simpler. > > For current QEMU implementation IOREQ_TYPE_COPY (MMIO accesses for > > MMCONFIG) would be preferable as it allows to use

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-21 Thread Roger Pau Monné
On Wed, Mar 21, 2018 at 10:58:40AM +1000, Alexey G wrote: > On Tue, 20 Mar 2018 08:50:48 + > Roger Pau Monné wrote: > > >On Tue, Mar 20, 2018 at 05:49:22AM +1000, Alexey G wrote: > >> On Mon, 19 Mar 2018 15:58:02 + > >> Roger Pau Monné wrote:

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-20 Thread Alexey G
On Tue, 20 Mar 2018 08:50:48 + Roger Pau Monné wrote: >On Tue, Mar 20, 2018 at 05:49:22AM +1000, Alexey G wrote: >> On Mon, 19 Mar 2018 15:58:02 + >> Roger Pau Monné wrote: >> >> >On Tue, Mar 13, 2018 at 04:33:52AM +1000, Alexey Gerasimenko

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-20 Thread Paul Durrant
ich <jbeul...@suse.com>; Wei Liu <wei.l...@citrix.com>; Paul Durrant > <paul.durr...@citrix.com> > Subject: Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG > area in the MMIO hole + minor code refactoring > > On Tue, Mar 20, 2018 at 05:49:22AM +1000, Alexey G

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-20 Thread Roger Pau Monné
On Tue, Mar 20, 2018 at 05:49:22AM +1000, Alexey G wrote: > On Mon, 19 Mar 2018 15:58:02 + > Roger Pau Monné wrote: > > >On Tue, Mar 13, 2018 at 04:33:52AM +1000, Alexey Gerasimenko wrote: > >> Much like normal PCI BARs or other chipset-specific memory-mapped > >>

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-19 Thread Alexey G
On Mon, 19 Mar 2018 15:58:02 + Roger Pau Monné wrote: >On Tue, Mar 13, 2018 at 04:33:52AM +1000, Alexey Gerasimenko wrote: >> Much like normal PCI BARs or other chipset-specific memory-mapped >> resources, MMCONFIG area needs space in MMIO hole, so we must >> allocate

Re: [Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-19 Thread Roger Pau Monné
On Tue, Mar 13, 2018 at 04:33:52AM +1000, Alexey Gerasimenko wrote: > Much like normal PCI BARs or other chipset-specific memory-mapped > resources, MMCONFIG area needs space in MMIO hole, so we must allocate > it manually. > > The actual MMCONFIG size depends on a number of PCI buses available

[Xen-devel] [RFC PATCH 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2018-03-12 Thread Alexey Gerasimenko
Much like normal PCI BARs or other chipset-specific memory-mapped resources, MMCONFIG area needs space in MMIO hole, so we must allocate it manually. The actual MMCONFIG size depends on a number of PCI buses available which should be covered by ECAM. Possible options are 64MB, 128MB and 256MB. As