[Xen-devel] [PATCH v17 00/19] osstest: initial FreeBSD support

2017-12-01 Thread Roger Pau Monne
ing missing. Thanks, Roger. Roger Pau Monne (19): osstest: make built_stash_file store a path_ runvar for each file osstest: move known_hosts generation to TestSupport osstest: add executive prefix to resource_shared_mark_ready osstest: introduce host_shared_mark_ready osstest: introduce

[Xen-devel] [PATCH v17 18/19] osstest: expand the list of tested disk controllers

2017-12-01 Thread Roger Pau Monne
The Mass osstest instance has a more diverse list of hardware disk controllers, so expand the list in order to include all the possible disk drivers. For the record, this list can be found at: usr.sbin/bsdconfig/share/device.subr In the FreeBSD source tree. Signed-off-by: Roger Pau Monné ---

[Xen-devel] [PATCH v17 17/19] osstest: remove the loader timeout from the install image

2017-12-01 Thread Roger Pau Monne
When the FreeBSD installer is booted on the godello{0/1} boxes it receives spurious key strokes. This doesn't happen so far when booted from disk, or with any other boxes. In order to cope with this remove the loader timeout on the install image. Note that failure to boot will still drop the loade

[Xen-devel] [PATCH v17 19/19] osstest: use -DWITHOUT_AUTO_OBJ with FreeBSD release targets

2017-12-01 Thread Roger Pau Monne
Due to a recent FreeBSD change the default output directory of the release targets is changed to the object directory instead of the source directory. Use WITHOUT_AUTO_OBJ to restore previous behavior. This is harmless if used with previous versions, it will be ignored. Signed-off-by: Roger Pau Mo

[Xen-devel] [PATCH] vpci: don't allow access to devices not assigned to the domain

2019-09-02 Thread Roger Pau Monne
Don't allow the hardware domain to access the PCI config space of devices not assigned to it. Ie: the config space of iommu devices in use by Xen should not be accessible to the hardware domain. Note that access from the hardware domain to config space regions where Xen hasn't detected any devices

[Xen-devel] [PATCH v2] vpci: honor read-only devices

2019-09-02 Thread Roger Pau Monne
Don't allow the hardware domain write access the PCI config space of devices marked as read-only. Signed-off-by: Roger Pau Monné --- Changes since v1: - Change the approach and allow full read access, while limiting write access to devices marked RO. --- xen/drivers/vpci/vpci.c | 16

[Xen-devel] [PATCH v3] vpci: honor read-only devices

2019-09-03 Thread Roger Pau Monne
Don't allow the hardware domain write access the PCI config space of devices marked as read-only. Signed-off-by: Roger Pau Monné --- Changes since v2: - Fix test harness. - Do the RO check before the ownership one. Changes since v1: - Change the approach and allow full read access, while limi

[Xen-devel] [PATCH v2 01/11] ioreq: fix hvm_all_ioreq_servers_add_vcpu fail path cleanup

2019-09-03 Thread Roger Pau Monne
The loop in FOR_EACH_IOREQ_SERVER is backwards hence the cleanup on failure needs to be done forwards. Fixes: 97a5a3e30161 ('x86/hvm/ioreq: maintain an array of ioreq servers rather than a list') Signed-off-by: Roger Pau Monné --- Changes since v1: - New in this version. --- xen/arch/x86/hvm/i

[Xen-devel] [PATCH v2 07/11] ioreq: allow registering internal ioreq server handler

2019-09-03 Thread Roger Pau Monne
Provide a routine to register the handler for an internal ioreq server. Signed-off-by: Roger Pau Monné --- Changes since v1: - Allow to provide an opaque data parameter to pass to the handler. - Allow changing the handler as long as the server is not enabled. --- xen/arch/x86/hvm/ioreq.c

[Xen-devel] [PATCH v2 06/11] ioreq: allow dispatching ioreqs to internal servers

2019-09-03 Thread Roger Pau Monne
Internal ioreq servers are always processed first, and ioreqs are dispatched by calling the handler function. Note this is already the case due to the implementation of FOR_EACH_IOREQ_SERVER. Note that hvm_send_ioreq doesn't get passed the ioreq server id, so obtain it from the ioreq server data b

[Xen-devel] [PATCH v2 05/11] ioreq: add internal ioreq initialization support

2019-09-03 Thread Roger Pau Monne
Add support for internal ioreq servers to initialization and deinitialization routines, prevent some functions from being executed against internal ioreq servers and add guards to only allow internal callers to modify internal ioreq servers. External callers (ie: from hypercalls) are only allowed t

[Xen-devel] [PATCH v2 09/11] vpci: register as an internal ioreq server

2019-09-03 Thread Roger Pau Monne
Switch vPCI to become an internal ioreq server, and hence drop all the vPCI specific decoding and trapping to PCI IO ports and MMCFG regions. This allows to unify the vPCI code with the ioreq infrastructure, opening the door for domains having PCI accesses handled by vPCI and other ioreq servers a

[Xen-devel] [PATCH v2 11/11] ioreq: provide support for long-running operations...

