Re: [PATCH 3/3] x86/spec-ctrl: Fix NMI race condition with VT-x MSR_SPEC_CTRL handling

2022-01-17 Thread Jan Beulich
On 17.01.2022 18:23, Andrew Cooper wrote: > On 17/01/2022 11:51, Jan Beulich wrote: >> On 13.01.2022 17:38, Andrew Cooper wrote: >>> @@ -119,12 +125,11 @@ UNLIKELY_END(realmode) >>> SAVE_ALL >>> >>> /* >>> - * PV variant needed here as no guest code has executed (so >>>

RE: [PATCH 19/37] xen/x86: promote VIRTUAL_BUG_ON to ASSERT in

2022-01-17 Thread Wei Chen
Hi Jan, > -Original Message- > From: Jan Beulich > Sent: 2022年1月18日 0:22 > To: Wei Chen > Cc: Bertrand Marquis ; xen- > de...@lists.xenproject.org; sstabell...@kernel.org; jul...@xen.org > Subject: Re: [PATCH 19/37] xen/x86: promote VIRTUAL_BUG_ON to ASSERT in > > On 23.09.2021 14:02,

RE: [PATCH 04/37] xen: introduce an arch helper for default dma zone status

2022-01-17 Thread Wei Chen
Hi Jan, > -Original Message- > From: Jan Beulich > Sent: 2022年1月18日 0:11 > To: Wei Chen > Cc: Bertrand Marquis ; xen- > de...@lists.xenproject.org; sstabell...@kernel.org; jul...@xen.org > Subject: Re: [PATCH 04/37] xen: introduce an arch helper for default dma > zone status > > I

[PATCH 15/19] block: pass a block_device and opf to bio_alloc_bioset

2022-01-17 Thread Christoph Hellwig
Pass the block_device and operation that we plan to use this bio for to bio_alloc_bioset to optimize the assigment. NULL/0 can be passed, both for the passthrough case on a raw request_queue and to temporarily avoid refactoring some nasty code. Also move the gfp_mask argument after the nr_vecs

[PATCH 16/19] block: pass a block_device and opf to bio_alloc_kiocb

2022-01-17 Thread Christoph Hellwig
Pass the block_device and operation that we plan to use this bio for to bio_alloc_kiocb to optimize the assigment. Signed-off-by: Christoph Hellwig --- block/bio.c | 12 block/fops.c| 17 - include/linux/bio.h | 4 ++-- 3 files changed, 18

[PATCH 19/19] block: pass a block_device and opf to bio_reset

2022-01-17 Thread Christoph Hellwig
Pass the block_device that we plan to use this bio for and the operation to bio_reset to optimize the assigment. A NULL block_device can be passed, both for the passthrough case on a raw request_queue and to temporarily avoid refactoring some nasty code. Signed-off-by: Christoph Hellwig ---

[PATCH 18/19] block: pass a block_device and opf to bio_init

2022-01-17 Thread Christoph Hellwig
Pass the block_device that we plan to use this bio for and the operation to bio_init to optimize the assigment. A NULL block_device can be passed, both for the passthrough case on a raw request_queue and to temporarily avoid refactoring some nasty code. Signed-off-by: Christoph Hellwig ---

[PATCH 12/19] xen-blkback: bio_alloc can't fail if it is allow to sleep

2022-01-17 Thread Christoph Hellwig
Remove handling of NULL returns from sleeping bio_alloc calls given that those can't fail. Signed-off-by: Christoph Hellwig --- drivers/block/xen-blkback/blkback.c | 14 -- 1 file changed, 14 deletions(-) diff --git a/drivers/block/xen-blkback/blkback.c

[PATCH 14/19] block: pass a block_device and opf to blk_next_bio

2022-01-17 Thread Christoph Hellwig
All callers need to set the block_device and operation, so lift that into the common code. Signed-off-by: Christoph Hellwig --- block/bio.c | 6 +- block/blk-lib.c | 19 +-- block/blk-zoned.c | 9 +++-- block/blk.h | 2 --

[PATCH 17/19] block: pass a block_device and opf to bio_alloc

2022-01-17 Thread Christoph Hellwig
Pass the block_device and operation that we plan to use this bio for to bio_alloc to optimize the assigment. NULL/0 can be passed, both for the passthrough case on a raw request_queue and to temporarily avoid refactoring some nasty code. Also move the gfp_mask argument after the nr_vecs argument

[PATCH 13/19] block: move blk_next_bio to bio.c

2022-01-17 Thread Christoph Hellwig
Keep blk_next_bio next to the core bio infrastructure. Signed-off-by: Christoph Hellwig --- block/bio.c | 13 + block/blk-lib.c | 13 - 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/block/bio.c b/block/bio.c index 0d400ba2dbd18..43fb28ac6b44e

[PATCH 10/19] rnbd-srv: simplify bio mapping in process_rdma

2022-01-17 Thread Christoph Hellwig
The memory mapped in process_rdma is contiguous, so there is no need to loop over bio_add_page. Remove rnbd_bio_map_kern and just open code the bio allocation and mapping in the caller. Signed-off-by: Christoph Hellwig --- drivers/block/rnbd/rnbd-srv-dev.c | 57 ---

[PATCH 11/19] rnbd-src: remove struct rnbd_dev_blk_io

2022-01-17 Thread Christoph Hellwig
Only the priv field of rnbd_dev_blk_io is used, so store the value of that in bio->bi_private directly and remove the entire bio_set overhead. Signed-off-by: Christoph Hellwig --- drivers/block/rnbd/rnbd-srv-dev.c | 4 +--- drivers/block/rnbd/rnbd-srv-dev.h | 13 ++---

[PATCH 08/19] dm-thin: use blkdev_issue_flush instead of open coding it

2022-01-17 Thread Christoph Hellwig
Use blkdev_issue_flush, which uses an on-stack bio instead of an opencoded version with a bio embedded into struct pool. Signed-off-by: Christoph Hellwig --- drivers/md/dm-thin.c | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/md/dm-thin.c

[PATCH 09/19] drbd: bio_alloc can't fail if it is allow to sleep

2022-01-17 Thread Christoph Hellwig
Remove handling of NULL returns from sleeping bio_alloc calls given that those can't fail. Signed-off-by: Christoph Hellwig --- drivers/block/drbd/drbd_receiver.c | 21 - 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/drivers/block/drbd/drbd_receiver.c

[PATCH 07/19] dm-snap: use blkdev_issue_flush instead of open coding it

2022-01-17 Thread Christoph Hellwig
Use blkdev_issue_flush, which uses an on-stack bio instead of an opencoded version with a bio embedded into struct dm_snapshot. Signed-off-by: Christoph Hellwig --- drivers/md/dm-snap.c | 21 + 1 file changed, 1 insertion(+), 20 deletions(-) diff --git

[PATCH 06/19] dm-crypt: remove clone_init

2022-01-17 Thread Christoph Hellwig
Just open code it next to the bio allocations, which saves a few lines of code, prepares for future changes and allows to remove the duplicate bi_opf assignment for the bio_clone_fast case in kcryptd_io_read. Signed-off-by: Christoph Hellwig --- drivers/md/dm-crypt.c | 21 -

[PATCH 04/19] ntfs3: remove ntfs_alloc_bio

2022-01-17 Thread Christoph Hellwig
bio_alloc will never fail if it is allowed to sleep, so there is no need for this loop. Also remove the __GFP_HIGH specifier as it doesn't make sense here given that we'll always fall back to the mempool anyway. Signed-off-by: Christoph Hellwig --- fs/ntfs3/fsntfs.c | 23

[PATCH 05/19] dm: bio_alloc can't fail if it is allowed to sleep

2022-01-17 Thread Christoph Hellwig
Remove handling of NULL returns from sleeping bio_alloc calls given that those can't fail. Signed-off-by: Christoph Hellwig --- drivers/md/dm-crypt.c | 5 + drivers/md/dm-log-writes.c | 18 -- drivers/md/dm-thin.c | 25 +

[PATCH 02/19] nilfs2: remove nilfs_alloc_seg_bio

2022-01-17 Thread Christoph Hellwig
bio_alloc will never fail when it can sleep. Remove the now simple nilfs_alloc_seg_bio helper and open code it in the only caller. Signed-off-by: Christoph Hellwig --- fs/nilfs2/segbuf.c | 31 --- 1 file changed, 4 insertions(+), 27 deletions(-) diff --git

improve the bio allocation interface

2022-01-17 Thread Christoph Hellwig
Hi Jens, this series is posted early because it has wide-ranging changes and could use some early ACKs before -rc1. It changes the interface to the bio allocators to always pass a block_device and the operation, which is information needed for every bio submitted through bio_submit. This means

[PATCH 01/19] fs: remove mpage_alloc

2022-01-17 Thread Christoph Hellwig
open code mpage_alloc in it's two callers and simplify the results because of the context: - __mpage_writepage always passes GFP_NOFS and can thus always sleep and will never get a NULL return from bio_alloc at all. - do_mpage_readpage can only get a non-sleeping context for readahead

[PATCH 03/19] nfs/blocklayout: remove bl_alloc_init_bio

2022-01-17 Thread Christoph Hellwig
bio_alloc will never fail when it can sleep. Remove the now simple bl_alloc_init_bio helper and open code it in the only caller. Signed-off-by: Christoph Hellwig --- fs/nfs/blocklayout/blocklayout.c | 26 +- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git

[qemu-mainline test] 167726: trouble: broken/fail/pass

2022-01-17 Thread osstest service owner
flight 167726 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/167726/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl broken

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

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

Fwd: Reboot hangs on blank screen

2022-01-17 Thread The Person
-- Forwarded message - From: George Dunlap Date: Mon, Jan 17, 2022, 6:32 AM Subject: Re: Reboot hangs on blank screen To: The Person Cc: community.mana...@xenproject.org > On Nov 29, 2021, at 6:51 PM, The Person wrote: > > I am using Qubes 4.1rc1 and i have a dell 7520

[ovmf test] 167729: all pass - PUSHED

2022-01-17 Thread osstest service owner
flight 167729 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/167729/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 5801910013757bd626f67ed77eea6c16a176eebf baseline version: ovmf

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

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

[ovmf test] 167727: all pass - PUSHED

2022-01-17 Thread osstest service owner
flight 167727 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/167727/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 59c48c9314111e41550cac7875c5e9235809c3ef baseline version: ovmf

[linux-linus test] 167722: regressions - trouble: broken/fail/pass

2022-01-17 Thread osstest service owner
flight 167722 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/167722/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl-multivcpu broken test-armhf-armhf-libvirt

[PATCH v2 5/4] x86/hvm: Drop hvm_{get,set}_guest_bndcfgs() and use {get,set}_regs() instead

2022-01-17 Thread Andrew Cooper
hvm_{get,set}_guest_bndcfgs() are thin wrappers around accessing MSR_BNDCFGS. MPX was implemented on Skylake uarch CPUs and dropped in subsequent CPUs, and is disabled by default in Xen VMs. It would be nice to move all the logic into vmx_msr_{read,write}_intercept(), but the common HVM

[PATCH v2 2/4] x86/msr: Split MSR_SPEC_CTRL handling

2022-01-17 Thread Andrew Cooper
In order to fix a VT-x bug, and support MSR_SPEC_CTRL on AMD, move MSR_SPEC_CTRL handling into the new {get,set}_reg() infrastructure. Duplicate the msrs->spec_ctrl.raw accesses in the PV and VT-x paths for now. The SVM path is currently unreachable because of the CPUID policy. No functional

[PATCH v2 4/4] x86/spec-ctrl: Fix NMI race condition with VT-x MSR_SPEC_CTRL handling

2022-01-17 Thread Andrew Cooper
The logic was based on a mistaken understanding of how NMI blocking on vmexit works. NMIs are only blocked for EXIT_REASON_NMI, and not for general exits. Therefore, an NMI can in general hit early in the vmx_asm_vmexit_handler path, and the guest's value will be clobbered before it is saved.

[PATCH v2 0/4] x86/spec-ctrl: Fix NMI race condition

2022-01-17 Thread Andrew Cooper
v1 had an irritating breakage with VM migration, caused by the accessor logic moving out of guest_{rd,wr}msr(). v2 takes an approach I'd previously put off to one side, but which appears to be the least invasive way forward. Andrew Cooper (4): x86/guest: Introduce {get,set}_reg()

[PATCH v2 1/4] x86/guest: Introduce {get,set}_reg() infrastructure

2022-01-17 Thread Andrew Cooper
Various registers have per-guest-type or per-vendor locations or access requirements. To support their use from common code, provide accessors which allow for per-guest-type behaviour. For now, just infrastructure handling default cases and expectations. Subsequent patches will start handling

[PATCH v2 3/4] x86/spec-ctrl: Drop SPEC_CTRL_{ENTRY_FROM,EXIT_TO}_HVM

2022-01-17 Thread Andrew Cooper
These were written before Spectre/Meltdown went public, and there was large uncertainty in how the protections would evolve. As it turns out, they're very specific to Intel hardware, and not very suitable for AMD. Drop the macros, opencoding the relevant subset of functionality, and leaving

Re: [PATCH 3/3] x86/spec-ctrl: Fix NMI race condition with VT-x MSR_SPEC_CTRL handling

2022-01-17 Thread Andrew Cooper
On 17/01/2022 11:51, Jan Beulich wrote: > On 13.01.2022 17:38, Andrew Cooper wrote: >> @@ -119,12 +125,11 @@ UNLIKELY_END(realmode) >> SAVE_ALL >> >> /* >> - * PV variant needed here as no guest code has executed (so >> - * MSR_SPEC_CTRL can't have changed

[qemu-mainline test] 167724: regressions - trouble: blocked/broken/fail/pass

2022-01-17 Thread osstest service owner
flight 167724 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/167724/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-armhf broken build-armhf 4

Re: [PATCH 19/37] xen/x86: promote VIRTUAL_BUG_ON to ASSERT in

2022-01-17 Thread Jan Beulich
On 23.09.2021 14:02, Wei Chen wrote: > VIRTUAL_BUG_ON that is using in phys_to_nid is an empty macro. This > results in two lines of error-checking code in phys_to_nid are not > actually working. It also covers up two compilation errors: > 1. error: ‘MAX_NUMNODES’ undeclared (first use in this

Re: [PATCH 04/37] xen: introduce an arch helper for default dma zone status

2022-01-17 Thread Jan Beulich
I realize this series has been pending for a long time, but I don't recall any indication that it would have been dropped. Hence as a first try, a few comments on this relatively simple change. I'm sorry it to have taken so long to get to it. On 23.09.2021 14:02, Wei Chen wrote: > In current

Re: [PATCH 1/2] tools/libs/light: numa placement: don't try to free a NULL list of vcpus

2022-01-17 Thread Anthony PERARD
On Fri, Jan 14, 2022 at 11:22:00PM +, Dario Faggioli wrote: > On Thu, 2022-01-13 at 12:05 +, Anthony PERARD wrote: > > On Wed, Jan 12, 2022 at 05:41:36PM +0100, Dario Faggioli wrote: > > > > > 2) there should be nothing to free anyway > > > > The issue here is that it doesn't appear to

Re: [PATCH v3 1/2] dt-bindings: arm: xen: document Xen iommu device

2022-01-17 Thread Robin Murphy
On 2022-01-17 12:32, Sergiy Kibrik wrote: In IOMMU-capable system hypervisor usually takes over IOMMU control. Generally guest domains don't need to care about IOMMU management and take any extra actions. Yet in some cases a knowledge about which device is protected may be useful for privileged

[PATCH] x86/Intel: use CPUID bit to determine PPIN availability

2022-01-17 Thread Jan Beulich
As of SDM revision 076 there is a CPUID bit for this functionality. Use it to amend the existing model-based logic. Signed-off-by: Jan Beulich --- In xen-cpuid.c I wasn't sure whether it's better to put the 7b1 table next to the 7a1 one, or whether tables should continue to be placed by feature

Re: [PATCH v4] xen/arm: Allow QEMU platform to be built with GICv2

2022-01-17 Thread Julien Grall
Hi, On 17/01/2022 10:40, Dongjiu Geng wrote: It turns out that QEMU has been supporting GICv2 virtualization since v3.1.0. So remove the dependencies on GICv3. Technically, the current form of CONFIG_QEMU allows the same binary to boot on QEMU with GICv2 or GICv3. If we want to use

[xen-unstable-smoke test] 167723: trouble: broken/pass

2022-01-17 Thread osstest service owner
flight 167723 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/167723/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl broken

Re: sched=null vwfi=native and call_rcu()

2022-01-17 Thread Julien Grall
Hi, On 17/01/2022 15:13, Juergen Gross wrote: On 17.01.22 12:05, George Dunlap wrote: On Jan 14, 2022, at 9:01 PM, Stefano Stabellini wrote: On Fri, 14 Jan 2022, Dario Faggioli wrote: On Thu, 2022-01-06 at 17:52 -0800, Stefano Stabellini wrote: On Thu, 6 Jan 2022, Julien Grall wrote:

Re: [PATCH] x86/APIC: mark wait_tick_pvh() __init

2022-01-17 Thread Wei Liu
On Mon, Jan 17, 2022 at 11:34:20AM +0100, Jan Beulich wrote: > It should have been that way right from its introduction by 02e0de011555 > ("x86: APIC timer calibration when running as a guest"). > > Signed-off-by: Jan Beulich Reviewed-by: Wei Liu > > --- a/xen/arch/x86/apic.c > +++

Re: [PATCH v6 05/12] libs/guest: allow fetching a specific MSR entry from a cpu policy

2022-01-17 Thread Jan Beulich
On 17.01.2022 10:48, Roger Pau Monne wrote: > Introduce an interface that returns a specific MSR entry from a cpu > policy in xen_msr_entry_t format. > > This is useful to callers can peek data from the opaque > xc_cpu_policy_t type. > > No caller of the interface introduced on this patch. > >

Re: [PATCH v6 03/12] libs/guest: allow fetching a specific CPUID leaf from a cpu policy

2022-01-17 Thread Jan Beulich
On 17.01.2022 10:48, Roger Pau Monne wrote: > Introduce an interface that returns a specific leaf/subleaf from a cpu > policy in xen_cpuid_leaf_t format. > > This is useful to callers can peek data from the opaque > xc_cpu_policy_t type. > > No caller of the interface introduced on this patch. >

Re: [XEN PATCH] tools/firmware/hvmloader/smbios.c: Add new SMBIOS tables (7,8,9,26,27,28)

2022-01-17 Thread Jan Beulich
On 14.01.2022 09:52, Anton Belousov wrote: > SMBIOS tables like 7,8,9,26,27,28 are neccessary to prevent sandbox detection > by malware > using WMI-queries. This is a statement without any proof. It may seem obvious to you, but could you please make us properly see the value of your addition as

[xen-unstable test] 167719: trouble: broken/fail/pass

2022-01-17 Thread osstest service owner
flight 167719 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/167719/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-libvirt-raw broken Tests which are

Re: [PATCH 2/3] x86/spec-ctrl: Drop SPEC_CTRL_{ENTRY_FROM,EXIT_TO}_HVM

2022-01-17 Thread Jan Beulich
On 17.01.2022 12:41, Andrew Cooper wrote: > On 17/01/2022 11:22, Jan Beulich wrote: >> On 13.01.2022 17:38, Andrew Cooper wrote: >>> --- a/xen/arch/x86/hvm/svm/entry.S >>> +++ b/xen/arch/x86/hvm/svm/entry.S >>> @@ -59,7 +59,7 @@ __UNLIKELY_END(nsvm_hap) >>> mov

Re: [PATCH 1/3] x86/msr: Split MSR_SPEC_CTRL handling

2022-01-17 Thread Jan Beulich
On 17.01.2022 12:24, Andrew Cooper wrote: > On 17/01/2022 11:07, Jan Beulich wrote: >> On 13.01.2022 17:38, Andrew Cooper wrote: >>> In order to fix a VT-x bug, and support MSR_SPEC_CTRL on AMD, there will >>> need >>> to be three different access methods for where the guest's value lives. >>>

Re: [PATCH 3/3] x86/spec-ctrl: Fix NMI race condition with VT-x MSR_SPEC_CTRL handling

2022-01-17 Thread Jan Beulich
On 13.01.2022 17:38, Andrew Cooper wrote: > Second, update vmx_msr_{read,write}_intercept() to use the load/save lists > rather than vcpu_msrs, and update the comment to describe the new state > location. Nit: Assuming "the comment" refers to something in the named function, I'm afraid I can't

Re: [PATCH v4] xen/arm: Allow QEMU platform to be built with GICv2

2022-01-17 Thread Dongjiu Geng
Bertrand Marquis 于2022年1月17日周一 19:38写道: > > Hi, > > > On 17 Jan 2022, at 11:12, Dongjiu Geng wrote: > > > > Bertrand Marquis 于2022年1月17日周一 17:00写道: > >> > >> Hi, > >> > >>> On 17 Jan 2022, at 06:40, Dongjiu Geng wrote: > >>> > >>> It turns out that QEMU has been supporting GICv2 virtualization

Re: [PATCH 3/3] x86/spec-ctrl: Fix NMI race condition with VT-x MSR_SPEC_CTRL handling

2022-01-17 Thread Andrew Cooper
On 17/01/2022 09:21, Jan Beulich wrote: > On 14.01.2022 15:41, Andrew Cooper wrote: >> On 14/01/2022 14:14, Andrew Cooper wrote: >>> On 13/01/2022 16:38, Andrew Cooper wrote: The logic was based on a mistaken understanding of how NMI blocking on vmexit works. NMIs are only blocked

Re: [PATCH 2/3] x86/spec-ctrl: Drop SPEC_CTRL_{ENTRY_FROM,EXIT_TO}_HVM

2022-01-17 Thread Andrew Cooper
On 17/01/2022 11:22, Jan Beulich wrote: > On 13.01.2022 17:38, Andrew Cooper wrote: >> --- a/xen/arch/x86/hvm/svm/entry.S >> +++ b/xen/arch/x86/hvm/svm/entry.S >> @@ -59,7 +59,7 @@ __UNLIKELY_END(nsvm_hap) >> mov VCPUMSR_spec_ctrl_raw(%rax), %eax >> >> /* WARNING! `ret`, `call

Re: [PATCH v4] xen/arm: Allow QEMU platform to be built with GICv2

2022-01-17 Thread Bertrand Marquis
Hi, > On 17 Jan 2022, at 11:12, Dongjiu Geng wrote: > > Bertrand Marquis 于2022年1月17日周一 17:00写道: >> >> Hi, >> >>> On 17 Jan 2022, at 06:40, Dongjiu Geng wrote: >>> >>> It turns out that QEMU has been supporting GICv2 virtualization since >>> v3.1.0. So remove the dependencies on GICv3. If

Re: [PATCH 1/3] x86/msr: Split MSR_SPEC_CTRL handling

2022-01-17 Thread Andrew Cooper
On 17/01/2022 11:07, Jan Beulich wrote: > On 13.01.2022 17:38, Andrew Cooper wrote: >> In order to fix a VT-x bug, and support MSR_SPEC_CTRL on AMD, there will need >> to be three different access methods for where the guest's value lives. >> However, it would be better not to duplicate the #GP

Re: [PATCH 2/3] x86/spec-ctrl: Drop SPEC_CTRL_{ENTRY_FROM,EXIT_TO}_HVM

2022-01-17 Thread Jan Beulich
On 13.01.2022 17:38, Andrew Cooper wrote: > --- a/xen/arch/x86/hvm/svm/entry.S > +++ b/xen/arch/x86/hvm/svm/entry.S > @@ -59,7 +59,7 @@ __UNLIKELY_END(nsvm_hap) > mov VCPUMSR_spec_ctrl_raw(%rax), %eax > > /* WARNING! `ret`, `call *`, `jmp *` not safe beyond this point. */ > -

