[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 4/5] KVM: Kick resamplefd for split kernel irqchip
From: |
Alex Williamson |
Subject: |
Re: [PATCH v2 4/5] KVM: Kick resamplefd for split kernel irqchip |
Date: |
Mon, 9 Mar 2020 15:04:28 -0600 |
On Thu, 5 Mar 2020 19:43:24 -0500
Peter Xu <address@hidden> 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