public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Tony Krowiak <akrowiak@linux.ibm.com>,
	linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org,
	kvm@vger.kernel.org
Cc: kbuild-all@lists.01.org, jjherne@linux.ibm.com,
	freude@linux.ibm.com, borntraeger@de.ibm.com, cohuck@redhat.com,
	mjrosato@linux.ibm.com, pasic@linux.ibm.com,
	alex.williamson@redhat.com, kwankhede@nvidia.com,
	fiuczy@linux.ibm.com
Subject: Re: [PATCH v20 18/20] s390/vfio-ap: update docs to include dynamic config support
Date: Tue, 5 Jul 2022 05:20:53 +0800	[thread overview]
Message-ID: <202207050533.oQ9M1DAt-lkp@intel.com> (raw)
In-Reply-To: <20220621155134.1932383-19-akrowiak@linux.ibm.com>

Hi Tony,

I love your patch! Perhaps something to improve:

[auto build test WARNING on s390/features]
[also build test WARNING on mst-vhost/linux-next linus/master v5.19-rc5 next-20220704]
[cannot apply to kvms390/next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/intel-lab-lkp/linux/commits/Tony-Krowiak/s390-vfio-ap-dynamic-configuration-support/20220621-235654
base:   https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git features
reproduce: make htmldocs

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> Documentation/s390/vfio-ap.rst:684: WARNING: Inline strong start-string without end-string.
>> Documentation/s390/vfio-ap.rst:684: WARNING: Inline emphasis start-string without end-string.
>> Documentation/s390/vfio-ap.rst:943: WARNING: Title underline too short.
>> Documentation/s390/vfio-ap.rst:998: WARNING: Definition list ends without a blank line; unexpected unindent.

vim +684 Documentation/s390/vfio-ap.rst

   538	
   539	1. Install the vfio_ap module on the linux host. The dependency chain for the
   540	   vfio_ap module is:
   541	   * iommu
   542	   * s390
   543	   * zcrypt
   544	   * vfio
   545	   * vfio_mdev
   546	   * vfio_mdev_device
   547	   * KVM
   548	
   549	   To build the vfio_ap module, the kernel build must be configured with the
   550	   following Kconfig elements selected:
   551	   * IOMMU_SUPPORT
   552	   * S390
   553	   * ZCRYPT
   554	   * S390_AP_IOMMU
   555	   * VFIO
   556	   * VFIO_MDEV
   557	   * KVM
   558	
   559	   If using make menuconfig select the following to build the vfio_ap module::
   560	
   561	     -> Device Drivers
   562		-> IOMMU Hardware Support
   563		   select S390 AP IOMMU Support
   564		-> VFIO Non-Privileged userspace driver framework
   565		   -> Mediated device driver frramework
   566		      -> VFIO driver for Mediated devices
   567	     -> I/O subsystem
   568		-> VFIO support for AP devices
   569	
   570	2. Secure the AP queues to be used by the three guests so that the host can not
   571	   access them. To secure them, there are two sysfs files that specify
   572	   bitmasks marking a subset of the APQN range as usable only by the default AP
   573	   queue device drivers. All remaining APQNs are available for use by
   574	   any other device driver. The vfio_ap device driver is currently the only
   575	   non-default device driver. The location of the sysfs files containing the
   576	   masks are::
   577	
   578	     /sys/bus/ap/apmask
   579	     /sys/bus/ap/aqmask
   580	
   581	   The 'apmask' is a 256-bit mask that identifies a set of AP adapter IDs
   582	   (APID). Each bit in the mask, from left to right, corresponds to an APID from
   583	   0-255. If a bit is set, the APID belongs to the subset of APQNs marked as
   584	   available only to the default AP queue device drivers.
   585	
   586	   The 'aqmask' is a 256-bit mask that identifies a set of AP queue indexes
   587	   (APQI). Each bit in the mask, from left to right, corresponds to an APQI from
   588	   0-255. If a bit is set, the APQI belongs to the subset of APQNs marked as
   589	   available only to the default AP queue device drivers.
   590	
   591	   The Cartesian product of the APIDs corresponding to the bits set in the
   592	   apmask and the APQIs corresponding to the bits set in the aqmask comprise
   593	   the subset of APQNs that can be used only by the host default device drivers.
   594	   All other APQNs are available to the non-default device drivers such as the
   595	   vfio_ap driver.
   596	
   597	   Take, for example, the following masks::
   598	
   599	      apmask:
   600	      0x7d00000000000000000000000000000000000000000000000000000000000000
   601	
   602	      aqmask:
   603	      0x8000000000000000000000000000000000000000000000000000000000000000
   604	
   605	   The masks indicate:
   606	
   607	   * Adapters 1, 2, 3, 4, 5, and 7 are available for use by the host default
   608	     device drivers.
   609	
   610	   * Domain 0 is available for use by the host default device drivers
   611	
   612	   * The subset of APQNs available for use only by the default host device
   613	     drivers are:
   614	
   615	     (1,0), (2,0), (3,0), (4.0), (5,0) and (7,0)
   616	
   617	   * All other APQNs are available for use by the non-default device drivers.
   618	
   619	   The APQN of each AP queue device assigned to the linux host is checked by the
   620	   AP bus against the set of APQNs derived from the Cartesian product of APIDs
   621	   and APQIs marked as available to the default AP queue device drivers. If a
   622	   match is detected,  only the default AP queue device drivers will be probed;
   623	   otherwise, the vfio_ap device driver will be probed.
   624	
   625	   By default, the two masks are set to reserve all APQNs for use by the default
   626	   AP queue device drivers. There are two ways the default masks can be changed:
   627	
   628	   1. The sysfs mask files can be edited by echoing a string into the
   629	      respective sysfs mask file in one of two formats:
   630	
   631	      * An absolute hex string starting with 0x - like "0x12345678" - sets
   632		the mask. If the given string is shorter than the mask, it is padded
   633		with 0s on the right; for example, specifying a mask value of 0x41 is
   634		the same as specifying::
   635	
   636		   0x4100000000000000000000000000000000000000000000000000000000000000
   637	
   638		Keep in mind that the mask reads from left to right, so the mask
   639		above identifies device numbers 1 and 7 (01000001).
   640	
   641		If the string is longer than the mask, the operation is terminated with
   642		an error (EINVAL).
   643	
   644	      * Individual bits in the mask can be switched on and off by specifying
   645		each bit number to be switched in a comma separated list. Each bit
   646		number string must be prepended with a ('+') or minus ('-') to indicate
   647		the corresponding bit is to be switched on ('+') or off ('-'). Some
   648		valid values are:
   649	
   650		   - "+0"    switches bit 0 on
   651		   - "-13"   switches bit 13 off
   652		   - "+0x41" switches bit 65 on
   653		   - "-0xff" switches bit 255 off
   654	
   655		The following example:
   656	
   657		      +0,-6,+0x47,-0xf0
   658	
   659		Switches bits 0 and 71 (0x47) on
   660	
   661		Switches bits 6 and 240 (0xf0) off
   662	
   663		Note that the bits not specified in the list remain as they were before
   664		the operation.
   665	
   666	   2. The masks can also be changed at boot time via parameters on the kernel
   667	      command line like this:
   668	
   669		 ap.apmask=0xffff ap.aqmask=0x40
   670	
   671		 This would create the following masks::
   672	
   673		    apmask:
   674		    0xffff000000000000000000000000000000000000000000000000000000000000
   675	
   676		    aqmask:
   677		    0x4000000000000000000000000000000000000000000000000000000000000000
   678	
   679		 Resulting in these two pools::
   680	
   681		    default drivers pool:    adapter 0-15, domain 1
   682		    alternate drivers pool:  adapter 16-255, domains 0, 2-255
   683	
 > 684	   Note ***:
   685	   Changing a mask such that one or more APQNs will be taken from a vfio_ap
   686	   mediated device (see below) will fail with an error (EBUSY). A message
   687	   is logged to the kernel ring buffer which can be viewed with the 'dmesg'
   688	   command. The output identifies each APQN flagged as 'in use' and identifies
   689	   the vfio_ap mediated device to which it is assigned; for example:
   690	
   691	   Userspace may not re-assign queue 05.0054 already assigned to 62177883-f1bb-47f0-914d-32a22e3a8804
   692	   Userspace may not re-assign queue 04.0054 already assigned to cef03c3c-903d-4ecc-9a83-40694cb8aee4
   693	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

  reply	other threads:[~2022-07-04 21:22 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-21 15:51 [PATCH v20 00/20] s390/vfio-ap: dynamic configuration support Tony Krowiak
2022-06-21 15:51 ` [PATCH v20 01/20] s390/vfio-ap: use new AP bus interface to search for queue devices Tony Krowiak
2022-06-21 15:51 ` [PATCH v20 02/20] s390/vfio-ap: move probe and remove callbacks to vfio_ap_ops.c Tony Krowiak
2022-06-21 15:51 ` [PATCH v20 03/20] s390/vfio-ap: manage link between queue struct and matrix mdev Tony Krowiak
2022-06-21 15:51 ` [PATCH v20 04/20] s390/vfio-ap: introduce shadow APCB Tony Krowiak
2022-06-21 15:51 ` [PATCH v20 05/20] s390/vfio-ap: refresh guest's APCB by filtering AP resources assigned to mdev Tony Krowiak
2022-06-21 15:51 ` [PATCH v20 06/20] s390/vfio-ap: allow assignment of unavailable AP queues to mdev device Tony Krowiak
2022-06-21 15:51 ` [PATCH v20 07/20] s390/vfio-ap: rename matrix_dev->lock mutex to matrix_dev->mdevs_lock Tony Krowiak
2022-06-21 15:51 ` [PATCH v20 08/20] s390/vfio-ap: introduce new mutex to control access to the KVM pointer Tony Krowiak
2022-06-21 15:51 ` [PATCH v20 09/20] s390/vfio-ap: use proper locking order when setting/clearing " Tony Krowiak
2022-06-21 15:51 ` [PATCH v20 10/20] s390/vfio-ap: prepare for dynamic update of guest's APCB on assign/unassign Tony Krowiak
2022-06-21 20:02   ` Jason J. Herne
2022-06-21 15:51 ` [PATCH v20 11/20] s390/vfio-ap: prepare for dynamic update of guest's APCB on queue probe/remove Tony Krowiak
2022-06-21 15:51 ` [PATCH v20 12/20] s390/vfio-ap: allow hot plug/unplug of AP devices when assigned/unassigned Tony Krowiak
2022-06-21 15:51 ` [PATCH v20 13/20] s390/vfio-ap: hot plug/unplug of AP devices when probed/removed Tony Krowiak
2022-06-21 15:51 ` [PATCH v20 14/20] s390/vfio-ap: reset queues after adapter/domain unassignment Tony Krowiak
2022-06-21 15:51 ` [PATCH v20 15/20] s390/vfio-ap: implement in-use callback for vfio_ap driver Tony Krowiak
2022-06-21 15:51 ` [PATCH v20 16/20] s390/vfio-ap: sysfs attribute to display the guest's matrix Tony Krowiak
2022-06-21 15:51 ` [PATCH v20 17/20] s390/vfio-ap: handle config changed and scan complete notification Tony Krowiak
2022-06-21 15:51 ` [PATCH v20 18/20] s390/vfio-ap: update docs to include dynamic config support Tony Krowiak
2022-07-04 21:20   ` kernel test robot [this message]
2022-06-21 15:51 ` [PATCH v20 19/20] s390/Docs: new doc describing lock usage by the vfio_ap device driver Tony Krowiak
2022-07-05  4:59   ` kernel test robot
2022-07-05  7:46   ` kernel test robot
2022-06-21 15:51 ` [PATCH v20 20/20] MAINTAINERS: pick up all vfio_ap docs for VFIO AP maintainers Tony Krowiak
2022-06-21 19:56   ` Jason J. Herne
2022-06-22  6:48 ` [PATCH v20 00/20] s390/vfio-ap: dynamic configuration support Christian Borntraeger
2022-06-22 10:42   ` Halil Pasic
2022-06-22 12:40   ` Tony Krowiak

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=202207050533.oQ9M1DAt-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=akrowiak@linux.ibm.com \
    --cc=alex.williamson@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=fiuczy@linux.ibm.com \
    --cc=freude@linux.ibm.com \
    --cc=jjherne@linux.ibm.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kvm@vger.kernel.org \
    --cc=kwankhede@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=mjrosato@linux.ibm.com \
    --cc=pasic@linux.ibm.com \
    /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