[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v6 1/3] xen/vpci: Move ecam access functions to common code


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Fri, 15 Oct 2021 11:49:08 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=iVEuiwYQwnseWpjmazVcr598DjTpv7Cf9Z3K7ZXzXiA=; b=PtuIsN/Lv6OpQ3Se0ybF0U6T5aOFp8anuQrkHZv5HIc3+7U5u8LKu6EN5vPP27jV+zV+oIHUsXiC4kGLx1dMzeuItgjgqSI5eTt9mpfMLOiuZSn9IOnwDOdmbcvJhP2vH+dFIc1KAY494KXtqDGZa8qdcE1E8oDhsrtXgFozhkw3EyK4RD7glG0cltRiGXvUv96RfhspIGo5ouC/vKuyQaiZ7GisVRUn/HhEOK0VB1X9Bj6AVOSyh60O3gWizB0exDH6d+0QnYOUuClsTXlCYeRDJS2UEAzkrf6hA72mEL3z97uz4K3aiDPM/Mdd08eJblIth/PSlntUKd8CRBWh3w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h+vVdV/1pepwjo6raDik3KnFPO61x8rA+b/hIfDJSfwGBldYltgEAZZkH7JJyfsklJMnqjG1H/8S5YexH4c8r11w9pLbyP9G7SzoAWYh9EY2NE2IWOjI4PF1jysAmRV98UjFEFWVp6WTZ1QSXqi80mA7hcs7itFMMPq5+j6EeeWxjwJU2FUW05imTd2XQfbeIviBweeCnoxdHs/mJf131g3komvggwZgNoepRilDnLCBMnpbFa4PWOHBP4bqW1rv5+z0NJlNB1ej9HxXuWyO9daUDzw1m3+NFJPWl+PXHjUFAsKuPWApvwUAOFxJ4EI2VurrtWBs7f0iOGrxO/3alQ==
  • Authentication-results: esa3.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Paul Durrant <paul@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "Julien Grall" <julien@xxxxxxx>
  • Delivery-date: Fri, 15 Oct 2021 09:49:38 +0000
  • Ironport-data: A9a23:9xtCz6zT6fkuzh3linZ6t+eYwSrEfRIJ4+MujC+fZmUNrF6WrkUHz WAWCDjQM/qONmemKNElPtyy8UtXvZPUyNMxTABoqSAxQypGp/SeCIXCJC8cHc8zwu4v7q5Dx 59DAjUVBJlsFhcwnvopW1TYhSEUOZugH9IQM8aZfHAsLeNYYH1500s6w7dk2tcAbeWRWGthh /uj+6UzB3f9s9JEGjp8B3Wr8U4HUFza4Vv0j3RmDRx5lAa2e0o9VfrzEZqZPXrgKrS4K8bhL wr1IBNVyUuCl/slIovNfr8W6STmSJaKVeSFoiI+t6RPHnGuD8H9u0o2HKN0VKtZt9mGt/4sy vZ0rLbhcB8kOKzog/s9dyZ6FhgraMWq+JefSZS+mcmazkmAeHrw2fR+SkoxOOX0+M4uXzsIr 6ZBbmlQMFbT3Ipaw5riIgVort4kI8TxepsWp1lrzC3DDOZgSpfGK0nPzYIFh29r3J8SdRrYT 5EeWwA3VgnPWDZSH0wwDZwllb6Jv3aqJlW0r3rK/PFqsgA/1jdZz7zFINfTPNuQSq19jkue4 27L4Wn9KhUbL8CEjyqI9Gq2ge3Clj+9X5gd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9etaiXbB/GNHeDbljho8yg=
  • Ironport-hdrordr: A9a23:BYeiT6mJ0Dl3DupugAu/D/qZs8DpDfOximdD5ihNYBxZY6Wkfp +V8sjzhCWatN9OYh0dcLC7WJVpQRvnhPhICK0qTMqftWjdyRGVxeRZjLcKrAeQfhEWmtQtsZ uINpIOdOEYbmIK/PoSgjPIa+rIqePvmMvD6Ja8vhUdPT2CKZsQlDuRYjzrbHGeLzM2fKbReq Dsgfau8FGbCAsqh4mAdzQ4dtmGg+eOuIPtYBYACRJiwA6SjQmw4Lq/NxSDxB8RXx5G3L9nqA H+4kPEz5Tml8v+5g7X1mfV4ZgTsNz9yuFbDMjJrsQOMD3jhiuheYwkcbyfuzIepv2p9T8R4Z XxiiZlG/42x2Laf2mzrxeo8w780Aw243un8lOciWuLm72weBsKT+56wa5JeBrQ7EQt+Ptm1r hQ4m6fv51LSTvdgSXU/bHzJlFXv3vxhUBnvf8YjnRZX4dbQqRWt5Yj8ERcF4pFND7m6bogDP JlAKjnlbdrmGuhHjLkV1RUsZmRtixZJGbDfqFCgL3a79FupgE786NCr/Zv2Uvp9/oGOtB5Dq r/Q+JVfBwndL5jUUtHPpZyfSKAMB26ffv9ChPgHb3ZLtBzB5vske+93Fxn3pDhRHQ3pKFC76 gpFmko7FIPRw==
  • Ironport-sdr: I+tspSi9GQrP0fA0L0GLpR17a8BP/spomo72hD/hL05EttME/FZDUf5EZHzEcYQm+LMRVTgndr calYYnbMAUBlXhJMe4DXXyExwUUv/lx32u9rFvuxgNyjpe2c5ezFt/Hs2fdYfFDBcWhS7rbr7k Omk1gvJu0o/5LoTEH6t3V+LaD55omXIDXCFCLfv5Qj5mpHno4FrkW7JpokU18Uo8MutoHCg6jn zUF2hoCDYiigOLPC9f4BQlWIicoKBDDhfHnGA3TxxiQNaAtS1abQdmm0I5wnbsrWWHtZDFI3ge /NmGLoS++m5itXVEBj948GIk
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Fri, Oct 15, 2021 at 10:13:24AM +0200, Jan Beulich wrote:
> On 15.10.2021 09:37, Bertrand Marquis wrote:
> >> On 15 Oct 2021, at 07:29, Jan Beulich <jbeulich@xxxxxxxx> wrote:
> >> On 14.10.2021 19:09, Bertrand Marquis wrote:
> >>>> On 14 Oct 2021, at 17:06, Jan Beulich <jbeulich@xxxxxxxx> wrote:
> >>>> On 14.10.2021 16:49, Bertrand Marquis wrote:
> >>>>> @@ -305,7 +291,7 @@ static int vpci_portio_read(const struct 
> >>>>> hvm_io_handler *handler,
> >>>>>
> >>>>>    reg = hvm_pci_decode_addr(cf8, addr, &sbdf);
> >>>>>
> >>>>> -    if ( !vpci_access_allowed(reg, size) )
> >>>>> +    if ( !vpci_ecam_access_allowed(reg, size) )
> >>>>>        return X86EMUL_OKAY;
> >>>>>
> >>>>>    *data = vpci_read(sbdf, reg, size);
> >>>>> @@ -335,7 +321,7 @@ static int vpci_portio_write(const struct 
> >>>>> hvm_io_handler *handler,
> >>>>>
> >>>>>    reg = hvm_pci_decode_addr(cf8, addr, &sbdf);
> >>>>>
> >>>>> -    if ( !vpci_access_allowed(reg, size) )
> >>>>> +    if ( !vpci_ecam_access_allowed(reg, size) )
> >>>>>        return X86EMUL_OKAY;
> >>>>>
> >>>>>    vpci_write(sbdf, reg, size, data);
> >>>>
> >>>> Why would port I/O functions call an ECAM helper? And in how far is
> >>>> that helper actually ECAM-specific?
> >>>
> >>> The function was global before.
> >>
> >> I'm not objecting to the function being global, but to the "ecam" in
> >> its name.
> > 
> > Adding ecam in the name was a request from Roger.
> > This is just a consequence of this.
> 
> Roger - did you have in mind the uses here when asking for the addition
> of "ecam"?

I didn't realize it was also used by the IO ports accessors. Strictly
speaking 64bit accesses (lenght == 8) shouldn't be possible/allowed
from IO ports, but that's a red herring.

Thanks, Roger.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.