Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp3288431img; Mon, 25 Mar 2019 07:25:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqyHW8dU5wh+imr+cK3M3YHsyMrhNLSxq7BsQmOrwKqnAlRsPRanQF5we0YH6XSab1ZAGpMB X-Received: by 2002:a17:902:142:: with SMTP id 60mr25464382plb.191.1553523946482; Mon, 25 Mar 2019 07:25:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553523946; cv=none; d=google.com; s=arc-20160816; b=e7JzfYtSM3Ju9ZCVSlMQ3JxKRL1c6/dg215WJ/289tOM7iEcgE009ugwVuxUmu1rZT 8zlYTfEX7voMVWc8QQRs4oILh0J+6bjD3bCN0zbYIB3k7aHy54swweAtJhg/7yptc/8d IwpwT1VT2bzF3qiIVYA3Ad2SMVSzBk9ag3mjokwKFeNCx8w4fo5vEtG6VzVLNbyNihAY 73iRrM8l5v73oj6ZAfQ6CXMvEj4G2m7S60OLHl+8t2f5GBBTM836SZlUUdSRhDL0mC6C 9AnwtkynZ3R7y5X//I29Ulw9LdMmsX5F50fOt1RLE1sLUgAXrTiDILo5x4fdkp2cobrM HMNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=RChr53bAxs01g+9oM7rvxZJAjCENW45+IArswBTuaXY=; b=eK7IPrw1AXsefe7eIizFm8IetYywNfONdXuIxU0UB4T8MeBE+8mzNjjevNEY/YM9y/ y2CHa7fKR7AWS2s8KiTh+Jr7I7285RHMsDxdE5FK0adoPLK9rbMesC0vEwKB/fnGAVEJ 7C/Q6BRoi0bp/0bIvot2wBbXCOIGdwI3tVcu6JlQt1h1ynVWh8QI6iJg3/vz6KtsJwq9 VXOhbj0GYSAgJmhflINe+5e50RRVj7wh2FnLhauV6RrQQA0eSZuTJ6Z+37x9W3G5lNqv NojK6Sq1eeu9jq9kzhBsrRuYr1KmdDH7+VEb2j7ExA7I3aZvJpBJ2/WNLSIWjbJy/APN utJQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x206si12062332pgx.37.2019.03.25.07.25.31; Mon, 25 Mar 2019 07:25:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729067AbfCYOXl (ORCPT + 99 others); Mon, 25 Mar 2019 10:23:41 -0400 Received: from smtp03.citrix.com ([162.221.156.55]:26019 "EHLO SMTP03.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726024AbfCYOXl (ORCPT ); Mon, 25 Mar 2019 10:23:41 -0400 X-IronPort-AV: E=Sophos;i="5.60,269,1549929600"; d="scan'208";a="81726615" Subject: Re: [Xen-devel] [PATCH] xen/pv: Add PV specific legacy_pic struct to expose legacy IRQs. To: Boris Ostrovsky , , , References: <1553025739-92245-1-git-send-email-jennifer.herbert@citrix.com> <2eb1fdec-6cc0-7f62-3d4f-adc5dba9971e@oracle.com> <5C93CEB7.9030701@citrix.com> CC: Juergen Gross , Stefano Stabellini , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Thomas Gleixner From: Jennifer Herbert Message-ID: <5C98E468.1050502@citrix.com> Date: Mon, 25 Mar 2019 14:23:36 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.5.0 MIME-Version: 1.0 In-Reply-To: <5C93CEB7.9030701@citrix.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21/03/19 17:49, Jennifer Herbert wrote: > > > On 19/03/19 23:06, Boris Ostrovsky wrote: >> On 3/19/19 4:02 PM, Jennifer Herbert wrote: >>> The ACPI tables doesn't always contain all IRQs for legacy devices >>> such as RTC. Since no PIC controller is visible for a PV linux guest, >>> under Xen, legacy_pic currently defaults to the null_legacy_pic - with >>> reports no legacy IRQs. Since the commit "rtc: cmos: Do not assume >>> irq 8 for rtc when there are no legacy irqs" by Hans de Goede >>> (commit id: a1e23a42f1bdc00e32fc4869caef12e4e6272f26), the rtc now >>> incorrectly decides it has no irq it can use, for some hardware. >>> >>> This patch rectifies the problem by providing a xen legacy_pic >>> struct, which is much like the null_legacy_pic except that it >>> reports NR_IRQS_LEGACY irqs. >> I assume this is for dom0? >> >> Could there be the same problem with PVH dom0? (and if yes then this >> should probably go into arch/x86/xen/enlighten.c). >> >> -boris >> > > I am doing this to fix a problem with dom0. DomU doesn't seem to have > an RTC, and so it is unaffected. > > I'm not familiar with PVH, but have now done some experiments. The RTC > on PVH seems broken - but not quite in the same way as PV. More > research is needed, however simply doing the same trick I did with PV > will not fix the issue. > > I'll look further into it. > The same problem does exist with PVH - however its worse with the presence of the IO-APIC, as with my patch it tries to set up with IRQ, and fails. I'm not sure how would be best to deal with this. However, the RTC seems broken even for machines without the ACPI omission. I can see fixing it for just PV doesn't seem too nice, but unsure how to fix this for PVH. I'm open to suggestions, but otherwise I'll put this on hold.