[Xen-devel] [PATCH] libxl/pvh: force PVH guests to use the xenstore shutdown

2017-12-19 Thread Roger Pau Monne
There's no other way to shutdown a PVH guest at the moment. Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson Cc: Wei Liu --- tools/libxl/libxl_domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[Xen-devel] [PATCH 1/2] x86/dom0: remove autotranslate leftovers

2017-12-19 Thread Roger Pau Monne
Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc: Andrew Cooper --- xen/arch/x86/pv/dom0_build.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/xen/arch/x86/pv/dom0_build.c

[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

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

2017-12-01 Thread Roger Pau Monne
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 build helpers for FreeBSD osstest

[Xen-devel] [PATCH for-4.11] libacpi: fixes for iasl >= 20180427

2018-05-09 Thread Roger Pau Monne
New versions of iasl have introduced improved C file generation, as reported in the changelog: iASL: Enhanced the -tc option (which creates an AML hex file in C, suitable for import into a firmware project): 1) Create a unique name for the table, to simplify use of multiple SSDTs. 2) Add a

[Xen-devel] [PATCH v2 3/3] xen: share start flags between PV and PVH

2018-05-09 Thread Roger Pau Monne
Use a global variable to store the start flags for both PV and PVH. This allows the xen_initial_domain macro to work properly on PVH. Note that ARM is also switched to use the new variable. Signed-off-by: Boris Ostrovsky Signed-off-by: Roger Pau Monné

[Xen-devel] [PATCH v2 1/3] xen/pvh: enable and set default MTRR type