2019-09-03 Thread Roger Pau Monne
...and switch vPCI to use this infrastructure for long running physmap modification operations. This allows to get rid of the vPCI specific modifications done to handle_hvm_io_completion and allows generalizing the support for long-running operations to other internal ioreq servers. Such support i

[Xen-devel] [PATCH v2 00/11] ioreq: add support for internal servers

2019-09-03 Thread Roger Pau Monne
handled by other ioreq servers. The implementation is fairly simple and limited to what's needed by vPCI, but can be expanded in the future if other more complex users appear. The series can also be found at: git://xenbits.xen.org/people/royger/xen.git ioreq_vpci_v2 Thanks, Roger. Roger Pau

[Xen-devel] [PATCH v2 04/11] ioreq: add fields to allow internal ioreq servers

2019-09-03 Thread Roger Pau Monne
Internal ioreq servers are plain function handlers implemented inside of the hypervisor. Note that most fields used by current (external) ioreq servers are not needed for internal ones, and hence have been placed inside of a struct and packed in an union together with the only internal specific fie

[Xen-devel] [PATCH v2 02/11] ioreq: terminate cf8 handling at hypervisor level

2019-09-03 Thread Roger Pau Monne
Do not forward accesses to cf8 to external emulators, decoding of PCI accesses is handled by Xen, and emulators can request handling of config space accesses of devices using the provided ioreq interface. Fully terminate cf8 accesses at the hypervisor level, by improving the existing hvm_access_cf

[Xen-devel] [PATCH v2 08/11] ioreq: allow decoding accesses to MMCFG regions

2019-09-03 Thread Roger Pau Monne
Pick up on the infrastructure already added for vPCI and allow ioreq to decode accesses to MMCFG regions registered for a domain. This infrastructure is still only accessible from internal callers, so MMCFG regions can only be registered from the internal domain builder used by PVH dom0. Note that

[Xen-devel] [PATCH v2 03/11] ioreq: switch selection and forwarding to use ioservid_t

2019-09-03 Thread Roger Pau Monne
hvm_select_ioreq_server and hvm_send_ioreq where both using hvm_ioreq_server directly, switch to use ioservid_t in order to select and forward ioreqs. This is a preparatory change, since future patches will use the ioreq server id in order to differentiate between internal and external ioreq serve

[Xen-devel] [PATCH v2 10/11] ioreq: split the code to detect PCI config space accesses

2019-09-03 Thread Roger Pau Monne
Place the code that converts a PIO/COPY ioreq into a PCI_CONFIG one into a separate function, and adjust the code to make use of this newly introduced function. No functional change intended. Signed-off-by: Roger Pau Monné --- Changes since v1: - New in this version. --- xen/arch/x86/hvm/ioreq

[Xen-devel] [PATCH] p2m/ept: add _subtree suffix to ept_invalidate_emt

2019-09-04 Thread Roger Pau Monne
So that the name implies the function is used to walk the page table pointer passed as parameter. Drop the parent_ prefix from the level parameter, since the level passed is the one matching the EPT entry passed in the mfn parameter. While there also change bool_t to bool and add an assert to make

[Xen-devel] [PATCH] x86/libxl: choose a sane default for HAP

2019-09-05 Thread Roger Pau Monne
Current libxl code will always enable Hardware Assisted Paging (HAP), expecting that the hypervisor will fallback to shadow if HAP is not available. With the changes to the domain builder that's not the case any longer, and the hypervisor will raise an error if HAP is not available instead of silen

[Xen-devel] [PATCH v2 2/2] sysctl/libxl: choose a sane default for HAP

2019-09-05 Thread Roger Pau Monne
Current libxl code will always enable Hardware Assisted Paging (HAP), expecting that the hypervisor will fallback to shadow if HAP is not available. With the changes to the domain builder that's not the case any longer, and the hypervisor will raise an error if HAP is not available instead of silen

[Xen-devel] [PATCH v2 0/2] libxl: choose a sane default for HAP

2019-09-05 Thread Roger Pau Monne
oyger/xen.git hap_info_v2 Thanks, Roger. Roger Pau Monne (2): sysctl: report existing physcaps on ARM sysctl/libxl: choose a sane default for HAP tools/libxl/libxl.c | 1 + tools/libxl/libxl_create.c | 8 +++- tools/libxl/libxl_types.idl | 1 + tools/xl/xl_info.c

[Xen-devel] [PATCH v2 1/2] sysctl: report existing physcaps on ARM

2019-09-05 Thread Roger Pau Monne
Current physcaps in XEN_SYSCTL_physinfo are only used by x86, albeit the capabilities themselves are not x86 specific. This patch adds support for also reporting the current capabilities on ARM hardware. Note that on ARM PHYSCAP_hvm is always reported, and setting PHYSCAP_directio has been moved t

[Xen-devel] [PATCH v2 0/4] build: honor toolchain related environment vars

