From: Jan Kiszka Subject: Re: [RFC][PATCH 10/16] memory: Introduce memory_region_init_reservation Date: Sun, 04 Dec 2011 14:24:42 +0100 Message-ID: <4EDB749A.2030003@web.de> References: <4EDB739A.8080201@redhat.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig4759D41361BE555A950D99CE" Cc: Marcelo Tosatti , kvm@vger.kernel.org, qemu-devel , Anthony Liguori , "Michael S. Tsirkin" , Blue Swirl To: Avi Kivity Return-path: Received: from fmmailgate01.web.de ([217.72.192.221]:51663 "EHLO fmmailgate01.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753496Ab1LDNYq (ORCPT ); Sun, 4 Dec 2011 08:24:46 -0500 Received: from moweb001.kundenserver.de (moweb001.kundenserver.de [172.19.20.114]) by fmmailgate01.web.de (Postfix) with ESMTP id F02EA1A427B7B for ; Sun, 4 Dec 2011 14:24:44 +0100 (CET) In-Reply-To: <4EDB739A.8080201@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig4759D41361BE555A950D99CE Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2011-12-04 14:20, Avi Kivity wrote: > On 12/03/2011 01:17 PM, Jan Kiszka wrote: >> From: Jan Kiszka >> >> Introduce a memory region type that can reserve I/O space. Such region= s >> are useful for modeling I/O that is only handled outside of QEMU, i.e.= >> in the context of an accelerator like KVM. Any access to such a region= >> from QEMU is a bug and will be reported as such. >=20 > This is guest triggerable (DMA into the region), so abort() is too dras= tic. Mmh, true. Will turn it into a print-once warning. >=20 >> +void memory_region_init_reservation(MemoryRegion *mr, >> + const char *name, >> + uint64_t size) >> +{ >> + memory_region_init(mr, name, size); >> + mr->ops =3D &reservation_ops; >> + mr->opaque =3D mr; >> + mr->terminates =3D true; >> + mr->backend_registered =3D false; >> +} >=20 > Just calling memory_region_init_io() is simpler, no? Yep. Thanks, Jan --------------enig4759D41361BE555A950D99CE Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk7bdJoACgkQitSsb3rl5xR+pACgqHwdVdSaIPU8HzG7Muk/PGj7 BF4AoKtJxAi5nmPJnXlrgy7T/YsApJz3 =yVAq -----END PGP SIGNATURE----- --------------enig4759D41361BE555A950D99CE--