Re: sched=null vwfi=native and call_rcu()

2022-01-17 Thread Juergen Gross
On 17.01.22 12:05, George Dunlap wrote: On Jan 14, 2022, at 9:01 PM, Stefano Stabellini wrote: On Fri, 14 Jan 2022, Dario Faggioli wrote: On Thu, 2022-01-06 at 17:52 -0800, Stefano Stabellini wrote: On Thu, 6 Jan 2022, Julien Grall wrote: This issue and solution were discussed numerous

Re: [PATCH v4] xen/arm: Allow QEMU platform to be built with GICv2

2022-01-17 Thread Dongjiu Geng
Bertrand Marquis 于2022年1月17日周一 17:00写道: > > Hi, > > > On 17 Jan 2022, at 06:40, Dongjiu Geng wrote: > > > > It turns out that QEMU has been supporting GICv2 virtualization since > > v3.1.0. So remove the dependencies on GICv3. If we want to use GICv3, > > we can select the QEMU_LEGACY

Re: [PATCH 1/3] x86/msr: Split MSR_SPEC_CTRL handling

2022-01-17 Thread Jan Beulich
On 13.01.2022 17:38, Andrew Cooper wrote: > In order to fix a VT-x bug, and support MSR_SPEC_CTRL on AMD, there will need > to be three different access methods for where the guest's value lives. > However, it would be better not to duplicate the #GP checking logic. > > guest_{rd,wr}msr() are

