[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [BUGFIX][PATCH v7 1/9] vmport: The io memory region nee
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [BUGFIX][PATCH v7 1/9] vmport: The io memory region needs to be at least a size of 4 |
Date: |
Fri, 12 Jun 2015 16:38:01 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 |
On 06/12/2015 08:05 AM, Don Slutz wrote:
> Before:
>
> commit c3c1bb99d1c11978d9ce94d1bdcf0705378c1459
> Author: Peter Crosthwaite <address@hidden>
> Date: Mon Mar 16 22:35:54 2015 -0700
>
> exec: Respect as_tranlsate_internal length clamp
>
> it did not matter. Only accept I/O that starts on 1st
> port.
>
> Signed-off-by: Don Slutz <address@hidden>
> CC: Don Slutz <address@hidden>
> ---
> hw/misc/vmport.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/hw/misc/vmport.c b/hw/misc/vmport.c
> index 7fcc00d..51b64bc 100644
> --- a/hw/misc/vmport.c
> +++ b/hw/misc/vmport.c
> @@ -69,6 +69,10 @@ static uint64_t vmport_ioport_read(void *opaque, hwaddr
> addr,
> unsigned char command;
> uint32_t eax;
>
> + /* Only support 1 address */
> + if (addr) {
> + return ~0U;
> + }
Different answer on 32-bit platforms (there, ~0U is 0xffffffff, which
then 0-extends to uint64_t rather than your desired result of
0xffffffffffffffffULL).
Why can't you just 'return -1;'?
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
[Qemu-devel] [PATCH v7 2/9] vmport: Switch to trace, Don Slutz, 2015/06/12
[Qemu-devel] [BUGFIX][PATCH v7 3/9] vmport: Fix vmport_cmd_ram_size, Don Slutz, 2015/06/12
[Qemu-devel] [PATCH v7 6/9] vmport_rpc: Add QMP access to vmport_rpc object., Don Slutz, 2015/06/12
[Qemu-devel] [PATCH v7 7/9] vmport_rpc: Add migration, Don Slutz, 2015/06/12
[Qemu-devel] [PATCH v7 5/9] vmport_rpc: Add limited support of VMware's hyper-call rpc, Don Slutz, 2015/06/12