Re: [QEMU PATCH v5 10/13] virtio-gpu: Resource UUID

2023-09-20 Thread Huang Rui
On Sat, Sep 16, 2023 at 12:48:14AM +0800, Akihiko Odaki wrote: > On 2023/09/15 20:11, Huang Rui wrote: > > From: Antonio Caggiano > > > > Enable resource UUID feature and implement command resource assign UUID. > > This is done by introducing a hash table to map resource IDs to their > > UUIDs. >

Re: [QEMU PATCH v5 05/13] virtio-gpu: Configure context init for virglrenderer

2023-09-20 Thread Huang Rui
On Tue, Sep 19, 2023 at 04:17:43PM +0800, Marc-André Lureau wrote: > Hi > > On Fri, Sep 15, 2023 at 6:16 PM Huang Rui wrote: > > > > Configure context init feature flag for virglrenderer. > > > > Originally-by: Antonio Caggiano > > Signed-off-by: Huang Rui > > --- > > > > V4 -> V5: > > - In

Re: [PATCH v9 02/16] vpci: use per-domain PCI lock to protect vpci structure

2023-09-20 Thread Roger Pau Monné
On Tue, Sep 19, 2023 at 12:20:39PM -0400, Stewart Hildebrand wrote: > On 9/19/23 11:39, Roger Pau Monné wrote: > > On Tue, Aug 29, 2023 at 11:19:42PM +, Volodymyr Babchuk wrote: > >> diff --git a/xen/drivers/vpci/msi.c b/xen/drivers/vpci/msi.c > >> index 8f2b59e61a..a0733bb2cb 100644 > >> --- a

Re: [PATCH v9 02/16] vpci: use per-domain PCI lock to protect vpci structure