2019-09-05 Thread Roger Pau Monne
at: git://xenbits.xen.org/people/royger/xen.git env_tools Results from Travis and gitlab CI loops are at: https://travis-ci.org/royger/xen/builds/581139388 https://gitlab.com/xen-project/people/royger/xen/pipelines/80440648 Thanks, Roger. Roger Pau Monne (4): build: set HOST{CC/CXX}, clang

[Xen-devel] [PATCH v2 2/4] kconfig: include default toolchain values

2019-09-05 Thread Roger Pau Monne
Include config/$(OS).mk which contains the default values for the toolchain variables. This removes the need to pass HOST{CC/CXX} as parameters from the high level make target or to default them to gcc/g++ if unset. Signed-off-by: Roger Pau Monné --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian

[Xen-devel] [PATCH v2 4/4] build: allow picking the env values for toolchain utilities

2019-09-05 Thread Roger Pau Monne
Don't force the usage of the hardcoded toolchain values if those are already set on the environment. Note that as part of the change the definition of AS and LD is moved after the setting of compiler related variables. Signed-off-by: Roger Pau Monné --- Cc: Andrew Cooper Cc: George Dunlap Cc:

[Xen-devel] [PATCH v2 1/4] build: set HOST{CC/CXX}, clang and gcc in StdGNU.mk

2019-09-05 Thread Roger Pau Monne
This is a preparatory change for simplifying the setting of HOST{CC/CXX} and allowing the Xen build system to pick the toolchain variables from the environment. No functional change intended. Signed-off-by: Roger Pau Monné --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulic

[Xen-devel] [PATCH v2 3/4] build: allow picking the env values for compiler variables

2019-09-05 Thread Roger Pau Monne
Don't force the usage of the hardcoded compiler values if those are already set on the environment. This allows the Xen build system to correctly pick CC/CXX values present on the environment, and fixes the usage of those by the Gitlab CI test system. Note that without this fix the Xen build syste

[Xen-devel] [PATCH v2] xstate: make use_xsave non-init

2019-09-05 Thread Roger Pau Monne
LLVM code generation can attempt to load from a variable in the next condition of an expression under certain circumstances, thus attempting to load use_xsave regardless of the value of the bsp variable, which leads to a page fault when the init section has already been unmapped. Fix this by makin

[Xen-devel] [PATCH v3 0/2] libxl: choose a sane default for HAP

2019-09-06 Thread Roger Pau Monne
Hello, First patch is a preparatory change to also make use of the physcaps on ARM, second patch introduces a new physcap (HAP) in order for the toolstack to decide whether to use HAP if the user hasn't made a selection. Thanks, Roger. Roger Pau Monne (2): sysctl: report existing physca

[Xen-devel] [PATCH v3 1/2] sysctl: report existing physcaps on ARM

2019-09-06 Thread Roger Pau Monne
Current physcaps in XEN_SYSCTL_physinfo are only used by x86, albeit the capabilities themselves are not x86 specific. This patch adds support for also reporting the current capabilities on ARM hardware. Note that on ARM PHYSCAP_hvm is always reported, and setting PHYSCAP_directio has been moved t

[Xen-devel] [PATCH v3 2/2] sysctl/libxl: choose a sane default for HAP

2019-09-06 Thread Roger Pau Monne
Current libxl code will always enable Hardware Assisted Paging (HAP), expecting that the hypervisor will fallback to shadow if HAP is not available. With the changes to the domain builder that's not the case any longer, and the hypervisor will raise an error if HAP is not available instead of silen

[Xen-devel] [PATCH] freebsd-build: fix building efifat after r351831

2019-09-10 Thread Roger Pau Monne
FreeBSD revisions after r351831 no longer automatically build an efifat partition image, and makefs should be used instead if such file is required. Do this and add logic to build the efifat partition ourselves if it's not present in the output of the build. Signed-off-by: Roger Pau Monné --- Cc

[Xen-devel] [PATCH v4 1/2] sysctl/libxl: choose a sane default for HAP

2019-09-10 Thread Roger Pau Monne
Current libxl code will always enable Hardware Assisted Paging (HAP), expecting that the hypervisor will fallback to shadow if HAP is not available. With the changes to DOMCTL_createdomain that's not the case any longer, and the hypervisor will raise an error if HAP is not available instead of sile

[Xen-devel] [PATCH v4 2/2] sysctl: report shadow paging capability

2019-09-10 Thread Roger Pau Monne
Report whether shadow paging is supported by the hypervisor, since it can be disabled at build time. Requested-by: Andrew Cooper Signed-off-by: Roger Pau Monné --- NB: I'm not sure the added check in libxl__domain_create_info_setdefault is that useful, or if it could be better placed somewhere e

[Xen-devel] [PATCH] x86/iommu: improve logging message

2019-09-27 Thread Roger Pau Monne
Switch to using pd and also print the pfn that failed. No functional change intended. Signed-off-by: Roger Pau Monné --- xen/drivers/passthrough/x86/iommu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/drivers/passthrough/x86/iommu.c b/xen/drivers/passthrough/x86

[Xen-devel] [PATCH] x86/iommu: fix hwdom iommu requirements check

