Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 145517 Details for
Bug 222520
PIT handler wrongly registered to dom0
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Register PIT handlers to the correct domain
p (text/plain), 5.51 KB, created by
Herbert Xu
on 2007-01-13 04:15:04 UTC
(
hide
)
Description:
Register PIT handlers to the correct domain
Filename:
MIME Type:
Creator:
Herbert Xu
Created:
2007-01-13 04:15:04 UTC
Size:
5.51 KB
patch
obsolete
>diff -ur xen.orig/arch/x86/hvm/hvm.c xen/arch/x86/hvm/hvm.c >--- xen.orig/arch/x86/hvm/hvm.c 2007-01-13 14:46:56.000000000 +1100 >+++ xen/arch/x86/hvm/hvm.c 2007-01-13 14:49:58.000000000 +1100 >@@ -266,7 +266,7 @@ > > platform = &d->arch.hvm_domain; > pic_init(&platform->vpic, pic_irq_request, &platform->interrupt_request); >- register_pic_io_hook(); >+ register_pic_io_hook(d); > > if ( hvm_apic_support(d) ) > { >diff -ur xen.orig/arch/x86/hvm/i8254.c xen/arch/x86/hvm/i8254.c >--- xen.orig/arch/x86/hvm/i8254.c 2007-01-13 14:46:56.000000000 +1100 >+++ xen/arch/x86/hvm/i8254.c 2007-01-13 14:49:58.000000000 +1100 >@@ -380,9 +380,9 @@ > s++; s->vcpu = v; > s++; s->vcpu = v; > >- register_portio_handler(PIT_BASE, 4, handle_pit_io); >+ register_portio_handler(v->domain, PIT_BASE, 4, handle_pit_io); > /* register the speaker port */ >- register_portio_handler(0x61, 1, handle_speaker_io); >+ register_portio_handler(v->domain, 0x61, 1, handle_speaker_io); > ticks_per_sec(v) = cpu_khz * (int64_t)1000; > #ifdef DEBUG_PIT > printk("HVM_PIT: guest frequency =%lld\n", (long long)ticks_per_sec(v)); >diff -ur xen.orig/arch/x86/hvm/i8259.c xen/arch/x86/hvm/i8259.c >--- xen.orig/arch/x86/hvm/i8259.c 2007-01-13 14:46:55.000000000 +1100 >+++ xen/arch/x86/hvm/i8259.c 2007-01-13 14:49:58.000000000 +1100 >@@ -570,12 +570,12 @@ > return 1; > } > >-void register_pic_io_hook (void) >+void register_pic_io_hook(struct domain *d) > { >- register_portio_handler(0x20, 2, intercept_pic_io); >- register_portio_handler(0x4d0, 1, intercept_elcr_io); >- register_portio_handler(0xa0, 2, intercept_pic_io); >- register_portio_handler(0x4d1, 1, intercept_elcr_io); >+ register_portio_handler(d, 0x20, 2, intercept_pic_io); >+ register_portio_handler(d, 0x4d0, 1, intercept_elcr_io); >+ register_portio_handler(d, 0xa0, 2, intercept_pic_io); >+ register_portio_handler(d, 0x4d1, 1, intercept_elcr_io); > } > > >diff -ur xen.orig/arch/x86/hvm/intercept.c xen/arch/x86/hvm/intercept.c >--- xen.orig/arch/x86/hvm/intercept.c 2007-01-13 14:46:55.000000000 +1100 >+++ xen/arch/x86/hvm/intercept.c 2007-01-13 14:49:58.000000000 +1100 >@@ -248,12 +248,11 @@ > return 0; > } > >-int register_io_handler(unsigned long addr, unsigned long size, >- intercept_action_t action, int type) >+int register_io_handler( >+ struct domain *d, unsigned long addr, unsigned long size, >+ intercept_action_t action, int type) > { >- struct vcpu *v = current; >- struct hvm_io_handler *handler = >- &(v->domain->arch.hvm_domain.io_handler); >+ struct hvm_io_handler *handler = &d->arch.hvm_domain.io_handler; > int num = handler->num_slot; > > if (num >= MAX_IO_HANDLER) { >diff -ur xen.orig/arch/x86/hvm/pmtimer.c xen/arch/x86/hvm/pmtimer.c >--- xen.orig/arch/x86/hvm/pmtimer.c 2007-01-13 14:46:55.000000000 +1100 >+++ xen/arch/x86/hvm/pmtimer.c 2007-01-13 14:49:58.000000000 +1100 >@@ -52,7 +52,7 @@ > /* ACPI supports a 32-bit power management timer */ > set_timer(&s->timer, NOW() + (1000000000ULL << 31) / FREQUENCE_PMTIMER); > >- register_portio_handler(base, 4, handle_pmt_io); >+ register_portio_handler(v->domain, base, 4, handle_pmt_io); > } > > void pmtimer_deinit(struct domain *d) >diff -ur xen.orig/arch/x86/hvm/rtc.c xen/arch/x86/hvm/rtc.c >--- xen.orig/arch/x86/hvm/rtc.c 2007-01-13 14:46:55.000000000 +1100 >+++ xen/arch/x86/hvm/rtc.c 2007-01-13 14:49:58.000000000 +1100 >@@ -381,7 +381,7 @@ > s->next_second_time = NOW() + 1000000000ULL; > set_timer(&s->second_timer2, s->next_second_time); > >- register_portio_handler(base, 2, handle_rtc_io); >+ register_portio_handler(v->domain, base, 2, handle_rtc_io); > } > > void rtc_deinit(struct domain *d) >diff -ur xen.orig/include/asm-x86/hvm/io.h xen/include/asm-x86/hvm/io.h >--- xen.orig/include/asm-x86/hvm/io.h 2007-01-04 17:21:28.000000000 +1100 >+++ xen/include/asm-x86/hvm/io.h 2007-01-13 14:49:58.000000000 +1100 >@@ -126,8 +126,9 @@ > > /* global io interception point in HV */ > extern int hvm_io_intercept(ioreq_t *p, int type); >-extern int register_io_handler(unsigned long addr, unsigned long size, >- intercept_action_t action, int type); >+extern int register_io_handler( >+ struct domain *d, unsigned long addr, unsigned long size, >+ intercept_action_t action, int type); > > static inline int hvm_portio_intercept(ioreq_t *p) > { >@@ -136,11 +137,11 @@ > > int hvm_mmio_intercept(ioreq_t *p); > >-static inline int register_portio_handler(unsigned long addr, >- unsigned long size, >- intercept_action_t action) >+static inline int register_portio_handler( >+ struct domain *d, unsigned long addr, >+ unsigned long size, intercept_action_t action) > { >- return register_io_handler(addr, size, action, VMX_PORTIO); >+ return register_io_handler(d, addr, size, action, VMX_PORTIO); > } > > #if defined(__i386__) || defined(__x86_64__) >diff -ur xen.orig/include/asm-x86/hvm/vpic.h xen/include/asm-x86/hvm/vpic.h >--- xen.orig/include/asm-x86/hvm/vpic.h 2007-01-13 14:46:55.000000000 +1100 >+++ xen/include/asm-x86/hvm/vpic.h 2007-01-13 14:49:58.000000000 +1100 >@@ -73,7 +73,7 @@ > int pic_read_irq(struct hvm_virpic *s); > void pic_update_irq(struct hvm_virpic *s); /* Caller must hold s->lock */ > uint32_t pic_intack_read(struct hvm_virpic *s); >-void register_pic_io_hook (void); >+void register_pic_io_hook(struct domain *d); > int cpu_get_pic_interrupt(struct vcpu *v, int *type); > int is_periodic_irq(struct vcpu *v, int irq, int type); > int is_irq_enabled(struct vcpu *v, int irq);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 222520
: 145517