xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Don Slutz <dslutz@verizon.com>, xen-devel@lists.xen.org
Cc: Keir Fraser <keir@xen.org>,
	Ian Campbell <ian.campbell@citrix.com>,
	Jan Beulich <jbeulich@suse.com>
Subject: Re: [RFC][PATCH 1/1] Add IOREQ_TYPE_VMWARE_PORT
Date: Mon, 29 Sep 2014 13:13:47 +0200	[thread overview]
Message-ID: <54293EEB.7000401@redhat.com> (raw)
In-Reply-To: <1411757470-29337-2-git-send-email-dslutz@verizon.com>

Il 26/09/2014 20:51, Don Slutz ha scritto:
> +    memcpy(&regs->rax, &vio->io_data, vio->io_size);

Shouldn't this match the code you use below for case
HVMIO_handle_vmport_awaiting_completion?

Paolo

> +    return X86EMUL_OKAY;
> +}
> +
>  static int hvmemul_do_io(
>      int is_mmio, paddr_t addr, unsigned long *reps, int size,
>      paddr_t ram_gpa, int dir, int df, void *p_data)
> diff --git a/xen/arch/x86/hvm/io.c b/xen/arch/x86/hvm/io.c
> index 9f565d6..96ef3ff 100644
> --- a/xen/arch/x86/hvm/io.c
> +++ b/xen/arch/x86/hvm/io.c
> @@ -206,6 +206,25 @@ void hvm_io_assist(ioreq_t *p)
>          else
>              memcpy(&guest_cpu_user_regs()->rax, &p->data, vio->io_size);
>          break;
> +    case HVMIO_handle_vmport_awaiting_completion:
> +    {
> +        struct cpu_user_regs *regs = guest_cpu_user_regs();
> +
> +        /* Always zero extension for eax */
> +        regs->rax = (uint32_t)(p->addr >> 32);
> +        /* Only zero extension if 32bit register changed */
> +        if ( (uint32_t)regs->rbx != (uint32_t)p->addr )
> +            regs->rbx = (uint32_t)p->addr;
> +        if ( (uint32_t)regs->rcx != (uint32_t)p->count )
> +            regs->rcx = (uint32_t)p->count;
> +        if ( (uint32_t)regs->rdx != (uint32_t)p->size )
> +            regs->rdx = (uint32_t)p->size;
> +        if ( (uint32_t)regs->rsi != (uint32_t)(p->data >> 32) )
> +            regs->rsi = (uint32_t)(p->data >> 32);
> +        if ( (uint32_t)regs->rdi != (uint32_t)p->data )
> +            regs->rdi = (uint32_t)p->data;
> +    }

  reply	other threads:[~2014-09-29 11:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-26 18:51 [RFC][PATCH 0/1] Add support for Xen access to vmport Don Slutz
2014-09-26 18:51 ` [RFC][PATCH 1/1] Add IOREQ_TYPE_VMWARE_PORT Don Slutz
2014-09-29 11:13   ` Paolo Bonzini [this message]
2014-10-02 18:31     ` Don Slutz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54293EEB.7000401@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=dslutz@verizon.com \
    --cc=ian.campbell@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=keir@xen.org \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).