Re: [PATCH 3/4] xen/version: Drop bogus return values for XENVER_platform_parameters

2023-01-09 Thread Jan Beulich
On 06.01.2023 13:14, Andrew Cooper wrote: > On 06/01/2023 7:54 am, Jan Beulich wrote: >> On 05.01.2023 23:17, Andrew Cooper wrote: >>> On 05/01/2023 7:57 am, Jan Beulich wrote: On 04.01.2023 20:55, Andrew Cooper wrote: > On 04/01/2023 4:40 pm, Jan Beulich wrote: >> On 03.01.2023 21:09,

Re: [PATCH 01/11] x86/shadow: replace sh_reset_l3_up_pointers()

2023-01-09 Thread Jan Beulich
On 06.01.2023 01:55, Andrew Cooper wrote: > On 05/01/2023 3:59 pm, Jan Beulich wrote: >> Rather than doing a separate hash walk (and then even using the vCPU >> variant, which is to go away), do the up-pointer-clearing right in >> sh_unpin(), as an alternative to the (now further limited) enlisting

Re: [PATCH 05/11] x86/shadow: move bogus HVM checks in sh_pagetable_dying()

2023-01-09 Thread Jan Beulich
On 06.01.2023 02:00, Andrew Cooper wrote: > On 05/01/2023 4:04 pm, Jan Beulich wrote: >> Perhaps these should have been dropped right in 2fb2dee1ac62 ("x86/mm: >> pagetable_dying() is HVM-only"). Convert both to assertions, noting that >> in particular the one in the 3-level variant of the function

Re: [PATCH 06/11] x86/shadow: drop a few uses of mfn_valid()

