Re: Linux 5.13+ as Xen dom0 crashes on Ryzen CPU (ucode loading related?)

2021-09-14 Thread Juergen Gross
On 13.09.21 14:50, Marek Marczykowski-Górecki wrote: Hi, Since 5.13, the Xen (PV) dom0 crashes on boot, before even printing the kernel version. Test environment: - Xen 4.14.2 - AMD Ryzen 5 4500U (reported also on AMD Ryzen 7 4750U) - Linux 5.13.13, confirmed also on 5.14 The crash happen

Re: [PATCH] x86: conditionalize workaround for build issue with GNU ld 2.37

2021-09-14 Thread Roger Pau Monné
On Mon, Sep 13, 2021 at 05:07:54PM +0200, Jan Beulich wrote: > On 13.09.2021 16:33, Roger Pau Monné wrote: > > On Mon, Sep 13, 2021 at 04:05:15PM +0200, Jan Beulich wrote: > >> On 13.09.2021 15:37, Roger Pau Monné wrote: > >>> On Thu, Sep 09, 2021 at 04:35:49PM +0200, Jan Beulich wrote: > I ha

Re: [PATCH] x86/ACPI: ignore processors which cannot be brought online

2021-09-14 Thread Roger Pau Monné
On Mon, Sep 13, 2021 at 09:54:01AM +0200, Jan Beulich wrote: > ACPI 6.3 introduced a flag allowing to tell MADT entries describing > hotpluggable processors from ones which are simply placeholders (often > used by firmware writers to simplify handling there). > > Inspired by a Linux patch by Mario

Re: [PATCH v1 05/14] xen/arm: PCI host bridge discovery within XEN on ARM