Re: sched=null vwfi=native and call_rcu()

2022-01-17 Thread George Dunlap
> On Jan 14, 2022, at 9:01 PM, Stefano Stabellini > wrote: > > On Fri, 14 Jan 2022, Dario Faggioli wrote: >> On Thu, 2022-01-06 at 17:52 -0800, Stefano Stabellini wrote: >>> On Thu, 6 Jan 2022, Julien Grall wrote: This issue and solution were discussed numerous time on the ML. In

[PATCH] x86/time: minor adjustments to init_pit()

2022-01-17 Thread Jan Beulich
For one, "using_pit" shouldn't be set ahead of the function's last (for now: only) error path. Otherwise "clocksource=pit" on the command line can lead to misbehavior when actually taking that error path. And then make an implicit assumption explicit: CALIBRATE_FRAC cannot, for example, simply be

[PATCH] x86/APIC: mark wait_tick_pvh() __init

2022-01-17 Thread Jan Beulich
It should have been that way right from its introduction by 02e0de011555 ("x86: APIC timer calibration when running as a guest"). Signed-off-by: Jan Beulich --- a/xen/arch/x86/apic.c +++ b/xen/arch/x86/apic.c @@ -1190,7 +1190,7 @@ static void __init check_deadline_errata "please

[PATCH] x86/APIC: drop 32-bit days remnants