2018-05-09 Thread Roger Pau Monne
On PVH MTRR is not initialized by the firmware (because there's no firmware), so the kernel is started with MTRR disabled which means all memory accesses are UC. So far there have been no issues (ie: slowdowns) caused by this because PVH only supported DomU mode without passed-through devices, so

[Xen-devel] [PATCH] pci: treat class 0 devices as endpoints

2018-05-08 Thread Roger Pau Monne
Class 0 devices are legacy pre PCI 2.0 devices that didn't have a class code. Treat them as endpoints, so that they can be handled by the IOMMU and properly passed-through to the hardware domain. Such device has been seen on a Super Micro server, lspci -vv reports: 00:13.0 Non-VGA unclassified

[Xen-devel] [PATCH 0/2] vpci/msi: fix updating already bound MSI interrupts

2018-05-08 Thread Roger Pau Monne
this incorrect behavior introduce a new update helper that should be used to update the bindings of an already enabled group of MSI interrupts. Thanks, Roger. Roger Pau Monne (2): vpci/msi: split code to bind pirq vpci/msi: fix update of bound MSI interrupts xen/arch/x86/hvm/vmsi.c | 96

[Xen-devel] [PATCH 2/2] vpci/msi: fix update of bound MSI interrupts

2018-05-08 Thread Roger Pau Monne
Current update process of already bound MSI interrupts is wrong because unmap_domain_pirq calls pci_disable_msi, which disables MSI interrupts on the device. On the other hand map_domain_pirq doesn't enable MSI, so the current update process of already enabled MSI entries is wrong because MSI

[Xen-devel] [PATCH 1/2] vpci/msi: split code to bind pirq

2018-05-08 Thread Roger Pau Monne
And put it in a separate update function. This is required in order to improve binding of MSI PIRQs when using vPCI. No functional change. Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc: Andrew Cooper ---

[Xen-devel] [PATCH RFC] libxl: set 1GB MMIO hole for PVH

2018-05-09 Thread Roger Pau Monne
This prevents page-shattering, by being able to populate the RAM regions below 4GB using 1GB pages, provided the guest memory size is set to a multiple of a GB. Note that there are some special and ACPI pages in the MMIO hole that will be populated using smaller order pages, but those shouldn't

[Xen-devel] [PATCH] vhpet: check that the set interrupt route is valid

2018-05-10 Thread Roger Pau Monne
The value written by the guest must be valid according to the mask provided in the interrupt routing capabilities register. If the interrupt is not valid set it to the first valid IRQ in the capabilities field if the timer is enabled, else just clear the field. Also refuse to start any timer that

[Xen-devel] [PATCH 4/5] libxc/pvh: set default MTRR type to write-back

2018-05-10 Thread Roger Pau Monne
And enable MTRR. This allows to provide a sane initial MTRR state for PVH DomUs. This will have to be expanded when pci-passthrough support is added to PVH guests, so that MMIO regions of devices are set as UC. Note that initial MTRR setup is done by hvmloader for HVM guests, that's not used by

[Xen-devel] [PATCH 2/5] hvm/mtrr: use the hardware number of variable ranges for Dom0

2018-05-10 Thread Roger Pau Monne
Expand the size of the variable ranges array to match the size of the underlying hardware, this is a preparatory change for copying the hardware MTRR state for Dom0. Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc: Andrew Cooper

[Xen-devel] [PATCH 3/5] hvm/mtrr: copy hardware state for Dom0

2018-05-10 Thread Roger Pau Monne
Copy the state found on the hardware when creating a PVH Dom0. Since the memory map provided to a PVH Dom0 is based on the native one using the same set of MTRR ranges should provide Dom0 with a sane MTRR state without having to manually build it in Xen. Signed-off-by: Roger Pau Monné

[Xen-devel] [PATCH 0/5] PVH MTRR initial state

2018-05-10 Thread Roger Pau Monne
, Roger. Roger Pau Monne (5): hvm/mtrr: add emacs local variables block with formatting info hvm/mtrr: use the hardware number of variable ranges for Dom0 hvm/mtrr: copy hardware state for Dom0 libxc/pvh: set default MTRR type to write-back docs/pvh: document initial MTRR state docs/misc

[Xen-devel] [PATCH 5/5] docs/pvh: document initial MTRR state

2018-05-10 Thread Roger Pau Monne
Provided to both Dom0 and DomUs. Signed-off-by: Roger Pau Monné --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Julien Grall

[Xen-devel] [PATCH v2 3/6] hvm/mtrr: use the hardware number of variable ranges for Dom0

2018-05-15 Thread Roger Pau Monne
Expand the size of the variable ranges array to match the size of the underlying hardware, this is a preparatory change for copying the hardware MTRR state for Dom0. Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc: Andrew Cooper

[Xen-devel] [PATCH v2 5/6] libxc/pvh: set default MTRR type to write-back

2018-05-15 Thread Roger Pau Monne
And enable MTRR. This allows to provide a sane initial MTRR state for PVH DomUs. This will have to be expanded when pci-passthrough support is added to PVH guests, so that MMIO regions of devices are set as UC. Note that initial MTRR setup is done by hvmloader for HVM guests, that's not used by

[Xen-devel] [PATCH v2 6/6] docs/pvh: document initial MTRR state

2018-05-15 Thread Roger Pau Monne
Provided to both Dom0 and DomUs. Signed-off-by: Roger Pau Monné --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Julien Grall

[Xen-devel] [PATCH v2 1/6] hvm/mtrr: add emacs local variables block with formatting info

2018-05-15 Thread Roger Pau Monne
Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc: Andrew Cooper --- xen/arch/x86/hvm/mtrr.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c index

[Xen-devel] [PATCH v2 0/6] PVH MTRR initial stat

2018-05-15 Thread Roger Pau Monne
, Roger. Roger Pau Monne (6): hvm/mtrr: add emacs local variables block with formatting info mtrr: introduce mask to get VCNT from MTRRcap MSR hvm/mtrr: use the hardware number of variable ranges for Dom0 hvm/mtrr: copy hardware state for Dom0 libxc/pvh: set default MTRR type to write-back

[Xen-devel] [PATCH v2 2/6] mtrr: introduce mask to get VCNT from MTRRcap MSR

2018-05-15 Thread Roger Pau Monne
No functional change. Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc: Andrew Cooper --- xen/arch/x86/cpu/mtrr/main.c| 2 +- xen/arch/x86/hvm/mtrr.c | 6 +++--- xen/include/asm-x86/msr-index.h | 2 ++ 3

[Xen-devel] [PATCH v2 4/6] hvm/mtrr: copy hardware state for Dom0

2018-05-15 Thread Roger Pau Monne
Copy the state found on the hardware when creating a PVH Dom0. Since the memory map provided to a PVH Dom0 is based on the native one using the same set of MTRR ranges should provide Dom0 with a sane MTRR state without having to manually build it in Xen. Signed-off-by: Roger Pau Monné

[Xen-devel] [PATCH v2 3/3] vpci/msi: fix update of bound MSI interrupts

2018-05-15 Thread Roger Pau Monne
Current update process of already bound MSI interrupts is wrong because unmap_domain_pirq calls pci_disable_msi, which disables MSI interrupts on the device. On the other hand map_domain_pirq doesn't enable MSI, so the current update process of already enabled MSI entries is wrong because MSI

[Xen-devel] [PATCH v2 1/3] vpci/msi: fix unbind loop

2018-05-15 Thread Roger Pau Monne
The current unbind loop on failure in vpci_msi_enable is wrong and will only work correctly if the initial pirq is 0. Fix this by adding a proper bound. Reported-by: Jan Beulich Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc:

[Xen-devel] [PATCH v2 2/3] vpci/msi: split code to bind pirq

2018-05-15 Thread Roger Pau Monne
And put it in a separate update function. This is required in order to improve binding of MSI PIRQs when using vPCI. No functional change. Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc: Andrew Cooper ---

[Xen-devel] [PATCH for-4.11] x86/cacheattr: fix mtrr_pat_not_equal

2018-05-17 Thread Roger Pau Monne
The function is supposed to return whether the MTRR and PAT state of two CPUs match. Currently this is not properly done because the test for the deftype and the enable bits required both the deftype and the enable bits to be different, while just one of those fields being different can already

[Xen-devel] [PATCH v3 6/8] hvm/mtrr: copy hardware state for Dom0

2018-05-22 Thread Roger Pau Monne
Copy the state found on the hardware when creating a PVH Dom0. Since the memory map provided to a PVH Dom0 is based on the native one using the same set of MTRR ranges should provide Dom0 with a sane MTRR state without having to manually build it in Xen. Signed-off-by: Roger Pau Monné

[Xen-devel] [PATCH v3 0/8] PVH MTRR initial state

2018-05-22 Thread Roger Pau Monne
been rebased on top of a couple of fixes/improvements from Jan, which are also included in the series. Thanks, Roger. Jan Beulich (2): x86/HVM: improve MTRR load checks x86/mtrr: split "enabled" field into two boolean flags Roger Pau Monne (6): mtrr: introduce mask to get VCNT from M

[Xen-devel] [PATCH v3 4/8] hvm/mtrr: add emacs local variables block with formatting info

2018-05-22 Thread Roger Pau Monne
Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc: Andrew Cooper --- xen/arch/x86/hvm/mtrr.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c index

[Xen-devel] [PATCH v3 8/8] docs/pvh: document initial MTRR state

2018-05-22 Thread Roger Pau Monne
Provided to both Dom0 and DomUs. Signed-off-by: Roger Pau Monné --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Julien Grall

[Xen-devel] [PATCH v3 7/8] libxc/pvh: set default MTRR type to write-back

2018-05-22 Thread Roger Pau Monne
And enable MTRR. This allows to provide a sane initial MTRR state for PVH DomUs. This will have to be expanded when pci-passthrough support is added to PVH guests, so that MMIO regions of devices are set as UC. Note that initial MTRR setup is done by hvmloader for HVM guests, that's not used by

[Xen-devel] [PATCH v3 3/8] x86/mtrr: split "enabled" field into two boolean flags

2018-05-22 Thread Roger Pau Monne
From: Jan Beulich The code hopefully is more readable this way. Also switch have_fixed to bool, seeing that it already is used as a boolean. Signed-off-by: Jan Beulich [switched to use MASK_*] Signed-off-by: Roger Pau Monné --- Cc:

[Xen-devel] [PATCH v3 2/8] x86/HVM: improve MTRR load checks

2018-05-22 Thread Roger Pau Monne
From: Jan Beulich We should not assume that the incoming set of values contains exactly MTRR_VCNT variable range MSRs. Permit a smaller amount and reject a bigger one. As a result the save path then also needs to no longer use a fixed upper bound, in turn requiring unused

[Xen-devel] [PATCH v3 1/8] mtrr: introduce mask to get VCNT from MTRRcap MSR

2018-05-22 Thread Roger Pau Monne
No functional change. Signed-off-by: Roger Pau Monné Reviewed-by: Jan Beulich --- Cc: Jan Beulich Cc: Andrew Cooper --- Changes since v3: - Rebase on top of Jan's MTRR fixes. Changes since v2: - Use

[Xen-devel] [PATCH v3 2/6] vhpet: check that the set interrupt route is valid

2018-06-08 Thread Roger Pau Monne
The value written by the guest must be valid according to the mask provided in the interrupt routing capabilities register. If the interrupt is not valid set it to the first valid IRQ in the capabilities field if the timer is enabled, else just clear the field. Also refuse to start any timer that

[Xen-devel] [PATCH v3 1/6] vpt: fix create_periodic_time to use the irq parameter

2018-06-08 Thread Roger Pau Monne
Instead of the stale value inside the periodic_time struct. Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc: Andrew Cooper --- xen/arch/x86/hvm/vpt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/hvm/vpt.c b/xen/arch/x86/hvm/vpt.c index

[Xen-devel] [PATCH v3 5/6] vpt: add support for level interrupts

2018-06-08 Thread Roger Pau Monne
Level trigger interrupts will be asserted regardless of whether the interrupt is masked, and thus the callback will also be executed. Add a new 'level' parameter to create_periodic_time in order to create level triggered timers. Note that none of the current users of vpt are switched to use

[Xen-devel] [PATCH v3 4/6] vpt: split part of pt_intr_post into a separate helper

2018-06-08 Thread Roger Pau Monne
No functional change. Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc: Andrew Cooper --- xen/arch/x86/hvm/vpt.c | 67 +++--- 1 file changed, 36 insertions(+), 31 deletions(-) diff --git a/xen/arch/x86/hvm/vpt.c b/xen/arch/x86/hvm/vpt.c index

[Xen-devel] [PATCH XTF] add HPET functional test

2018-06-08 Thread Roger Pau Monne
In order to test HPET level trigger interrupts. Note that the test doesn't check that the interrupt is injected correctly, only that the status bits are properly set an acknowledged when using HPET with level triggered interrupts. Signed-off-by: Roger Pau Monné --- Cc: Andrew Cooper ---

[Xen-devel] [PATCH v3 0/6] vhpet: add support for level triggered interrupts

2018-06-08 Thread Roger Pau Monne
implementation in Xen. Last patch adds some basic testing of hpet (mainly the level triggered interrupts) to xtf. Thanks, Roger. Roger Pau Monne (6): vpt: fix create_periodic_time to use the irq parameter vhpet: check that the set interrupt route is valid vpt: convert periodic_time fields to bool vpt

[Xen-devel] [PATCH v3 3/6] vpt: convert periodic_time fields to bool

2018-06-08 Thread Roger Pau Monne
No functional change. Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc: Andrew Cooper --- xen/include/asm-x86/hvm/vpt.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/xen/include/asm-x86/hvm/vpt.h b/xen/include/asm-x86/hvm/vpt.h index

[Xen-devel] [PATCH v3 6/6] vhpet: add support for level triggered interrupts

2018-06-08 Thread Roger Pau Monne
Level triggered interrupts are not an optional feature of HPET, and must be implemented in order to comply with the HPET specification. Implement them by adding a callback to the timer which sets the interrupt bit in the general interrupt status register. Further interrupts (in case of periodic

[Xen-devel] [PATCH v4 4/8] hvm/mtrr: add emacs local variables block with formatting info

2018-06-08 Thread Roger Pau Monne
Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc: Andrew Cooper --- xen/arch/x86/hvm/mtrr.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c index c181a7a3d0..2f8f8ddd8f 100644 --- a/xen/arch/x86/hvm/mtrr.c +++

[Xen-devel] [PATCH v4 3/8] x86/mtrr: split "enabled" field into two boolean flags

2018-06-08 Thread Roger Pau Monne
From: Jan Beulich The code hopefully is more readable this way. Also switch have_fixed to bool, seeing that it already is used as a boolean. Signed-off-by: Jan Beulich [switched to use MASK_*] Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc: Andrew Cooper ---

[Xen-devel] [PATCH v4 2/8] x86/HVM: improve MTRR load checks

2018-06-08 Thread Roger Pau Monne
From: Jan Beulich We should not assume that the incoming set of values contains exactly MTRR_VCNT variable range MSRs. Permit a smaller amount and reject a bigger one. As a result the save path then also needs to no longer use a fixed upper bound, in turn requiring unused space in the save

[Xen-devel] [PATCH v4 5/8] hvm/mtrr: use the hardware number of variable ranges for Dom0

2018-06-08 Thread Roger Pau Monne
Expand the size of the variable ranges array to match the size of the underlying hardware, this is a preparatory change for copying the hardware MTRR state for Dom0. Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc: Andrew Cooper --- Changes since v3: - Move the index check to

[Xen-devel] [PATCH v4 6/8] hvm/mtrr: copy hardware state for Dom0

2018-06-08 Thread Roger Pau Monne
Copy the state found on the hardware when creating a PVH Dom0. Since the memory map provided to a PVH Dom0 is based on the native one using the same set of MTRR ranges should provide Dom0 with a sane MTRR state without having to manually build it in Xen. Signed-off-by: Roger Pau Monné

[Xen-devel] [PATCH v4 8/8] docs/pvh: document initial MTRR state

2018-06-08 Thread Roger Pau Monne
Provided to both Dom0 and DomUs. 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 --- Changes since v2: - Add 'currently' to the first

[Xen-devel] [PATCH v3] xen: share start flags between PV and PVH

2018-06-08 Thread Roger Pau Monne
Use a global variable to store the start flags for both PV and PVH. This allows the xen_initial_domain macro to work properly on PVH. Note that ARM is also switched to use the new variable. Signed-off-by: Boris Ostrovsky Signed-off-by: Roger Pau Monné --- Cc: Boris Ostrovsky Cc: Juergen Gross

[Xen-devel] [PATCH v4 7/8] libxc/pvh: set default MTRR type to write-back

2018-06-08 Thread Roger Pau Monne
And enable MTRR. This allows to provide a sane initial MTRR state for PVH DomUs. This will have to be expanded when pci-passthrough support is added to PVH guests, so that MMIO regions of devices are set as UC. Note that initial MTRR setup is done by hvmloader for HVM guests, that's not used by

[Xen-devel] [PATCH v2] multiboot2: clarify usage of the address tag

2018-06-07 Thread Roger Pau Monne
Add a note to spell out that if the address tag is not present the file should be loaded using the elf header. Signed-off-by: Roger Pau Monné --- Cc: Daniel Kiper Cc: xen-devel@lists.xenproject.org --- Changes since v1: - s/elf/@sc{elf}/ - s/Multiboot/Multiboot2/ --- doc/multiboot.texi | 6

[Xen-devel] [PATCH v3] multiboot2: clarify usage of the address tag

2018-06-11 Thread Roger Pau Monne
Add a note to spell out that if the address tag is not present the file should be loaded using the elf header. Signed-off-by: Roger Pau Monné --- Cc: Daniel Kiper Cc: xen-devel@lists.xenproject.org --- Changes since v2: - Clarify that the address tag must be used if present. Changes since v1:

[Xen-devel] [PATCH] multiboot2: clarify usage of the address tag

2018-06-05 Thread Roger Pau Monne
Add a note to spell out that if the address tag is not present the file should be loaded using the elf header. Signed-off-by: Roger Pau Monné --- Cc: Daniel Kiper Cc: xen-devel@lists.xenproject.org --- doc/multiboot.texi | 6 ++ 1 file changed, 6 insertions(+) diff --git

[Xen-devel] [PATCH 2/4] tests: disable x86 emulator test harness when using clang

2018-07-02 Thread Roger Pau Monne
clang is not capable of building the x86 emulator test harness, so disconnect it from the clang build until it can be fixed. Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson Cc: Wei Liu --- tools/tests/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/tests/Makefile

[Xen-devel] [PATCH 1/4] firmware/seabios: fix build on systems with non GNU toolchains

2018-07-02 Thread Roger Pau Monne
SeaBIOS requires gcc and GNU ld in order to build, so allow setting SEABIOSCC and SEABIOSLD by the caller when building in order to pass the path to the compiler and linker that should be used when building SeaBIOS. Note that the LD32BIT-y variable was used by FreeBSD builds and is no longer

[Xen-devel] [PATCH 3/4] tests/xs: use ENOENT instead of ENODATA

2018-07-02 Thread Roger Pau Monne
ENODATA is not part of the standard set of errno values, so use ENOENT instead. This fixes the build on FreeBSD. Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson Cc: Wei Liu --- tools/tests/xenstore/xs-test.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git

[Xen-devel] [PATCH 2/3] osstest: set the make command to use for xen-build

2018-07-02 Thread Roger Pau Monne
The default make on FreeBSD is the BSD make, and Xen requires the GNU make in order to build. Set the make command based on the OS for the Xen build. Signed-off-by: Roger Pau Monné --- ts-xen-build | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ts-xen-build

[Xen-devel] [PATCH 0/4] xen: FreeBSD build fixes

2018-07-02 Thread Roger Pau Monne
Hello, This series contains some minor FreeBSD build fixes and improvements required in order to add a Xen build on FreeBSD to osstest. Thanks, Roger. Roger Pau Monne (4): firmware/seabios: fix build on systems with non GNU toolchains tests: disable x86 emulator test harness when using

[Xen-devel] [PATCH 0/3] osstest: initial support for building Xen on FreeBSD

2018-07-02 Thread Roger Pau Monne
://lists.xenproject.org/archives/html/xen-devel/2018-07/msg00048.html Thanks, Roger. Roger Pau Monne (3): osstest: remove duplicate set_freebsd_runvars osstest: set the make command to use for xen-build osstest: add FreeBSD Xen build job make-freebsd-flight | 48

[Xen-devel] [PATCH 3/3] osstest: add FreeBSD Xen build job

2018-07-02 Thread Roger Pau Monne
To both the FreeBSD and the xen-unstable flights. This is the runvar difference of a xen-unstable flight: +build-amd64-freebsd all_host_os freebsd +build-amd64-xsm-freebsd all_host_os freebsd +build-amd64-freebsd arch amd64 +build-amd64-xsm-freebsd arch

[Xen-devel] [PATCH 3/3] libxc: do not return a value from xc_cpuid_policy

2018-06-27 Thread Roger Pau Monne
None of the called functions return any errors, so there's no point in returning an int from xc_cpuid_policy. Signed-off-by: Roger Pau Monné --- tools/libxc/xc_cpuid_x86.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tools/libxc/xc_cpuid_x86.c

[Xen-devel] [PATCH 2/3] libxc: fix stale PVH comment

2018-06-27 Thread Roger Pau Monne
PVHv2 uses the HVM path, not the PV one. Signed-off-by: Roger Pau Monné --- tools/libxc/xc_cpuid_x86.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/libxc/xc_cpuid_x86.c b/tools/libxc/xc_cpuid_x86.c index 21537f06f1..364f802c0f 100644 ---

[Xen-devel] [PATCH 1/3] x86/cpuid: fix generation of auto cpuid header

2018-06-27 Thread Roger Pau Monne
The makefile rule to generate the cpuid-autogen.h header passes the whole list of dependencies to gen-cpuid.py but only the first dependency is actually needed. So far this seems to be harmless. Signed-off-by: Roger Pau Monné --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan

[Xen-devel] [PATCH 0/3] libxc/cpuid: minor fixes

2018-06-27 Thread Roger Pau Monne
Hello, This series contain some minor fixes for cpuid header file generation and a couple of fixes for libxc related cpuid functions. Thanks, Roger. Roger Pau Monne (3): x86/cpuid: fix generation of auto cpuid header libxc: fix stale PVH comment libxc: do not return a value from

[Xen-devel] [PATCH v3] x86/dom0: add extra RAM regions as UNUSABLE for PVH memory map

2018-05-03 Thread Roger Pau Monne
When running as PVH Dom0 the native memory map is used in order to craft a tailored memory map for Dom0 taking into account it's memory limit. Dom0 memory is always going to be smaller than the total amount of memory present on the host, so in order to prevent Dom0 from relocating PCI BARs over

[Xen-devel] [PATCH 3/3] xen: share start flags between PV and PVH

2018-05-03 Thread Roger Pau Monne
Use a global variable to store the start flags for both PV and PVH. This allows the xen_initial_domain macro to work properly on PVH. Signed-off-by: Boris Ostrovsky Signed-off-by: Roger Pau Monné --- Cc: Boris Ostrovsky

[Xen-devel] [PATCH 2/3] xen/store: do not store local values in xen_start_info

2018-05-03 Thread Roger Pau Monne
There's no need to store the xenstore page or event channel in xen_start_info if they are locally initialized. This also fixes PVH local xenstore initialization due to the lack of xen_start_info in that case. Signed-off-by: Boris Ostrovsky Signed-off-by: Roger Pau

[Xen-devel] [PATCH 1/3] xen/pvh: enable and set default MTRR type

2018-05-03 Thread Roger Pau Monne
On PVH MTRR is not initialized by the firmware (because there's no firmware), so the kernel is started with MTRR disabled which means all memory accesses are UC. So far there have been no issues (ie: slowdowns) caused by this because PVH only supported DomU mode without passed-through devices, so

[Xen-devel] [PATCH v2] x86/dom0: add extra RAM regions as UNUSABLE for PVH memory map

2018-05-03 Thread Roger Pau Monne
When running as PVH Dom0 the native memory map is used in order to craft a tailored memory map for Dom0 taking into account it's memory limit. Dom0 memory is always going to be smaller than the total amount of memory present on the host, so in order to prevent Dom0 from relocating PCI BARs over

[Xen-devel] [PATCH for-4.11] x86/dom0: add extra RAM regions as RESERVED for PVH memory map

2018-05-03 Thread Roger Pau Monne
When running as PVH Dom0 the native memory map is used in order to craft a tailored memory map for Dom0 taking into account it's memory limit. Dom0 memory is always going to be smaller than the total amount of memory present on the host, so in order to prevent Dom0 from relocating PCI BARs over

[Xen-devel] [PATCH v2] sched/null: skip vCPUs on the waitqueue that are blocked

2017-12-29 Thread Roger Pau Monne
Avoid scheduling vCPUs that are blocked, there's no point in assigning them to a pCPU because they are not going to run anyway. Since blocked vCPUs are not assigned to pCPUs after this change, force a rescheduling when a vCPU is brought up if it's on the waitqueue. Also when scheduling try to

[Xen-devel] [PATCH] x86/efi: fix build with linkers that support both coff-x86-64 and pe-x86-64

2018-01-05 Thread Roger Pau Monne
When using a linker that supports both formats the following error will be triggered: efi/buildid.o: file not recognized: File format is ambiguous efi/buildid.o: matching formats: coff-x86-64 pe-x86-64 Solve this by specifying the buildid.o format to pe-x86-64. Signed-off-by: Roger Pau Monné

[Xen-devel] [PATCH] x86/compat: fix compilation errors with clang 6

2018-01-23 Thread Roger Pau Monne
The following errors are generated when compiling Xen with clang 6: In file included from x86_64/asm-offsets.c:9: In file included from /root/src/xen/xen/include/xen/sched.h:8: In file included from /root/src/xen/xen/include/xen/shared.h:6: In file included from

[Xen-devel] [PATCH] xen/pvshim: fix GNTTABOP_query_size hypercall forwarding with SMAP

2018-01-26 Thread Roger Pau Monne
Disable SMAP in the shim before bouncing the hypercall, or else L0 will fail to get the hypercall buffer. Signed-off-by: Roger Pau Monné Reported-by: Fatih Acar --- Cc: Jan Beulich Cc: Andrew Cooper Cc:

[Xen-devel] [PATCH] x86: move declaration of the exception_table to C

2018-01-26 Thread Roger Pau Monne
This makes the code cleaner because there's no need to declare the exception_table in assembly, and also fixes the following error when using clang's integrated assembler: entry.S:834:15: error: unexpected token in '.rept' directive .rept 32 - ((. - exception_table) / 8) ^

[Xen-devel] [PATCH 3/6] xen/pvshim: identity pin shim vCPUs to pCPUs

2018-01-17 Thread Roger Pau Monne
Since VCPUOP_{up/down} already identity pins vCPU hotplug to pCPU hotplug also pin the vCPUs to the pCPUs in the scheduler. This prevent vCPU migration and should improve performance. While there also use __cpumask_set_cpu instead of cpumask_set_cpu, there's no need to use the locked variant.

[Xen-devel] [PATCH 0/6] xen/pvshim: fix for staging

2018-01-17 Thread Roger Pau Monne
pvshim_fixes_v1 Thanks, Roger. Roger Pau Monne (6): xen/pvshim: map vcpu_info earlier for APs xen/pvh: place the trampoline at page 0x1 xen/pvshim: identity pin shim vCPUs to pCPUs xen/pvshim: simplify replace_va_mapping code xen/pvshim: fix coding style issues firmware/shim: fix build process

[Xen-devel] [PATCH 2/6] xen/pvh: place the trampoline at page 0x1

2018-01-17 Thread Roger Pau Monne
Since PVH guest jump straight into trampoline_setup trampoline_phys is not initialized, thus the trampoline is relocated to address 0. This works, but has the undesirable effect of having VA 0 mapped to MFN 0, which means NULL pointed dereferences no longer trigger a page fault. In order to

[Xen-devel] [PATCH 6/6] firmware/shim: fix build process to use POSIX find options

2018-01-17 Thread Roger Pau Monne
The -printf find option is not POSIX compatible, so replace it with another rune. Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson Cc: Wei Liu --- tools/firmware/xen-dir/Makefile | 3 ++- 1 file changed, 2 insertions(+),

[Xen-devel] [PATCH v3 0/5] clang fixes

2018-01-29 Thread Roger Pau Monne
integrated assembler. Fully compiling Xen with clang's integrated assembler will require clang 4.0 or newer. This series has been tested with clang 3.5, clang 6.0 and gcc 6.4.0. Thanks, Roger. Roger Pau Monne (5): build: filter out command line assembler arguments x86/clang: fix build

[Xen-devel] [PATCH v3 2/5] x86/clang: fix build with indirect thunks

2018-01-29 Thread Roger Pau Monne
The build with clang is currently broken because clang integrated assembler requires asm macros to be declared inside the same inline asm declaration where they are used. In order to fix this always include indirect_thunk_asm.h in the same asm declaration where it's being used. This has been

[Xen-devel] [PATCH v3 1/5] build: filter out command line assembler arguments

2018-01-29 Thread Roger Pau Monne
If the assembler is not used. This happens when using cc -E or cc -S for example. GCC will just ignore the -Wa,... when the assembler is not called, but clang will complain loudly and fail. This is a preparatory change in order to pass assembler arguments when using clang. Signed-off-by: Roger

[Xen-devel] [PATCH v3 3/5] x86: fix indirect thunk usage of CONFIG_INDIRECT_THUNK

2018-01-29 Thread Roger Pau Monne
When indirect_thunk_asm.h is instantiated directly into assembly files CONFIG_INDIRECT_THUNK might not be defined, and thus using .if against it is wrong. Add a check to define CONFIG_INDIRECT_THUNK to 0 if not defined, so that using .if CONFIG_INDIRECT_THUNK is always correct. This suppresses

[Xen-devel] [PATCH v3 4/5] x86: move declaration of the exception_table to C

2018-01-29 Thread Roger Pau Monne
This makes the code cleaner because there's no need to declare the exception_table in assembly, and also fixes the following error when using clang's integrated assembler: entry.S:834:15: error: unexpected token in '.rept' directive .rept 32 - ((. - exception_table) / 8) ^

[Xen-devel] [PATCH v3 5/5] x86: remove usage of .skip with non-absolute expressions

2018-01-29 Thread Roger Pau Monne
Clang assembler doesn't support using .skip with non-absolute expressions: entry.S:109:15: error: expected absolute expression .skip .Lcr4_alt_end - .Lcr4_alt, 0x90 ^ This usage of .skip was to fill code sections with NOPs in order for them to be patched at run time if

[Xen-devel] [PATCH v2] x86: move declaration of the exception_table to C

2018-01-28 Thread Roger Pau Monne
This makes the code cleaner because there's no need to declare the exception_table in assembly, and also fixes the following error when using clang's integrated assembler: entry.S:834:15: error: unexpected token in '.rept' directive .rept 32 - ((. - exception_table) / 8) ^

[Xen-devel] [PATCH 2/3] pvh/dom0: pass address/length to pvh_acpi_table_allowed

2018-02-08 Thread Roger Pau Monne
The current usage of acpi_gbl_root_table_list inside the function is wrong. Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc: Andrew Cooper --- xen/arch/x86/hvm/dom0_build.c | 29 +++-- 1 file

[Xen-devel] [PATCH 1/3] pvh/dom0: init variables at declaration time

2018-02-08 Thread Roger Pau Monne
Also remove a couple of newlines at the start of function declarations. No functional change. Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc: Andrew Cooper --- xen/arch/x86/hvm/dom0_build.c | 17 + 1

[Xen-devel] [PATCH 3/3] pvh/dom0: whitelist PVH Dom0 ACPI tables

2018-02-08 Thread Roger Pau Monne
Signed-off-by: Roger Pau Monné --- xen/arch/x86/hvm/dom0_build.c | 31 ++- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/xen/arch/x86/hvm/dom0_build.c b/xen/arch/x86/hvm/dom0_build.c index 830b4345cc..82ee3fe237 100644 ---

[Xen-devel] [PATCH 0/3] pvh/dom0: switch to ACPI whitelisting

2018-02-08 Thread Roger Pau Monne
physmap. Thanks, Roger. Roger Pau Monne (3): pvh/dom0: init variables at declaration time pvh/dom0: pass address/length to pvh_acpi_table_allowed pvh/dom0: whitelist PVH Dom0 ACPI tables xen/arch/x86/hvm/dom0_build.c | 75 +-- 1 file changed, 37

[Xen-devel] [PATCH v4 4/7] kconfig/gcov: rename to coverage

2018-02-07 Thread Roger Pau Monne
So it can be used by both gcc and clang. Just add the Kconfig option and modify the makefiles so the llvm coverage specific code can be added in a follow up patch. Signed-off-by: Roger Pau Monné --- Cc: Andrew Cooper Cc: George Dunlap

[Xen-devel] [PATCH] osstest: add a pvinpvh test

2018-02-16 Thread Roger Pau Monne
The new shim tests uses the same approach as the PVH one, but doesn't differentiate between AMD and Intel. This is the (trimmed) diff of the output from mg-show-flight-runvars: +test-amd64-amd64-xl-pvshimall_host_di_version2017-12-14 +test-amd64-i386-xl-pvshim all_host_di_version

[Xen-devel] [PATCH] hvm/monitor: fix usage of the control register mask

2018-02-16 Thread Roger Pau Monne
Previous usage is not correct and would prevent certain updates from being notified to the monitor client. For example if (value ^ old) == (PGE | PSE) and mask == PGE this update would not be notified. Signed-off-by: Roger Pau Monné --- Cc: Razvan Cojocaru

[Xen-devel] [PATCH v2 0/2] vmx/hap: optimize CR4 trapping

2018-02-16 Thread Roger Pau Monne
. Thanks, Roger. Roger Pau Monne (2): x86/hvm: introduce cr_mask to store trapped bits of CR accesses vmx/hap: optimize CR4 trapping xen/arch/x86/hvm/svm/vmcb.c| 1 + xen/arch/x86/hvm/vmx/vmcs.c| 1 + xen/arch/x86/hvm/vmx/vmx.c | 39 +++ xen/arch

[Xen-devel] [PATCH v2 1/2] x86/hvm: introduce cr_mask to store trapped bits of CR accesses

2018-02-16 Thread Roger Pau Monne
At the moment this is currently set at VMCS creation and not changed, but further patches are going to change the CR4 mask at runtime. Signed-off-by: Roger Pau Monné --- Cc: Boris Ostrovsky Cc: Suravee Suthikulpanit

[Xen-devel] [PATCH v2 2/2] vmx/hap: optimize CR4 trapping

2018-02-16 Thread Roger Pau Monne
There a bunch of bits in CR4 that should be allowed to be set directly by the guest without requiring Xen intervention, currently this is already done by passing through guest writes into the CR4 used when running in non-root mode, but taking an expensive vmexit in order to do so. xenalyze

[Xen-devel] [PATCH] vmx/hap: optimize CR4 trapping

2018-02-15 Thread Roger Pau Monne
There a bunch of bits in CR4 that should be allowed to be set directly by the guest without requiring Xen intervention, currently this is already done by passing through guest writes into the CR4 used when running in non-root mode, but taking an expensive vmexit in order to do so. xenalyze

  1   2   3   4   5   6   7   8   9   10   >