qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [uq/master PATCH] kvmvapic: add ioport read accessor


From: Jan Kiszka
Subject: Re: [Qemu-devel] [uq/master PATCH] kvmvapic: add ioport read accessor
Date: Mon, 06 May 2013 08:29:33 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

On 2013-05-05 22:51, Marcelo Tosatti wrote:
> 
> Necessary since memory region accessor assumes read and write
> methods are registered. Otherwise reading I/O port 0x7e segfaults.
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=954306
> 
> Signed-off-by: Marcelo Tosatti <address@hidden>
> 
> diff --git a/hw/i386/kvmvapic.c b/hw/i386/kvmvapic.c
> index 5b558aa..655483b 100644
> --- a/hw/i386/kvmvapic.c
> +++ b/hw/i386/kvmvapic.c
> @@ -687,8 +687,14 @@ static void vapic_write(void *opaque, hwaddr addr, 
> uint64_t data,
>      }
>  }
>  
> +static uint64_t vapic_read(void *opaque, hwaddr addr, unsigned size)
> +{
> +    return 0xffffffff;
> +}
> +
>  static const MemoryRegionOps vapic_ops = {
>      .write = vapic_write,
> +    .read = vapic_read,
>      .endianness = DEVICE_NATIVE_ENDIAN,
>  };
>  
> 

Right. I'm just wondering why the guest reads from that port.

Reviewed-by: Jan Kiszka <address@hidden>

-- 
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
Corporate Competence Center Embedded Linux



reply via email to

[Prev in Thread] Current Thread [Next in Thread]