2019-09-28 Thread Roger Pau Monne
Both a shadow and a HAP hwdom require an iommu and must be run in strict mode. Change the HAP check into a hvm domain check. Signed-off-by: Roger Pau Monné --- xen/drivers/passthrough/iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/drivers/passthrough/iommu.c b/xe

[Xen-devel] [PATCH v3 02/10] ioreq: switch selection and forwarding to use ioservid_t

2019-09-30 Thread Roger Pau Monne
hvm_select_ioreq_server and hvm_send_ioreq where both using hvm_ioreq_server directly, switch to use ioservid_t in order to select and forward ioreqs. This is a preparatory change, since future patches will use the ioreq server id in order to differentiate between internal and external ioreq serve

[Xen-devel] [PATCH v3 01/10] ioreq: terminate cf8 handling at hypervisor level

2019-09-30 Thread Roger Pau Monne
Do not forward accesses to cf8 to external emulators, decoding of PCI accesses is handled by Xen, and emulators can request handling of config space accesses of devices using the provided ioreq interface. Fully terminate cf8 accesses at the hypervisor level, by improving the existing hvm_access_cf

[Xen-devel] [PATCH v3 00/10] ioreq: add support for internal servers

2019-09-30 Thread Roger Pau Monne
handled by other ioreq servers. The implementation is fairly simple and limited to what's needed by vPCI, but can be expanded in the future if other more complex users appear. The series can also be found at: git://xenbits.xen.org/people/royger/xen.git ioreq_vpci_v3 Thanks, Roger. Roger Pau

[Xen-devel] [PATCH v3 10/10] ioreq: provide support for long-running operations...

2019-09-30 Thread Roger Pau Monne
...and switch vPCI to use this infrastructure for long running physmap modification operations. This allows to get rid of the vPCI specific modifications done to handle_hvm_io_completion and allows generalizing the support for long-running operations to other internal ioreq servers. Such support i

[Xen-devel] [PATCH v3 04/10] ioreq: add internal ioreq initialization support

2019-09-30 Thread Roger Pau Monne
Add support for internal ioreq servers to initialization and deinitialization routines, prevent some functions from being executed against internal ioreq servers and add guards to only allow internal callers to modify internal ioreq servers. External callers (ie: from hypercalls) are only allowed t

[Xen-devel] [PATCH v3 06/10] ioreq: allow registering internal ioreq server handler

2019-09-30 Thread Roger Pau Monne
Provide a routine to register the handler for an internal ioreq server. Signed-off-by: Roger Pau Monné --- Changes since v2: - s/hvm_add_ioreq_handler/hvm_set_ioreq_handler. - Do not goto the out label if ioreq is not internal. Changes since v1: - Allow to provide an opaque data parameter to

[Xen-devel] [PATCH v3 08/10] vpci: register as an internal ioreq server

2019-09-30 Thread Roger Pau Monne
Switch vPCI to become an internal ioreq server, and hence drop all the vPCI specific decoding and trapping to PCI IO ports and MMCFG regions. This allows to unify the vPCI code with the ioreq infrastructure, opening the door for domains having PCI accesses handled by vPCI and other ioreq servers a

[Xen-devel] [PATCH v3 03/10] ioreq: add fields to allow internal ioreq servers

2019-09-30 Thread Roger Pau Monne
Internal ioreq servers are plain function handlers implemented inside of the hypervisor. Note that most fields used by current (external) ioreq servers are not needed for internal ones, and hence have been placed inside of a struct and packed in an union together with the only internal specific fie

[Xen-devel] [PATCH v3 09/10] ioreq: split the code to detect PCI config space accesses

2019-09-30 Thread Roger Pau Monne
Place the code that converts a PIO/COPY ioreq into a PCI_CONFIG one into a separate function, and adjust the code to make use of this newly introduced function. No functional change intended. Signed-off-by: Roger Pau Monné --- Changes since v1: - New in this version. --- xen/arch/x86/hvm/ioreq

[Xen-devel] [PATCH v3 07/10] ioreq: allow decoding accesses to MMCFG regions

2019-09-30 Thread Roger Pau Monne
Pick up on the infrastructure already added for vPCI and allow ioreq to decode accesses to MMCFG regions registered for a domain. This infrastructure is still only accessible from internal callers, so MMCFG regions can only be registered from the internal domain builder used by PVH dom0. Note that

[Xen-devel] [PATCH v3 05/10] ioreq: allow dispatching ioreqs to internal servers

2019-09-30 Thread Roger Pau Monne
Internal ioreq servers will be processed first due to the implementation of FOR_EACH_IOREQ_SERVER, and ioreqs are dispatched simply by calling the handler function. Signed-off-by: Roger Pau Monné Reviewed-by: Paul Durrant --- Changes since v2: - Have a single condition for buffered ioreqs. Cha

[Xen-devel] [PATCH] xen-blkfront: switch kcalloc to kvcalloc for large array allocation

2019-05-03 Thread Roger Pau Monne
There's no reason to request physically contiguous memory for those allocations. Reported-by: Ian Jackson Signed-off-by: Roger Pau Monné --- Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Stefano Stabellini Cc: Konrad Rzeszutek Wilk Cc: Jens Axboe Cc: xen-devel@lists.xenproject.org Cc: linux-bl.