2022-01-17 Thread Jan Beulich
Mercury and Neptune were Pentium chipsets - no need to work around their errata, even more so that the workaround looks fragile. Also ditch a Pentium-related and stale part of a comment. Signed-off-by: Jan Beulich --- a/xen/arch/x86/apic.c +++ b/xen/arch/x86/apic.c @@ -1042,11 +1042,6 @@

[PATCH] x86/APIC: no need for timer calibration when using TDT

2022-01-17 Thread Jan Beulich
The only global effect of calibrate_APIC_clock() is the setting of "bus_scale"; the final __setup_APIC_LVTT(0) is (at best) redundant with the immediately following setup_APIC_timer() invocation. Yet "bus_scale" isn't used when using TDT. Avoid wasting 100ms for calibration in this case.

Re: [PATCH] MAINTAINERS: update my email address

2022-01-17 Thread Bertrand Marquis
Hi, > On 14 Jan 2022, at 17:07, Nick Rosbrook wrote: > > I am no longer an employee at AIS. Use my personal email address > instead. > > Signed-off-by: Nick Rosbrook Reviewed-by: Bertrand Marquis Cheers Bertrand > --- > MAINTAINERS | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >

Re: [PATCH] MAINTAINERS: update my email address

2022-01-17 Thread George Dunlap
> On Jan 14, 2022, at 5:07 PM, Nick Rosbrook wrote: > > I am no longer an employee at AIS. Use my personal email address > instead. > > Signed-off-by: Nick Rosbrook Reviewed-by: George Dunlap