2021-09-14 Thread Oleksandr Andrushchenko
Hi, Rahul! On 19.08.21 15:02, Rahul Singh wrote: > XEN during boot will read the PCI device tree node “reg” property > and will map the PCI config space to the XEN memory. [snip] > +int pci_host_common_probe(struct dt_device_node *dev, > + int ecam_reg_idx) > +{ > +str

Re: [PATCH v2] xen-blkback: Remove needless request_queue NULL pointer check

2021-09-14 Thread Roger Pau Monné
On Fri, Sep 10, 2021 at 03:59:18AM +, Xu Wang wrote: > The request_queue pointer returned from bdev_get_queue() shall > never be NULL, so the null check is unnecessary, just remove it. There are other places in the code where the return of bdev_get_queue is checked to not be NULL, like __blkde

Re: [PATCH] xen/pvcalls: backend can be a module

2021-09-14 Thread Juergen Gross
On 07.09.21 14:17, Jan Beulich wrote: It's not clear to me why only the frontend has been tristate. Switch the backend to be, too. Signed-off-by: Jan Beulich Pushed to xen/tip.git for-linus-5.15 Juergen OpenPGP_0xB0DE9DD628BF132F.asc Description: OpenPGP public key OpenPGP_signature Des

Re: [RFC PATCH] xen/gnttab: Store frame GFN in struct page_info on Arm

2021-09-14 Thread Jan Beulich
On 13.09.2021 21:57, Oleksandr wrote: > > On 13.09.21 09:17, Jan Beulich wrote: > > Hi Jan > >> On 10.09.2021 09:52, Jan Beulich wrote: >>> On 10.09.2021 01:04, Oleksandr Tyshchenko wrote: @@ -731,11 +733,19 @@ static void p2m_put_l3_page(const lpae_t pte) */ if ( p2m

Re: [PATCH v1 06/14] xen/arm: Add support for PCI ecam operations

2021-09-14 Thread Rahul Singh
Hi Julien, > On 9 Sep 2021, at 12:32 pm, Julien Grall wrote: > > Hi Rahul, > > On 19/08/2021 13:02, Rahul Singh wrote: >> Add support for PCI ecam operations to access the PCI >> configuration space. >> Signed-off-by: Rahul Singh >> --- >> xen/arch/arm/pci/Makefile | 1 + >> xen/ar

Re: [PATCH 00/12] swiotlb-xen: fixes and adjustments

2021-09-14 Thread Juergen Gross
On 07.09.21 14:03, Jan Beulich wrote: The primary intention really was the last patch, there you go ... 01: swiotlb-xen: avoid double free 02: swiotlb-xen: fix late init retry 03: swiotlb-xen: maintain slab count properly 04: swiotlb-xen: ensure to issue well-formed XENMEM_exchange requests 05:

Re: [RFC PATCH] xen/gnttab: Store frame GFN in struct page_info on Arm

2021-09-14 Thread Jan Beulich
On 13.09.2021 19:09, Oleksandr wrote: > On 10.09.21 10:52, Jan Beulich wrote: >> On 10.09.2021 01:04, Oleksandr Tyshchenko wrote: >>> @@ -731,11 +733,19 @@ static void p2m_put_l3_page(const lpae_t pte) >>>*/ >>> if ( p2m_is_foreign(pte.p2m.type) ) >>> { >>> -mfn_t mfn =

Re: [PATCH 0/9] xen/x86: PVH Dom0 fixes and fallout adjustments

2021-09-14 Thread Roger Pau Monné
On Tue, Sep 07, 2021 at 12:04:34PM +0200, Jan Beulich wrote: > In order to try to debug hypervisor side breakage from XSA-378 I found > myself urged to finally give PVH Dom0 a try. Sadly things didn't work > quite as expected. In the course of investigating these issues I actually > spotted one pie

Re: Linux 5.13+ as Xen dom0 crashes on Ryzen CPU (ucode loading related?)

2021-09-14 Thread Mike Rapoport
On Tue, Sep 14, 2021 at 09:14:38AM +0200, Juergen Gross wrote: > On 13.09.21 14:50, Marek Marczykowski-Górecki wrote: > > Hi, > > > > Since 5.13, the Xen (PV) dom0 crashes on boot, before even printing the > > kernel version. > > Test environment: > > - Xen 4.14.2 > > - AMD Ryzen 5 4500U (repo

Re: Linux 5.13+ as Xen dom0 crashes on Ryzen CPU (ucode loading related?)

2021-09-14 Thread Jan Beulich
On 14.09.2021 09:14, Juergen Gross wrote: > On 13.09.21 14:50, Marek Marczykowski-Górecki wrote: >> Hi, >> >> Since 5.13, the Xen (PV) dom0 crashes on boot, before even printing the >> kernel version. >> Test environment: >> - Xen 4.14.2 >> - AMD Ryzen 5 4500U (reported also on AMD Ryzen 7 4750

Re: Linux 5.13+ as Xen dom0 crashes on Ryzen CPU (ucode loading related?)

2021-09-14 Thread Juergen Gross
On 14.09.21 10:33, Mike Rapoport wrote: On Tue, Sep 14, 2021 at 09:14:38AM +0200, Juergen Gross wrote: On 13.09.21 14:50, Marek Marczykowski-Górecki wrote: Hi, Since 5.13, the Xen (PV) dom0 crashes on boot, before even printing the kernel version. Test environment: - Xen 4.14.2 - AMD Ryz

Re: [PATCH 0/9] xen/x86: PVH Dom0 fixes and fallout adjustments

2021-09-14 Thread Jan Beulich
On 14.09.2021 10:32, Roger Pau Monné wrote: > On Tue, Sep 07, 2021 at 12:04:34PM +0200, Jan Beulich wrote: >> In order to try to debug hypervisor side breakage from XSA-378 I found >> myself urged to finally give PVH Dom0 a try. Sadly things didn't work >> quite as expected. In the course of invest

Re: [PATCH 04/12] swiotlb-xen: ensure to issue well-formed XENMEM_exchange requests

2021-09-14 Thread Jan Beulich
On 13.09.2021 22:31, Stefano Stabellini wrote: > On Mon, 13 Sep 2021, Jan Beulich wrote: >> On 11.09.2021 01:14, Stefano Stabellini wrote: >>> On Tue, 7 Sep 2021, Jan Beulich wrote: While the hypervisor hasn't been enforcing this, we would still better avoid issuing requests with GFNs not

[qemu-mainline test] 164973: regressions - FAIL

2021-09-14 Thread osstest service owner
flight 164973 qemu-mainline real [real] flight 164979 qemu-mainline real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/164973/ http://logs.test-lab.xenproject.org/osstest/logs/164979/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be

[PATCH] x86/setup: call early_reserve_memory() earlier

2021-09-14 Thread Juergen Gross
Commit a799c2bd29d19c565 ("x86/setup: Consolidate early memory reservations") introduced early_reserve_memory() to do all needed initial memblock_reserve() calls in one function. Unfortunately the call of early_reserve_memory() is done too late for Xen dom0, as in some cases a Xen hook called by e8

Re: [PATCH RFC] vPCI: account for hidden devices in modify_bars()

2021-09-14 Thread Roger Pau Monné
On Mon, Aug 30, 2021 at 03:04:55PM +0200, Jan Beulich wrote: > Hidden devices (e.g. an add-in PCI serial card used for Xen's serial > console) are associated with DomXEN, not Dom0. This means that while > looking for overlapping BARs such devices cannot be found on Dom0's > list of devices; DomXEN'

Re: [PATCH] x86/setup: call early_reserve_memory() earlier

2021-09-14 Thread Jan Beulich
On 14.09.2021 11:41, Juergen Gross wrote: > Commit a799c2bd29d19c565 ("x86/setup: Consolidate early memory > reservations") introduced early_reserve_memory() to do all needed > initial memblock_reserve() calls in one function. Unfortunately the > call of early_reserve_memory() is done too late for

Re: [PATCH 10/11] xen/arm: Do not map PCI ECAM space to Domain-0's p2m

2021-09-14 Thread Oleksandr Andrushchenko
> >> >>     If so, it would be better if the MMIO region in question was never >>     mapped into Dom0 at all rather having to unmap it. >> > Ok, I'll do that Sorry for pasting here quite a big patch, but I feel I need clarification if this is the way we want it. Please note I had to modify set

Re: [PATCH RFC] vPCI: account for hidden devices in modify_bars()

2021-09-14 Thread Jan Beulich
On 14.09.2021 12:00, Roger Pau Monné wrote: > On Mon, Aug 30, 2021 at 03:04:55PM +0200, Jan Beulich wrote: >> Hidden devices (e.g. an add-in PCI serial card used for Xen's serial >> console) are associated with DomXEN, not Dom0. This means that while >> looking for overlapping BARs such devices can

Re: [PATCH] x86/setup: call early_reserve_memory() earlier

2021-09-14 Thread Marek Marczykowski-Górecki
On Tue, Sep 14, 2021 at 11:41:08AM +0200, Juergen Gross wrote: > Commit a799c2bd29d19c565 ("x86/setup: Consolidate early memory > reservations") introduced early_reserve_memory() to do all needed > initial memblock_reserve() calls in one function. Unfortunately the > call of early_reserve_memory()

Re: Linux 5.13+ as Xen dom0 crashes on Ryzen CPU (ucode loading related?)

2021-09-14 Thread Marek Marczykowski-Górecki
On Tue, Sep 14, 2021 at 10:39:10AM +0200, Jan Beulich wrote: > On 14.09.2021 09:14, Juergen Gross wrote: > > On 13.09.21 14:50, Marek Marczykowski-Górecki wrote: > >> Hi, > >> > >> Since 5.13, the Xen (PV) dom0 crashes on boot, before even printing the > >> kernel version. > >> Test environment: >

Re: [PATCH] x86/setup: call early_reserve_memory() earlier

2021-09-14 Thread Juergen Gross
On 14.09.21 12:03, Jan Beulich wrote: On 14.09.2021 11:41, Juergen Gross wrote: Commit a799c2bd29d19c565 ("x86/setup: Consolidate early memory reservations") introduced early_reserve_memory() to do all needed initial memblock_reserve() calls in one function. Unfortunately the call of early_reser

Re: [PATCH 1/1] tools/xl: Fix regular expression for autobaloon mode detection based on xen command line.

2021-09-14 Thread Ian Jackson
Dmitry Isaikin writes ("[PATCH 1/1] tools/xl: Fix regular expression for autobaloon mode detection based on xen command line."): > The case of specifying a negative size was handled incorrectly. Thank you. The change looks good to me. Did you test that after your change, the functionality works

Re: [PATCH v1 06/14] xen/arm: Add support for PCI ecam operations

2021-09-14 Thread Rahul Singh
Hi Stefano, > On 10 Sep 2021, at 12:21 am, Stefano Stabellini > wrote: > > On Thu, 19 Aug 2021, Rahul Singh wrote: >> Add support for PCI ecam operations to access the PCI >> configuration space. >> >> Signed-off-by: Rahul Singh >> --- >> xen/arch/arm/pci/Makefile | 1 + >> xen/arch

Re: [PATCH 0/9] xen/x86: PVH Dom0 fixes and fallout adjustments

2021-09-14 Thread Roger Pau Monné
On Tue, Sep 14, 2021 at 11:03:23AM +0200, Jan Beulich wrote: > On 14.09.2021 10:32, Roger Pau Monné wrote: > > On Tue, Sep 07, 2021 at 12:04:34PM +0200, Jan Beulich wrote: > >> In order to try to debug hypervisor side breakage from XSA-378 I found > >> myself urged to finally give PVH Dom0 a try. S

Re: [PATCH RFC] vPCI: account for hidden devices in modify_bars()

2021-09-14 Thread Roger Pau Monné
On Tue, Sep 14, 2021 at 12:12:12PM +0200, Jan Beulich wrote: > On 14.09.2021 12:00, Roger Pau Monné wrote: > > On Mon, Aug 30, 2021 at 03:04:55PM +0200, Jan Beulich wrote: > >> Hidden devices (e.g. an add-in PCI serial card used for Xen's serial > >> console) are associated with DomXEN, not Dom0. T

[libvirt test] 164978: regressions - FAIL

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

Re: [PATCH 0/9] xen/x86: PVH Dom0 fixes and fallout adjustments

2021-09-14 Thread Jan Beulich
On 14.09.2021 13:15, Roger Pau Monné wrote: > On Tue, Sep 14, 2021 at 11:03:23AM +0200, Jan Beulich wrote: >> On 14.09.2021 10:32, Roger Pau Monné wrote: >>> On Tue, Sep 07, 2021 at 12:04:34PM +0200, Jan Beulich wrote: In order to try to debug hypervisor side breakage from XSA-378 I found

Re: [PATCH RFC] vPCI: account for hidden devices in modify_bars()

2021-09-14 Thread Jan Beulich
On 14.09.2021 13:21, Roger Pau Monné wrote: > On Tue, Sep 14, 2021 at 12:12:12PM +0200, Jan Beulich wrote: >> On 14.09.2021 12:00, Roger Pau Monné wrote: >>> On Mon, Aug 30, 2021 at 03:04:55PM +0200, Jan Beulich wrote: Hidden devices (e.g. an add-in PCI serial card used for Xen's serial c

[xen-unstable test] 164976: regressions - FAIL

2021-09-14 Thread osstest service owner
flight 164976 xen-unstable real [real] flight 164981 xen-unstable real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/164976/ http://logs.test-lab.xenproject.org/osstest/logs/164981/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be r

Re: [RFC PATCH] xen/gnttab: Store frame GFN in struct page_info on Arm

2021-09-14 Thread Oleksandr
On 14.09.21 11:31, Jan Beulich wrote: Hi Jan On 13.09.2021 19:09, Oleksandr wrote: On 10.09.21 10:52, Jan Beulich wrote: On 10.09.2021 01:04, Oleksandr Tyshchenko wrote: @@ -731,11 +733,19 @@ static void p2m_put_l3_page(const lpae_t pte) */ if ( p2m_is_foreign(pte.p2m.type)

[PATCH RFC 0/4] remove libxenctrl usage from xenstored

2021-09-14 Thread Juergen Gross
Xenstored is using libxenctrl for only one purpose: to get information about state of domains. This RFC patch series is removing that dependency by introducing a new stable interface which can be used by xenstored instead. I have chosen to add a new hypercall with sub-commands. This can be change

[PATCH RFC 4/4] tools/xenstore: use new stable interface instead of libxenctrl

2021-09-14 Thread Juergen Gross
Xenstore is using libxenctrl only for obtaining state information about domains. Use the new stable interface XEN_CONTROL_OP_get_state_changed_domain instead. Signed-off-by: Juergen Gross --- tools/xenstore/Makefile| 3 +- tools/xenstore/xenstored_control.c | 14 +- tools/xenstor

[PATCH RFC 1/4] xen: add a domain unique id to each domain

2021-09-14 Thread Juergen Gross
Xenstore is referencing domains by their domid, but reuse of a domid can lead to the situation that Xenstore can't tell whether a domain with that domid has been deleted and created again without Xenstore noticing the domain is a new one now. Add a global domain creation unique id which is updated

[PATCH RFC 2/4] xen: add bitmap to indicate per-domain state changes

2021-09-14 Thread Juergen Gross
Add a bitmap with one bit per possible domid indicating the respective domain has changed its state (created, deleted, dying, crashed, shutdown). Registering the VIRQ_DOM_EXC event will result in setting the bits for all existing domains and resetting all other bits. Resetting a bit will be done

[PATCH RFC 3/4] xen: add new stable control hypercall

2021-09-14 Thread Juergen Gross
The sysctl and domctl hypercalls are not stable, so tools using those need to be in sync with the hypervisor. In order to decouple (some) tools from the hypervisor add a new stable hypercall __HYPERVISOR_control_op with (for now) two sub-options: - XEN_CONTROL_OP_get_version for retrieving the ma

Re: [PATCH 0/9] xen/x86: PVH Dom0 fixes and fallout adjustments

2021-09-14 Thread Roger Pau Monné
On Tue, Sep 14, 2021 at 01:58:29PM +0200, Jan Beulich wrote: > On 14.09.2021 13:15, Roger Pau Monné wrote: > > On Tue, Sep 14, 2021 at 11:03:23AM +0200, Jan Beulich wrote: > >> On 14.09.2021 10:32, Roger Pau Monné wrote: > >>> On Tue, Sep 07, 2021 at 12:04:34PM +0200, Jan Beulich wrote: > In o

[linux-linus test] 164977: regressions - FAIL

2021-09-14 Thread osstest service owner
flight 164977 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/164977/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-arm64-arm64-xl-thunderx 13 debian-fixup fail REGR. vs. 152332 test-arm64-arm64-xl

[PATCH] x86/p2m: fix xenmem_add_to_physmap_one double page removal

2021-09-14 Thread Roger Pau Monne
If the new gfn matches the previous one (ie: gfn == old_gpfn) xenmem_add_to_physmap_one will issue a duplicated call to guest_physmap_remove_page with the same gfn, because the get_gpfn_from_mfn call has been moved by commit f8582da041 to be performed before the original page is removed. This leads

Re: [RFC PATCH 00/10] security: Introduce qemu_security_policy_taint() API

2021-09-14 Thread P J P
Hello Philippe, all >On Thursday, 9 September, 2021, 03:58:40 pm IST, Daniel P. Berrangé > wrote: >On Thu, Sep 09, 2021 at 01:20:14AM +0200, Philippe Mathieu-Daudé wrote: >> This series is experimental! The goal is to better limit the >> boundary of what code is considerated security critical, an

[PATCH V5 00/12] x86/Hyper-V: Add Hyper-V Isolation VM support

2021-09-14 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 V5 01/12] x86/hyperv: Initialize GHCB page in Isolation VM

2021-09-14 Thread Tianyu Lan
From: Tianyu Lan Hyperv exposes GHCB page via SEV ES GHCB MSR for SNP guest to communicate with hypervisor. Map GHCB page for all cpus to read/write MSR register and submit hvcall request via ghcb page. Signed-off-by: Tianyu Lan --- Change since v4: * Fix typo comment Chagne since v3:

[PATCH V5 02/12] x86/hyperv: Initialize shared memory boundary in the Isolation VM.

2021-09-14 Thread Tianyu Lan
From: Tianyu Lan Hyper-V exposes shared memory boundary via cpuid HYPERV_CPUID_ISOLATION_CONFIG and store it in the shared_gpa_boundary of ms_hyperv struct. This prepares to share memory with host for SNP guest. Signed-off-by: Tianyu Lan --- Change since v4: * Rename reserve field. Cha

[PATCH V5 03/12] x86/hyperv: Add new hvcall guest address host visibility support

2021-09-14 Thread Tianyu Lan
From: Tianyu Lan Add new hvcall guest address host visibility support to mark memory visible to host. Call it inside set_memory_decrypted /encrypted(). Add HYPERVISOR feature check in the hv_is_isolation_supported() to optimize in non-virtualization environment. Acked-by: Dave Hansen Signed-off

[PATCH V5 04/12] Drivers: hv: vmbus: Mark vmbus ring buffer visible to host in Isolation VM

2021-09-14 Thread Tianyu Lan
From: Tianyu Lan Mark vmbus ring buffer visible with set_memory_decrypted() when establish gpadl handle. Signed-off-by: Tianyu Lan --- Change sincv v4 * Change gpadl handle in netvsc and uio driver from u32 to struct vmbus_gpadl. * Change vmbus_establish_gpadl()'s gpad

[PATCH V5 05/12] x86/hyperv: Add Write/Read MSR registers via ghcb page

2021-09-14 Thread Tianyu Lan
From: Tianyu Lan Hyperv provides GHCB protocol to write Synthetic Interrupt Controller MSR registers in Isolation VM with AMD SEV SNP and these registers are emulated by hypervisor directly. Hyperv requires to write SINTx MSR registers twice. First writes MSR via GHCB page to communicate with hyp

[PATCH V5 06/12] x86/hyperv: Add ghcb hvcall support for SNP VM

2021-09-14 Thread Tianyu Lan
From: Tianyu Lan hyperv provides ghcb hvcall to handle VMBus HVCALL_SIGNAL_EVENT and HVCALL_POST_MESSAGE msg in SNP Isolation VM. Add such support. Signed-off-by: Tianyu Lan --- Change since v3: * Add hv_ghcb_hypercall() stub function to avoid compile error for ARM. --- arch/

[PATCH V5 07/12] Drivers: hv: vmbus: Add SNP support for VMbus channel initiate message

2021-09-14 Thread Tianyu Lan
From: Tianyu Lan The monitor pages in the CHANNELMSG_INITIATE_CONTACT msg are shared with host in Isolation VM and so it's necessary to use hvcall to set them visible to host. In Isolation VM with AMD SEV SNP, the access address should be in the extra space which is above shared gpa boundary. So

[PATCH V5 10/12] hyperv/IOMMU: Enable swiotlb bounce buffer for Isolation VM

2021-09-14 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 V5 12/12] net: netvsc: Add Isolation VM support for netvsc driver

2021-09-14 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 V5 11/12] scsi: storvsc: Add Isolation VM support for storvsc driver

2021-09-14 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 V5 09/12] x86/Swiotlb: Add Swiotlb bounce buffer remap function for HV IVM

2021-09-14 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 V5 08/12] Drivers: hv : vmbus: Initialize VMbus ring buffer for Isolation VM

2021-09-14 Thread Tianyu Lan
From: Tianyu Lan VMbus ring buffer are shared with host and it's need to be accessed via extra address space of Isolation VM with AMD SNP support. This patch is to map the ring buffer address in extra address space via vmap_pfn(). Hyperv set memory host visibility hvcall smears data in the ring b

Re: [PATCH 09/11] xen/arm: Setup MMIO range trap handlers for hardware domain

2021-09-14 Thread Oleksandr Andrushchenko
>> What you want to know if how many times register_mmio_handler() will be >> called from domain_vpci_init(). >> >> You introduced a function pci_host_iterate_bridges() that will walk over the >> bridges and then call the callback vpci_setup_mmio_handler(). So you could >> introduce a new callb

Re: [PATCH RFC] vPCI: account for hidden devices in modify_bars()

2021-09-14 Thread Roger Pau Monné
On Tue, Sep 14, 2021 at 02:05:01PM +0200, Jan Beulich wrote: > On 14.09.2021 13:21, Roger Pau Monné wrote: > > On Tue, Sep 14, 2021 at 12:12:12PM +0200, Jan Beulich wrote: > >> On 14.09.2021 12:00, Roger Pau Monné wrote: > >>> On Mon, Aug 30, 2021 at 03:04:55PM +0200, Jan Beulich wrote: > Hidd

Re: [PATCH 09/11] xen/arm: Setup MMIO range trap handlers for hardware domain

2021-09-14 Thread Oleksandr Andrushchenko
} >> >> +static int pci_ecam_register_mmio_handler(struct domain *d, >> + struct pci_host_bridge *bridge, >> + const struct mmio_handler_ops >> *ops) >> +{ >> +struct pci_config_window *cfg = bridge->sysdata;

Re: [PATCH] x86/p2m: fix xenmem_add_to_physmap_one double page removal

2021-09-14 Thread Jan Beulich
On 14.09.2021 15:34, Roger Pau Monne wrote: > If the new gfn matches the previous one (ie: gfn == old_gpfn) It took me a while to realize that you probably mean "gpfn" here. > xenmem_add_to_physmap_one will issue a duplicated call to > guest_physmap_remove_page with the same gfn, because the Con

Re: Enabling hypervisor agnosticism for VirtIO backends

2021-09-14 Thread Alex Bennée
Stefano Stabellini writes: > On Mon, 6 Sep 2021, AKASHI Takahiro wrote: >> > the second is how many context switches are involved in a transaction. >> > Of course with all things there is a trade off. Things involving the >> > very tightest latency would probably opt for a bare metal backend wh

Re: [PATCH V4 00/13] x86/Hyper-V: Add Hyper-V Isolation VM support

2021-09-14 Thread Tianyu Lan
Hi Michael and Christoph: I just sent out V5 patchset. I use alloc_pages() to allocate rx/tx ring buffer in Isolation VM and use vmap() to map rx/tx buffer first because the vmbus_establish_gpadl() still needs to va of low end memory to initialize gpadl buffer. After calling vmbus_establish_

Re: Is it time to start implementing Xen bindings for rust-vmm?

2021-09-14 Thread Alex Bennée
Andrew Cooper writes: > On 13/09/2021 13:44, Alex Bennée wrote: >> Hi, >> >> As we consider the next cycle for Project Stratos I would like to make >> some more progress on hypervisor agnosticism for our virtio backends. >> While we have implemented a number of virtio vhost-user backends using

[PATCH] swiotlb: set IO TLB segment size via cmdline

2021-09-14 Thread Roman Skakun
From: Roman Skakun It is possible when default IO TLB size is not enough to fit a long buffers as described here [1]. This patch makes a way to set this parameter using cmdline instead of recompiling a kernel. [1] https://www.xilinx.com/support/answers/72694.html Signed-off-by: Roman Skakun -

Re: [PATCH 0/9] xen/x86: PVH Dom0 fixes and fallout adjustments

2021-09-14 Thread Jan Beulich
On 14.09.2021 14:41, Roger Pau Monné wrote: > On Tue, Sep 14, 2021 at 01:58:29PM +0200, Jan Beulich wrote: >> On 14.09.2021 13:15, Roger Pau Monné wrote: >>> On Tue, Sep 14, 2021 at 11:03:23AM +0200, Jan Beulich wrote: On 14.09.2021 10:32, Roger Pau Monné wrote: > On Tue, Sep 07, 2021 at 1

Re: [PATCH RFC] vPCI: account for hidden devices in modify_bars()

2021-09-14 Thread Jan Beulich
On 14.09.2021 16:22, Roger Pau Monné wrote: > On Tue, Sep 14, 2021 at 02:05:01PM +0200, Jan Beulich wrote: >> On 14.09.2021 13:21, Roger Pau Monné wrote: >>> On Tue, Sep 14, 2021 at 12:12:12PM +0200, Jan Beulich wrote: On 14.09.2021 12:00, Roger Pau Monné wrote: > On Mon, Aug 30, 2021 at 0

Re: [PATCH] swiotlb: set IO TLB segment size via cmdline

2021-09-14 Thread Jan Beulich
On 14.09.2021 17:10, Roman Skakun wrote: > From: Roman Skakun > > It is possible when default IO TLB size is not > enough to fit a long buffers as described here [1]. > > This patch makes a way to set this parameter > using cmdline instead of recompiling a kernel. > > [1] https://www.xilinx.com

Re: [PATCH] swiotlb: set IO TLB segment size via cmdline

2021-09-14 Thread Christoph Hellwig
On Tue, Sep 14, 2021 at 05:29:07PM +0200, Jan Beulich wrote: > I'm not convinced the swiotlb use describe there falls under "intended > use" - mapping a 1280x720 framebuffer in a single chunk? (As an aside, > the bottom of this page is also confusing, as following "Then we can > confirm the modifie

RE: [PATCH V5 12/12] net: netvsc: Add Isolation VM support for netvsc driver

2021-09-14 Thread Haiyang Zhang
> -Original Message- > From: Tianyu Lan > Sent: Tuesday, September 14, 2021 9:39 AM > To: KY Srinivasan ; Haiyang Zhang > ; Stephen Hemminger ; > wei@kernel.org; Dexuan Cui ; t...@linutronix.de; > mi...@redhat.com; b...@alien8.de; x...@kernel.org; h...@zytor.com; > dave.han...@linux

Re: [PATCH RFC] vPCI: account for hidden devices in modify_bars()

2021-09-14 Thread Roger Pau Monné
On Tue, Sep 14, 2021 at 05:16:17PM +0200, Jan Beulich wrote: > On 14.09.2021 16:22, Roger Pau Monné wrote: > > On Tue, Sep 14, 2021 at 02:05:01PM +0200, Jan Beulich wrote: > >> On 14.09.2021 13:21, Roger Pau Monné wrote: > >>> On Tue, Sep 14, 2021 at 12:12:12PM +0200, Jan Beulich wrote: > On 1

Re: [PATCH v1 08/14] xen:arm: Implement pci access functions

2021-09-14 Thread Rahul Singh
Hi Stefano, > On 10 Sep 2021, at 12:41 am, Stefano Stabellini > wrote: > > On Thu, 19 Aug 2021, Rahul Singh wrote: >> Implement generic pci access functions to read/write the configuration >> space. >> >> Signed-off-by: Rahul Singh >> --- >> xen/arch/arm/pci/pci-access.c | 31 +++

Re: [PATCH 0/9] xen/x86: PVH Dom0 fixes and fallout adjustments

2021-09-14 Thread Roger Pau Monné
On Tue, Sep 14, 2021 at 05:13:52PM +0200, Jan Beulich wrote: > On 14.09.2021 14:41, Roger Pau Monné wrote: > > On Tue, Sep 14, 2021 at 01:58:29PM +0200, Jan Beulich wrote: > >> On 14.09.2021 13:15, Roger Pau Monné wrote: > >>> On Tue, Sep 14, 2021 at 11:03:23AM +0200, Jan Beulich wrote: > On 1

[PATCH v2] tools/libxl: Correctly align the ACPI tables

2021-09-14 Thread Kevin Stefanov
The memory allocator currently calculates alignment in libxl's virtual address space, rather than guest physical address space. This results in the FACS being commonly misaligned. Furthermore, the allocator has several other bugs. The opencoded align-up calculation is currently susceptible to a b

Re: [PATCH v2] tools/libxl: Correctly align the ACPI tables

2021-09-14 Thread Andrew Cooper
On 14/09/2021 17:43, Kevin Stefanov wrote: > The memory allocator currently calculates alignment in libxl's virtual > address space, rather than guest physical address space. This results > in the FACS being commonly misaligned. > > Furthermore, the allocator has several other bugs. > > The opencod

[qemu-mainline test] 164980: regressions - FAIL

2021-09-14 Thread osstest service owner
flight 164980 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/164980/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-arm64-arm64-libvirt-raw 17 guest-start/debian.repeat fail REGR. vs. 164950 Tests which are

Re: Is it time to start implementing Xen bindings for rust-vmm?

2021-09-14 Thread Andrew Cooper
On 14/09/2021 15:44, Alex Bennée wrote: > Andrew Cooper writes: > >> On 13/09/2021 13:44, Alex Bennée wrote: >>> Hi, >>> >>> As we consider the next cycle for Project Stratos I would like to make >>> some more progress on hypervisor agnosticism for our virtio backends. >>> While we have implemente

[RFC PATCH V2] xen/gnttab: Store frame GFN in struct page_info on Arm

2021-09-14 Thread Oleksandr Tyshchenko
From: Oleksandr Tyshchenko Rework Arm implementation to store grant table frame GFN in struct page_info directly instead of keeping it in standalone status/shared arrays. To cover 64-bit/40-bit IPA on Arm64/Arm32 we need the space to hold 52-bit/28-bit value respectively. In order to not grow th

Re: Is it time to start implementing Xen bindings for rust-vmm?

2021-09-14 Thread Stefano Stabellini
On Tue, 14 Sep 2021, Andrew Cooper wrote: > On 14/09/2021 15:44, Alex Bennée wrote: > > Andrew Cooper writes: > > > >> On 13/09/2021 13:44, Alex Bennée wrote: > >>> Hi, > >>> > >>> As we consider the next cycle for Project Stratos I would like to make > >>> some more progress on hypervisor agnosti

Re: [PATCH v2] xen/sched: fix sched_move_domain() for domain without vcpus

2021-09-14 Thread Dario Faggioli
On Wed, 2021-09-08 at 15:04 +0200, Juergen Gross wrote: > In case a domain is created with a cpupool other than Pool-0 > specified > it will be moved to that cpupool before any vcpus are allocated. > > This will lead to a NULL pointer dereference in sched_move_domain(). > > Fix that by tolerating

Re: [PATCH v1 08/14] xen:arm: Implement pci access functions

2021-09-14 Thread Stefano Stabellini
+Jan for the header include question at the bottom On Tue, 14 Sep 2021, Rahul Singh wrote: > Hi Stefano, > > > On 10 Sep 2021, at 12:41 am, Stefano Stabellini > > wrote: > > > > On Thu, 19 Aug 2021, Rahul Singh wrote: > >> Implement generic pci access functions to read/write the configuration

Re: [PATCH v1 06/14] xen/arm: Add support for PCI ecam operations

2021-09-14 Thread Stefano Stabellini
On Tue, 14 Sep 2021, Rahul Singh wrote: > >> +return NULL; > >> + > >> +busn -= cfg->busn_start; > >> +base = cfg->win + (busn << cfg->ops->bus_shift); > >> + > >> +return base + (PCI_DEVFN(sbdf_t.dev, sbdf_t.fn) << devfn_shift) + > >> where; > >> +} > > > > I understand that

Re: [PATCH] mini-os: xenbus: support large messages

2021-09-14 Thread Samuel Thibault
Hello, Thanks for having worked on this! Juergen Gross, le mer. 18 août 2021 17:26:10 +0200, a ecrit: > +static void xenbus_read_data(char *buf, unsigned int len) > +{ > +unsigned int off = 0; > +unsigned int prod; > +unsigned int size; > +int notify; > + > +while (off != len)

[xen-unstable test] 164983: regressions - FAIL

2021-09-14 Thread osstest service owner
flight 164983 xen-unstable real [real] flight 164986 xen-unstable real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/164983/ http://logs.test-lab.xenproject.org/osstest/logs/164986/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be r

[linux-linus test] 164984: regressions - FAIL

2021-09-14 Thread osstest service owner
flight 164984 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/164984/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-arm64-arm64-xl-thunderx 13 debian-fixup fail REGR. vs. 152332 test-arm64-arm64-xl

Re: [PATCH 09/11] xen/arm: Setup MMIO range trap handlers for hardware domain

2021-09-14 Thread Stefano Stabellini
On Tue, 14 Sep 2021, Oleksandr Andrushchenko wrote: > >> What you want to know if how many times register_mmio_handler() will be > >> called from domain_vpci_init(). > >> > >> You introduced a function pci_host_iterate_bridges() that will walk over > >> the bridges and then call the callback vpci

Re: [PATCH 10/11] xen/arm: Do not map PCI ECAM space to Domain-0's p2m

2021-09-14 Thread Stefano Stabellini
On Tue, 14 Sep 2021, Oleksandr Andrushchenko wrote: > With the patch above I have the following log in Domain-0: > > generic-armv8-xt-dom0 login: root > root@generic-armv8-xt-dom0:~# (XEN) *** Serial input to Xen (type 'CTRL-a' > three times to switch input) > (XEN) PCI devices > (XEN)

linux-next: build failure after merge of the xen-tip tree

2021-09-14 Thread Stephen Rothwell
e: power: don't try to use non-existing RTC for storing data") I used the xen-tip tree from next-20210914 for today. -- Cheers, Stephen Rothwell pgpgjUYGOSCAo.pgp Description: OpenPGP digital signature

Re: [PATCH V10 01/18] perf/core: Use static_call to optimize perf_guest_info_callbacks

2021-09-14 Thread Zhu, Lingshan
On 8/27/2021 3:59 AM, Sean Christopherson wrote: TL;DR: Please don't merge this patch, it's broken and is also built on a shoddy foundation that I would like to fix. Hi Sean,Peter, Paolo I will send out an V11 which drops this patch since it's buggy, and Sean is working on fix this.

Re: [PATCH 04/12] swiotlb-xen: ensure to issue well-formed XENMEM_exchange requests

2021-09-14 Thread Stefano Stabellini
On Tue, 14 Sep 2021, Jan Beulich wrote: > On 13.09.2021 22:31, Stefano Stabellini wrote: > > On Mon, 13 Sep 2021, Jan Beulich wrote: > >> On 11.09.2021 01:14, Stefano Stabellini wrote: > >>> On Tue, 7 Sep 2021, Jan Beulich wrote: > While the hypervisor hasn't been enforcing this, we would stil

Re: Xen Booting Problem on ARM Machine

2021-09-14 Thread Stefano Stabellini
Something is off. When you enabled earlyprintk in Xen, you should see something like this at boot time: https://marc.info/?l=xen-devel&m=158829968025334 All the Xen logs starting with "(XEN)" on the serial. Do you have access to the serial of the machine? Without it, it is going to be hard to debu

Re: [PATCH] swiotlb: set IO TLB segment size via cmdline

2021-09-14 Thread Stefano Stabellini
On Tue, 14 Sep 2021, Christoph Hellwig wrote: > On Tue, Sep 14, 2021 at 05:29:07PM +0200, Jan Beulich wrote: > > I'm not convinced the swiotlb use describe there falls under "intended > > use" - mapping a 1280x720 framebuffer in a single chunk? (As an aside, > > the bottom of this page is also conf

Re: [PATCH 04/12] swiotlb-xen: ensure to issue well-formed XENMEM_exchange requests

2021-09-14 Thread Stefano Stabellini
On Tue, 14 Sep 2021, Stefano Stabellini wrote: > On Tue, 14 Sep 2021, Jan Beulich wrote: > > On 13.09.2021 22:31, Stefano Stabellini wrote: > > > On Mon, 13 Sep 2021, Jan Beulich wrote: > > >> On 11.09.2021 01:14, Stefano Stabellini wrote: > > >>> On Tue, 7 Sep 2021, Jan Beulich wrote: > > Whi

Re: HVM/PVH Balloon crash

2021-09-14 Thread Elliott Mitchell
On Tue, Sep 07, 2021 at 05:57:10PM +0200, Jan Beulich wrote: > On 07.09.2021 17:03, Elliott Mitchell wrote: > > Could be this system is in an > > intergenerational hole, and some spot in the PVH/HVM code makes an > > assumption of the presence of NPT guarantees presence of an operational > > IOMMU

Re: [Stratos-dev] Enabling hypervisor agnosticism for VirtIO backends

2021-09-14 Thread Stefano Stabellini
On Tue, 14 Sep 2021, Trilok Soni wrote: > On 9/13/2021 4:51 PM, Stefano Stabellini via Stratos-dev wrote: > > On Mon, 6 Sep 2021, AKASHI Takahiro wrote: > > > > the second is how many context switches are involved in a transaction. > > > > Of course with all things there is a trade off. Things invo

Re: [PATCH 09/11] xen/arm: Setup MMIO range trap handlers for hardware domain

2021-09-14 Thread Oleksandr Andrushchenko
On 15.09.21 03:25, Stefano Stabellini wrote: > On Tue, 14 Sep 2021, Oleksandr Andrushchenko wrote: What you want to know if how many times register_mmio_handler() will be called from domain_vpci_init(). You introduced a function pci_host_iterate_bridges() that will walk over

[xen-unstable-smoke test] 164989: tolerable all pass - PUSHED

2021-09-14 Thread osstest service owner
flight 164989 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/164989/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 15 migrate-support-checkfail never pass test-arm64-arm64-xl-xsm 1

Re: [PATCH 09/11] xen/arm: Setup MMIO range trap handlers for hardware domain

2021-09-14 Thread Oleksandr Andrushchenko
Hi, Rahul! On 14.09.21 17:24, Oleksandr Andrushchenko wrote: > > } >>>   +static int pci_ecam_register_mmio_handler(struct domain *d, >>> +  struct pci_host_bridge *bridge, >>> +  const struct mmio_handler_ops >>> *op

Re: [PATCH 10/11] xen/arm: Do not map PCI ECAM space to Domain-0's p2m

2021-09-14 Thread Oleksandr Andrushchenko
Hi, Stefano, Rahul! On 15.09.21 03:36, Stefano Stabellini wrote: > On Tue, 14 Sep 2021, Oleksandr Andrushchenko wrote: >> With the patch above I have the following log in Domain-0: >> >> generic-armv8-xt-dom0 login: root >> root@generic-armv8-xt-dom0:~# (XEN) *** Serial input to Xen (type 'CTRL-a'

Re: HVM/PVH Balloon crash

2021-09-14 Thread Jan Beulich
On 15.09.2021 04:40, Elliott Mitchell wrote: > On Tue, Sep 07, 2021 at 05:57:10PM +0200, Jan Beulich wrote: >> On 07.09.2021 17:03, Elliott Mitchell wrote: >>> Could be this system is in an >>> intergenerational hole, and some spot in the PVH/HVM code makes an >>> assumption of the presence of NPT