# 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
|