2023-09-20 Thread Roger Pau Monné
On Tue, Sep 19, 2023 at 05:55:42PM +0200, Jan Beulich wrote: > On 19.09.2023 17:39, Roger Pau Monné wrote: > > On Tue, Aug 29, 2023 at 11:19:42PM +, Volodymyr Babchuk wrote: > >> @@ -2908,7 +2908,13 @@ int allocate_and_map_msi_pirq(struct domain *d, int > >> index, int *pirq_p, > >> > >>

RE: [PATCH v10 36/38] x86/fred: Add fred_syscall_init()

2023-09-20 Thread Thomas Gleixner
On Wed, Sep 20 2023 at 04:33, Li, Xin3 wrote: >> > +static inline void fred_syscall_init(void) { >> > + /* >> > + * Per FRED spec 5.0, FRED uses the ring 3 FRED entrypoint for SYSCALL >> > + * and SYSENTER, and ERETU is the only legit instruction to return to >> > + * ring 3, as a result the

RE: [PATCH v10 03/38] x86/msr: Add the WRMSRNS instruction support

2023-09-20 Thread Li, Xin3
> > +static __always_inline void __wrmsrns(u32 msr, u32 low, u32 high) > > Shouldn't this be named wrmsrns_safe since it has exception handling, similar > to > the current wrmsrl_safe. > Both safe and unsafe versions have exception handling, while the safe version returns an integer to its call

Re: [PATCH v10 03/38] x86/msr: Add the WRMSRNS instruction support

2023-09-20 Thread Nikolay Borisov
On 14.09.23 г. 7:47 ч., Xin Li wrote: Add an always inline API __wrmsrns() to embed the WRMSRNS instruction into the code. Tested-by: Shan Kang Signed-off-by: Xin Li --- arch/x86/include/asm/msr.h | 18 ++ 1 file changed, 18 insertions(+) diff --git a/arch/x86/include/as

Re: [PATCH v9 04/16] vpci: add hooks for PCI device assign/de-assign

2023-09-20 Thread Roger Pau Monné
On Tue, Aug 29, 2023 at 11:19:43PM +, Volodymyr Babchuk wrote: > From: Oleksandr Andrushchenko > > When a PCI device gets assigned/de-assigned we need to > initialize/de-initialize vPCI state for the device. > > Also, rename vpci_add_handlers() to vpci_assign_device() and > vpci_remove_devic

Re: [QEMU PATCH v5 09/13] virtio-gpu: Handle resource blob commands

2023-09-20 Thread Huang Rui
On Tue, Sep 19, 2023 at 04:44:01PM +0800, Marc-André Lureau wrote: > Hi > > On Fri, Sep 15, 2023 at 3:14 PM Huang Rui wrote: > > > > From: Antonio Caggiano > > > > Support BLOB resources creation, mapping and unmapping by calling the > > new stable virglrenderer 0.10 interface. Only enabled when

Re: [PATCH v9 04/16] vpci: add hooks for PCI device assign/de-assign

2023-09-20 Thread Roger Pau Monné
On Wed, Sep 13, 2023 at 11:53:56PM +, Volodymyr Babchuk wrote: > > Hi, > > Jan Beulich writes: > > > On 13.09.2023 01:41, Volodymyr Babchuk wrote: > >> Jan Beulich writes: > >>> On 30.08.2023 01:19, Volodymyr Babchuk wrote: > @@ -1481,6 +1488,13 @@ static int assign_device(struct doma

[ovmf test] 183077: all pass - PUSHED

2023-09-20 Thread osstest service owner
flight 183077 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/183077/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 4fb69c2bee3006b08ca2abba58843f7573e0c5c6 baseline version: ovmf eb485b6438f488db5300b

Re: [PATCH v9 05/16] vpci/header: rework exit path in init_bars

2023-09-20 Thread Roger Pau Monné
On Tue, Aug 29, 2023 at 11:19:43PM +, Volodymyr Babchuk wrote: > Introduce "fail" label in init_bars() function to have the centralized > error return path. This is the pre-requirement for the future changes > in this function. > > This patch does not introduce functional changes. > > Signed-

Re: [QEMU PATCH v5 07/13] softmmu/memory: enable automatic deallocation of memory regions

2023-09-20 Thread Xenia Ragiadakou
On 20/9/23 01:18, Akihiko Odaki wrote: On 2023/09/19 23:21, Xenia Ragiadakou wrote: On 19/9/23 13:44, Akihiko Odaki wrote: On 2023/09/19 19:28, Xenia Ragiadakou wrote: On 15/9/23 18:11, Akihiko Odaki wrote: On 2023/09/15 20:11, Huang Rui wrote: From: Xenia Ragiadakou When the memory re

Xen Security Advisory 438 v2 (CVE-2023-34322) - top-level shadow reference dropped too early for 64-bit PV guests

2023-09-20 Thread Xen . org security team
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Xen Security Advisory CVE-2023-34322 / XSA-438 version 2 top-level shadow reference dropped too early for 64-bit PV guests UPDATES IN VERSION 2 Public release. ISSUE DESCRIPTION =

Re: xen | Failed pipeline for staging | ea36ac0d

2023-09-20 Thread Nicola Vetrini
On 20/09/2023 01:12, Stefano Stabellini wrote: On Tue, 19 Sep 2023, Jan Beulich wrote: On 19.09.2023 11:53, GitLab wrote: > Job #5118269256 ( https://gitlab.com/xen-project/xen/-/jobs/5118269256/raw ) > > Stage: analyze > Name: eclair-x86_64 Quoting from the log: ... Success: No unexpected rep

Re: [PATCH v10 06/38] Documentation/x86/64: Add a documentation for FRED

2023-09-20 Thread Nikolay Borisov
On 14.09.23 г. 7:47 ч., Xin Li wrote: Briefly introduce FRED, and its advantages compared to IDT. Signed-off-by: Xin Li --- Documentation/arch/x86/x86_64/fred.rst | 98 + Documentation/arch/x86/x86_64/index.rst | 1 + 2 files changed, 99 insertions(+) create m

Re: [PATCH v9 06/16] vpci/header: implement guest BAR register handlers

2023-09-20 Thread Roger Pau Monné
On Tue, Aug 29, 2023 at 11:19:43PM +, Volodymyr Babchuk wrote: > From: Oleksandr Andrushchenko > > Add relevant vpci register handlers when assigning PCI device to a domain > and remove those when de-assigning. This allows having different > handlers for different domains, e.g. hwdom and othe

Re: [QEMU PATCH v5 10/13] virtio-gpu: Resource UUID

2023-09-20 Thread Huang Rui
On Tue, Sep 19, 2023 at 05:00:05PM +0800, Marc-André Lureau wrote: > Hi > > On Fri, Sep 15, 2023 at 3:14 PM Huang Rui wrote: > > > > From: Antonio Caggiano > > > > Enable resource UUID feature and implement command resource assign UUID. > > This is done by introducing a hash table to map resourc

Re: RFC: arm64: Handling reserved memory nodes

2023-09-20 Thread Leo Yan
Hi Julien, On Mon, Sep 18, 2023 at 08:26:21PM +0100, Julien Grall wrote: [...] > ... from my understanding reserved-memory are just normal memory that are > set aside for a specific purpose. So Xen has to create a 'memory' node *and* > a 'reserved-memory' region. To be clear, Xen passes the 're

Re: [QEMU PATCH v5 11/13] virtio-gpu: Support Venus capset

2023-09-20 Thread Huang Rui
On Tue, Sep 19, 2023 at 05:02:36PM +0800, Marc-André Lureau wrote: > Hi > > On Fri, Sep 15, 2023 at 3:14 PM Huang Rui wrote: > > > > From: Antonio Caggiano > > > > Add support for the Venus capset, which enables Vulkan support through > > the Venus Vulkan driver for virtio-gpu. > > > > Signed-of

Re: [QEMU PATCH v5 07/13] softmmu/memory: enable automatic deallocation of memory regions

2023-09-20 Thread Akihiko Odaki
On 2023/09/20 17:57, Xenia Ragiadakou wrote: On 20/9/23 01:18, Akihiko Odaki wrote: On 2023/09/19 23:21, Xenia Ragiadakou wrote: On 19/9/23 13:44, Akihiko Odaki wrote: On 2023/09/19 19:28, Xenia Ragiadakou wrote: On 15/9/23 18:11, Akihiko Odaki wrote: On 2023/09/15 20:11, Huang Rui wrote:

Re: [PATCH v10 09/38] x86/fred: Disable FRED support if CONFIG_X86_FRED is disabled

2023-09-20 Thread Nikolay Borisov
On 14.09.23 г. 7:47 ч., Xin Li wrote: From: "H. Peter Anvin (Intel)" Add CONFIG_X86_FRED to to make cpu_feature_enabled() work correctly with FRED. Originally-by: Megha Dey Signed-off-by: H. Peter Anvin (Intel) Tested-by: Shan Kang Signed-off-by: Xin Li --- arch/x86/include/asm/disab

Re: RFC: arm64: Handling reserved memory nodes

2023-09-20 Thread Julien Grall
On 20/09/2023 11:03, Leo Yan wrote: On Mon, Sep 18, 2023 at 08:26:21PM +0100, Julien Grall wrote: [...] ... from my understanding reserved-memory are just normal memory that are set aside for a specific purpose. So Xen has to create a 'memory' node *and* a 'reserved-memory' region. To be

Re: RFC: arm64: Handling reserved memory nodes

2023-09-20 Thread Michal Orzel
Hello, On 20/09/2023 12:03, Leo Yan wrote: > > > Hi Julien, > > On Mon, Sep 18, 2023 at 08:26:21PM +0100, Julien Grall wrote: > > [...] > >> ... from my understanding reserved-memory are just normal memory that are >> set aside for a specific purpose. So Xen has to create a 'memory' node *and

Re: RFC: arm64: Handling reserved memory nodes

2023-09-20 Thread Julien Grall
On 20/09/2023 11:31, Michal Orzel wrote: Hello, Hi Michal, On 20/09/2023 12:03, Leo Yan wrote: Hi Julien, On Mon, Sep 18, 2023 at 08:26:21PM +0100, Julien Grall wrote: [...] ... from my understanding reserved-memory are just normal memory that are set aside for a specific purpose. So X

Re: [PATCH v10 13/38] x86/cpu: Add X86_CR4_FRED macro

2023-09-20 Thread Nikolay Borisov
On 14.09.23 г. 7:47 ч., Xin Li wrote: From: "H. Peter Anvin (Intel)" Add X86_CR4_FRED macro for the FRED bit in %cr4. This bit must not be changed after initialization, so add it to the pinned CR4 bits. Signed-off-by: H. Peter Anvin (Intel) Tested-by: Shan Kang Signed-off-by: Xin Li ---

Re: [PATCH v6 0/4] ppc: Enable full Xen build

2023-09-20 Thread George Dunlap
On Mon, Sep 18, 2023 at 6:27 PM Shawn Anastasio wrote: > > On 9/18/23 8:19 AM, Jan Beulich wrote: > > On 14.09.2023 21:03, Shawn Anastasio wrote: > >> Shawn Anastasio (4): > >> xen/ppc: Implement bitops.h > >> xen/ppc: Define minimal stub headers required for full build > > > > Compilation fai

Re: [PATCH v6 0/4] ppc: Enable full Xen build

2023-09-20 Thread George Dunlap
On Wed, Sep 20, 2023 at 11:59 AM George Dunlap wrote: > > On Mon, Sep 18, 2023 at 6:27 PM Shawn Anastasio > wrote: > > > > On 9/18/23 8:19 AM, Jan Beulich wrote: > > > On 14.09.2023 21:03, Shawn Anastasio wrote: > > >> Shawn Anastasio (4): > > >> xen/ppc: Implement bitops.h > > >> xen/ppc: De

[ovmf test] 183079: all pass - PUSHED

2023-09-20 Thread osstest service owner
flight 183079 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/183079/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 4317b4824bc881fe6079d04b7ee5b0f6bddf62ca baseline version: ovmf 4fb69c2bee3006b08ca2a

Re: [PATCH v9 08/16] vpci/header: handle p2m range sets per BAR

2023-09-20 Thread Roger Pau Monné
On Tue, Aug 29, 2023 at 11:19:44PM +, Volodymyr Babchuk wrote: > From: Oleksandr Andrushchenko > > Instead of handling a single range set, that contains all the memory > regions of all the BARs and ROM, have them per BAR. > As the range sets are now created when a PCI device is added and dest

Re: [PATCH v13 6/9] gfxstream + rutabaga: add initial support for gfxstream

2023-09-20 Thread Akihiko Odaki
On 2023/08/29 9:36, Gurchetan Singh wrote: This adds initial support for gfxstream and cross-domain. Both features rely on virtio-gpu blob resources and context types, which are also implemented in this patch. gfxstream has a long and illustrious history in Android graphics paravirtualization.

Re: [PATCH v13 6/9] gfxstream + rutabaga: add initial support for gfxstream

2023-09-20 Thread Mark Cave-Ayland
On 20/09/2023 12:42, Akihiko Odaki wrote: On 2023/08/29 9:36, Gurchetan Singh wrote: This adds initial support for gfxstream and cross-domain.  Both features rely on virtio-gpu blob resources and context types, which are also implemented in this patch. gfxstream has a long and illustrious hist

Re: xl dmesg buffer too small for Xen 4.18?

2023-09-20 Thread Julien Grall
Hi Roger, On 19/09/2023 17:10, Roger Pau Monné wrote: On Tue, Sep 19, 2023 at 06:00:32PM +0200, Jan Beulich wrote: On 19.09.2023 17:56, Julien Grall wrote: On 19/09/2023 16:09, Chuck Zmudzinski wrote: On 9/19/2023 8:10 AM, Julien Grall wrote: On 19/09/2023 08:02, Roger Pau Monné wrote: On M

[xen-unstable test] 183074: regressions - FAIL

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

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

2023-09-20 Thread osstest service owner
flight 183080 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/183080/ 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: RFC: arm64: Handling reserved memory nodes

2023-09-20 Thread Leo Yan
On Wed, Sep 20, 2023 at 11:36:24AM +0100, Julien Grall wrote: [...] > > > Could you confirm the Xen does write reserved memory nodes? Or Xen > > > converts the reserved memory nodes to normal memory nodes as I > > > describe above :) > > > > Xen passes the /reserved-memory node unchanged from h

Re: [PATCH v10 16/38] x86/ptrace: Add FRED additional information to the pt_regs structure

2023-09-20 Thread Nikolay Borisov
On 14.09.23 г. 7:47 ч., Xin Li wrote: FRED defines additional information in the upper 48 bits of cs/ss fields. Therefore add the information definitions into the pt_regs structure. Specially introduce a new structure fred_ss to denote the FRED flags above SS selector, which avoids FRED_SSX_

Re: RFC: arm64: Handling reserved memory nodes

2023-09-20 Thread Leo Yan
On Wed, Sep 20, 2023 at 11:36:24AM +0100, Julien Grall wrote: [...] > Can you confirm the version of Xen you are using? For this question, I use a very new Xen repo with staging branch which I git pulled at last week. Thanks, Leo

Re: [PATCH 4/7] block/dirty-bitmap: Clean up local variable shadowing

2023-09-20 Thread Markus Armbruster
Kevin Wolf writes: > Am 19.09.2023 um 07:48 hat Markus Armbruster geschrieben: >> Kevin Wolf writes: >> >> > Am 31.08.2023 um 15:25 hat Markus Armbruster geschrieben: >> >> Local variables shadowing other local variables or parameters make the >> >> code needlessly hard to understand. Tracked

Re: [PATCH v9 02/16] vpci: use per-domain PCI lock to protect vpci structure

2023-09-20 Thread Stewart Hildebrand
On 9/20/23 04:09, Roger Pau Monné wrote: > On Tue, Sep 19, 2023 at 12:20:39PM -0400, Stewart Hildebrand wrote: >> On 9/19/23 11:39, Roger Pau Monné wrote: >>> On Tue, Aug 29, 2023 at 11:19:42PM +, Volodymyr Babchuk wrote: diff --git a/xen/drivers/vpci/msi.c b/xen/drivers/vpci/msi.c in

Re: [PATCH v9 06/16] vpci/header: implement guest BAR register handlers

2023-09-20 Thread Stewart Hildebrand
On 9/20/23 05:49, Roger Pau Monné wrote: > On Tue, Aug 29, 2023 at 11:19:43PM +, Volodymyr Babchuk wrote: >> diff --git a/xen/drivers/vpci/header.c b/xen/drivers/vpci/header.c >> index e58bbdf68d..e96d7b2b37 100644 >> --- a/xen/drivers/vpci/header.c >> +++ b/xen/drivers/vpci/header.c >> +static

Re: [PATCH v3 2/6] hw/isa/piix3: Reuse piix3_realize() in piix3_xen_realize()

2023-09-20 Thread Chuck Zmudzinski
On 9/19/2023 4:02 PM, Bernhard Beschow wrote: > > > Am 3. April 2023 12:27:14 UTC schrieb Jason Andryuk : >>On Mon, Apr 3, 2023 at 5:33 AM Anthony PERARD >>wrote: >>> >>> On Sat, Apr 01, 2023 at 10:36:45PM +, Bernhard Beschow wrote: >>> > >>> > >>> > Am 30. März 2023 13:00:25 UTC schrieb An

Re: [RFC PATCH 1/3] x86/paravirt: move some functions and defines to alternative

2023-09-20 Thread Peter Zijlstra
On Thu, Jun 08, 2023 at 04:03:31PM +0200, Juergen Gross wrote: > As a preparation for replacing paravirt patching completely by > alternative patching, move some backend functions and #defines to > alternative code and header. > > Signed-off-by: Juergen Gross Acked-by: Peter Zijlstra (Intel)

Re: [PATCH v10 03/38] x86/msr: Add the WRMSRNS instruction support

2023-09-20 Thread Peter Zijlstra
On Fri, Sep 15, 2023 at 02:16:50AM +0100, andrew.coop...@citrix.com wrote: > Juergen has already done the work to delete one of these two patching > mechanisms and replace it with the other. > > https://lore.kernel.org/lkml/a32e211f-4add-4fb2-9e5a-480ae9b9b...@suse.com/ > > Unfortunately, it's o

Re: [PATCH v10 03/38] x86/msr: Add the WRMSRNS instruction support

2023-09-20 Thread Juergen Gross
On 20.09.23 17:00, Peter Zijlstra wrote: On Fri, Sep 15, 2023 at 02:16:50AM +0100, andrew.coop...@citrix.com wrote: Juergen has already done the work to delete one of these two patching mechanisms and replace it with the other. https://lore.kernel.org/lkml/a32e211f-4add-4fb2-9e5a-480ae9b9b...@

[libvirt test] 183075: tolerable FAIL - PUSHED

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

New MISRA C:2012 R10.3 violations due to XSA-438 fix

2023-09-20 Thread Nicola Vetrini
Hi all, In light of the recent changes introduced by commit fb0ff49fe9f784bfee0370c2a3c5f20e39d7a1cb, as part of XSA-438 [1], the signature of function pointer 'update_cr3' in 'xen/arch/x86/include/asm/paging.h', line 121, changed its second parameter to a boolean. Consequently, all calls to t

RE: [PATCH v10 16/38] x86/ptrace: Add FRED additional information to the pt_regs structure

2023-09-20 Thread Li, Xin3
> > +struct fred_ss { > > + u64 ss : 16, // SS selector > > Is this structure conformant to the return state as described in FRED 5.0? > > — The stack segment of the interrupted context, 64 bits formatted as follows: > > • Bits 15:0 contain the SS selector. < - WE HAVE THIS > > • B

RE: [PATCH v10 13/38] x86/cpu: Add X86_CR4_FRED macro

2023-09-20 Thread Li, Xin3
> > +#ifdef __x86_64__ > > +#define X86_CR4_FRED_BIT 32 /* enable FRED kernel entry */ > > +#define X86_CR4_FRED _BITUL(X86_CR4_FRED_BIT) > > nit: s/BITUL/BITULL I guess if __x86_64__ is defined then we are > guaranteed that unsigned long will be a 64 bit, but for the sake of > cla

Re: [PATCH v10 33/38] x86/entry: Add fred_entry_from_kvm() for VMX to handle IRQ/NMI

2023-09-20 Thread Paolo Bonzini
On 9/14/23 06:48, Xin Li wrote: + /* +* Don't check the FRED stack level, the call stack leading to this +* helper is effectively constant and shallow (relatively speaking). It's more that we don't need to protect from reentrancy. The external interrupt uses stack level

Re: [PATCH v10 34/38] KVM: VMX: Call fred_entry_from_kvm() for IRQ/NMI handling

2023-09-20 Thread Paolo Bonzini
On 9/14/23 06:48, Xin Li wrote: When FRED is enabled, call fred_entry_from_kvm() to handle IRQ/NMI in IRQ/NMI induced VM exits. Tested-by: Shan Kang Signed-off-by: Xin Li Acked-by: Paolo Bonzini --- arch/x86/kvm/vmx/vmx.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(

[linux-linus test] 183076: regressions - FAIL

2023-09-20 Thread osstest service owner
flight 183076 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/183076/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-qemuu-dmrestrict-amd64-dmrestrict 8 xen-boot fail REGR. vs. 182531 test-amd64

[PATCH v2 1/7] migration/rdma: Fix save_page method to fail on polling error

2023-09-20 Thread Markus Armbruster
qemu_rdma_save_page() reports polling error with error_report(), then succeeds anyway. This is because the variable holding the polling status *shadows* the variable the function returns. The latter remains zero. Broken since day one, and duplicated more recently. Fixes: 2da776db4846 (rdma: cor

[PATCH v2 6/7] block: Clean up local variable shadowing

2023-09-20 Thread Markus Armbruster
Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Tracked down with -Wshadow=local. Clean up: delete inner declarations when they are actually redundant, else rename variables. Signed-off-by: Markus Armbruster Reviewed-by: Stefan Hajnoczi

[PATCH v2 5/7] block/vdi: Clean up local variable shadowing

2023-09-20 Thread Markus Armbruster
Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Tracked down with -Wshadow=local. Clean up: delete inner declarations when they are actually redundant, else rename variables. Signed-off-by: Markus Armbruster Reviewed-by: Stefan Hajnoczi

[PATCH v2 2/7] migration: Clean up local variable shadowing

2023-09-20 Thread Markus Armbruster
Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Tracked down with -Wshadow=local. Clean up: delete inner declarations when they are actually redundant, else rename variables. Signed-off-by: Markus Armbruster Reviewed-by: Peter Xu --- m

[PATCH v2 4/7] block/dirty-bitmap: Clean up local variable shadowing

2023-09-20 Thread Markus Armbruster
Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Tracked down with -Wshadow=local. Clean up: rename both the pair of parameters and the pair of local variables. While there, move the local variables to function scope. Suggested-by: Kevin

[PATCH v2 7/7] qobject atomics osdep: Make a few macros more hygienic

2023-09-20 Thread Markus Armbruster
Variables declared in macros can shadow other variables. Much of the time, this is harmless, e.g.: #define _FDT(exp) \ do { \ int ret = (exp);

[PATCH v2 3/7] ui: Clean up local variable shadowing

2023-09-20 Thread Markus Armbruster
Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Tracked down with -Wshadow=local. Clean up: delete inner declarations when they are actually redundant, else rename variables. Signed-off-by: Markus Armbruster Reviewed-by: Peter Maydell -

[PATCH v2 0/7] Steps towards enabling -Wshadow=local

2023-09-20 Thread Markus Armbruster
Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Bugs love to hide in such code. Evidence: PATCH 1. Enabling -Wshadow would prevent bugs like this one. But we'd have to clean up all the offenders first. We got a lot of them. Enabling -W

Re: New MISRA C:2012 R10.3 violations due to XSA-438 fix

2023-09-20 Thread Andrew Cooper
On 20/09/2023 5:25 pm, Nicola Vetrini wrote: > Hi all, > > In light of the recent changes introduced by commit > fb0ff49fe9f784bfee0370c2a3c5f20e39d7a1cb, > as part of XSA-438 [1], the signature of function pointer 'update_cr3' in > 'xen/arch/x86/include/asm/paging.h', line 121, changed its secon

Re: [PATCH v9 02/16] vpci: use per-domain PCI lock to protect vpci structure

2023-09-20 Thread Stewart Hildebrand
On 9/19/23 11:39, Roger Pau Monné wrote: > On Tue, Aug 29, 2023 at 11:19:42PM +, Volodymyr Babchuk wrote: >> diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c >> index 1edc7f1e91..545a27796e 100644 >> --- a/xen/arch/x86/hvm/vmx/vmx.c >> +++ b/xen/arch/x86/hvm/vmx/vmx.c >> @@

[PATCH] x86/paging: Delete update_cr3()'s do_locking parameter

2023-09-20 Thread Andrew Cooper
Nicola reports that the XSA-438 fix introduced new MISRA violations because of some incidental tidying it tried to do. The parameter is useless, so resolve the MISRA regression by removing it. hap_update_cr3() discards the parameter entirely, while sh_update_cr3() uses it to distinguish internal

Re: [XEN PATCH v3 4/4] README: remove old note about the build system's python expectation

2023-09-20 Thread Andrew Cooper
On 19/09/2023 7:50 am, Jan Beulich wrote: > On 19.09.2023 08:30, Javi Merino wrote: >> 5852ca485263 (build: fix tools/configure in case only python3 exists, >> 2019-12-11) changed the configure script to test for the availability >> of python3, python and python2 in that order. It sets PYTHON to t

Re: [XEN PATCH v3 0/4] python: Support setuptools

2023-09-20 Thread Andrew Cooper
On 19/09/2023 7:30 am, Javi Merino wrote: > This series adds support for setuptools as distutils will be > deprecated in python 3.12. > > Not done for this series: > - Andrew suggested simplifying the code in m4/python_devel.m4[0] and > this is not done yet. > > [0] > https://lore.kernel.org

Re: [PATCH v2 7/7] qobject atomics osdep: Make a few macros more hygienic

2023-09-20 Thread Eric Blake
On Wed, Sep 20, 2023 at 08:31:49PM +0200, Markus Armbruster wrote: ... > The only reliable way to prevent unintended variable name capture is > -Wshadow. > > One blocker for enabling it is shadowing hiding in function-like > macros like > > qdict_put(dict, "name", qobject_ref(...)) > > qdic

RE: [PATCH v10 33/38] x86/entry: Add fred_entry_from_kvm() for VMX to handle IRQ/NMI

2023-09-20 Thread Li, Xin3
> > + /* > > +* Don't check the FRED stack level, the call stack leading to this > > +* helper is effectively constant and shallow (relatively speaking). > > It's more that we don't need to protect from reentrancy. The external > interrupt uses stack level 0 so no adjustment would be ne

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

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

[ovmf test] 183087: all pass - PUSHED

2023-09-20 Thread osstest service owner
flight 183087 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/183087/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 89dad77cfbffda0303383a11026d854008c1b731 baseline version: ovmf 4317b4824bc881fe6079d

Re: [XEN PATCH v3 0/4] python: Support setuptools

2023-09-20 Thread Stefano Stabellini
On Wed, 20 Sep 2023, Andrew Cooper wrote: > On 19/09/2023 7:30 am, Javi Merino wrote: > > This series adds support for setuptools as distutils will be > > deprecated in python 3.12. > > > > Not done for this series: > > - Andrew suggested simplifying the code in m4/python_devel.m4[0] and > >

[xen-4.15-testing test] 183081: regressions - FAIL

2023-09-20 Thread osstest service owner
flight 183081 xen-4.15-testing real [real] flight 183094 xen-4.15-testing real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/183081/ http://logs.test-lab.xenproject.org/osstest/logs/183094/ Regressions :-( Tests which did not succeed and are blocking, including tests which could

RE: [PATCH v10 36/38] x86/fred: Add fred_syscall_init()

2023-09-20 Thread H. Peter Anvin
On September 20, 2023 1:18:14 AM PDT, Thomas Gleixner wrote: >On Wed, Sep 20 2023 at 04:33, Li, Xin3 wrote: >>> > +static inline void fred_syscall_init(void) { >>> > + /* >>> > + * Per FRED spec 5.0, FRED uses the ring 3 FRED entrypoint for SYSCALL >>> > + * and SYSENTER, and ERETU is the only

[xen-4.16-testing test] 183082: tolerable trouble: fail/pass/starved - PUSHED

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

Re: [PATCH v2 7/7] qobject atomics osdep: Make a few macros more hygienic

2023-09-20 Thread Markus Armbruster
Eric Blake writes: > On Wed, Sep 20, 2023 at 08:31:49PM +0200, Markus Armbruster wrote: > ... >> The only reliable way to prevent unintended variable name capture is >> -Wshadow. >> >> One blocker for enabling it is shadowing hiding in function-like >> macros like >> >> qdict_put(dict, "na

Re: xen | Failed pipeline for staging | ea36ac0d

2023-09-20 Thread Jan Beulich
On 20.09.2023 01:12, Stefano Stabellini wrote: > There is a second unrelated issue breaking staging. The PPC builds are > failing. I am CCing Shawn. Please send a quick fix if you can to unblock > gitlab-ci if you can. I did send a separate reply for these. I'm not convinced it is Shawn to deal wi

Re: [XEN PATCH v3 4/4] README: remove old note about the build system's python expectation

2023-09-20 Thread Jan Beulich
On 20.09.2023 21:40, Andrew Cooper wrote: > On 19/09/2023 7:50 am, Jan Beulich wrote: >> On 19.09.2023 08:30, Javi Merino wrote: >>> 5852ca485263 (build: fix tools/configure in case only python3 exists, >>> 2019-12-11) changed the configure script to test for the availability >>> of python3, python

Re: [PATCH v2 2/7] migration: Clean up local variable shadowing

2023-09-20 Thread Zhijian Li (Fujitsu)
On 21/09/2023 02:31, Markus Armbruster wrote: > Local variables shadowing other local variables or parameters make the > code needlessly hard to understand. Tracked down with -Wshadow=local. > Clean up: delete inner declarations when they are actually redundant, > else rename variables. > > Sig

Re: [PATCH v10 16/38] x86/ptrace: Add FRED additional information to the pt_regs structure

2023-09-20 Thread Nikolay Borisov
On 20.09.23 г. 20:23 ч., Li, Xin3 wrote: +struct fred_ss { + u64 ss : 16, // SS selector Is this structure conformant to the return state as described in FRED 5.0? — The stack segment of the interrupted context, 64 bits formatted as follows: • Bits 15:0 contain the SS sele

RE: [PATCH v10 16/38] x86/ptrace: Add FRED additional information to the pt_regs structure

2023-09-20 Thread Li, Xin3
> > I guess you have FRED 3.0 spec, no? > Doh you are right, I was looking at the wrong version of the document > sorry for > the noise. Actually I appreciate your review so much!