qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Anthony Xu <anthony.xu@intel.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 4/4] pam: setup pc.bios
Date: Sat, 8 Apr 2017 17:49:21 +0800	[thread overview]
Message-ID: <e6089f9a-a90a-33f7-1e62-9d941619b983@redhat.com> (raw)
In-Reply-To: <1491612336-31066-5-git-send-email-anthony.xu@intel.com>



On 08/04/2017 08:45, Anthony Xu wrote:
> -    if (!isapc_ram_fw) {
> -        memory_region_set_readonly(bios, true);
> +    if (PC_MACHINE(current_machine)->pam) {
> +        /* if PAM is disabled, set it as readwrite */
> +        if (!isapc_ram_fw) {
> +            memory_region_set_readonly(bios, true);
> +        }
>      }

I think this is wrong, the high copy should remain read-only or pflash
stops working when you remove PAM.

The comment only explains the "what" but not the "why" and the "why" is
not in the commit message.  See also here:

> +    if (PC_MACHINE(current_machine)->pam) {
> +        memory_region_add_subregion_overlap(rom_memory,
> +                                        0x100000 - isa_bios_size,
> +                                        isa_bios,
> +                                        1);
> +        if (!isapc_ram_fw) {
> +            memory_region_set_readonly(isa_bios, true);
> +        }
> +    } else {
> +        /* if PAM is disabed, add isa-bios to system memory region */
> +        memory_region_add_subregion_overlap(system_memory,
>                                          0x100000 - isa_bios_size,
>                                          isa_bios,
>                                          1);

Thanks,

Paolo

  reply	other threads:[~2017-04-08  9:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-08  0:45 [Qemu-devel] [PATCH 0/4] pam: make pam configurable Anthony Xu
2017-04-08  0:45 ` [Qemu-devel] [PATCH 1/4] pam:refactor PAM related code Anthony Xu
2017-04-08  9:49   ` Paolo Bonzini
2017-04-11  1:25     ` Xu, Anthony
2017-04-08  0:45 ` [Qemu-devel] [PATCH 2/4] pam: Make PAM configurable Anthony Xu
2017-04-08  0:45 ` [Qemu-devel] [PATCH 3/4] pam: disable pc.rom when pam is disabled Anthony Xu
2017-04-08  0:45 ` [Qemu-devel] [PATCH 4/4] pam: setup pc.bios Anthony Xu
2017-04-08  9:49   ` Paolo Bonzini [this message]
2017-04-11  1:42     ` Xu, Anthony
2017-04-11  9:18       ` Paolo Bonzini

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=e6089f9a-a90a-33f7-1e62-9d941619b983@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=anthony.xu@intel.com \
    --cc=qemu-devel@nongnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).