qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@redhat.com>
To: Peter Xu <peterx@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Cornelia Huck <cohuck@redhat.com>,
	qemu-devel@nongnu.org, Eric Auger <eric.auger@redhat.com>
Subject: Re: [PATCH v2 4/5] KVM: Kick resamplefd for split kernel irqchip
Date: Mon, 9 Mar 2020 15:04:28 -0600	[thread overview]
Message-ID: <20200309150428.1eb36e78@w520.home> (raw)
In-Reply-To: <20200306004324.GG7146@xz-x1>

On Thu, 5 Mar 2020 19:43:24 -0500
Peter Xu <peterx@redhat.com> wrote:

> On Thu, Mar 05, 2020 at 04:58:57PM -0700, Alex Williamson wrote:
> 
> Hi, Alex,
> 
> [...]
> 
> > > +bool kvm_resample_fd_notify(int gsi)
> > > +{
> > > +    KVMResampleFd *rfd;
> > > +
> > > +    if (!kvm_irqchip_is_split()) {
> > > +        return false;
> > > +    }  
> > 
> > Nit, checking split irqchip here seems unnecessary.  We're only adding
> > and removing list entries based on split irqchip below, so the list
> > would be empty anyway, unless another user comes along that might have
> > a reason for this functionality that isn't as tied to split irqchip.  
> 
> Right, now it's more or less a hint to readers, and we can remove it.
> I'll see whether I'll repost a new version, and I'll drop it if so.
> 
> > 
> > Overall the series looks like a big improvement versus falling back to
> > our crappy generic EOI hackery with split irqchip.  Thanks,  
> 
> Yes I was pretty happy to see the numbers too when I first tested the
> series, after all I was still uncertain about how much overhead the
> userspace EOI would take on the irq return path.  It turns out that
> the injection seems to be more important.
> 
> In all cases, major credits go to Paolo for the idea. :)

Hey Peter, I'm trying to test this myself and my VM just hangs as soon
as I enable split irqchip.  It boots up to discovering the virtio
disks, then nothing more.  My host kernel is 5.3.7-301.fc31.x86_64,
QEMU is 373c7068dd61 + this patch series.  VM script is:

/usr/local/bin/qemu-system-x86_64 \
-S \
-machine pc-q35-5.0,accel=kvm,usb=off,vmport=off,dump-guest-core=off,kernel-irqchip=split \
-cpu host \
-m 2048 \
-smp 2,sockets=2,cores=1,threads=1 \
-no-user-config \
-nodefaults \
-monitor stdio \
-serial none \
-parallel none \
-no-hpet \
-device pcie-root-port,port=0x10,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x2 \
-device pcie-root-port,port=0x11,chassis=2,id=pci.2,bus=pcie.0,addr=0x2.0x1 \
-device pcie-root-port,port=0x12,chassis=3,id=pci.3,bus=pcie.0,addr=0x2.0x2 \
-device pcie-root-port,port=0x13,chassis=4,id=pci.4,bus=pcie.0,addr=0x2.0x3 \
-device pcie-root-port,port=0x14,chassis=5,id=pci.5,bus=pcie.0,addr=0x2.0x4 \
-device pcie-root-port,port=0x15,chassis=6,id=pci.6,bus=pcie.0,addr=0x2.0x5 \
-drive file=/var/lib/libvirt/images/fedora31-1.qcow2,format=qcow2,if=none,id=drive-virtio-disk0 \
-device virtio-blk-pci,scsi=off,bus=pci.3,addr=0x0,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
-vnc :0 \
-device VGA,id=video0,vgamem_mb=16,bus=pcie.0,addr=0x1 \
-device vfio-pci,host=02:00.0,id=e1000e,bus=pci.2,addr=0x0

Guest has pci=nomsi on the kernel command line.  It boots with
irqchip=on, also boots with x-no-kvm-intx=on as an arg to the vfio-pci
device.  I'm afraid there's a regression here unless I'm failing to add
something necessary for split irqchip.  Thanks,

Alex



  reply	other threads:[~2020-03-09 21:05 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-28 16:14 [PATCH v2 0/5] vfio/pci: Fix up breakage against split irqchip and INTx Peter Xu
2020-02-28 16:14 ` [PATCH v2 1/5] vfio/pci: Disable INTx fast path if using split irqchip Peter Xu
2020-02-28 16:15 ` [PATCH v2 2/5] vfio/pci: Use kvm_irqchip_add_irqfd_notifier_gsi() for irqfds Peter Xu
2020-02-28 16:15 ` [PATCH v2 3/5] KVM: Pass EventNotifier into kvm_irqchip_assign_irqfd Peter Xu
2020-02-28 16:15 ` [PATCH v2 4/5] KVM: Kick resamplefd for split kernel irqchip Peter Xu
2020-03-02 15:07   ` Auger Eric
2020-03-05 23:58   ` Alex Williamson
2020-03-06  0:43     ` Peter Xu
2020-03-09 21:04       ` Alex Williamson [this message]
2020-03-09 22:10   ` Alex Williamson
2020-03-09 22:33     ` Alex Williamson
2020-03-10  0:38       ` Peter Xu
2020-03-10  1:54         ` Alex Williamson
2020-03-09 23:28     ` Peter Xu
2020-02-28 16:15 ` [PATCH v2 5/5] Revert "vfio/pci: Disable INTx fast path if using split irqchip" Peter Xu
2020-03-02 15:10   ` Auger Eric
2020-03-02 15:09 ` [PATCH v2 0/5] vfio/pci: Fix up breakage against split irqchip and INTx Auger Eric

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200309150428.1eb36e78@w520.home \
    --to=alex.williamson@redhat.com \
    --cc=cohuck@redhat.com \
    --cc=eric.auger@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).