WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] RE: [Xen-changelog] [xen-unstable] Initial support for HVM c

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] RE: [Xen-changelog] [xen-unstable] Initial support for HVM compat guests
From: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
Date: Mon, 15 Jan 2007 14:31:31 +0800
Delivery-date: Sun, 14 Jan 2007 22:31:49 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <200701052055.l05Ktdko012983@xxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AccxDEI/xnx7jpkDRTyKsEVGkKWVRwHYc7AQ
Thread-topic: [Xen-changelog] [xen-unstable] Initial support for HVM compat guests
Curious about "HVM compat" here? :-) I can't get exact meaning 
simply by following change. Is it an exact new model, since 32bit 
HVM guests are already supported on 64bit xen? Or it means a 
compat-dom0 coupled with 32bit HVM? Or something like to reuse 
new compat layer for HVM side if translation required?

Thanks,
Kevin

>-----Original Message-----
>From: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
>[mailto:xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Xen
>patchbot-unstable
>Sent: 2007年1月6日 4:56
>To: xen-changelog@xxxxxxxxxxxxxxxxxxx
>Subject: [Xen-changelog] [xen-unstable] Initial support for HVM compat
>guests
>
># HG changeset patch
># User Emmanuel Ackaouy <ack@xxxxxxxxxxxxx>
># Date 1168019467 0
># Node ID 23dcc167b97efba1c81c51bd0d6adb094c80d013
># Parent  1b7ebd25fa40cf603910f1ffc7d59eba03050da1
>Initial support for HVM compat guests
>
>Signed-off-by: Emmanuel Ackaouy <ack@xxxxxxxxxxxxx>
>---
> xen/arch/x86/domain.c              |    6 +++++-
> xen/arch/x86/hvm/intercept.c       |    2 +-
> xen/arch/x86/mm/shadow/multi.c     |    1 -
> xen/arch/x86/x86_64/compat/entry.S |    4 ++--
> xen/include/public/hvm/ioreq.h     |    5 +++--
> 5 files changed, 11 insertions(+), 7 deletions(-)
>
>diff -r 1b7ebd25fa40 -r 23dcc167b97e xen/arch/x86/domain.c
>--- a/xen/arch/x86/domain.c    Fri Jan 05 17:46:14 2007 +0000
>+++ b/xen/arch/x86/domain.c    Fri Jan 05 17:51:07 2007 +0000
>@@ -1395,7 +1395,11 @@ void domain_relinquish_resources(struct
> #ifdef CONFIG_COMPAT
>         if ( IS_COMPAT(d) )
>         {
>-            pfn = l4e_get_pfn(*(l4_pgentry_t
>*)__va(pagetable_get_paddr(v->arch.guest_table)));
>+            if ( is_hvm_vcpu(v) )
>+                pfn = pagetable_get_pfn(v->arch.guest_table);
>+            else
>+                pfn = l4e_get_pfn(*(l4_pgentry_t
>*)__va(pagetable_get_paddr(v->arch.guest_table)));
>+
>             if ( pfn != 0 )
>             {
>                 if ( shadow_mode_refcounts(d) )
>diff -r 1b7ebd25fa40 -r 23dcc167b97e xen/arch/x86/hvm/intercept.c
>--- a/xen/arch/x86/hvm/intercept.c     Fri Jan 05 17:46:14 2007 +0000
>+++ b/xen/arch/x86/hvm/intercept.c     Fri Jan 05 17:51:07 2007 +0000
>@@ -182,7 +182,7 @@ int hvm_buffered_io_intercept(ioreq_t *p
>     spin_lock(buffered_io_lock);
>
>     if ( buffered_iopage->write_pointer -
>buffered_iopage->read_pointer ==
>-         (unsigned long)IOREQ_BUFFER_SLOT_NUM ) {
>+         (unsigned int)IOREQ_BUFFER_SLOT_NUM ) {
>         /* the queue is full.
>          * send the iopacket through the normal path.
>          * NOTE: The arithimetic operation could handle the situation
>for
>diff -r 1b7ebd25fa40 -r 23dcc167b97e xen/arch/x86/mm/shadow/multi.c
>--- a/xen/arch/x86/mm/shadow/multi.c   Fri Jan 05 17:46:14 2007 +0000
>+++ b/xen/arch/x86/mm/shadow/multi.c   Fri Jan 05 17:51:07 2007
>+0000
>@@ -2106,7 +2106,6 @@ void sh_destroy_monitor_table(struct vcp
>             shadow_free(d, _mfn(l3e_get_pfn(l3e[3])));
>             sh_unmap_domain_page(l3e);
>         }
>-        shadow_free(d, mmfn);
>         sh_unmap_domain_page(l4e);
>     }
> #elif CONFIG_PAGING_LEVELS == 3
>diff -r 1b7ebd25fa40 -r 23dcc167b97e
>xen/arch/x86/x86_64/compat/entry.S
>--- a/xen/arch/x86/x86_64/compat/entry.S       Fri Jan 05 17:46:14 2007
>+0000
>+++ b/xen/arch/x86/x86_64/compat/entry.S       Fri Jan 05 17:51:07
>2007 +0000
>@@ -313,7 +313,7 @@ ENTRY(compat_hypercall_table)
>         .quad compat_xenoprof_op
>         .quad do_event_channel_op
>         .quad compat_physdev_op
>-        .quad compat_ni_hypercall
>+        .quad do_hvm_op
>         .quad compat_sysctl             /* 35 */
>         .quad compat_domctl
>         .quad compat_kexec_op
>@@ -356,7 +356,7 @@ ENTRY(compat_hypercall_args_table)
>         .byte 2 /* compat_xenoprof_op       */
>         .byte 2 /* compat_event_channel_op  */
>         .byte 2 /* compat_physdev_op        */
>-        .byte 0 /* compat_ni_hypercall      */
>+        .byte 2 /* do_hvm_op                */
>         .byte 1 /* compat_sysctl            */  /* 35 */
>         .byte 1 /* compat_domctl            */
>         .byte 2 /* compat_kexec_op          */
>diff -r 1b7ebd25fa40 -r 23dcc167b97e xen/include/public/hvm/ioreq.h
>--- a/xen/include/public/hvm/ioreq.h   Fri Jan 05 17:46:14 2007 +0000
>+++ b/xen/include/public/hvm/ioreq.h   Fri Jan 05 17:51:07 2007 +0000
>@@ -56,6 +56,7 @@ struct ioreq {
>     uint8_t dir:1;          /*  1=read, 0=write             */
>     uint8_t df:1;
>     uint8_t type;           /* I/O type                     */
>+    uint8_t _pad0[6];
>     uint64_t io_count;      /* How many IO done on a vcpu   */
> };
> typedef struct ioreq ioreq_t;
>@@ -74,8 +75,8 @@ typedef struct shared_iopage shared_iopa
>
> #define IOREQ_BUFFER_SLOT_NUM     80
> struct buffered_iopage {
>-    unsigned long   read_pointer;
>-    unsigned long   write_pointer;
>+    unsigned int    read_pointer;
>+    unsigned int    write_pointer;
>     ioreq_t         ioreq[IOREQ_BUFFER_SLOT_NUM];
> };            /* sizeof this structure must be in one page */
> typedef struct buffered_iopage buffered_iopage_t;
>
>_______________________________________________
>Xen-changelog mailing list
>Xen-changelog@xxxxxxxxxxxxxxxxxxx
>http://lists.xensource.com/xen-changelog

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel