[PATCH 10/10] mini-os: modify grant mappings to work in PVH mode

2021-12-05 Thread Juergen Gross
For being able to use the grant mapping interface in PVH mode some changes are required, as the guest needs to specify a physical address in the hypercall interface. Signed-off-by: Juergen Gross --- gntmap.c | 81 ++-- include/gntmap.h | 1 +

Re: [PATCH 1/3] EFI: move efi-boot.h inclusion point

2021-12-05 Thread Jan Beulich
On 03.12.2021 17:10, Luca Fancellu wrote: >> On 3 Dec 2021, at 10:56, Jan Beulich wrote: >> >> When it was introduced, it was imo placed way too high up, making it >> necessary to forward-declare way too many static functions. Move it down >> together with >> - the efi_check_dt_boot() stub, which

[PATCH 06/10] mini-os: add memory map service functions

2021-12-05 Thread Juergen Gross
Add two functions for adding reserved areas to the memory map and for removing them again. Those will be needed for proper grant table/mapping support in PVH mode. Signed-off-by: Juergen Gross --- e820.c | 72 ++ include/e820.h | 4 +++ 2

[PATCH 04/10] mini-os: respect memory map when ballooning up

2021-12-05 Thread Juergen Gross
Today Mini-OS won't look at the memory map when ballooning up. This can result in problems for PVH domains with more than 4 GB of RAM, as ballooning will happily run into the ACPI area. Fix that by adding only pages being marked as RAM in the memory map and by distinguishing between the current nu

[PATCH 09/10] mini-os: prepare grantmap entry interface for use by PVH mode

2021-12-05 Thread Juergen Gross
Instead of passing the pointer of a grantmap entry to the _gntmap_[un]map_grant_ref() sub-functions use the map pointer and the entry index instead. This will be needed for PVH mode usage. Signed-off-by: Juergen Gross --- gntmap.c | 48 +++- 1 file cha

[PATCH 01/10] mini-os: split e820 map handling into new source file

2021-12-05 Thread Juergen Gross
Introduce e820.c containing all the E820 memory map handling. No functional change. Signed-off-by: Juergen Gross --- Makefile | 1 + arch/arm/mm.c | 8 arch/x86/mm.c | 70 + e820.c | 119 + inc

[PATCH 02/10] mini-os: sort and sanitize e820 memory map

2021-12-05 Thread Juergen Gross
Do some processing of the E820 memory map obtained from the hypervisor: - align the entries to page boundaries - sort the entries by their start address - merge adjacent entries of same type This is relevant for PVH mode only. Signed-off-by: Juergen Gross --- e820.c | 56 ++

[PATCH 07/10] mini-os: move x86 specific gnttab coding into arch/x86/gnttab.c

2021-12-05 Thread Juergen Gross
Having grant table code in arch/x86/mm.c seems wrong. Move it to the new file arch/x86/gnttab.c, especially as the amount of code is expected to grow further. No functional change. Signed-off-by: Juergen Gross --- arch/x86/gnttab.c | 78 +++ arch/x86/

[PATCH 08/10] mini-os: add proper pvh grant table handling

2021-12-05 Thread Juergen Gross
Grant table initialization for PVH requires some additional actions compared to PV mode. Add those. Signed-off-by: Juergen Gross --- arch/x86/gnttab.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/arch/x86/gnttab.c b/arch/x86/gnttab.c index 56e59d7..281c207

[PATCH 00/10] mini-os: add missing PVH features

2021-12-05 Thread Juergen Gross
Mini-OS in PVH mode is missing some features, especially in the areas of ballooning and grant tables. With this series I am able to run Xenstore stubdom in PVH mode. Juergen Gross (10): mini-os: split e820 map handling into new source file mini-os: sort and sanitize e820 memory map mini-os:

[PATCH 03/10] mini-os: don't assume contiguous RAM when initializing in PVH mode

2021-12-05 Thread Juergen Gross
Sizing the available memory should respect memory holes, so look at the memory map when setting the boundary for the memory allocator. Signed-off-by: Juergen Gross --- arch/x86/mm.c | 6 +- e820.c | 13 - include/e820.h | 2 +- 3 files changed, 10 insertions(+), 11 del

[PATCH 05/10] mini-os: don't repeat definition available via header file

2021-12-05 Thread Juergen Gross
arch/x86/setup.c is repeating the definition of __pte() instead using the appropriate header. Fix that. Signed-off-by: Juergen Gross --- arch/x86/setup.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/arch/x86/setup.c b/arch/x86/setup.c index 1ec68d3..b27bbed 100644 -

[qemu-mainline test] 167121: tolerable FAIL - PUSHED

2021-12-05 Thread osstest service owner
flight 167121 qemu-mainline real [real] flight 167180 qemu-mainline real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/167121/ http://logs.test-lab.xenproject.org/osstest/logs/167180/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-am

[linux-linus test] 167168: tolerable FAIL - PUSHED

2021-12-05 Thread osstest service owner
flight 167168 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/167168/ Failures :-/ but no regressions. Regressions which are regarded as allowable (not blocking): test-armhf-armhf-xl-rtds18 guest-start/debian.repeat fail REGR. vs. 167118 Tests which did not succeed,

[seabios test] 167120: tolerable FAIL - PUSHED

2021-12-05 Thread osstest service owner
flight 167120 seabios real [real] http://logs.test-lab.xenproject.org/osstest/logs/167120/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-qemuu-win7-amd64 19 guest-stopfail like 165173 test-amd64-amd64-qemuu-nested-amd 20 debi

[ovmf test] 167122: all pass - PUSHED

2021-12-05 Thread osstest service owner
flight 167122 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/167122/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf dfafa8e45382939fb5dc78e9d37b97b500a43613 baseline version: ovmf f0f3f5aae7c4d346ea5e2

[xen-unstable test] 167119: tolerable FAIL - PUSHED

2021-12-05 Thread osstest service owner
flight 167119 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/167119/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-examine 4 memdisk-try-append fail like 166912 test-amd64-amd64-xl-qemut-win7-amd64

[linux-linus test] 167118: tolerable FAIL - PUSHED

2021-12-05 Thread osstest service owner
flight 167118 linux-linus real [real] flight 167164 linux-linus real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/167118/ http://logs.test-lab.xenproject.org/osstest/logs/167164/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-amd64-

[libvirt test] 167130: regressions - FAIL

2021-12-05 Thread osstest service owner
flight 167130 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/167130/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-armhf-libvirt 6 libvirt-buildfail REGR. vs. 151777 build-amd64-libvirt

[linux-5.4 test] 167117: tolerable FAIL - PUSHED

2021-12-05 Thread osstest service owner
flight 167117 linux-5.4 real [real] http://logs.test-lab.xenproject.org/osstest/logs/167117/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-amd64-amd64-xl-qemut-debianhvm-i386-xsm 20 guest-start/debianhvm.repeat fail in 167023 pass in 167071 test-a

Re: [PATCH V4 3/5] hyperv/IOMMU: Enable swiotlb bounce buffer for Isolation VM

2021-12-05 Thread Juergen Gross
On 05.12.21 09:48, Tianyu Lan wrote: On 12/5/2021 4:34 PM, Juergen Gross wrote: On 05.12.21 09:18, Tianyu Lan wrote: From: Tianyu Lan hyperv Isolation VM requires bounce buffer support to copy data from/to encrypted memory and so enable swiotlb force mode to use swiotlb bounce buffer for DM

[xen-unstable-coverity test] 167144: all pass - PUSHED

2021-12-05 Thread osstest service owner
flight 167144 xen-unstable-coverity real [real] http://logs.test-lab.xenproject.org/osstest/logs/167144/ Perfect :-) All tests in this flight passed as required version targeted for testing: xen ea0c08bc77fe7bd7e4e65c648e17752e91912d01 baseline version: xen e7f1

Re: [PATCH V4 3/5] hyperv/IOMMU: Enable swiotlb bounce buffer for Isolation VM

2021-12-05 Thread Tianyu Lan
On 12/5/2021 4:34 PM, Juergen Gross wrote: On 05.12.21 09:18, Tianyu Lan wrote: From: Tianyu Lan hyperv Isolation VM requires bounce buffer support to copy data from/to encrypted memory and so enable swiotlb force mode to use swiotlb bounce buffer for DMA transaction. In Isolation VM with

Re: [PATCH V4 3/5] hyperv/IOMMU: Enable swiotlb bounce buffer for Isolation VM

2021-12-05 Thread Juergen Gross
On 05.12.21 09:18, Tianyu Lan wrote: From: Tianyu Lan hyperv Isolation VM requires bounce buffer support to copy data from/to encrypted memory and so enable swiotlb force mode to use swiotlb bounce buffer for DMA transaction. In Isolation VM with AMD SEV, the bounce buffer needs to be accessed

[PATCH V4 5/5] hv_netvsc: Add Isolation VM support for netvsc driver

2021-12-05 Thread Tianyu Lan
From: Tianyu Lan In Isolation VM, all shared memory with host needs to mark visible to host via hvcall. vmbus_establish_gpadl() has already done it for netvsc rx/tx ring buffer. The page buffer used by vmbus_sendpacket_ pagebuffer() stills need to be handled. Use DMA API to map/umap these memory

[PATCH V4 4/5] scsi: storvsc: Add Isolation VM support for storvsc driver

2021-12-05 Thread Tianyu Lan
From: Tianyu Lan In Isolation VM, all shared memory with host needs to mark visible to host via hvcall. vmbus_establish_gpadl() has already done it for storvsc rx/tx ring buffer. The page buffer used by vmbus_sendpacket_ mpb_desc() still needs to be handled. Use DMA API(scsi_dma_map/unmap) to map

[PATCH V4 3/5] hyperv/IOMMU: Enable swiotlb bounce buffer for Isolation VM

2021-12-05 Thread Tianyu Lan
From: Tianyu Lan hyperv Isolation VM requires bounce buffer support to copy data from/to encrypted memory and so enable swiotlb force mode to use swiotlb bounce buffer for DMA transaction. In Isolation VM with AMD SEV, the bounce buffer needs to be accessed via extra address space which is above

[PATCH V4 1/5] Swiotlb: Add Swiotlb bounce buffer remap function for HV IVM

2021-12-05 Thread Tianyu Lan
From: Tianyu Lan In Isolation VM with AMD SEV, bounce buffer needs to be accessed via extra address space which is above shared_gpa_boundary (E.G 39 bit address line) reported by Hyper-V CPUID ISOLATION_CONFIG. The access physical address will be original physical address + shared_gpa_boundary. T

[PATCH V4 0/5] x86/Hyper-V: Add Hyper-V Isolation VM support(Second part)

2021-12-05 Thread Tianyu Lan
From: Tianyu Lan Hyper-V provides two kinds of Isolation VMs. VBS(Virtualization-based security) and AMD SEV-SNP unenlightened Isolation VMs. This patchset is to add support for these Isolation VM support in Linux. The memory of these vms are encrypted and host can't access guest memory directly

[PATCH V4 2/5] x86/hyper-v: Add hyperv Isolation VM check in the cc_platform_has()

2021-12-05 Thread Tianyu Lan
From: Tianyu Lan Hyper-V provides Isolation VM which has memory encrypt support. Add hyperv_cc_platform_has() and return true for check of GUEST_MEM_ENCRYPT attribute. Signed-off-by: Tianyu Lan --- Change since v3: * Change code style of checking GUEST_MEM attribute in the hyp