Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756675Ab3CFJju (ORCPT ); Wed, 6 Mar 2013 04:39:50 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60965 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756011Ab3CFJjr (ORCPT ); Wed, 6 Mar 2013 04:39:47 -0500 Date: Wed, 6 Mar 2013 11:38:53 +0200 From: Gleb Natapov To: Paolo Bonzini Cc: Hu Tao , Peter Maydell , "Michael S. Tsirkin" , Jan Kiszka , qemu-devel , Markus Armbruster , Blue Swirl , Orit Wasserman , kvm list , Juan Quintela , Alexander Graf , Andrew Jones , Alex Williamson , Sasha Levin , Stefan Hajnoczi , Luiz Capitulino , KAMEZAWA Hiroyuki , Kevin Wolf , Anthony Liguori , Marcelo Tosatti , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v13 0/8] pv event interface between host and guest Message-ID: <20130306093852.GK11223@redhat.com> References: <20130303091738.GB23616@redhat.com> <513471F1.5020702@redhat.com> <20130306085628.GB4719@localhost.localdomain> <51370753.90806@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <51370753.90806@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1506 Lines: 40 On Wed, Mar 06, 2013 at 10:07:31AM +0100, Paolo Bonzini wrote: > Il 06/03/2013 09:56, Hu Tao ha scritto: > >> > > >> > Something like this should work (in SeaBIOS's src/acpi-dsdt-isa.dsl): > >> > > >> > Device(PEVT) { > >> > Name(_HID, EisaId("QEMU0001")) > >> > OperationRegion(PEOR, SystemIO, 0x505, 0x01) > >> > Field(PEOR, ByteAcc, NoLock, Preserve) { > >> > PEPT, 8, > >> > } > >> > > >> > Method(_STA, 0, NotSerialized) { > >> > Store(PEPT, Local0) > >> > If (LEqual(Local0, Zero)) { > >> > Return (0x00) > >> > } Else { > >> > Return (0x0F) > >> > } > >> > } > > IIUC, here _STA reads from ioport 0x505, if the result is 0, then the > > device is not present. Otherwise, the device is present. But as Gleb > > said, ''the data you read from unassigned port is not guarantied to be > > zero, it may depend on QEMU version''. What should I do to tell if the > > device is present or not correctly? > > The firmware is tied to the QEMU version, so you can rely on unassigned > ports returning zero. > > Later we can change this to use fw-cfg. > I thought we agreed to do it from the start :) -- Gleb. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/