lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAN35MuTOWYvboZtk_dQXEQ_+vDEO+ao9pzxLSkJj3x8RboAsSw@mail.gmail.com>
Date: Wed, 17 Jan 2024 08:46:49 +0800
From: Yi Wang <up2wing@...il.com>
To: Christian Borntraeger <borntraeger@...ux.ibm.com>
Cc: Sean Christopherson <seanjc@...gle.com>, pbonzini@...hat.com, tglx@...utronix.de, 
	mingo@...hat.com, bp@...en8.de, dave.hansen@...ux.intel.com, x86@...nel.org, 
	hpa@...or.com, kvm@...r.kernel.org, linux-kernel@...r.kernel.org, 
	wanpengli@...cent.com, Yi Wang <foxywang@...cent.com>, 
	Oliver Upton <oliver.upton@...ux.dev>, Marc Zyngier <maz@...nel.org>, 
	Anup Patel <anup@...infault.org>, Atish Patra <atishp@...shpatra.org>, 
	Janosch Frank <frankja@...ux.ibm.com>, Claudio Imbrenda <imbrenda@...ux.ibm.com>
Subject: Re: [PATCH] KVM: irqchip: synchronize srcu only if needed

On Wed, Jan 17, 2024 at 12:50 AM Christian Borntraeger
<borntraeger@...ux.ibm.com> wrote:
>
>
>
> Am 15.01.24 um 17:01 schrieb Yi Wang:
> > Many thanks for your such kind and detailed reply, Sean!
> >

...

> >>
> >> So instead of special casing x86, what if we instead have KVM setup an empty
> >> IRQ routing table during kvm_create_vm(), and then avoid this mess entirely?
> >> That way x86 and s390 no longer need to set empty/dummy routing when creating
> >> an IRQCHIP, and the worst case scenario of userspace misusing an ioctl() is no
> >> longer a NULL pointer deref.
>
> Sounds like a good idea. This should also speedup guest creation on s390 since
> it would avoid one syncronize_irq.
> >
> > To setup an empty IRQ routing table during kvm_create_vm() sounds a good idea,
> > at this time vCPU have not been created and kvm->lock is held so skipping
> > synchronization is safe here.
> >
> > However, there is one drawback, if vmm wants to emulate irqchip
> > itself, e.g. qemu
> > with command line '-machine kernel-irqchip=off' may not need irqchip
> > in kernel. How
> > do we handle this issue?
>
> I would be fine with wasted memory. The only question is does it have a functional
> impact or can we simply ignore the dummy routing.
>

Thanks for your reply, I will update the patch.


-- 
---
Best wishes
Yi Wang

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