[Xen-devel] [PATCH 5/5] pci: switch PCI capabilities related functions to use pci_sbdf_t

2019-05-10 Thread Roger Pau Monne
Since pci_dev already has a pci_sbdf_t field switch the capability related functions SBDF parameters to a single pci_sbdf_t parameter. No functional change expected. Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc: Andrew Cooper Cc: Wei Liu Cc: George Dunlap Cc: Ian Jackson Cc: Julien

[Xen-devel] [PATCH 3/5] pci: switch pci_conf_{read/write} to use pci_sbdf_t

2019-05-10 Thread Roger Pau Monne
pci_dev already uses pci_sbdf_t, so propagate the usage of the type to pci_conf functions in order to shorten the calls when made from a pci_dev struct. No functional change intended. Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc: Andrew Cooper Cc: Wei Liu Cc: George Dunlap Cc: Ian J

[Xen-devel] [PATCH 2/5] pci: use function generation macros for pci_config_{write, read}

2019-05-10 Thread Roger Pau Monne
This avoids code duplication between the helpers. No functional change intended. Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc: Andrew Cooper Cc: Wei Liu --- xen/arch/x86/x86_64/pci.c | 140 -- 1 file changed, 57 insertions(+), 83 deletions(-) dif

[Xen-devel] [PATCH 4/5] print: introduce a format specifier for pci_sbdf_t

2019-05-10 Thread Roger Pau Monne
The new format specifier is '%pp', and prints a pci_sbdf_t using the seg:bus:dev.func format. Replace all SBDFs printed using '%04x:%02x:%02x.%u' to use the new format specifier. No functional change expected. Signed-off-by: Roger Pau Monné --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jacks

[Xen-devel] [PATCH 1/5] pci: use pci_sbdf_t in pci_dev

2019-05-10 Thread Roger Pau Monne
This patch replaces the seg, bus and devfn fields of the struct and fixes the callers. While there instances of u have also been replaced with uint_t. No functional change intended. Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc: Andrew Cooper Cc: Wei Liu Cc: George Dunlap Cc: Ian Jac

[Xen-devel] [PATCH 0/5] pci: expand usage of pci_sbdf_t

2019-05-10 Thread Roger Pau Monne
lds, hence this patch set. Note there's still more low hanging fruit that could benefit from switching to pci_sbdf_t, this patch series just changes some of the more core pci functions to use pci_sbdf_t. This series should not introduce any functional changes. Roger Pau Monne (5): pci: us

[Xen-devel] [PATCH] pvshim: make PV shim build selectable from configure

2019-05-14 Thread Roger Pau Monne
So a user can decide whether to compile a PV shim as part of the tools build. Note that the default behavior is preserved, which is to build a PV shim when the target architecture is x86. Requested-by: Olaf Hering Signed-off-by: Roger Pau Monné --- NOTE: run autogen.sh after applying. --- Cc: Ia

[Xen-devel] [PATCH v2] pvshim: make PV shim build selectable from configure

2019-05-14 Thread Roger Pau Monne
So a user can decide whether to compile a PV shim as part of the tools build. Note that the default behavior is preserved, which is to build a PV shim when the target or host (if target is unset) architecture is 64bit x86. Requested-by: Olaf Hering Signed-off-by: Roger Pau Monné --- NOTE: run au

[Xen-devel] [PATCH] x86: fix alternative_callN

2019-05-22 Thread Roger Pau Monne
alternative_callN using inline assemble to generate the alternative patch sites should be using the ALTERNATIVE C preprocessor macro rather than the ALTERNATIVE assembly macro, the more that using the assembly macro in an inline assembly instance causes the following error on llvm based toolchains:

[Xen-devel] [PATCH v2] x86: fix alternative_callN usage of ALTERNATIVE asm macro

2019-05-22 Thread Roger Pau Monne
alternative_callN using inline assembly to generate the alternative patch sites should be using the ALTERNATIVE C preprocessor macro rather than the ALTERNATIVE assembly macro, the more that using the assembly macro in an inline assembly instance causes the following error on llvm based toolchains:

[Xen-devel] [BACKPORT] xen/pvh: correctly setup the PV EFI interface for dom0

2019-05-27 Thread Roger Pau Monne
commit 72813bfbf0276a97c82af038efb5f02dcdd9e310 upstream This involves initializing the boot params EFI related fields and the efi global variable. Without this fix a PVH dom0 doesn't detect when booted from EFI, and thus doesn't support accessing any of the EFI related data. Reported-by: PGNet

[Xen-devel] [PATCH v3] x86: remove alternative_callN usage of ALTERNATIVE asm macro

2019-05-29 Thread Roger Pau Monne
There is a bug in llvm that needs to be fixed before switching to use the alternative assembly macros in inline assembly call sites. Therefore alternative_callN using inline assembly to generate the alternative patch sites should be using the ALTERNATIVE C preprocessor macro rather than the ALTERNA

