From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.81]) by mx.groups.io with SMTP id smtpd.web11.8110.1592401892973350583 for ; Wed, 17 Jun 2020 06:51:33 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QSt5H7Zh; spf=pass (domain: redhat.com, ip: 207.211.31.81, mailfrom: pbonzini@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1592401892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cHn9/rpqSBbg/PR1ksgpdUNa9vHSVv6mm0qL3K7v/mg=; b=QSt5H7Zhf1e5K20E1LqUJV7iKK+stTLEwFlzTlDQmqUkQ3R6q+FEIp9yOfo2+RVOeNsKVR QCKhMGzPBTFUAJ1VvSkNjw7GKAiXkY0olOkSUPZc/3S84KB07L0oG9jWDVe5bB33wWcUqy Oh88xf7qYSQct5ykIQ8N6c3zRroM9ck= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-197-XvoayTYKPVmDwJRO755gbQ-1; Wed, 17 Jun 2020 09:51:30 -0400 X-MC-Unique: XvoayTYKPVmDwJRO755gbQ-1 Received: by mail-wr1-f69.google.com with SMTP id d6so1211962wrn.1 for ; Wed, 17 Jun 2020 06:51:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=cHn9/rpqSBbg/PR1ksgpdUNa9vHSVv6mm0qL3K7v/mg=; b=LA9mMB81T4JNNi4HF/s63Mt9ZIgyopeB7M5LOxqkZR7ET9NA2fjRwzPn6p5SUHPmmC +9Tud/moURAGqQoR7xTmhjrB4iSNwZM4qajE5e4ujLnwyZ/nKPkz4J9Jx5ZEm5PL82zM ab0h7dKWWay4deHATnvm2Rzrpj28geqdTJqHCZm0bd3RKYL/G7MLoDrmIphE/N5ijrQP 4AR81zJ3RPgQ9MS5Gn0Ut+Jrek5aZ1N5MIclgN6sAkS3wi/ZTl3oDp0uzfyiWSeYm9SX oAMKRr/H6P1YWXEwbGeH7SxsY96GyUI0SyYwtx1QJuQH8OCKUsUV//eEVrFSXEJnimh2 bHRg== X-Gm-Message-State: AOAM533Wm/U2tca7Q/zP5MvuhGN58hfk54jeMTCYTLDMiODTSYCzUkXO wgcrxAigivVP5g/tOcWdE7f//1uw5QRg9go2EliDnaP2fZknWt+3Zr+MQvKkNDVBYUyvn/N59HR iZU8STHw1OJU+vg== X-Received: by 2002:adf:f3cf:: with SMTP id g15mr7373726wrp.388.1592401889524; Wed, 17 Jun 2020 06:51:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxS5OHtseCnGrNn8YM/KJNC8B/magnajfdf4ZgrV4VQPRyK4TlhzvuroNGq0h2dOx7mAXoVFw== X-Received: by 2002:adf:f3cf:: with SMTP id g15mr7373708wrp.388.1592401889313; Wed, 17 Jun 2020 06:51:29 -0700 (PDT) Return-Path: Received: from ?IPv6:2001:b07:6468:f312:a479:c0fc:f90:8c20? ([2001:b07:6468:f312:a479:c0fc:f90:8c20]) by smtp.gmail.com with ESMTPSA id 125sm528184wmc.23.2020.06.17.06.51.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 17 Jun 2020 06:51:28 -0700 (PDT) Subject: Re: [PATCH] OvmfPkg: End timer interrupt later to avoid stack overflow under load To: Laszlo Ersek , Igor Druzhinin , devel@edk2.groups.io Cc: jordan.l.justen@intel.com, ard.biesheuvel@arm.com, anthony.perard@citrix.com, julien@xen.org, Ray Ni References: <1592275782-9369-1-git-send-email-igor.druzhinin@citrix.com> From: "Paolo Bonzini" Message-ID: <1d4cd50f-9479-0361-2d23-edda83037243@redhat.com> Date: Wed, 17 Jun 2020 15:51:28 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 16/06/20 20:42, Laszlo Ersek wrote: > (Hmmm... maybe the hypervisor *has* to queue the timer interrupts, > otherwise some of them would simply be lost, and the guest would lose > track of time.) Yes, there are various kinds of coalescing of interrupts that hypervisors perform to help the guest keep track of time. This is especially true of the PIT and RTC; newer OSes track time directly from the TSC, the HPET or the APIC timer so they tolerate lost ticks much better. That said, Igor's patch seems correct to me. In fact, I'd even move DisableInterrupts before gBS->RestoreTPL unless there's a good reason not to do so. Paolo