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

Re: [Xen-devel] [PATCH v2 06/16] x86/amd: call post outb hook for both PV and HVM



>>> On 19.10.18 at 16:28, <wei.liu2@xxxxxxxxxx> wrote:
> --- a/xen/arch/x86/hvm/io.c
> +++ b/xen/arch/x86/hvm/io.c
> @@ -234,6 +234,8 @@ static int g2m_portio_write(const struct hvm_io_handler 
> *handler,
>      {
>      case 1:
>          outb(data, mport);
> +        if ( post_outb_hook )
> +            post_outb_hook(mport, (uint8_t)data);

Pointless cast. I notice ...

> @@ -352,8 +350,8 @@ static void guest_io_write(unsigned int port, unsigned 
> int bytes,
>          {
>          case 1:
>              outb((uint8_t)data, port);
> -            if ( pv_post_outb_hook )
> -                pv_post_outb_hook(port, (uint8_t)data);
> +            if ( post_outb_hook )
> +                post_outb_hook(port, (uint8_t)data);

... one has been present here (which should be dropped instead)
and ...

> @@ -433,8 +431,8 @@ static int write_io(unsigned int port, unsigned int bytes,
>              io_emul_stub_setup(poc, ctxt->opcode, port, bytes);
>  
>          io_emul(ctxt->regs);
> -        if ( (bytes == 1) && pv_post_outb_hook )
> -            pv_post_outb_hook(port, val);
> +        if ( (bytes == 1) && post_outb_hook )
> +            post_outb_hook(port, val);

... none has been present here.

However, looking at Roger's approach in "amd/pvh: enable ACPI C1E
disable quirk on PVH Dom0" I wonder if execution would ever make it
to g2m_portio_write() for Dom0 - g2m_ioport_list gets added to from
a domctl only afaics.

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.