direct-io.hg

changeset 13279:23dcc167b97e

Initial support for HVM compat guests

Signed-off-by: Emmanuel Ackaouy <ack@xensource.com>
author Emmanuel Ackaouy <ack@xensource.com>
date Fri Jan 05 17:51:07 2007 +0000 (2007-01-05)
parents 1b7ebd25fa40
children d898b5990ed7
files xen/arch/x86/domain.c xen/arch/x86/hvm/intercept.c xen/arch/x86/mm/shadow/multi.c xen/arch/x86/x86_64/compat/entry.S xen/include/public/hvm/ioreq.h
line diff
     1.1 --- a/xen/arch/x86/domain.c	Fri Jan 05 17:46:14 2007 +0000
     1.2 +++ b/xen/arch/x86/domain.c	Fri Jan 05 17:51:07 2007 +0000
     1.3 @@ -1395,7 +1395,11 @@ void domain_relinquish_resources(struct 
     1.4  #ifdef CONFIG_COMPAT
     1.5          if ( IS_COMPAT(d) )
     1.6          {
     1.7 -            pfn = l4e_get_pfn(*(l4_pgentry_t *)__va(pagetable_get_paddr(v->arch.guest_table)));
     1.8 +            if ( is_hvm_vcpu(v) )
     1.9 +                pfn = pagetable_get_pfn(v->arch.guest_table);
    1.10 +            else
    1.11 +                pfn = l4e_get_pfn(*(l4_pgentry_t *)__va(pagetable_get_paddr(v->arch.guest_table)));
    1.12 +
    1.13              if ( pfn != 0 )
    1.14              {
    1.15                  if ( shadow_mode_refcounts(d) )
     2.1 --- a/xen/arch/x86/hvm/intercept.c	Fri Jan 05 17:46:14 2007 +0000
     2.2 +++ b/xen/arch/x86/hvm/intercept.c	Fri Jan 05 17:51:07 2007 +0000
     2.3 @@ -182,7 +182,7 @@ int hvm_buffered_io_intercept(ioreq_t *p
     2.4      spin_lock(buffered_io_lock);
     2.5  
     2.6      if ( buffered_iopage->write_pointer - buffered_iopage->read_pointer ==
     2.7 -         (unsigned long)IOREQ_BUFFER_SLOT_NUM ) {
     2.8 +         (unsigned int)IOREQ_BUFFER_SLOT_NUM ) {
     2.9          /* the queue is full.
    2.10           * send the iopacket through the normal path.
    2.11           * NOTE: The arithimetic operation could handle the situation for
     3.1 --- a/xen/arch/x86/mm/shadow/multi.c	Fri Jan 05 17:46:14 2007 +0000
     3.2 +++ b/xen/arch/x86/mm/shadow/multi.c	Fri Jan 05 17:51:07 2007 +0000
     3.3 @@ -2106,7 +2106,6 @@ void sh_destroy_monitor_table(struct vcp
     3.4              shadow_free(d, _mfn(l3e_get_pfn(l3e[3])));
     3.5              sh_unmap_domain_page(l3e);
     3.6          }
     3.7 -        shadow_free(d, mmfn);
     3.8          sh_unmap_domain_page(l4e);
     3.9      }
    3.10  #elif CONFIG_PAGING_LEVELS == 3
     4.1 --- a/xen/arch/x86/x86_64/compat/entry.S	Fri Jan 05 17:46:14 2007 +0000
     4.2 +++ b/xen/arch/x86/x86_64/compat/entry.S	Fri Jan 05 17:51:07 2007 +0000
     4.3 @@ -313,7 +313,7 @@ ENTRY(compat_hypercall_table)
     4.4          .quad compat_xenoprof_op
     4.5          .quad do_event_channel_op
     4.6          .quad compat_physdev_op
     4.7 -        .quad compat_ni_hypercall
     4.8 +        .quad do_hvm_op
     4.9          .quad compat_sysctl             /* 35 */
    4.10          .quad compat_domctl
    4.11          .quad compat_kexec_op
    4.12 @@ -356,7 +356,7 @@ ENTRY(compat_hypercall_args_table)
    4.13          .byte 2 /* compat_xenoprof_op       */
    4.14          .byte 2 /* compat_event_channel_op  */
    4.15          .byte 2 /* compat_physdev_op        */
    4.16 -        .byte 0 /* compat_ni_hypercall      */
    4.17 +        .byte 2 /* do_hvm_op                */
    4.18          .byte 1 /* compat_sysctl            */  /* 35 */
    4.19          .byte 1 /* compat_domctl            */
    4.20          .byte 2 /* compat_kexec_op          */
     5.1 --- a/xen/include/public/hvm/ioreq.h	Fri Jan 05 17:46:14 2007 +0000
     5.2 +++ b/xen/include/public/hvm/ioreq.h	Fri Jan 05 17:51:07 2007 +0000
     5.3 @@ -56,6 +56,7 @@ struct ioreq {
     5.4      uint8_t dir:1;          /*  1=read, 0=write             */
     5.5      uint8_t df:1;
     5.6      uint8_t type;           /* I/O type                     */
     5.7 +    uint8_t _pad0[6];
     5.8      uint64_t io_count;      /* How many IO done on a vcpu   */
     5.9  };
    5.10  typedef struct ioreq ioreq_t;
    5.11 @@ -74,8 +75,8 @@ typedef struct shared_iopage shared_iopa
    5.12  
    5.13  #define IOREQ_BUFFER_SLOT_NUM     80
    5.14  struct buffered_iopage {
    5.15 -    unsigned long   read_pointer;
    5.16 -    unsigned long   write_pointer;
    5.17 +    unsigned int    read_pointer;
    5.18 +    unsigned int    write_pointer;
    5.19      ioreq_t         ioreq[IOREQ_BUFFER_SLOT_NUM];
    5.20  };            /* sizeof this structure must be in one page */
    5.21  typedef struct buffered_iopage buffered_iopage_t;