From: Avi Kivity <avi@redhat.com>
To: "Kevin O'Connor" <kevin@koconnor.net>
Cc: Mohammed Gamal <m.gamal005@gmail.com>,
kvm@vger.kernel.org, seabios@seabios.org
Subject: Re: [RFC PATCH v3 0/3] Add segment limit checks to emulator
Date: Sun, 25 Jul 2010 11:55:47 +0300 [thread overview]
Message-ID: <4C4BFC13.8080907@redhat.com> (raw)
In-Reply-To: <20100724161630.GA15361@morn.localdomain>
On 07/24/2010 07:16 PM, Kevin O'Connor wrote:
> On Sat, Jul 24, 2010 at 11:45:22AM -0400, Kevin O'Connor wrote:
>> On Mon, Jul 12, 2010 at 04:13:06PM +0300, Avi Kivity wrote:
>>> Does SeaBIOS use big real mode now?
>> SeaBIOS calls option roms in big real mode. This is required by the
>> relevant specs.
>>
>> See the transition16big function in src/romlayout.S. It briefly jumps
>> to an address at 0xffxxx during the transition to real-mode. At a
>> quick glance, it looks like it could probably be changed to not use a
>> code address>64K.
> I put together a SeaBIOS patch so it does not use code addresses>64K
> in big real mode - in case anyone wants to test it. Note, this only
> reduces the use of code addresses>64K - SeaBIOS will still try to use
> data addresses>64K (eg, in option rom PMM code).
>
What conditions are needed to trigger this path? This can't occur under
normal operation, since it will fail badly with kvm on Intel.
> -Kevin
>
>
> diff --git a/src/misc.c b/src/misc.c
> index 354df87..108c332 100644
> --- a/src/misc.c
> +++ b/src/misc.c
> @@ -156,8 +156,8 @@ u64 rombios32_gdt[] VAR16VISIBLE __aligned(8) = {
> GDT_LIMIT(BUILD_BIOS_SIZE-1) | GDT_CODE | GDT_BASE(BUILD_BIOS_ADDR),
> // 16 bit data segment base=0x0 limit=0xffff (SEG32_MODE16_DS)
> GDT_LIMIT(0x0ffff) | GDT_DATA,
> - // 16 bit code segment base=0 limit=0xffffffff (SEG32_MODE16BIG_CS)
> - GDT_LIMIT(0xfffff) | GDT_CODE | GDT_G,
> + // 16 bit code segment base=0xf0000 limit=0xffffffff (SEG32_MODE16BIG_CS)
> + GDT_LIMIT(0xfffff) | GDT_CODE | GDT_G | GDT_BASE(BUILD_BIOS_ADDR),
> // 16 bit data segment base=0 limit=0xffffffff (SEG32_MODE16BIG_DS)
> GDT_LIMIT(0xfffff) | GDT_DATA | GDT_G,
> };
> diff --git a/src/romlayout.S b/src/romlayout.S
> index 54e5a4d..a469596 100644
> --- a/src/romlayout.S
> +++ b/src/romlayout.S
> @@ -105,7 +105,7 @@ transition16big:
> movw %ax, %fs
> movw %ax, %gs
>
> - ljmpl $SEG32_MODE16BIG_CS, $(BUILD_BIOS_ADDR + 1f)
> + ljmpw $SEG32_MODE16BIG_CS, $1f
>
> .code16gcc
> 1:
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2010-07-25 8:56 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-11 22:56 [RFC PATCH v3 0/3] Add segment limit checks to emulator Mohammed Gamal
2010-07-11 22:56 ` [RFC PATCH v3 1/3] Add helper methods to get segment limits Mohammed Gamal
2010-07-11 22:56 ` [RFC PATCH v3 2/3] x86 emulator: Add segment limit checking helpers Mohammed Gamal
2010-07-11 22:56 ` [RFC PATCH v3 3/3] x86 emulator: Add segment limit checks to emulator functions Mohammed Gamal
2010-07-12 6:26 ` [RFC PATCH v3 0/3] Add segment limit checks to emulator Avi Kivity
2010-07-12 12:36 ` Mohammed Gamal
2010-07-12 13:13 ` Avi Kivity
[not found] ` <AANLkTimHvpE05chocuoQnY0ydOMchMcIInu9QX5F_pV4@mail.gmail.com>
2010-07-12 13:51 ` Avi Kivity
2010-07-12 14:41 ` Gleb Natapov
2010-07-12 14:49 ` Avi Kivity
2010-07-24 15:45 ` Kevin O'Connor
2010-07-24 16:16 ` Kevin O'Connor
2010-07-25 8:55 ` Avi Kivity [this message]
2010-07-25 16:42 ` Kevin O'Connor
2010-07-25 17:19 ` Kevin O'Connor
2010-07-25 18:34 ` Avi Kivity
2010-07-25 18:55 ` Kevin O'Connor
2010-07-25 8:54 ` Avi Kivity
2010-07-25 16:23 ` Kevin O'Connor
2010-07-26 11:47 ` Avi Kivity
2010-07-26 17:47 ` Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C4BFC13.8080907@redhat.com \
--to=avi@redhat.com \
--cc=kevin@koconnor.net \
--cc=kvm@vger.kernel.org \
--cc=m.gamal005@gmail.com \
--cc=seabios@seabios.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.