2023-01-09 Thread Jan Beulich
On 06.01.2023 02:02, Andrew Cooper wrote: > On 05/01/2023 4:04 pm, Jan Beulich wrote: >> v->arch.paging.shadow.shadow_table[], v->arch.paging.shadow.oos[], >> v->arch.paging.shadow.oos_{snapshot[],fixup[].smfn[]} as well as the > > fixup[],smfn[] ? No. See e.g. shadow_vcpu_init(): for ( i =

Re: [linux-linus test] 175625: regressions - FAIL

2023-01-09 Thread Juergen Gross
On 08.01.23 17:54, osstest service owner wrote: flight 175625 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/175625/ Regressions :-( I'm looking at the x86 failures right now. I can reproduce the issue locally using the linus tree. Juergen OpenPGP_0xB0DE9DD628BF1

Re: [PATCH v1 1/8] xen/riscv: introduce dummy asm/init.h

2023-01-09 Thread Oleksii
Thanks for the comments. I'll update commit message in the next patch series. ~Oleksii On Fri, 2023-01-06 at 13:42 +, Julien Grall wrote: > On 06/01/2023 13:14, Oleksii Kurochko wrote: > > I am guessing this is necessary because you will use > will > be used later on. > > If so, then I thi

Re: [PATCH v1 2/8] xen/riscv: introduce asm/types.h header file

2023-01-09 Thread Oleksii
On Fri, 2023-01-06 at 15:12 +0100, Jan Beulich wrote: > On 06.01.2023 14:14, Oleksii Kurochko wrote: > > Signed-off-by: Oleksii Kurochko > > --- > >  xen/arch/riscv/include/asm/types.h | 73 > > ++ > >  1 file changed, 73 insertions(+) > >  create mode 100644 xen/arch/ri

Re: [PATCH v1 3/8] xen/riscv: introduce stack stuff

2023-01-09 Thread Oleksii
On Fri, 2023-01-06 at 15:15 +0100, Jan Beulich wrote: > On 06.01.2023 14:14, Oleksii Kurochko wrote: > > --- a/xen/arch/riscv/riscv64/head.S > > +++ b/xen/arch/riscv/riscv64/head.S > > @@ -1,4 +1,10 @@ > > .section .text.header, "ax", %progbits > >   > >  ENTRY(start) > > -    j  start

Re: [PATCH v1 3/8] xen/riscv: introduce stack stuff

2023-01-09 Thread Oleksii
Hi, On Fri, 2023-01-06 at 13:54 +, Julien Grall wrote: > Hi, > > On 06/01/2023 13:14, Oleksii Kurochko wrote: > > The patch introduces and sets up a stack in order to go to C > > environment > > > > Signed-off-by: Oleksii Kurochko > > --- > >   xen/arch/riscv/Makefile   | 1 + > >   xen/

Re: [PATCH v1 4/8] xen/riscv: introduce sbi call to putchar to console

2023-01-09 Thread Oleksii
Hi, On Fri, 2023-01-06 at 13:40 +, Julien Grall wrote: > Hi, > > On 06/01/2023 13:14, Oleksii Kurochko wrote: > > The patch introduce sbi_putchar() SBI call which is necessary > > to implement initial early_printk > > > > Signed-off-by: Oleksii Kurochko > > --- > >   xen/arch/riscv/Makefile

Re: [PATCH v1 4/8] xen/riscv: introduce sbi call to putchar to console

2023-01-09 Thread Oleksii
Hi Michal, On Fri, 2023-01-06 at 16:19 +0100, Michal Orzel wrote: > Hi Oleksii, > > On 06/01/2023 14:14, Oleksii Kurochko wrote: > > > > > > The patch introduce sbi_putchar() SBI call which is necessary > > to implement initial early_printk > > > > Signed-off-by: Oleksii Kurochko > > --- > >

Re: [PATCH v1 6/8] xen/riscv: introduce early_printk basic stuff

2023-01-09 Thread Oleksii
Hi, On Fri, 2023-01-06 at 13:51 +, Julien Grall wrote: > Hi, > > On 06/01/2023 13:14, Oleksii Kurochko wrote: > > The patch introduces a basic stuff of early_printk functionality > > which will be enough to print 'hello from C environment" > > > > Signed-off-by: Oleksii Kurochko > > --- > >

Re: [PATCH v1 8/8] automation: add RISC-V smoke test

2023-01-09 Thread Oleksii
On Fri, 2023-01-06 at 15:05 +, Andrew Cooper wrote: > On 06/01/2023 1:14 pm, Oleksii Kurochko wrote: > > Add check if there is a message 'Hello from C env' presents > > in log file to be sure that stack is set and C part of early printk > > is working. > > > > Also qemu-system-riscv was added

Re: [PATCH 07/11] x86/shadow: L2H shadow type is PV32-only

2023-01-09 Thread Jan Beulich
On 06.01.2023 02:31, Andrew Cooper wrote: > On 05/01/2023 4:05 pm, Jan Beulich wrote: >> Like for the various HVM-only types, save a little bit of code by suitably >> "masking" this type out when !PV32. > > add/remove: 0/1 grow/shrink: 2/4 up/down: 544/-922 (-378) > Function   

Re: [XEN v4] xen/arm: Probe the load/entry point address of an uImage correctly

2023-01-09 Thread Oleksandr Tyshchenko
On 08.01.23 18:06, Julien Grall wrote: Hello Julien, Ayan, all Hi Ayan, On 21/12/2022 18:53, Ayan Kumar Halder wrote: Currently, kernel_uimage_probe() does not read the load/entry point address set in the uImge header. Thus, info->zimage.start is 0 (default value). This causes, kernel_zim

Re: [PATCH 08/11] x86/shadow: reduce effort of hash calculation

2023-01-09 Thread Jan Beulich
On 06.01.2023 03:03, Andrew Cooper wrote: > On 05/01/2023 4:05 pm, Jan Beulich wrote: >> The "n" input is a GFN value and hence bounded by the physical address >> bits in use on a system. > > The one case where this isn't obviously true is in sh_audit().  It comes > from a real MFN in the system,

[PATCH] automation: add qemu-system-riscv to riscv64.dockerfile

2023-01-09 Thread Oleksii Kurochko
qemu-system-riscv will be used to run RISC-V Xen binary and gather logs for smoke tests. Signed-off-by: Oleksii Kurochko --- automation/build/archlinux/riscv64.dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/automation/build/archlinux/riscv64.dockerfile b/automa

Re: [PATCH v1 01/13] xen/arm: re-arrange the static shared memory region

2023-01-09 Thread Julien Grall
Hi Penny, On 09/01/2023 07:48, Penny Zheng wrote: -Original Message- From: Julien Grall Sent: Sunday, January 8, 2023 7:44 PM To: Penny Zheng ; xen-devel@lists.xenproject.org Cc: Wei Chen ; Stefano Stabellini ; Bertrand Marquis ; Volodymyr Babchuk Subject: Re: [PATCH v1 01/13] xen/ar

Re: [PATCH v1 05/13] xen/arm: allocate shared memory from heap when host address not provided

2023-01-09 Thread Julien Grall
Hi Penny, On 09/01/2023 07:50, Penny Zheng wrote: -Original Message- From: Julien Grall Sent: Sunday, January 8, 2023 8:23 PM To: Penny Zheng ; xen-devel@lists.xenproject.org Cc: Wei Chen ; Stefano Stabellini ; Bertrand Marquis ; Volodymyr Babchuk Subject: Re: [PATCH v1 05/13] xen/arm:

Re: [PATCH v1 06/13] xen/arm: assign shared memory to owner when host address not provided

2023-01-09 Thread Julien Grall
On 09/01/2023 07:49, Penny Zheng wrote: Hi Julien Hi Penny, Happy new year Happy new year too! -Original Message- From: Julien Grall Sent: Sunday, January 8, 2023 8:53 PM To: Penny Zheng ; xen-devel@lists.xenproject.org Cc: Wei Chen ; Stefano Stabellini ; Bertrand Marquis

[linux-linus test] 175634: regressions - FAIL

2023-01-09 Thread osstest service owner
flight 175634 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/175634/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-libvirt-xsm 8 xen-boot fail REGR. vs. 173462 test-amd64-amd64-li

Re: [PATCH v1 4/8] xen/riscv: introduce sbi call to putchar to console

2023-01-09 Thread Julien Grall
Hi Oleksii, On 09/01/2023 09:04, Oleksii wrote: On Fri, 2023-01-06 at 13:40 +, Julien Grall wrote: Hi, On 06/01/2023 13:14, Oleksii Kurochko wrote: The patch introduce sbi_putchar() SBI call which is necessary to implement initial early_printk Signed-off-by: Oleksii Kurochko ---   xen/

Re: LBR and Sapphire Rapids

2023-01-09 Thread Jan Beulich
On 06.01.2023 19:21, Andrew Cooper wrote: > On SPR, MSR_DBG_CTRL.LBR is a write-discard bit.  There really are no > model specific LBRs, so we should emulate it as write discard too.  More > generally, I think we should apply that to any system were we don't know > the model-specific indices. > >

Re: [PATCH v1 6/8] xen/riscv: introduce early_printk basic stuff

2023-01-09 Thread Julien Grall
Hi, On 09/01/2023 09:10, Oleksii wrote: On Fri, 2023-01-06 at 13:51 +, Julien Grall wrote: Hi, On 06/01/2023 13:14, Oleksii Kurochko wrote: The patch introduces a basic stuff of early_printk functionality which will be enough to print 'hello from C environment" Signed-off-by: Oleksii Kur

Re: [PATCH 1/2] xen/cppcheck: sort alphabetically cppcheck report entries

2023-01-09 Thread Michal Orzel
Hi Luca, On 06/01/2023 11:41, Luca Fancellu wrote: > > > Sort alphabetically cppcheck report entries when producing the text > report, this will help comparing different reports and will group > together findings from the same file. > > Signed-off-by: Luca Fancellu > --- > xen/scripts/xen_ana

Re: [PATCH v7 4/4] x86: Allow using Linux's PAT

2023-01-09 Thread Jan Beulich
On 07.01.2023 23:07, Demi Marie Obenour wrote: > --- a/xen/arch/x86/Kconfig > +++ b/xen/arch/x86/Kconfig > @@ -227,6 +227,39 @@ config XEN_ALIGN_2M > > endchoice > > +config LINUX_PAT > + bool "Use Linux's PAT instead of Xen's default" > + help > + Use Linux's Page Attribute Tabl

Re: [PATCH 1/2] xen/cppcheck: sort alphabetically cppcheck report entries

2023-01-09 Thread Jan Beulich
On 09.01.2023 12:15, Michal Orzel wrote: > On 06/01/2023 11:41, Luca Fancellu wrote: >> Sort alphabetically cppcheck report entries when producing the text >> report, this will help comparing different reports and will group >> together findings from the same file. >> >> Signed-off-by: Luca Fancell

[xen-unstable test] 175635: tolerable FAIL

2023-01-09 Thread osstest service owner
flight 175635 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/175635/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-qemut-win7-amd64 19 guest-stopfail like 175624 test-amd64-i386-xl-qemuu-win7-amd64

Re: [PATCH 5/6] tests: add G_GNUC_PRINTF for various functions

2023-01-09 Thread Daniel P . Berrangé
On Thu, Dec 29, 2022 at 10:34:55AM +0100, Thomas Huth wrote: > On 19/12/2022 14.02, Daniel P. Berrangé wrote: > > Signed-off-by: Daniel P. Berrangé > > --- > > tests/qtest/ahci-test.c | 3 +++ > > tests/qtest/arm-cpu-features.c| 1 + > > tests/qtest/erst-test.c | 2 +

Re: [PATCH 2/8] x86/paging: fold most HAP and shadow final teardown

2023-01-09 Thread Jan Beulich
On 05.01.2023 18:56, Andrew Cooper wrote: > On 22/12/2022 7:51 am, Jan Beulich wrote: >> On 21.12.2022 18:16, Andrew Cooper wrote: >>> On 21/12/2022 1:25 pm, Jan Beulich wrote: + d, d->arch.paging.total_pages, + d->arch.paging.free_pages, d->arch.paging.p

RE: [PATCH v1 06/13] xen/arm: assign shared memory to owner when host address not provided

2023-01-09 Thread Penny Zheng
> -Original Message- > From: Julien Grall > Sent: Monday, January 9, 2023 6:58 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org > Cc: Wei Chen ; Stefano Stabellini > ; Bertrand Marquis ; > Volodymyr Babchuk > Subject: Re: [PATCH v1 06/13] xen/arm: assign shared memory to owner > when

[PATCH 0/2] x86/vmx: Don't crash guests when there is no model-specific LBRs available

2023-01-09 Thread Andrew Cooper
This is the minimum bodge required to stop guests crashing on Sapphire Rapids hardware. Note that both Arch LBR and safely (in terms of migration) enumerating PDCM/MSR_PERF_CAPS depend on improved MSR levelling support which is still not yet complete. i.e. We cannot do the second half (enumeratin

Re: (Ab)using xenstored without Xen

2023-01-09 Thread David Woodhouse
On 9 January 2023 07:40:06 GMT, Juergen Gross wrote: >Sorry for the late answer, but I was pretty busy before my 3 week time off. :-) No problem, I had lots of other things to work on, including my own time off. Hope you enjoyed it! >On 20.12.22 13:02, David Woodhouse wrote: >> I've been wor

[PATCH 2/2] x86/vmx: Support for CPUs without model-specific LBR

2023-01-09 Thread Andrew Cooper
Ice Lake (server at least) has both Arch LBR and model-specific LBR. Sapphire Rapids does not have model-specific LBR at all. I.e. On SPR and later, model_specific_lbr will always be NULL, so we must make changes to avoid reliably hitting the domain_crash(). The Arch LBR spec states that CPUs wi

[PATCH 1/2] x86/vmx: Calculate model-specific LBRs once at start of day

2023-01-09 Thread Andrew Cooper
There is no point repeating this calculation at runtime, especially as it is in the fallback path of the WRSMR/RDMSR handlers. Move the infrastructure higher in vmx.c to avoid forward declarations, renaming last_branch_msr_get() to get_model_specific_lbr() to highlight that these are model-specifi

Re: [PATCH v1 4/8] xen/riscv: introduce sbi call to putchar to console

2023-01-09 Thread Oleksii
On Fri, 2023-01-06 at 17:16 +, Andrew Cooper wrote: > On 20/12/2022 6:23 am, Bobby Eshleman wrote: > > On Fri, Jan 06, 2023 at 03:14:25PM +0200, Oleksii Kurochko wrote: > > > The patch introduce sbi_putchar() SBI call which is necessary > > > to implement initial early_printk > > > > > I think

[qemu-mainline test] 175637: FAIL

2023-01-09 Thread osstest service owner
flight 175637 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/175637/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-credit2 broken in 175629 Tests wh

[PATCH v2 0/5] x86/mm: address aspects noticed during XSA-410 work

2023-01-09 Thread Jan Beulich
Various tidying changes accumulated during that effort. They're all functionally independent afaict, but there may be contextual interactions between some of them. v2 addresses review comments, which however goes as far as introducing a new patch (2). 1: paging: fold most HAP and shadow final tea

[PATCH v2 1/5] x86/paging: fold most HAP and shadow final teardown

2023-01-09 Thread Jan Beulich
HAP does a few things beyond what's common, which are left there at least for now. Common operations, however, are moved to paging_final_teardown(), allowing shadow_final_teardown() to go away. While moving (and hence generalizing) the respective SHADOW_PRINTK() drop the logging of total_pages fro

[PATCH v2 2/5] x86/paging: drop set-allocation from final-teardown

2023-01-09 Thread Jan Beulich
The fixes for XSA-410 have arranged for P2M pages being freed by P2M code to be properly freed directly, rather than being put back on the paging pool list. Therefore whatever p2m_teardown() may return will no longer need taking care of here. Drop the code, leaving the assertions in place and addin

[PATCH v2 3/5] x86/paging: move update_paging_modes() hook

2023-01-09 Thread Jan Beulich
The hook isn't mode dependent, hence it's misplaced in struct paging_mode. (Or alternatively I see no reason why the alloc_page() and free_page() hooks don't also live there.) Move it to struct paging_domain. Signed-off-by: Jan Beulich --- v2: Undo rename (plural -> singular). Add a comment in sh

[PATCH v2 4/5] x86/paging: move and conditionalize flush_tlb() hook

2023-01-09 Thread Jan Beulich
The hook isn't mode dependent, hence it's misplaced in struct paging_mode. (Or alternatively I see no reason why the alloc_page() and free_page() hooks don't also live there.) Move it to struct paging_domain. The hook also is used for HVM guests only, so make respective pieces conditional upon CON

[PATCH v2 5/5] x86/shadow: drop zero initialization from shadow_domain_init()

2023-01-09 Thread Jan Beulich
There's no need for this as struct domain starts out zero-filled. Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper --- v2: Re-base over changes earlier in the series. --- a/xen/arch/x86/mm/shadow/common.c +++ b/xen/arch/x86/mm/shadow/common.c @@ -64,12 +64,8 @@ int shadow_domain_init(struc

Re: [PATCH v7 2/4] x86/mm: Reject invalid cacheability in PV guests by default

2023-01-09 Thread Jan Beulich
On 07.01.2023 23:07, Demi Marie Obenour wrote: > Setting cacheability flags that are not ones specified by Xen is a bug > in the guest. By default, return -EINVAL if a guests attempts to do > this. The invalid-cacheability= Xen command-line flag allows the > administrator to allow such attempts o

Re: [PATCH v7 3/4] x86/mm: make code robust to future PAT changes

2023-01-09 Thread Jan Beulich
On 07.01.2023 23:07, Demi Marie Obenour wrote: > @@ -6412,6 +6414,100 @@ static void __init __maybe_unused > build_assertions(void) > * using different PATs will not work. > */ > BUILD_BUG_ON(XEN_MSR_PAT != 0x050100070406ULL); > + > +/* > + * _PAGE_WB must be zero. Linux

Re: [PATCH 1/2] xen/cppcheck: sort alphabetically cppcheck report entries

2023-01-09 Thread Luca Fancellu
> On 9 Jan 2023, at 11:41, Jan Beulich wrote: > > On 09.01.2023 12:15, Michal Orzel wrote: >> On 06/01/2023 11:41, Luca Fancellu wrote: >>> Sort alphabetically cppcheck report entries when producing the text >>> report, this will help comparing different reports and will group >>> together fin

Re: [PATCH 2/6] x86/prot-key: Split PKRU infrastructure out of asm/processor.h

2023-01-09 Thread Andrew Cooper
On 21/12/2021 11:28 am, Jan Beulich wrote: > On 16.12.2021 10:54, Andrew Cooper wrote: >> --- /dev/null >> +++ b/xen/arch/x86/include/asm/prot-key.h >> @@ -0,0 +1,45 @@ >> +/** >> + * arch/x86/include/asm/spec_ctrl.h >> + *

Re: [PATCH 0/4] xen/blkback: some cleanups

2023-01-09 Thread Juergen Gross
On 16.12.22 15:58, Juergen Gross wrote: Some small cleanup patches I had lying around for some time now. Juergen Gross (4): xen/blkback: fix white space code style issues xen/blkback: remove stale prototype xen/blkback: simplify free_persistent_gnts() interface xen/blkback: move blki

[PATCH] x86/mm: fix poking_init() for Xen PV guests

2023-01-09 Thread Juergen Gross
Commit 3f4c8211d982 ("x86/mm: Use mm_alloc() in poking_init()") broke the kernel for running as Xen PV guest. It seems as if the new address space is never activated before being used, resulting in Xen rejecting to accept the new CR3 value (the PGD isn't pinned). Fix that by adding the now missin

[qemu-mainline test] 175643: regressions - FAIL

2023-01-09 Thread osstest service owner
flight 175643 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/175643/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-xsm 6 xen-buildfail REGR. vs. 175623 build-amd64

[PATCH v2 0/8] Basic early_printk and smoke test implementation

2023-01-09 Thread Oleksii Kurochko
The patch series introduces the following: - the minimal set of headers and changes inside them. - SBI (RISC-V Supervisor Binary Interface) things necessary for basic early_printk implementation. - things needed to set up the stack. - early_printk() function to print only strings. - RISC-V smoke

[PATCH v2 4/8] xen/riscv: introduce sbi call to putchar to console

2023-01-09 Thread Oleksii Kurochko
The patch introduce sbi_putchar() SBI call which is necessary to implement initial early_printk Signed-off-by: Oleksii Kurochko --- Changes in V2: - add an explanatory comment about sbi_console_putchar() function. - order the files alphabetically in Makefile --- xen/arch/riscv/Makefile

[PATCH v2 3/8] xen/riscv: introduce stack stuff

2023-01-09 Thread Oleksii Kurochko
The patch introduces and sets up a stack in order to go to C environment Signed-off-by: Oleksii Kurochko --- Changes in V2: - introduce STACK_SIZE define. - use consistent padding between instruction mnemonic and operand(s) --- xen/arch/riscv/Makefile | 1 + xen/arch/riscv/in

[PATCH v2 1/8] xen/riscv: introduce dummy asm/init.h

2023-01-09 Thread Oleksii Kurochko
The following patches require which includes Signed-off-by: Oleksii Kurochko --- Changes in V2: - Add explanation comment to the comment message --- xen/arch/riscv/include/asm/init.h | 12 1 file changed, 12 insertions(+) create mode 100644 xen/arch/riscv/include/asm/init.h

[PATCH v2 8/8] automation: add RISC-V smoke test

2023-01-09 Thread Oleksii Kurochko
Add check if there is a message 'Hello from C env' presents in log file to be sure that stack is set and C part of early printk is working. Signed-off-by: Oleksii Kurochko --- Changes in V2: - Move changes in the dockerfile to separate patch and send it to mailing list separately:

[PATCH v2 6/8] xen/riscv: introduce early_printk basic stuff

2023-01-09 Thread Oleksii Kurochko
The patch introduces a basic stuff of early_printk functionality which will be enough to print 'hello from C environment". early_printk() function was changed in comparison with original as common isn't being built now so there is no vscnprintf. Because printk() relies on a serial driver (like the

[PATCH v2 2/8] xen/riscv: introduce asm/types.h header file

2023-01-09 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- Changes in V2: - Remove unneeded now types from --- xen/arch/riscv/include/asm/types.h | 22 ++ 1 file changed, 22 insertions(+) create mode 100644 xen/arch/riscv/include/asm/types.h diff --git a/xen/arch/riscv/include/asm/types.h b/

[PATCH v2 5/8] xen/include: include in

2023-01-09 Thread Oleksii Kurochko
should be included because second argument of early_puts has type 'size_t' which is defined in Signed-off-by: Oleksii Kurochko Acked-by: Julien Grall --- Changes in V2: - add Acked-by: Julien Grall --- xen/include/xen/early_printk.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/x

[PATCH v2 7/8] xen/riscv: print hello message from C env

2023-01-09 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- xen/arch/riscv/riscv64/head.S | 4 +--- xen/arch/riscv/setup.c| 12 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/xen/arch/riscv/riscv64/head.S b/xen/arch/riscv/riscv64/head.S index c1f33a1934..d444dd8aad 100644 --- a/xen

Re: [PATCH v2 4/8] xen/riscv: introduce sbi call to putchar to console

2023-01-09 Thread Jan Beulich
On 09.01.2023 16:46, Oleksii Kurochko wrote: > --- /dev/null > +++ b/xen/arch/riscv/include/asm/sbi.h > @@ -0,0 +1,34 @@ > +/* SPDX-License-Identifier: (GPL-2.0-or-later) */ > +/* > + * Copyright (c) 2021 Vates SAS. > + * > + * Taken from xvisor, modified by Bobby Eshleman (bobby.eshle...@gmail.com

Re: [PATCH v2 4/8] xen/riscv: introduce sbi call to putchar to console

2023-01-09 Thread Julien Grall
Hi, On 09/01/2023 15:46, Oleksii Kurochko wrote: The patch introduce sbi_putchar() SBI call which is necessary to implement initial early_printk Signed-off-by: Oleksii Kurochko --- Changes in V2: - add an explanatory comment about sbi_console_putchar() function. - order the files alp

[libvirt test] 175638: tolerable FAIL - PUSHED

2023-01-09 Thread osstest service owner
flight 175638 libvirt real [real] flight 175645 libvirt real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/175638/ http://logs.test-lab.xenproject.org/osstest/logs/175645/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-arm64-arm64-li

Re: [PATCH v2 6/8] xen/riscv: introduce early_printk basic stuff

2023-01-09 Thread Julien Grall
Hi, On 09/01/2023 15:46, Oleksii Kurochko wrote: The patch introduces a basic stuff of early_printk functionality which will be enough to print 'hello from C environment". early_printk() function was changed in comparison with original as common isn't being built now so there is no vscnprintf.

Re: [PATCH v2 3/8] xen/riscv: introduce stack stuff

2023-01-09 Thread Julien Grall
Hi, On 09/01/2023 15:46, Oleksii Kurochko wrote: The patch introduces and sets up a stack in order to go to C environment Signed-off-by: Oleksii Kurochko It looks like the comments from Andrew were missed. --- Changes in V2: - introduce STACK_SIZE define. - use consistent padding

Re: [PATCH v7 4/4] x86: Allow using Linux's PAT

2023-01-09 Thread Demi Marie Obenour
On Mon, Jan 09, 2023 at 12:37:34PM +0100, Jan Beulich wrote: > On 07.01.2023 23:07, Demi Marie Obenour wrote: > > --- a/xen/arch/x86/Kconfig > > +++ b/xen/arch/x86/Kconfig > > @@ -227,6 +227,39 @@ config XEN_ALIGN_2M > > > > endchoice > > > > +config LINUX_PAT > > + bool "Use Linux's PAT ins

Re: [PATCH v2 3/8] xen/riscv: introduce stack stuff

2023-01-09 Thread Jan Beulich
On 09.01.2023 16:46, Oleksii Kurochko wrote: > --- a/xen/arch/riscv/include/asm/config.h > +++ b/xen/arch/riscv/include/asm/config.h > @@ -43,6 +43,8 @@ > > #define SMP_CACHE_BYTES (1 << 6) > > +#define STACK_SIZE (PAGE_SIZE) Btw, nit: No need for parentheses here. Jan

Re: [PATCH] x86/ucode/AMD: apply the patch early on every logical thread

2023-01-09 Thread Sergey Dyasli
On Thu, Jan 5, 2023 at 10:56 PM Andrew Cooper wrote: > > diff --git a/xen/arch/x86/cpu/microcode/private.h > > b/xen/arch/x86/cpu/microcode/private.h > > index 73b095d5bf..c4c6729f56 100644 > > --- a/xen/arch/x86/cpu/microcode/private.h > > +++ b/xen/arch/x86/cpu/microcode/private.h > > @@ -7,6 +

Re: [PATCH v2 6/8] xen/riscv: introduce early_printk basic stuff

2023-01-09 Thread Jan Beulich
On 09.01.2023 16:46, Oleksii Kurochko wrote: > --- a/xen/arch/riscv/Kconfig.debug > +++ b/xen/arch/riscv/Kconfig.debug > @@ -0,0 +1,7 @@ > +config EARLY_PRINTK > +bool "Enable early printk config" Nit: Stray "config" in the prompt text. Jan

Re: [PATCH 2/6] x86/prot-key: Split PKRU infrastructure out of asm/processor.h

2023-01-09 Thread Jan Beulich
On 09.01.2023 15:57, Andrew Cooper wrote: > On 21/12/2021 11:28 am, Jan Beulich wrote: >> On 16.12.2021 10:54, Andrew Cooper wrote: >>> --- /dev/null >>> +++ b/xen/arch/x86/include/asm/prot-key.h >>> @@ -0,0 +1,45 @@ >>> +/

Re: [PATCH] MAINTAINERS: Clarify check-in requirements for mixed-author patches

2023-01-09 Thread George Dunlap
On Thu, Dec 8, 2022 at 2:26 PM George Dunlap wrote: > > > On Thu, Dec 8, 2022 at 1:58 PM Julien Grall wrote: > >> Hi George, >> >> On 08/12/2022 10:49, George Dunlap wrote: >> > From: George Dunlap >> > >> > There was a question raised recently about the requriements for >> >> Typo: s/requrieme

Re: [PATCH 3/6] x86/hvm: Context switch MSR_PKRS

2023-01-09 Thread Andrew Cooper
On 21/12/2021 11:56 am, Jan Beulich wrote: > On 16.12.2021 10:54, Andrew Cooper wrote: >> @@ -42,4 +45,49 @@ static inline void wrpkru(uint32_t pkru) >> :: "a" (pkru), "d" (0), "c" (0) ); >> } >> >> +/* >> + * Xen does not use PKS. >> + * >> + * Guest kernel use is expected t

Re: [PATCH 6/6] x86/hvm: Support PKS

2023-01-09 Thread Andrew Cooper
On 21/12/2021 12:18 pm, Jan Beulich wrote: > On 16.12.2021 10:54, Andrew Cooper wrote: >> With all infrastructure in place, advertise the PKS CPUID bit to guests, and >> let them set CR4.PKS. >> >> Experiment with a tweak to the layout of hvm_cr4_guest_valid_bits() so future >> additions will be ju

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

2023-01-09 Thread osstest service owner
flight 175644 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/175644/ 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

[qemu-mainline bisection] complete build-amd64-xsm

2023-01-09 Thread osstest service owner
branch xen-unstable xenbranch xen-unstable job build-amd64-xsm testid xen-build Tree: ovmf git://xenbits.xen.org/osstest/ovmf.git Tree: qemu git://xenbits.xen.org/qemu-xen-traditional.git Tree: qemuu git://git.qemu.org/qemu.git Tree: seabios git://xenbits.xen.org/osstest/seabios.git Tree: xen git:

Re: [PATCH] automation: add qemu-system-riscv to riscv64.dockerfile

2023-01-09 Thread Andrew Cooper
On 09/01/2023 9:50 am, Oleksii Kurochko wrote: > qemu-system-riscv will be used to run RISC-V Xen binary and > gather logs for smoke tests. > > Signed-off-by: Oleksii Kurochko I've committed this, and rebuilt the container.  Subsequent Gitlab-CI runs should be able to run the RISC-V smoke tests.

[qemu-mainline test] 175647: regressions - FAIL

2023-01-09 Thread osstest service owner
flight 175647 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/175647/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-xsm 6 xen-buildfail REGR. vs. 175623 build-amd64

Re: [PATCH v1 06/13] xen/arm: assign shared memory to owner when host address not provided

2023-01-09 Thread Julien Grall
Hi Penny, On 09/01/2023 11:58, Penny Zheng wrote: -Original Message- From: Julien Grall Sent: Monday, January 9, 2023 6:58 PM To: Penny Zheng ; xen-devel@lists.xenproject.org Cc: Wei Chen ; Stefano Stabellini ; Bertrand Marquis ; Volodymyr Babchuk Subject: Re: [PATCH v1 06/13] xen/arm:

Problem with pat_enable() and commit 72cbc8f04fe2

2023-01-09 Thread Michael Kelley (LINUX)
I've come across a case with a VM running on Hyper-V that doesn't get MTRRs, but the PAT is functional. (This is a Confidential VM using AMD's SEV-SNP encryption technology with the vTOM option.) In this case, the changes in commit 72cbc8f04fe2 ("x86/PAT: Have pat_enabled() properly reflect state

Re: [PATCH] automation: add qemu-system-riscv to riscv64.dockerfile

2023-01-09 Thread Oleksii
On Mon, 2023-01-09 at 17:53 +, Andrew Cooper wrote: > On 09/01/2023 9:50 am, Oleksii Kurochko wrote: > > qemu-system-riscv will be used to run RISC-V Xen binary and > > gather logs for smoke tests. > > > > Signed-off-by: Oleksii Kurochko > > I've committed this, and rebuilt the container.  S

[qemu-mainline bisection] complete build-amd64

2023-01-09 Thread osstest service owner
branch xen-unstable xenbranch xen-unstable job build-amd64 testid xen-build Tree: ovmf git://xenbits.xen.org/osstest/ovmf.git Tree: qemu git://xenbits.xen.org/qemu-xen-traditional.git Tree: qemuu git://git.qemu.org/qemu.git Tree: seabios git://xenbits.xen.org/osstest/seabios.git Tree: xen git://xe

[ovmf test] 175655: all pass - PUSHED

2023-01-09 Thread osstest service owner
flight 175655 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/175655/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 33a3408fbbf988aaa8ecc6e721cf83e3ae810e54 baseline version: ovmf d8d829b89dababf763ab3

[qemu-mainline test] 175654: regressions - FAIL

2023-01-09 Thread osstest service owner
flight 175654 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/175654/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-xsm 6 xen-buildfail REGR. vs. 175623 build-amd64

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

2023-01-09 Thread osstest service owner
flight 175653 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/175653/ 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

[PATCH v7] xen/pt: reserve PCI slot 2 for Intel igd-passthru

2023-01-09 Thread Chuck Zmudzinski
Intel specifies that the Intel IGD must occupy slot 2 on the PCI bus, as noted in docs/igd-assign.txt in the Qemu source code. Currently, when the xl toolstack is used to configure a Xen HVM guest with Intel IGD passthrough to the guest with the Qemu upstream device model, a Qemu emulated PCI devi

[linux-linus test] 175642: regressions - FAIL

2023-01-09 Thread osstest service owner
flight 175642 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/175642/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-libvirt-xsm 8 xen-boot fail REGR. vs. 173462 test-amd64-amd64-li

Re: [PATCH v7] xen/pt: reserve PCI slot 2 for Intel igd-passthru

2023-01-09 Thread Michael S. Tsirkin
On Mon, Jan 09, 2023 at 04:55:42PM -0500, Chuck Zmudzinski wrote: > Intel specifies that the Intel IGD must occupy slot 2 on the PCI bus, > as noted in docs/igd-assign.txt in the Qemu source code. > > Currently, when the xl toolstack is used to configure a Xen HVM guest with > Intel IGD passthroug

[XEN PATCH 0/3] Configure qemu upstream correctly by default for igd-passthru

2023-01-09 Thread Chuck Zmudzinski
Sorry for the length of this cover letter but it is helpful to put all the pros and cons of the two different approaches to solving the problem of configuring the Intel IGD with qemu upstream and libxl in one place, which I attempt to do here. Of course the other approach involves a patch to qemu [

[XEN PATCH 2/3] libxl/dm: Manage pci slot assignment for Intel IGD passthrough

2023-01-09 Thread Chuck Zmudzinski
By default, except for the ich9-usb-uhci device which libxl assigns to slot 29 (0xid), libxl defers to qemu upstream's automatic slot assignment process, which is simply to assign each emulated device to the next available slot on the pci bus. With this default behavior, libxl and qemu will not con

[XEN PATCH 1/3] libxl/dm: Use "pc" machine type for Intel IGD passthrough

2023-01-09 Thread Chuck Zmudzinski
The default qemu upstream "xenfv" machine type that is used when an HVM guest is configured for Intel IGD passthrough assigns slot 2 to the xen platform pci device. It is a requirement that slot 2 be assigned to the Intel IGD when it is passed through as the primary graphics adapter. Using the "pc"

[XEN PATCH 3/3] libxl/dm: Assign slot 2 by default for Intel IGD passthrough

2023-01-09 Thread Chuck Zmudzinski
It is possible for the administrator to manually specify the virtual slot addresses of passed through pci devices on the guest's pci bus using the @VSLOT parameter in xl.cfg. With this patch, libxl will by default assign the Intel IGD to slot 2 when gfx_passthru is configured for the Intel IGD so i

[qemu-mainline bisection] complete build-i386

2023-01-09 Thread osstest service owner
branch xen-unstable xenbranch xen-unstable job build-i386 testid xen-build Tree: ovmf git://xenbits.xen.org/osstest/ovmf.git Tree: qemu git://xenbits.xen.org/qemu-xen-traditional.git Tree: qemuu git://git.qemu.org/qemu.git Tree: seabios git://xenbits.xen.org/osstest/seabios.git Tree: xen git://xen

Re: [PATCH v7] xen/pt: reserve PCI slot 2 for Intel igd-passthru

2023-01-09 Thread Chuck Zmudzinski
On 1/9/23 5:33 PM, Michael S. Tsirkin wrote: > On Mon, Jan 09, 2023 at 04:55:42PM -0500, Chuck Zmudzinski wrote: >> Intel specifies that the Intel IGD must occupy slot 2 on the PCI bus, >> as noted in docs/igd-assign.txt in the Qemu source code. >> >> Currently, when the xl toolstack is used to co

Re: [PATCH v7] xen/pt: reserve PCI slot 2 for Intel igd-passthru

2023-01-09 Thread Michael S. Tsirkin
On Mon, Jan 09, 2023 at 04:55:42PM -0500, Chuck Zmudzinski wrote: > Intel specifies that the Intel IGD must occupy slot 2 on the PCI bus, > as noted in docs/igd-assign.txt in the Qemu source code. > > Currently, when the xl toolstack is used to configure a Xen HVM guest with > Intel IGD passthroug

Re: [PATCH v7] xen/pt: reserve PCI slot 2 for Intel igd-passthru

2023-01-09 Thread Michael S. Tsirkin
On Mon, Jan 09, 2023 at 06:28:44PM -0500, Chuck Zmudzinski wrote: > On 1/9/23 5:33 PM, Michael S. Tsirkin wrote: > > On Mon, Jan 09, 2023 at 04:55:42PM -0500, Chuck Zmudzinski wrote: > >> Intel specifies that the Intel IGD must occupy slot 2 on the PCI bus, > >> as noted in docs/igd-assign.txt in t

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

2023-01-09 Thread osstest service owner
flight 175651 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/175651/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-i386-xl-vhd 21 guest-start/debian.repeatfail like 175624 test-amd64-amd64-xl-qemut-win7-amd64

Re: [PATCH v7] xen/pt: reserve PCI slot 2 for Intel igd-passthru

2023-01-09 Thread Chuck Zmudzinski
On 1/9/23 6:33 PM, Michael S. Tsirkin wrote: > On Mon, Jan 09, 2023 at 04:55:42PM -0500, Chuck Zmudzinski wrote: >> Intel specifies that the Intel IGD must occupy slot 2 on the PCI bus, >> as noted in docs/igd-assign.txt in the Qemu source code. >> >> Currently, when the xl toolstack is used to co

Re: [PATCH v7] xen/pt: reserve PCI slot 2 for Intel igd-passthru

2023-01-09 Thread Chuck Zmudzinski
On 1/9/23 6:35 PM, Michael S. Tsirkin wrote: > On Mon, Jan 09, 2023 at 06:28:44PM -0500, Chuck Zmudzinski wrote: >> On 1/9/23 5:33 PM, Michael S. Tsirkin wrote: >> > On Mon, Jan 09, 2023 at 04:55:42PM -0500, Chuck Zmudzinski wrote: >> >> Intel specifies that the Intel IGD must occupy slot 2 on the

[qemu-mainline test] 175664: regressions - FAIL

2023-01-09 Thread osstest service owner
flight 175664 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/175664/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-xsm 6 xen-buildfail REGR. vs. 175623 build-amd64

Re: [PATCH v2 6/8] xen/riscv: introduce early_printk basic stuff

2023-01-09 Thread Alistair Francis
On Tue, Jan 10, 2023 at 1:47 AM Oleksii Kurochko wrote: > > The patch introduces a basic stuff of early_printk functionality > which will be enough to print 'hello from C environment". > early_printk() function was changed in comparison with original as > common isn't being built now so there is n

Re: [PATCH v2 7/8] xen/riscv: print hello message from C env

2023-01-09 Thread Alistair Francis
On Tue, Jan 10, 2023 at 1:47 AM Oleksii Kurochko wrote: > > Signed-off-by: Oleksii Kurochko Reviewed-by: Alistair Francis Alistair > --- > xen/arch/riscv/riscv64/head.S | 4 +--- > xen/arch/riscv/setup.c| 12 > 2 files changed, 13 insertions(+), 3 deletions(-) > > diff

  1   2   >