[Xen-devel] [PATCH] automation: fix typo in comment

2019-05-30 Thread Roger Pau Monne
Signed-off-by: Roger Pau Monné --- Cc: Doug Goldstein Cc: Wei Liu --- automation/scripts/containerize | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/automation/scripts/containerize b/automation/scripts/containerize index a7809b3010..474530f945 100755 --- a/automation/script

[Xen-devel] [PATCH] automation: add clang and lld 8 tests to gitlab

2019-05-30 Thread Roger Pau Monne
Using clang and lld 8 requires installing the packages from the official llvm apt repositories, so modify the Debian Docker files for stretch and unstable to add the llvm repo and install clang and lld from it. Also add some jobs to test building Xen with clang 8 and lld. Signed-off-by: Roger Pau

[Xen-devel] [PATCH v2] automation: add clang and lld 8 tests to gitlab

2019-05-31 Thread Roger Pau Monne
Using clang and lld 8 requires installing the packages from the official llvm apt repositories, so modify the Debian Docker files for stretch and unstable to add the llvm repo and install clang and lld from it. Also add some jobs to test building Xen with clang 8 and lld. Signed-off-by: Roger Pau

[Xen-devel] [PATCH v2 01/12] pci: introduce a devfn field to pci_sbdf_t

2019-06-06 Thread Roger Pau Monne
This is equivalent to the current extfunc field in term of contents. Switch the two current users of extfunc to use devfn instead for correctness. No functional change. Requested-by: Jan Beulich Signed-off-by: Roger Pau Monné --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan B

[Xen-devel] [PATCH v2 02/12] pci: introduce a pci_sbdf_t field to pci_dev

2019-06-06 Thread Roger Pau Monne
And use an union with the current seg, bus and devfn fields to make fields point to the same underlying data. No functional change. Suggested-by: Jan Beulich Signed-off-by: Roger Pau Monné --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Julien Grall Cc: Konrad R

[Xen-devel] [PATCH v2 06/12] pci: switch pci_conf_read8 to use pci_sbdf_t

2019-06-06 Thread Roger Pau Monne
This reduces the number of parameters of the function to two, and simplifies some of the calling sites. Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc: Andrew Cooper Cc: Wei Liu Cc: George Dunlap Cc: Ian Jackson Cc: Julien Grall Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc:

[Xen-devel] [PATCH v2 00/12] pci: expand usage of pci_sbdf_t

2019-06-06 Thread Roger Pau Monne
ging fruit that could benefit from switching to pci_sbdf_t, this patch series just changes some of the more core pci functions to use pci_sbdf_t. This series should not introduce any functional changes. Roger Pau Monne (12): pci: introduce a devfn field to pci_sbdf_t pci: introduce a pci_

[Xen-devel] [PATCH v2 10/12] pci: switch pci_conf_write16 to use pci_sbdf_t

2019-06-06 Thread Roger Pau Monne
This reduces the number of parameters of the function to two, and simplifies some of the calling sites. Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc: Andrew Cooper Cc: Wei Liu Cc: George Dunlap Cc: Ian Jackson Cc: Julien Grall Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc:

[Xen-devel] [PATCH v2 12/12] print: introduce a format specifier for pci_sbdf_t

2019-06-06 Thread Roger Pau Monne
The new format specifier is '%pp', and prints a pci_sbdf_t using the seg:bus:dev.func format. Replace all SBDFs printed using '%04x:%02x:%02x.%u' to use the new format specifier. No functional change intended. Signed-off-by: Roger Pau Monné --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jacks

[Xen-devel] [PATCH v2 09/12] pci: switch pci_conf_write8 to use pci_sbdf_t

2019-06-06 Thread Roger Pau Monne
This reduces the number of parameters of the function to two, and simplifies some of the calling sites. Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc: Andrew Cooper Cc: Wei Liu Cc: "Roger Pau Monné" Cc: George Dunlap Cc: Ian Jackson Cc: Julien Grall Cc: Konrad Rzeszutek Wilk Cc: S

[Xen-devel] [PATCH v2 11/12] pci: switch pci_conf_write32 to use pci_sbdf_t

2019-06-06 Thread Roger Pau Monne
This reduces the number of parameters of the function to two, and simplifies some of the calling sites. Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc: Andrew Cooper Cc: Wei Liu Cc: George Dunlap Cc: Ian Jackson Cc: Julien Grall Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc:

[Xen-devel] [PATCH v2 07/12] pci: switch pci_conf_read16 to use pci_sbdf_t

2019-06-06 Thread Roger Pau Monne
This reduces the number of parameters of the function to two, and simplifies some of the calling sites. Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc: Andrew Cooper Cc: Wei Liu Cc: George Dunlap Cc: Ian Jackson Cc: Julien Grall Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc:

[Xen-devel] [PATCH v2 04/12] pci: make PCI_SBDF2 return a pci_sbdf_t

2019-06-06 Thread Roger Pau Monne
And fix it's only caller. Signed-off-by: Roger Pau Monné --- Cc: Kevin Tian Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Julien Grall Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc: Tim Deegan Cc: Wei Liu --- xen/drivers/passthrough/vtd/dmar.c | 2 +- xe

