* [Qemu-devel] Breakage
@ 2012-03-18 16:12 malc
2012-03-18 16:16 ` Avi Kivity
0 siblings, 1 reply; 15+ messages in thread
From: malc @ 2012-03-18 16:12 UTC (permalink / raw)
To: qemu-devel; +Cc: Avi Kivity
97161e177b4ea2730dff13c4df01475762ab6048 broke booting of a DOS image
i've been using for years, the VM stalls at "Booting from hard disk"
BIOS message never making any progress.
--
mailto:av1474@comtv.ru
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] Breakage
2012-03-18 16:12 [Qemu-devel] Breakage malc
@ 2012-03-18 16:16 ` Avi Kivity
2012-03-18 16:21 ` malc
2012-03-19 4:34 ` Roy Tam
0 siblings, 2 replies; 15+ messages in thread
From: Avi Kivity @ 2012-03-18 16:16 UTC (permalink / raw)
To: malc; +Cc: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 368 bytes --]
On 03/18/2012 06:12 PM, malc wrote:
> 97161e177b4ea2730dff13c4df01475762ab6048 broke booting of a DOS image
> i've been using for years, the VM stalls at "Booting from hard disk"
> BIOS message never making any progress.
Can you post an image that exhibits the problem?
Also, try the attached patch.
--
error compiling committee.c: too many arguments to function
[-- Attachment #2: 0001-exec-fix-write-tlb-entry-misused-as-iotlb.patch --]
[-- Type: text/x-patch, Size: 2073 bytes --]
>From bb363db2608dfc9b49b53994dc20d68169e66774 Mon Sep 17 00:00:00 2001
From: Avi Kivity <avi@redhat.com>
Date: Wed, 14 Mar 2012 16:19:39 +0200
Subject: [PATCH] exec: fix write tlb entry misused as iotlb
A couple of code paths check the lower bits of CPUTLBEntry::addr_write
against io_mem_ram as a way of looking for a dirty RAM page. This works
by accident since the value is zero, which matches all clear bits for
TLB_INVALID, TLB_MMIO, and TLB_NOTDIRTY (indicating dirty RAM).
Make it work by design by checking for the proper bits.
Signed-off-by: Avi Kivity <avi@redhat.com>
---
exec.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/exec.c b/exec.c
index 8fd50a1..d8b089e 100644
--- a/exec.c
+++ b/exec.c
@@ -2031,14 +2031,19 @@ static void tlb_unprotect_code_phys(CPUArchState *env, ram_addr_t ram_addr,
cpu_physical_memory_set_dirty_flags(ram_addr, CODE_DIRTY_FLAG);
}
+static bool tlb_is_dirty_ram(CPUTLBEntry *tlbe)
+{
+ return (tlbe->addr_write & (TLB_INVALID_MASK|TLB_MMIO|TLB_NOTDIRTY)) == 0;
+}
+
static inline void tlb_reset_dirty_range(CPUTLBEntry *tlb_entry,
unsigned long start, unsigned long length)
{
unsigned long addr;
- if ((tlb_entry->addr_write & ~TARGET_PAGE_MASK) == io_mem_ram.ram_addr) {
+ if (tlb_is_dirty_ram(tlb_entry)) {
addr = (tlb_entry->addr_write & TARGET_PAGE_MASK) + tlb_entry->addend;
if ((addr - start) < length) {
- tlb_entry->addr_write = (tlb_entry->addr_write & TARGET_PAGE_MASK) | TLB_NOTDIRTY;
+ tlb_entry->addr_write |= TLB_NOTDIRTY;
}
}
}
@@ -2091,7 +2096,7 @@ static inline void tlb_update_dirty(CPUTLBEntry *tlb_entry)
ram_addr_t ram_addr;
void *p;
- if ((tlb_entry->addr_write & ~TARGET_PAGE_MASK) == io_mem_ram.ram_addr) {
+ if (tlb_is_dirty_ram(tlb_entry)) {
p = (void *)(unsigned long)((tlb_entry->addr_write & TARGET_PAGE_MASK)
+ tlb_entry->addend);
ram_addr = qemu_ram_addr_from_host_nofail(p);
--
1.7.9
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] Breakage
2012-03-18 16:16 ` Avi Kivity
@ 2012-03-18 16:21 ` malc
2012-03-19 16:16 ` Luiz Capitulino
2012-03-19 4:34 ` Roy Tam
1 sibling, 1 reply; 15+ messages in thread
From: malc @ 2012-03-18 16:21 UTC (permalink / raw)
To: Avi Kivity; +Cc: qemu-devel
On Sun, 18 Mar 2012, Avi Kivity wrote:
> On 03/18/2012 06:12 PM, malc wrote:
> > 97161e177b4ea2730dff13c4df01475762ab6048 broke booting of a DOS image
> > i've been using for years, the VM stalls at "Booting from hard disk"
> > BIOS message never making any progress.
>
> Can you post an image that exhibits the problem?
It's 400+MB
>
> Also, try the attached patch.
Boots with the patch.
--
mailto:av1474@comtv.ru
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] Breakage
2012-03-18 16:16 ` Avi Kivity
2012-03-18 16:21 ` malc
@ 2012-03-19 4:34 ` Roy Tam
2012-03-19 9:48 ` Avi Kivity
1 sibling, 1 reply; 15+ messages in thread
From: Roy Tam @ 2012-03-19 4:34 UTC (permalink / raw)
To: Avi Kivity; +Cc: qemu-devel
2012/3/19 Avi Kivity <avi@redhat.com>:
> On 03/18/2012 06:12 PM, malc wrote:
>> 97161e177b4ea2730dff13c4df01475762ab6048 broke booting of a DOS image
>> i've been using for years, the VM stalls at "Booting from hard disk"
>> BIOS message never making any progress.
>
> Can you post an image that exhibits the problem?
>
> Also, try the attached patch.
>
Confirmed fixed for Windows XP.
But I get "*** stack smashing detected ***: terminated" and crash
when booting BeOS 5.
> --
> error compiling committee.c: too many arguments to function
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] Breakage
2012-03-19 4:34 ` Roy Tam
@ 2012-03-19 9:48 ` Avi Kivity
2012-03-20 1:21 ` Roy Tam
0 siblings, 1 reply; 15+ messages in thread
From: Avi Kivity @ 2012-03-19 9:48 UTC (permalink / raw)
To: Roy Tam; +Cc: qemu-devel
On 03/19/2012 06:34 AM, Roy Tam wrote:
> But I get "*** stack smashing detected ***: terminated" and crash
> when booting BeOS 5.
>
Is that a regression? From what commit?
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] Breakage
2012-03-18 16:21 ` malc
@ 2012-03-19 16:16 ` Luiz Capitulino
0 siblings, 0 replies; 15+ messages in thread
From: Luiz Capitulino @ 2012-03-19 16:16 UTC (permalink / raw)
To: malc; +Cc: Avi Kivity, qemu-devel
On Sun, 18 Mar 2012 20:21:45 +0400 (MSK)
malc <av1474@comtv.ru> wrote:
> On Sun, 18 Mar 2012, Avi Kivity wrote:
>
> > On 03/18/2012 06:12 PM, malc wrote:
> > > 97161e177b4ea2730dff13c4df01475762ab6048 broke booting of a DOS image
> > > i've been using for years, the VM stalls at "Booting from hard disk"
> > > BIOS message never making any progress.
> >
> > Can you post an image that exhibits the problem?
>
> It's 400+MB
>
> >
> > Also, try the attached patch.
>
> Boots with the patch.
I was just bisecting a problem during win95 install that seems to be
caused by the same commit. The attached patch fixes it too.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] Breakage
2012-03-19 9:48 ` Avi Kivity
@ 2012-03-20 1:21 ` Roy Tam
0 siblings, 0 replies; 15+ messages in thread
From: Roy Tam @ 2012-03-20 1:21 UTC (permalink / raw)
To: Avi Kivity; +Cc: qemu-devel
2012/3/19 Avi Kivity <avi@redhat.com>:
> On 03/19/2012 06:34 AM, Roy Tam wrote:
>> But I get "*** stack smashing detected ***: terminated" and crash
>> when booting BeOS 5.
>>
>
> Is that a regression? From what commit?
It seems to be a regression from 0.15.1.
1.0 (mingw) build fails to boot also (a fresh compile just done before
I type this message)
>
> --
> error compiling committee.c: too many arguments to function
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] Breakage
2012-09-17 22:41 ` Max Filippov
@ 2012-09-18 11:31 ` malc
0 siblings, 0 replies; 15+ messages in thread
From: malc @ 2012-09-18 11:31 UTC (permalink / raw)
To: Max Filippov; +Cc: Eduardo Habkost, Anthony Liguori, qemu-devel
On Tue, 18 Sep 2012, Max Filippov wrote:
> On Tue, Sep 18, 2012 at 12:15 AM, Eduardo Habkost <ehabkost@redhat.com> wrote:
> > On Mon, Sep 17, 2012 at 11:54:42PM +0400, malc wrote:
> >> On Mon, 17 Sep 2012, Anthony Liguori wrote:
> >>
> >> > malc <av1474@comtv.ru> writes:
> >> >
> >> > > Some(thing|one) broke compilation with pcspk enabled.
> >> > > Symptoms being:
> >> > >
> >> > > ../libhw32/hw/pcspk.o: In function `pcspk_io_write':
> >> > > /home/malc/x/rcs/git/qemu/hw/pcspk.c:145: undefined reference to `pit_set_gate'
> >> > > ../libhw32/hw/pcspk.o: In function `pcspk_io_read':
> >> > > /home/malc/x/rcs/git/qemu/hw/pcspk.c:130: undefined reference to `pit_get_channel_info'
> >> > > ../libhw32/hw/pcspk.o: In function `pcspk_callback':
> >> > > /home/malc/x/rcs/git/qemu/hw/pcspk.c:81: undefined reference to `pit_get_channel_info'
> >> > > collect2: ld returned 1 exit status
> >> >
> >> > Try cleaning your build directory.
> >> >
> >> > It builds fine for me.
> >> >
> >>
> >> --target-list=xtensa-softmmu --audio-card-list=pcspk
> >
> > It looks like this particular configuration never worked, since
> > xtensa-softmmu was introduced (commit cfa550c6acc6718c3f932e858366e3e1e81266d6).
>
> Other embedded platforms (I've tried cris-softmmu, lm32-softmmu, or32-softmmu,
> sh4-softmmu) give the same result.
>
> > Does it even make sense to have a PC-speaker on a Xtensa machine?
> > Should the machine have a i8254 PIT?
>
> I doubt that it's meaningful for any of the mentioned _architectures_,
> definitely not for xtensa.
>
Condensed version of long story:
I have a script that invokes QEMU's configure with tons of command line
arguments (i.e. turn on most of the audio drivers, most of the audio
cards, disable stuff i don't have or need; enable ccache and so forth),
this script was used to configure xtensa-softmmu configure never
complained but the make later bombed in the way mentioned above.
To avoid this "surprise" result we can(should?) filter out the
cards requested by the user based on contents of audio_possible_card_list
(in a fashion similar to the one employed for driver list filtering)
--
mailto:av1474@comtv.ru
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] Breakage
2012-09-17 20:15 ` Eduardo Habkost
@ 2012-09-17 22:41 ` Max Filippov
2012-09-18 11:31 ` malc
0 siblings, 1 reply; 15+ messages in thread
From: Max Filippov @ 2012-09-17 22:41 UTC (permalink / raw)
To: Eduardo Habkost; +Cc: qemu-devel, Anthony Liguori
On Tue, Sep 18, 2012 at 12:15 AM, Eduardo Habkost <ehabkost@redhat.com> wrote:
> On Mon, Sep 17, 2012 at 11:54:42PM +0400, malc wrote:
>> On Mon, 17 Sep 2012, Anthony Liguori wrote:
>>
>> > malc <av1474@comtv.ru> writes:
>> >
>> > > Some(thing|one) broke compilation with pcspk enabled.
>> > > Symptoms being:
>> > >
>> > > ../libhw32/hw/pcspk.o: In function `pcspk_io_write':
>> > > /home/malc/x/rcs/git/qemu/hw/pcspk.c:145: undefined reference to `pit_set_gate'
>> > > ../libhw32/hw/pcspk.o: In function `pcspk_io_read':
>> > > /home/malc/x/rcs/git/qemu/hw/pcspk.c:130: undefined reference to `pit_get_channel_info'
>> > > ../libhw32/hw/pcspk.o: In function `pcspk_callback':
>> > > /home/malc/x/rcs/git/qemu/hw/pcspk.c:81: undefined reference to `pit_get_channel_info'
>> > > collect2: ld returned 1 exit status
>> >
>> > Try cleaning your build directory.
>> >
>> > It builds fine for me.
>> >
>>
>> --target-list=xtensa-softmmu --audio-card-list=pcspk
>
> It looks like this particular configuration never worked, since
> xtensa-softmmu was introduced (commit cfa550c6acc6718c3f932e858366e3e1e81266d6).
Other embedded platforms (I've tried cris-softmmu, lm32-softmmu, or32-softmmu,
sh4-softmmu) give the same result.
> Does it even make sense to have a PC-speaker on a Xtensa machine?
> Should the machine have a i8254 PIT?
I doubt that it's meaningful for any of the mentioned _architectures_,
definitely not for xtensa.
--
Thanks.
-- Max
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] Breakage
2012-09-17 19:54 ` malc
2012-09-17 20:15 ` Eduardo Habkost
@ 2012-09-17 20:17 ` Jan Kiszka
1 sibling, 0 replies; 15+ messages in thread
From: Jan Kiszka @ 2012-09-17 20:17 UTC (permalink / raw)
To: malc; +Cc: qemu-devel, Anthony Liguori
On 2012-09-17 21:54, malc wrote:
> On Mon, 17 Sep 2012, Anthony Liguori wrote:
>
>> malc <av1474@comtv.ru> writes:
>>
>>> Some(thing|one) broke compilation with pcspk enabled.
>>> Symptoms being:
>>>
>>> ../libhw32/hw/pcspk.o: In function `pcspk_io_write':
>>> /home/malc/x/rcs/git/qemu/hw/pcspk.c:145: undefined reference to `pit_set_gate'
>>> ../libhw32/hw/pcspk.o: In function `pcspk_io_read':
>>> /home/malc/x/rcs/git/qemu/hw/pcspk.c:130: undefined reference to `pit_get_channel_info'
>>> ../libhw32/hw/pcspk.o: In function `pcspk_callback':
>>> /home/malc/x/rcs/git/qemu/hw/pcspk.c:81: undefined reference to `pit_get_channel_info'
>>> collect2: ld returned 1 exit status
>>
>> Try cleaning your build directory.
>>
>> It builds fine for me.
>>
>
> --target-list=xtensa-softmmu --audio-card-list=pcspk
pcspk is not supposed to be specified like this. It's automatically
built for those targets that support it.
Jan
--
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] Breakage
2012-09-17 19:54 ` malc
@ 2012-09-17 20:15 ` Eduardo Habkost
2012-09-17 22:41 ` Max Filippov
2012-09-17 20:17 ` Jan Kiszka
1 sibling, 1 reply; 15+ messages in thread
From: Eduardo Habkost @ 2012-09-17 20:15 UTC (permalink / raw)
To: malc; +Cc: qemu-devel, Anthony Liguori
On Mon, Sep 17, 2012 at 11:54:42PM +0400, malc wrote:
> On Mon, 17 Sep 2012, Anthony Liguori wrote:
>
> > malc <av1474@comtv.ru> writes:
> >
> > > Some(thing|one) broke compilation with pcspk enabled.
> > > Symptoms being:
> > >
> > > ../libhw32/hw/pcspk.o: In function `pcspk_io_write':
> > > /home/malc/x/rcs/git/qemu/hw/pcspk.c:145: undefined reference to `pit_set_gate'
> > > ../libhw32/hw/pcspk.o: In function `pcspk_io_read':
> > > /home/malc/x/rcs/git/qemu/hw/pcspk.c:130: undefined reference to `pit_get_channel_info'
> > > ../libhw32/hw/pcspk.o: In function `pcspk_callback':
> > > /home/malc/x/rcs/git/qemu/hw/pcspk.c:81: undefined reference to `pit_get_channel_info'
> > > collect2: ld returned 1 exit status
> >
> > Try cleaning your build directory.
> >
> > It builds fine for me.
> >
>
> --target-list=xtensa-softmmu --audio-card-list=pcspk
It looks like this particular configuration never worked, since
xtensa-softmmu was introduced (commit cfa550c6acc6718c3f932e858366e3e1e81266d6).
Does it even make sense to have a PC-speaker on a Xtensa machine?
Should the machine have a i8254 PIT?
--
Eduardo
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] Breakage
2012-09-17 19:35 ` Anthony Liguori
@ 2012-09-17 19:54 ` malc
2012-09-17 20:15 ` Eduardo Habkost
2012-09-17 20:17 ` Jan Kiszka
0 siblings, 2 replies; 15+ messages in thread
From: malc @ 2012-09-17 19:54 UTC (permalink / raw)
To: Anthony Liguori; +Cc: qemu-devel
On Mon, 17 Sep 2012, Anthony Liguori wrote:
> malc <av1474@comtv.ru> writes:
>
> > Some(thing|one) broke compilation with pcspk enabled.
> > Symptoms being:
> >
> > ../libhw32/hw/pcspk.o: In function `pcspk_io_write':
> > /home/malc/x/rcs/git/qemu/hw/pcspk.c:145: undefined reference to `pit_set_gate'
> > ../libhw32/hw/pcspk.o: In function `pcspk_io_read':
> > /home/malc/x/rcs/git/qemu/hw/pcspk.c:130: undefined reference to `pit_get_channel_info'
> > ../libhw32/hw/pcspk.o: In function `pcspk_callback':
> > /home/malc/x/rcs/git/qemu/hw/pcspk.c:81: undefined reference to `pit_get_channel_info'
> > collect2: ld returned 1 exit status
>
> Try cleaning your build directory.
>
> It builds fine for me.
>
--target-list=xtensa-softmmu --audio-card-list=pcspk
--
mailto:av1474@comtv.ru
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] Breakage
2012-09-17 17:40 malc
@ 2012-09-17 19:35 ` Anthony Liguori
2012-09-17 19:54 ` malc
0 siblings, 1 reply; 15+ messages in thread
From: Anthony Liguori @ 2012-09-17 19:35 UTC (permalink / raw)
To: malc, qemu-devel
malc <av1474@comtv.ru> writes:
> Some(thing|one) broke compilation with pcspk enabled.
> Symptoms being:
>
> ../libhw32/hw/pcspk.o: In function `pcspk_io_write':
> /home/malc/x/rcs/git/qemu/hw/pcspk.c:145: undefined reference to `pit_set_gate'
> ../libhw32/hw/pcspk.o: In function `pcspk_io_read':
> /home/malc/x/rcs/git/qemu/hw/pcspk.c:130: undefined reference to `pit_get_channel_info'
> ../libhw32/hw/pcspk.o: In function `pcspk_callback':
> /home/malc/x/rcs/git/qemu/hw/pcspk.c:81: undefined reference to `pit_get_channel_info'
> collect2: ld returned 1 exit status
Try cleaning your build directory.
It builds fine for me.
Regards,
Anthony Liguori
>
> --
> mailto:av1474@comtv.ru
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Qemu-devel] Breakage
@ 2012-09-17 17:40 malc
2012-09-17 19:35 ` Anthony Liguori
0 siblings, 1 reply; 15+ messages in thread
From: malc @ 2012-09-17 17:40 UTC (permalink / raw)
To: qemu-devel
Some(thing|one) broke compilation with pcspk enabled.
Symptoms being:
../libhw32/hw/pcspk.o: In function `pcspk_io_write':
/home/malc/x/rcs/git/qemu/hw/pcspk.c:145: undefined reference to `pit_set_gate'
../libhw32/hw/pcspk.o: In function `pcspk_io_read':
/home/malc/x/rcs/git/qemu/hw/pcspk.c:130: undefined reference to `pit_get_channel_info'
../libhw32/hw/pcspk.o: In function `pcspk_callback':
/home/malc/x/rcs/git/qemu/hw/pcspk.c:81: undefined reference to `pit_get_channel_info'
collect2: ld returned 1 exit status
--
mailto:av1474@comtv.ru
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Qemu-devel] Breakage
@ 2009-08-26 20:56 malc
0 siblings, 0 replies; 15+ messages in thread
From: malc @ 2009-08-26 20:56 UTC (permalink / raw)
To: qemu-devel
a. qemu-commits does not work again
b. 4dd75c702c96ec84db4efe24fcc80a4d7bb32df2 (make pthreads mandatory)
broke the build in cygwin
--
mailto:av1474@comtv.ru
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2012-09-18 11:32 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-18 16:12 [Qemu-devel] Breakage malc
2012-03-18 16:16 ` Avi Kivity
2012-03-18 16:21 ` malc
2012-03-19 16:16 ` Luiz Capitulino
2012-03-19 4:34 ` Roy Tam
2012-03-19 9:48 ` Avi Kivity
2012-03-20 1:21 ` Roy Tam
-- strict thread matches above, loose matches on Subject: below --
2012-09-17 17:40 malc
2012-09-17 19:35 ` Anthony Liguori
2012-09-17 19:54 ` malc
2012-09-17 20:15 ` Eduardo Habkost
2012-09-17 22:41 ` Max Filippov
2012-09-18 11:31 ` malc
2012-09-17 20:17 ` Jan Kiszka
2009-08-26 20:56 malc
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.