[PATCH v6 09/12] libs/guest: apply a featureset into a cpu policy

2022-01-17 Thread Roger Pau Monne
Pull out the code from xc_cpuid_apply_policy that applies a featureset to a cpu policy and place it on it's own standalone function that's part of the public interface. No functional change intended. Signed-off-by: Roger Pau Monné Reviewed-by: Jan Beulich --- tools/include/xenguest.h|

[PATCH v6 12/12] x86/CPUID: shrink max_{,sub}leaf fields according to actual leaf contents

2022-01-17 Thread Roger Pau Monne
From: Jan Beulich Zapping leaf data for out of range leaves is just one half of it: To avoid guests (bogusly or worse) inferring information from mere leaf presence, also shrink maximum indicators such that the respective trailing entry is not all blank (unless of course it's the initial subleaf

[PATCH v6 10/12] libs/{light,guest}: implement xc_cpuid_apply_policy in libxl

2022-01-17 Thread Roger Pau Monne
With the addition of the xc_cpu_policy_* now libxl can have better control over the cpu policy, this allows removing the xc_cpuid_apply_policy function and instead coding the required bits by libxl in libxl__cpuid_legacy directly. Remove xc_cpuid_apply_policy. Signed-off-by: Roger Pau Monné

[PATCH v6 11/12] libs/guest: (re)move xc_cpu_policy_apply_cpuid

2022-01-17 Thread Roger Pau Monne
Move the logic from xc_cpu_policy_apply_cpuid into libxl, now that the xc_cpu_policy_* helpers allow modifying a cpu policy. By moving such parsing into libxl directly we can get rid of xc_xend_cpuid, as libxl will now implement it's own private type for storing CPUID information, which currently

[PATCH v6 08/12] libs/guest: rework xc_cpuid_xend_policy

2022-01-17 Thread Roger Pau Monne
Rename xc_cpuid_xend_policy to xc_cpu_policy_apply_cpuid and make it public. Modify the function internally to use the new xc_cpu_policy_* set of functions. Also don't apply the passed policy to a domain directly, and instead modify the provided xc_cpu_policy_t. The caller will be responsible of

[PATCH v6 07/12] libs/guest: introduce helper set cpu topology in cpu policy

2022-01-17 Thread Roger Pau Monne
This logic is pulled out from xc_cpuid_apply_policy and placed into a separate helper. Note the legacy part of the introduced function, as long term Xen will require a proper topology setter function capable of expressing a more diverse set of topologies. No functional change intended.

[PATCH v6 06/12] libs/guest: make a cpu policy compatible with older Xen versions

2022-01-17 Thread Roger Pau Monne
Older Xen versions used to expose some CPUID bits which are no longer exposed by default. In order to keep a compatible behavior with guests migrated from versions of Xen that don't encode the CPUID data on the migration stream introduce a function that sets the same bits as older Xen versions.

[PATCH v6 05/12] libs/guest: allow fetching a specific MSR entry from a cpu policy

2022-01-17 Thread Roger Pau Monne
Introduce an interface that returns a specific MSR entry from a cpu policy in xen_msr_entry_t format. This is useful to callers can peek data from the opaque xc_cpu_policy_t type. No caller of the interface introduced on this patch. Signed-off-by: Roger Pau Monné --- Changes since v3: - Use

[PATCH v6 04/12] libx86: introduce helper to fetch msr entry

2022-01-17 Thread Roger Pau Monne
Use such helper in order to replace the code in x86_msr_copy_from_buffer. Note the introduced helper should not be directly called and instead x86_msr_get_entry should be used that will properly deal with const and non-const inputs. Note this requires making the raw fields uint64_t so that it can

[PATCH v6 03/12] libs/guest: allow fetching a specific CPUID leaf from a cpu policy

2022-01-17 Thread Roger Pau Monne
Introduce an interface that returns a specific leaf/subleaf from a cpu policy in xen_cpuid_leaf_t format. This is useful to callers can peek data from the opaque xc_cpu_policy_t type. No caller of the interface introduced on this patch. Signed-off-by: Roger Pau Monné --- Changes since v5: -

[PATCH v6 02/12] libx86: introduce helper to fetch cpuid leaf

2022-01-17 Thread Roger Pau Monne
Introduce a helper based on the current Xen guest_cpuid code in order to fetch a cpuid leaf from a policy. The newly introduced function in cpuid.c should not be directly called and instead the provided x86_cpuid_get_leaf macro should be used that will properly deal with const and non-const

[PATCH v6 01/12] libs/guest: move cpu policy related prototypes to xenguest.h

2022-01-17 Thread Roger Pau Monne
Do this before adding any more stuff to xg_cpuid_x86.c. The placement in xenctrl.h is wrong, as they are implemented by the xenguest library. Note that xg_cpuid_x86.c needs to include xg_private.h, and in turn also fix xg_private.h to include xc_bitops.h. The bitops definition of BITS_PER_LONG

[PATCH v6 00/12] libs/guest: new CPUID/MSR interface

2022-01-17 Thread Roger Pau Monne
Hello, The following series introduces a new CPUID/MSR interface for the xenguest library. Such interface handles both CPUID and MSRs using the same opaque object, and provides some helpers for the user to peek or modify such data without exposing the backing type. This is useful for future

Re: [PATCH 3/3] x86/spec-ctrl: Fix NMI race condition with VT-x MSR_SPEC_CTRL handling

2022-01-17 Thread Jan Beulich
On 14.01.2022 15:41, Andrew Cooper wrote: > On 14/01/2022 14:14, Andrew Cooper wrote: >> On 13/01/2022 16:38, Andrew Cooper wrote: >>> The logic was based on a mistaken understanding of how NMI blocking on >>> vmexit >>> works. NMIs are only blocked for EXIT_REASON_NMI, and not for general >>>

Re: [PATCH] Config.mk: update seabios to 1.15.0

2022-01-17 Thread Jan Beulich
On 16.01.2022 13:56, Wei Liu wrote: > Signed-off-by: Wei Liu Acked-by: Jan Beulich (In case such is needed at all for things like this.) Thanks, Jan

Re: [PATCH v4] xen/arm: Allow QEMU platform to be built with GICv2

2022-01-17 Thread Bertrand Marquis
Hi, > On 17 Jan 2022, at 06:40, Dongjiu Geng wrote: > > It turns out that QEMU has been supporting GICv2 virtualization since > v3.1.0. So remove the dependencies on GICv3. If we want to use GICv3, > we can select the QEMU_LEGACY configuration. I am bit puzzled by this change introducing a

[libvirt test] 167721: regressions - FAIL

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

Re: [PATCH 2/2] x86/time: improve TSC / CPU freq calibration accuracy

2022-01-17 Thread Jan Beulich
On 12.01.2022 12:32, Jan Beulich wrote: > On 12.01.2022 11:53, Roger Pau Monné wrote: >> On Wed, Jan 12, 2022 at 09:56:12AM +0100, Jan Beulich wrote: >>> I'm afraid I don't see a way to deal with the same issue in init_pit(). >>> In particular the (multiple) specs I have to hand don't make clear