[Xen-devel] [PATCH v2 05/12] pci: make PCI_SBDF3 return a pci_sbdf_t

2019-06-06 Thread Roger Pau Monne
And fix it's callers. Signed-off-by: Roger Pau Monné --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Julien Grall Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc: Tim Deegan Cc: Wei Liu --- xen/common/compat/memory.c| 4 ++-- xen/common/memory.c

[Xen-devel] [PATCH v2 03/12] pci: make PCI_SBDF return a pci_sbdf_t

2019-06-06 Thread Roger Pau Monne
And fix it's only caller. Signed-off-by: Roger Pau Monné --- Cc: Kevin Tian Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Julien Grall Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc: Tim Deegan Cc: Wei Liu --- Changes since v1: - New in this version. ---

[Xen-devel] [PATCH v2 08/12] pci: switch pci_conf_read32 to use pci_sbdf_t

2019-06-06 Thread Roger Pau Monne
This reduces the number of parameters of the function to two, and simplifies some of the calling sites. Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc: Andrew Cooper Cc: Wei Liu Cc: George Dunlap Cc: Ian Jackson Cc: Julien Grall Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc:

[Xen-devel] [PATCH v3 03/13] pci: introduce a pci_sbdf_t field to pci_dev

2019-06-07 Thread Roger Pau Monne
And use an union with the current seg, bus and devfn fields to make fields point to the same underlying data. No functional change. Suggested-by: Jan Beulich Signed-off-by: Roger Pau Monné Reviewed-by: Paul Durrant Acked-by: Jan Beulich --- Changes since v2: - Constify the union instead of e

[Xen-devel] [PATCH v3 05/13] pci: make PCI_SBDF2 return a pci_sbdf_t

2019-06-07 Thread Roger Pau Monne
And fix it's only caller. Signed-off-by: Roger Pau Monné --- Cc: Kevin Tian Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Julien Grall Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc: Tim Deegan Cc: Wei Liu --- xen/drivers/passthrough/vtd/dmar.c | 2 +- xe

[Xen-devel] [PATCH v3 01/13] pci: rename func field to fn

2019-06-07 Thread Roger Pau Monne
In preparation for adding a devfn field. This makes the naming more consistent, as the devfn field encloses both the dev and the fn fields. No functional change intended. Requested-by: Paul Durrant Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc: Andrew Cooper Cc: George Dunlap Cc: Ian

[Xen-devel] [PATCH v3 06/13] pci: make PCI_SBDF3 return a pci_sbdf_t

2019-06-07 Thread Roger Pau Monne
And fix it's callers. Signed-off-by: Roger Pau Monné --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Julien Grall Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc: Tim Deegan Cc: Wei Liu --- xen/common/compat/memory.c| 4 ++-- xen/common/memory.c

[Xen-devel] [PATCH v3 10/13] pci: switch pci_conf_write8 to use pci_sbdf_t

2019-06-07 Thread Roger Pau Monne
This reduces the number of parameters of the function to two, and simplifies some of the calling sites. Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc: Andrew Cooper Cc: Wei Liu Cc: "Roger Pau Monné" Cc: George Dunlap Cc: Ian Jackson Cc: Julien Grall Cc: Konrad Rzeszutek Wilk Cc: S

[Xen-devel] [PATCH v3 02/13] pci: introduce a devfn field to pci_sbdf_t

2019-06-07 Thread Roger Pau Monne
This is equivalent to the current extfunc field in term of contents. Switch the two current users of extfunc to use devfn instead for correctness. No functional change. Requested-by: Jan Beulich Signed-off-by: Roger Pau Monné --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan B

[Xen-devel] [PATCH v3 00/13] pci: expand usage of pci_sbdf_t

2019-06-07 Thread Roger Pau Monne
ging fruit that could benefit from switching to pci_sbdf_t, this patch series just changes some of the more core pci functions to use pci_sbdf_t. This series should not introduce any functional changes. Roger Pau Monne (13): pci: rename func field to fn pci: introduce a devfn field to p

[Xen-devel] [PATCH v3 04/13] pci: make PCI_SBDF return a pci_sbdf_t

2019-06-07 Thread Roger Pau Monne
And fix it's only caller. Signed-off-by: Roger Pau Monné Reviewed-by: Paul Durrant --- Cc: Kevin Tian Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Julien Grall Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc: Tim Deegan Cc: Wei Liu --- Changes since v1:

[Xen-devel] [PATCH v3 07/13] pci: switch pci_conf_read8 to use pci_sbdf_t

2019-06-07 Thread Roger Pau Monne
This reduces the number of parameters of the function to two, and simplifies some of the calling sites. Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc: Andrew Cooper Cc: Wei Liu Cc: George Dunlap Cc: Ian Jackson Cc: Julien Grall Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc:

[Xen-devel] [PATCH v3 11/13] pci: switch pci_conf_write16 to use pci_sbdf_t

2019-06-07 Thread Roger Pau Monne
This reduces the number of parameters of the function to two, and simplifies some of the calling sites. Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc: Andrew Cooper Cc: Wei Liu Cc: George Dunlap Cc: Ian Jackson Cc: Julien Grall Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc:

[Xen-devel] [PATCH v3 12/13] pci: switch pci_conf_write32 to use pci_sbdf_t

2019-06-07 Thread Roger Pau Monne
This reduces the number of parameters of the function to two, and simplifies some of the calling sites. Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc: Andrew Cooper Cc: Wei Liu Cc: George Dunlap Cc: Ian Jackson Cc: Julien Grall Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc:

[Xen-devel] [PATCH v3 09/13] pci: switch pci_conf_read32 to use pci_sbdf_t

2019-06-07 Thread Roger Pau Monne
This reduces the number of parameters of the function to two, and simplifies some of the calling sites. Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc: Andrew Cooper Cc: Wei Liu Cc: George Dunlap Cc: Ian Jackson Cc: Julien Grall Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc:

[Xen-devel] [PATCH v3 08/13] pci: switch pci_conf_read16 to use pci_sbdf_t

2019-06-07 Thread Roger Pau Monne
This reduces the number of parameters of the function to two, and simplifies some of the calling sites. Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc: Andrew Cooper Cc: Wei Liu Cc: George Dunlap Cc: Ian Jackson Cc: Julien Grall Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc:

[Xen-devel] [PATCH v3 13/13] print: introduce a format specifier for pci_sbdf_t

2019-06-07 Thread Roger Pau Monne
The new format specifier is '%pp', and prints a pci_sbdf_t using the seg:bus:dev.func format. Replace all SBDFs printed using '%04x:%02x:%02x.%u' to use the new format specifier. No functional change intended. Signed-off-by: Roger Pau Monné --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jacks

[Xen-devel] [PATCH v3] automation: add clang and lld 8 tests to gitlab

2019-06-10 Thread Roger Pau Monne
Using clang and lld 8 requires installing the packages from the official llvm apt repositories, so modify the Debian Docker files for stretch and unstable to add the llvm repo and install clang and lld from it. Also add some jobs to test building Xen with clang 8 and lld. Signed-off-by: Roger Pau

[Xen-devel] [PATCH v4] automation: add clang and lld 8 tests to gitlab

2019-06-10 Thread Roger Pau Monne
Using clang and lld 8 requires installing the packages from the official llvm apt repositories, so modify the Debian Docker files for stretch and unstable to add the llvm repo and install clang and lld from it. Also add some jobs to test building Xen with clang 8 and lld. Signed-off-by: Roger Pau

[Xen-devel] [PATCH 3/5] x86/dom0: add missing flag to printf format for PVH

2018-12-27 Thread Roger Pau Monne
No functional change. Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc: Andrew Cooper Cc: Wei Liu --- xen/arch/x86/hvm/dom0_build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/hvm/dom0_build.c b/xen/arch/x86/hvm/dom0_build.c index 24cc15f28b..c0eb9cb9

[Xen-devel] [PATCH 1/5] x86/dom0: fix wording of PVH Dom0 error message

2018-12-27 Thread Roger Pau Monne
No functional change. Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc: Andrew Cooper Cc: Wei Liu --- xen/arch/x86/hvm/dom0_build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/hvm/dom0_build.c b/xen/arch/x86/hvm/dom0_build.c index 12c20a4b66..91dc27dc

[Xen-devel] [PATCH 2/5] x86/dom0: allow stealing RAM from a region that starts in the low 1MB

2018-12-27 Thread Roger Pau Monne
As long as the memory stolen is always above 1MB. This allows the PVH Dom0 builder to be used on a memory map that only has a single RAM region starting at 0. Reported-by: Andrew Cooper Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc: Andrew Cooper Cc: Wei Liu --- xen/arch/x86/hvm/dom0

[Xen-devel] [PATCH 4/5] x86/dom0: propagate guest_physmap_add_page error code

2018-12-27 Thread Roger Pau Monne
No functional change. Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc: Andrew Cooper Cc: Wei Liu --- xen/arch/x86/hvm/dom0_build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/hvm/dom0_build.c b/xen/arch/x86/hvm/dom0_build.c index c0eb9cb953..7ea29c44

[Xen-devel] [PATCH 0/5] x86/dom0: minor fixes and improvements to PVH builder

2018-12-27 Thread Roger Pau Monne
Hello, This series contains some trivial bug fixes for the PVH dom0 builder and an improvement when filling the p2m so that alignment is taken into account when allocating and populating the p2m. Thanks, Roger. Roger Pau Monne (5): x86/dom0: fix wording of PVH Dom0 error message x86/dom0

[Xen-devel] [PATCH 5/5] x86/dom0: take alignment into account when populating p2m in PVH mode

2018-12-27 Thread Roger Pau Monne
Current code that allocates memory and populates the p2m for PVH Dom0 doesn't take the address alignment into account, this can lead to high order allocations that start on a non-aligned address to be broken down into lower order entries on the p2m page tables. Fix this by taking into account the

  1   2   3   4   5   6   7   8   9   10   >