From: Daniel Henrique Barboza
The current implementation of h_home_node_associativity hard codes
the values of associativity domains of the vcpus. Let's make
it consider the values already initialized in spapr->numa_assoc_array,
via the spapr_numa_get_vcpu_assoc() helper.
We want to set it and
From: Daniel Henrique Barboza
The NVLink2 GPUs works like a regular NUMA node with its
own associativity values, regardless of user input.
This can be handled inside spapr_numa_associativity_init(),
initializing NVGPU_MAX_NUM associativity arrays that can
be used by the GPUs.
Signed-off-by:
From: Daniel Henrique Barboza
The implementation of this hypercall will be modified to use
spapr->numa_assoc_arrays input. Moving it to spapr_numa.c makes
make more sense.
Reviewed-by: Greg Kurz
Signed-off-by: Daniel Henrique Barboza
Message-Id: <20200904172422.617460-2-danielhb...@gmail.com>
From: Daniel Henrique Barboza
Vcpus have an additional paramenter to be appended, vcpu_id. This
also changes the size of the of property itself, which is being
represented in index 0 of numa_assoc_array[cpu->node_id],
and defaults to MAX_DISTANCE_REF_POINTS for all cases but
vcpus.
All this
From: Philippe Mathieu-Daudé
Replace the magic '4' by ARRAY_SIZE(s->irq) which is more explicit.
Signed-off-by: Philippe Mathieu-Daudé
Message-Id: <20200901104043.91383-4-f4...@amsat.org>
Reviewed-by: Richard Henderson
Reviewed-by: Cédric Le Goater
Signed-off-by: David Gibson
---
From: Daniel Henrique Barboza
The work to be done in h_home_node_associativity() intersects
with what is already done in spapr_numa_fixup_cpu_dt(). This
patch creates a new helper, spapr_numa_get_vcpu_assoc(), to
be used for both spapr_numa_fixup_cpu_dt() and
h_home_node_associativity().
While
From: Philippe Mathieu-Daudé
We call pci_register_root_bus() to register 4 IRQs with the
ppc4xx_pci_set_irq() handler. As it can only be called with
values in the [0-4[ range, replace the pointless warning by
an assert().
Signed-off-by: Philippe Mathieu-Daudé
Message-Id:
From: Daniel Henrique Barboza
The next step to centralize all NUMA/associativity handling in
the spapr machine is to create a 'one stop place' for all
things ibm,associativity.
This patch introduces numa_assoc_array, a 2 dimensional array
that will store all ibm,associativity arrays of all NUMA
From: Daniel Henrique Barboza
This function is only used inside spapr_nvdimm.c.
Signed-off-by: Daniel Henrique Barboza
Message-Id: <20200901125645.118026-3-danielhb...@gmail.com>
Signed-off-by: David Gibson
---
hw/ppc/spapr_nvdimm.c | 22 +++---
From: Thiago Jung Bauermann
Instead of setting CPUState::halted to 1 in secondary_cpu_reset(), use the
start-powered-off property which makes cpu_common_reset() initialize it
to 1 in common code.
Now secondary_cpu_reset() becomes equivalent to main_cpu_reset() so rename
the function to
From: Daniel Henrique Barboza
In a similar fashion as the previous patch, let's move the
handling of ibm,associativity-lookup-arrays from spapr.c to
spapr_numa.c. A spapr_numa_write_assoc_lookup_arrays() helper was
created, and spapr_dt_dynamic_reconfiguration_memory() can now
use it to
From: Thiago Jung Bauermann
This change is in a separate patch because it's not so obvious that it
won't cause a regression.
Suggested-by: Eduardo Habkost
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: David Gibson
Reviewed-by: Greg Kurz
Signed-off-by: Thiago Jung Bauermann
Message-Id:
From: Thiago Jung Bauermann
We rely on cpu_common_reset() to set cs->halted to 0, it's redundant to do
it in main_cpu_reset().
Signed-off-by: Thiago Jung Bauermann
Message-Id: <20200826055535.951207-7-bauer...@linux.ibm.com>
Reviewed-by: Philippe Mathieu-Daudé
Signed-off-by: David Gibson
---
From: Thiago Jung Bauermann
Instead of setting CPUState::halted to 1 in s390_cpu_initfn(), use the
start-powered-off property which makes cpu_common_reset() initialize it
to 1 in common code.
Note that this changes behavior by setting cs->halted to 1 on reset, which
didn't happen before.
From: Thiago Jung Bauermann
PowerPC sPAPR CPUs start in the halted state, and spapr_reset_vcpu()
attempts to implement this by setting CPUState::halted to 1. But that's too
late for the case of hotplugged CPUs in a machine configure with 2 or more
threads per core.
By then, other parts of QEMU
From: Daniel Henrique Barboza
We're going to make changes in how spapr handles all
ibm,associativity* related properties to enhance our current NUMA
support.
At this moment we have associativity code scattered all around
spapr_* files, with hardcoded values and array sizes. This
makes it harder
From: Thiago Jung Bauermann
Instead of setting CPUState::halted to 1 in ppce500_cpu_reset_sec(), use
the start-powered-off property which makes cpu_common_reset() initialize it
to 1 in common code.
Also change creation of CPU object from cpu_create() to object_new() and
qdev_realize_and_unref()
From: Thiago Jung Bauermann
There are other platforms which also have CPUs that start powered off, so
generalize the start-powered-off property so that it can be used by them.
Note that ARMv7MState also has a property of the same name but this patch
doesn't change it because that class isn't a
From: Daniel Henrique Barboza
NVDIMM has different contraints and conditions than the regular
DIMM and we'll need to add at least one more.
Instead of relying on 'if (nvdimm)' conditionals in the body of
spapr_memory_pre_plug(), use the existing spapr_nvdimm_validate_opts()
and put all NVDIMM
From: Thiago Jung Bauermann
Instead of setting CPUState::halted to 1 in main_cpu_reset(), use the
start-powered-off property which makes cpu_common_reset() initialize it
to 1 in common code.
Also change creation of CPU object from cpu_create() to object_new() and
qdev_realize_and_unref()
From: Cédric Le Goater
The vCPU IPIs are now allocated in kvmppc_xive_cpu_connect() when the
vCPU connects to the KVM device and not when all the sources are reset
in kvmppc_xive_source_reset()
This requires extra care for hotplug vCPUs and VM restore.
Signed-off-by: Cédric Le Goater
From: Cédric Le Goater
When QEMU switches to the XIVE interrupt mode, it creates all the
guest interrupts at the level of the KVM device. These interrupts are
backed by real HW interrupts from the IPI interrupt pool of the XIVE
controller.
Currently, this is done from the QEMU main thread,
From: Daniel Henrique Barboza
The NVDIMM support for pSeries was introduced in 5.1, but it
didn't contemplate the 'nvdimm' machine option that other
archs uses. For every other arch, if no '-machine nvdimm(=on)'
is present, it is assumed that the NVDIMM support is disabled.
The user must
From: Cédric Le Goater
We will use to check if a vCPU IPI has been created.
Signed-off-by: Cédric Le Goater
Message-Id: <20200820134547.2355743-2-...@kaod.org>
Signed-off-by: David Gibson
---
hw/intc/spapr_xive_kvm.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git
From: Cédric Le Goater
This is doing an extra loop but should be equivalent.
It also differentiate the reset of the sources from the restore of the
sources configuration. This will help in allocating the vCPU IPIs
independently.
Signed-off-by: Cédric Le Goater
Message-Id:
spapr_drc.h includes typechecker macro boilerplate for the many different
DRC subclasses. However, most of these types don't actually have different
data in their class and/or instance, making these unneeded, unused, and in
fact a bad idea. Remove them.
Signed-off-by: David Gibson
Reviewed-by:
From: Daniel Henrique Barboza
We do not implement hotplug in the vscsi bus, but we forgot to
tell qdev about it. The result is that users are able to hotplug
devices in the vscsi bus, the devices appear in qdev, but they
aren't usable by the guest OS unless the user reboots it first.
Setting
From: Daniel Henrique Barboza
Since we're using the string just once, just use g_autofree and
avoid leaking it without calling g_free().
Signed-off-by: Daniel Henrique Barboza
Message-Id: <20200825215749.213536-2-danielhb...@gmail.com>
Signed-off-by: David Gibson
---
hw/ppc/spapr_nvdimm.c |
From: Cédric Le Goater
The OPAL test suite runs a read-erase-write test on the PNOR :
https://github.com/open-power/op-test/blob/master/testcases/OpTestPNOR.py
which revealed that the IPMI HIOMAP handlers didn't support
HIOMAP_C_ERASE. Implement the sector erase command by writing 0xFF in
The following changes since commit e11bd71f89649da3cff439c030d2ccac0cc914e3:
Merge remote-tracking branch
'remotes/huth-gitlab/tags/pull-request-2020-09-07' into staging (2020-09-07
16:51:00 +0100)
are available in the Git repository at:
git://github.com/dgibson/qemu.git
From: Cédric Le Goater
On POWER9, the KVM XIVE device uses priority 7 for the escalation
interrupts. On POWER10, the host can use a reduced set of priorities
and KVM will configure the escalation priority to a lower number. In
any case, the guest is allowed to use priorities in a single range :
From: Cédric Le Goater
It was missing the instance_size field.
Cc: Eduardo Habkost
Signed-off-by: Cédric Le Goater
Message-Id: <20200822083920.2668930-1-...@kaod.org>
Reviewed-by: Philippe Mathieu-Daudé
Signed-off-by: David Gibson
---
hw/ppc/pnv_lpc.c | 3 +--
1 file changed, 1
From: Cédric Le Goater
The sPAPR machine has four different IRQ backends, each implementing
the XICS or XIVE interrupt mode or both in the case of the 'dual'
backend.
If a machine is started in P8 compat mode, QEMU should necessarily
support the XICS interrupt mode and in that case, the
The TypeInfo incorrectly just lets the class size be inherited. It won't
actually break things, since the class is abstract, but we should get it
right.
Signed-off-by: David Gibson
Reviewed-by: Cédric Le Goater
Reviewed-by: Philippe Mathieu-Daudé
---
hw/input/adb.c | 1 +
1 file changed, 1
On Mon, Sep 07, 2020 at 01:58:20PM +0100, Peter Maydell wrote:
> On Mon, 7 Sep 2020 at 13:53, Daniel P. Berrangé wrote:
> >
> > The current iPXE ROMs in QEMU date from Janary 2019, so feels like
> > they are overdue for a refresh.
>
> Sounds good.
Thanks for the reminder, I'll look into it.
>
Public bug reported:
(following from
https://gitlab.com/libvirt/libvirt/-/issues/68#note_400960567)
As is very well explained in https://www.berrange.com/posts/2016/04/05
/improving-qemu-security-part-5-tls-support-for-nbd-server-client/, and
easily confirmed with captures, NBD stream starts in
On Fri, Sep 04, 2020 at 02:24:19PM -0300, Daniel Henrique Barboza wrote:
> changes from v5, all suggested by Greg:
> - patch 2:
> * changed g_malloc() to g_new()
> * removed the unneeded g_assert()
> - all patches: added Greg's R-b
Applied to ppc-for-5.2.
>
> v5 link:
Hi Leif,
On Tue, Sep 8, 2020 at 1:27 AM Leif Lindholm wrote:
>
> On Mon, Sep 07, 2020 at 18:24:06 +0800, Bin Meng wrote:
> > Hi Leif,
> >
> >
> > On Sun, Sep 6, 2020 at 9:08 AM Leif Lindholm wrote:
> > >
> > > On Tue, Sep 01, 2020 at 09:38:55 +0800, Bin Meng wrote:
> > > > From: Bin Meng
> > >
Hi, Phillippe,
On Mon, Sep 7, 2020 at 11:58 AM Philippe Mathieu-Daudé wrote:
>
> Hi Huacai,
>
> On 8/24/20 10:10 AM, Huacai Chen wrote:
> > Add Loongson-3 based machine support, it use liointc as the interrupt
> > controler and use GPEX as the pci controller. Currently it can only work
> > with
Hi, Philippe,
On Mon, Sep 7, 2020 at 11:39 AM Philippe Mathieu-Daudé wrote:
>
> You forgot to Cc the maintainers, doing it for you:
>
> ./scripts/get_maintainer.pl -f hw/core/null-machine.c
> Eduardo Habkost (supporter:Machine core)
> Marcel Apfelbaum (supporter:Machine core)
Thank you very
On Mon, Sep 07, 2020 at 09:46:28PM +0200, Philippe Mathieu-Daudé wrote:
> On 9/7/20 7:26 PM, Laurent Vivier wrote:
> > On 07/09/2020 18:29, Laurent Vivier wrote:
> >> On 07/09/2020 16:51, Cornelia Huck wrote:
> >>> On Mon, 7 Sep 2020 16:31:24 +0200
> >>> Laurent Vivier wrote:
> >>>
> On
Host CPU : Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
Host Memory : 15.49 GB
Start Time (UTC) : 2020-09-07 22:30:02
End Time (UTC) : 2020-09-07 23:02:34
Execution Time : 0:32:31.848707
Status : SUCCESS
Note:
Changes denoted by '-' are less than 0.01%.
On Mon, Sep 7, 2020 at 12:58 PM Alexander Bulekov wrote:
>
> On 200907 1547, Alexander Bulekov wrote:
> > On 200824 1717, Havard Skinnemoen via wrote:
> > > This supports reading and writing OTP fuses and keys. Only fuse reading
> > > has been tested. Protection is not implemented.
> > >
> > >
On Friday, August 28, 2020, Ahmed Karaman
wrote:
> - Apply pylint and flake8 formatting rules to the script.
> - Use 'tempfile' instead of '/tmp' for creating temporary files.
>
>
Reviewed-by: Aleksandar Markovic
Reply
Reply all
Forward
View Gmail in: *Mobile* | Older version
On Friday, August 28, 2020, Ahmed Karaman
wrote:
> - Apply pylint and flake8 formatting rules to the script.
> - Use 'tempfile' instead of '/tmp' for creating temporary files.
>
>
Reviewed-by: Aleksandar Markovic
Reply
Reply all
Forward
View Gmail in: *Mobile* | Older version
On 9/7/20 10:45 PM, 罗勇刚(Yonggang Luo) wrote:
> tpm_ss = ss.source_set()
>
> tpm_ss.add(files('tpm_backend.c'))
> tpm_ss.add(files('tpm_util.c'))
> tpm_ss.add(when: 'CONFIG_TPM_PASSTHROUGH', if_true:
> files('tpm_passthrough.c'))
> tpm_ss.add(when: 'CONFIG_TPM_EMULATOR', if_true:
On Mon, 7 Sep 2020 at 17:45, Paolo Bonzini wrote:
>
> The following changes since commit 62f9256052df85194faa33137bbe0afb1c95b6e6:
>
> Merge remote-tracking branch
> 'remotes/kraxel/tags/vga-20200904-pull-request' into staging (2020-09-07
> 13:27:20 +0100)
>
> are available in the Git
tpm_ss = ss.source_set()
tpm_ss.add(files('tpm_backend.c'))
tpm_ss.add(files('tpm_util.c'))
tpm_ss.add(when: 'CONFIG_TPM_PASSTHROUGH', if_true:
files('tpm_passthrough.c'))
tpm_ss.add(when: 'CONFIG_TPM_EMULATOR', if_true: files('tpm_emulator.c'))
softmmu_ss.add_all(when: 'CONFIG_TPM', if_true:
On 200701 2135, Peter Maydell wrote:
> On Wed, 1 Jul 2020 at 19:21, Philippe Mathieu-Daudé wrote:
> >
> > We can run I/O access with the 'i' or 'o' HMP commands in the
> > monitor. These commands are expected to run on a vCPU. The
> > monitor is not a vCPU thread. To avoid crashing, initialize
>
On Mon, 7 Sep 2020 at 20:12, Helge Deller wrote:
>
> On 07.09.20 20:29, Peter Maydell wrote:
> > On Thu, 3 Sep 2020 at 17:07, Helge Deller wrote:
> >>
> >> hppa power button support, graphics updates and firmware fixes
> >>
> >> The following changes since commit
> >>
On 9/7/20 10:03 PM, Luc Michel wrote:
> Hi Philippe,
>
> On 9/7/20 6:32 PM, Philippe Mathieu-Daudé wrote:
>> Add a LED device which can be connected to a GPIO output.
>> They can also be dimmed with PWM devices. For now we do
>> not implement the dimmed mode, but in preparation of a
>> future
On Mon, 7 Sep 2020 at 12:09, Kevin Wolf wrote:
>
> The following changes since commit 7c37270b3fbe3d034ba80e488761461676e21eb4:
>
> Merge remote-tracking branch 'remotes/kraxel/tags/ui-20200904-pull-request'
> into staging (2020-09-06 16:23:55 +0100)
>
> are available in the Git repository at:
Signed-off-by: Yonggang Luo
---
tests/meson.build | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tests/meson.build b/tests/meson.build
index 7f27a15cee..cf816a33cc 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -198,8 +198,13 @@ if have_system
# are not
The vmstate are valid on win32, just need generate tmp path properly
Signed-off-by: Yonggang Luo
---
tests/test-vmstate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/test-vmstate.c b/tests/test-vmstate.c
index f8de709a0b..4c453575bb 100644
---
The vmstate currently disabled because compiling error, but now its fixed
Signed-off-by: Yonggang Luo
---
tests/meson.build | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/tests/meson.build b/tests/meson.build
index cf816a33cc..09b9b4462a 100644
--- a/tests/meson.build
Signed-off-by: Yonggang Luo
---
meson.build | 6 --
1 file changed, 6 deletions(-)
diff --git a/meson.build b/meson.build
index 6e909213ee..d6a1949b2f 100644
--- a/meson.build
+++ b/meson.build
@@ -320,7 +320,6 @@ opengl = not_found
if 'CONFIG_OPENGL' in config_host
opengl =
The test-vmstate can be passed under win32 too
so enable it on win32,
This is based on Bonzini's upstream tag along
Yonggang Luo (4):
meson: remove empty else and duplicated gio deps
meson: Disable test-char on msys2/mingw for fixing tests stuck
vmstate: Fixes test-vmstate.c on msys2/mingw
(2020-09-07
16:51:00 +0100)
are available in the Git repository at:
https://github.com/rth7680/qemu.git tags/pull-mb-20200907-2
for you to fetch changes up to 7df61837df419740963f020d7ee7b852f6401301:
configure: Do not set TARGET_ABI32 for microblaze (2020-09-07 12:58:08 -0700
Hi Philippe,
On 9/7/20 6:32 PM, Philippe Mathieu-Daudé wrote:
Add a LED device which can be connected to a GPIO output.
They can also be dimmed with PWM devices. For now we do
not implement the dimmed mode, but in preparation of a
future implementation, we start using the LED intensity.
LEDs
On Tue, Sep 8, 2020 at 4:00 AM Paolo Bonzini wrote:
> Hi, LIBS is going away soon. I have a few more Meson patches including one
> for tcmalloc and jemalloc, I won't post them super soon though.
>
OK, then I'll skip this
>
> Paolo
>
> Il lun 7 set 2020, 21:50 Yonggang Luo ha scritto:
>
>>
Hi, LIBS is going away soon. I have a few more Meson patches including one
for tcmalloc and jemalloc, I won't post them super soon though.
Paolo
Il lun 7 set 2020, 21:50 Yonggang Luo ha scritto:
> Currently, the LIBS are not exposed to meson and meson didn't use that
> Use base_lib =
On 200907 1547, Alexander Bulekov wrote:
> On 200824 1717, Havard Skinnemoen via wrote:
> > This supports reading and writing OTP fuses and keys. Only fuse reading
> > has been tested. Protection is not implemented.
> >
> > Reviewed-by: Avi Fishman
> > Reviewed-by: Philippe Mathieu-Daudé
> >
On 9/7/20 9:50 PM, Yonggang Luo wrote:
> Signed-off-by: Yonggang Luo
Trailing ':' in subject, otherwise:
Reviewed-by: Philippe Mathieu-Daudé
> ---
> tests/meson.build | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/tests/meson.build b/tests/meson.build
> index
"Trying fixes" or "Fixes" in subject?
Anyway:
Reviewed-by: Philippe Mathieu-Daudé
On 9/7/20 9:50 PM, Yonggang Luo wrote:
> The vmstate should be valid on win32
>
> Signed-off-by: Yonggang Luo
> ---
> tests/test-vmstate.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git
Signed-off-by: Yonggang Luo
---
tests/meson.build | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/tests/meson.build b/tests/meson.build
index 7f27a15cee..39fa822be3 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -185,11 +185,9 @@ if have_system
Signed-off-by: Yonggang Luo
---
meson.build | 6 --
1 file changed, 6 deletions(-)
diff --git a/meson.build b/meson.build
index 6e909213ee..d6a1949b2f 100644
--- a/meson.build
+++ b/meson.build
@@ -320,7 +320,6 @@ opengl = not_found
if 'CONFIG_OPENGL' in config_host
opengl =
The vmstate should be valid on win32
Signed-off-by: Yonggang Luo
---
tests/test-vmstate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/test-vmstate.c b/tests/test-vmstate.c
index f8de709a0b..4c453575bb 100644
--- a/tests/test-vmstate.c
+++ b/tests/test-vmstate.c
@@
The test-vmstate can be passed under win32 too
so enable it on win32,
This is based on Bonzini's upstream tag along
Yonggang Luo (4):
vmstate: Trying fixes test-vmstate.c
meson: Fixes jemalloc and tcmalloc can not building.
meson: remove empty else and duplicated gio deps
vmstate: Enable
Currently, the LIBS are not exposed to meson and meson didn't use that
Use base_lib = declare_dependency(link_args: config_host['LIBS'].split())
to force use it
Signed-off-by: Yonggang Luo
---
configure | 9 +
meson.build | 5 -
2 files changed, 13 insertions(+), 1 deletion(-)
On 200824 1717, Havard Skinnemoen via wrote:
> This supports reading and writing OTP fuses and keys. Only fuse reading
> has been tested. Protection is not implemented.
>
> Reviewed-by: Avi Fishman
> Reviewed-by: Philippe Mathieu-Daudé
> Signed-off-by: Havard Skinnemoen
> ---
>
On 9/7/20 7:26 PM, Laurent Vivier wrote:
> On 07/09/2020 18:29, Laurent Vivier wrote:
>> On 07/09/2020 16:51, Cornelia Huck wrote:
>>> On Mon, 7 Sep 2020 16:31:24 +0200
>>> Laurent Vivier wrote:
>>>
On 07/09/2020 16:05, Philippe Mathieu-Daudé wrote:
> Hi Thiago,
>
> On 9/7/20
On 9/7/20 7:42 PM, Thomas Huth wrote:
> Now that we always do out-of-tree builds (and the in-tree builds are
> faked via a "build" directory), we can simplify out .gitignore file
> quite a bit.
>
> Signed-off-by: Thomas Huth
> ---
> .gitignore | 158
On 07.09.20 20:29, Peter Maydell wrote:
> On Thu, 3 Sep 2020 at 17:07, Helge Deller wrote:
>>
>> hppa power button support, graphics updates and firmware fixes
>>
>> The following changes since commit ac8b279f13865d1a4f1958d3bf34240c1c3af90d:
>>
>> Merge remote-tracking branch
On Tue, Sep 8, 2020 at 2:26 AM Peter Maydell
wrote:
> On Mon, 7 Sep 2020 at 13:11, Thomas Huth wrote:
> >
> > Hi Peter,
> >
> > the following changes since commit
> 7c37270b3fbe3d034ba80e488761461676e21eb4:
> >
> > Merge remote-tracking branch
> 'remotes/kraxel/tags/ui-20200904-pull-request'
On Thu, 3 Sep 2020 at 17:07, Helge Deller wrote:
>
> hppa power button support, graphics updates and firmware fixes
>
> The following changes since commit ac8b279f13865d1a4f1958d3bf34240c1c3af90d:
>
> Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20200827' into
> staging (2020-08-27
There is no real reason any more why nbd_export_new() and
nbd_export_create() should be separate functions. The latter only
performs a few checks before it calls the former. Move all the checks to
nbd/server.c and make the resulting function static.
Signed-off-by: Kevin Wolf
---
We have three almost identical functions that call an external process
and return its output and return code. Refactor them into small wrappers
around a common function.
Signed-off-by: Kevin Wolf
---
tests/qemu-iotests/iotests.py | 50 +--
1 file changed, 24
These QMP commands are replaced by block-export-add/del.
Signed-off-by: Kevin Wolf
---
qapi/block-export.json | 11 +--
docs/system/deprecated.rst | 8
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/qapi/block-export.json b/qapi/block-export.json
index
Signed-off-by: Kevin Wolf
---
tests/qemu-iotests/iotests.py | 11 +++-
tests/qemu-iotests/307| 117 ++
tests/qemu-iotests/307.out| 111
tests/qemu-iotests/group | 1 +
4 files changed, 239 insertions(+), 1
Every block export has a BlockBackend representing the disk that is
exported. It should live in BlockExport therefore.
Signed-off-by: Kevin Wolf
Reviewed-by: Max Reitz
---
include/block/export.h | 3 +++
block/export/export.c | 3 +++
nbd/server.c | 43
On Mon, 7 Sep 2020 at 13:11, Thomas Huth wrote:
>
> Hi Peter,
>
> the following changes since commit 7c37270b3fbe3d034ba80e488761461676e21eb4:
>
> Merge remote-tracking branch 'remotes/kraxel/tags/ui-20200904-pull-request'
> into staging (2020-09-06 16:23:55 +0100)
>
> are available in the
The reference owned by the user/monitor that is created when adding the
export and dropped when removing it was tied to the 'exports' list in
nbd/server.c. Every block export will have a user reference, so move it
to the block export level and tie it to the 'block_exports' list in
This adds a simple QMP command to query the list of block exports.
Signed-off-by: Kevin Wolf
---
qapi/block-export.json | 32
block/export/export.c | 23 +++
2 files changed, 55 insertions(+)
diff --git a/qapi/block-export.json
Clients may want to know when an export has finally disappeard
(block-export-del returns earlier than that in the general case), so add
a QAPI event for it.
Signed-off-by: Kevin Wolf
---
qapi/block-export.json | 12
block/export/export.c | 2 ++
tests/qemu-iotests/140.out
We'll need an id to identify block exports in monitor commands. This
adds one.
Note that this is different from the 'name' option in the NBD server,
which is the externally visible export name. While block export ids need
to be unique in the whole process, export names must be unique only for
the
The 'writable' option is a basic option that will probably be applicable
to most if not all export types that we will implement. Move it from NBD
to the generic BlockExport layer.
Signed-off-by: Kevin Wolf
---
qapi/block-export.json | 15 ++-
block/export/export.c | 16
Implement a new QMP command block-export-del and make nbd-server-remove
a wrapper around it.
Signed-off-by: Kevin Wolf
Reviewed-by: Max Reitz
---
qapi/block-export.json | 32 -
include/block/export.h | 1 +
include/block/nbd.h| 1 -
This adds a function to shut down all block exports, and another one to
shut down the block exports of a single type. The latter is used for now
when stopping the NBD server. As soon as we implement support for
multiple NBD servers, we'll need a per-server list of exports and it
will be replaced
Every export type will need a BlockBackend, so creating it centrally in
blk_exp_add() instead of the .create driver callback avoids duplication.
Signed-off-by: Kevin Wolf
---
include/block/nbd.h | 4 ++--
block/export/export.c | 49 +++
blockdev-nbd.c
Every block export needs a block node to export, so add a 'node-name'
option to BlockExportOptions and remove the replaced option 'device'
from BlockExportOptionsNbd.
To maintain compatibility in nbd-server-add, BlockExportOptionsNbd needs
to be wrapped by a new type NbdServerAddOptions that adds
Signed-off-by: Kevin Wolf
---
include/block/export.h | 3 +++
block/export/export.c | 2 ++
nbd/server.c | 26 +-
3 files changed, 18 insertions(+), 13 deletions(-)
diff --git a/include/block/export.h b/include/block/export.h
index 5236a35e12..e6f96f4e1e
Closing export is somewhat convoluted because nbd_export_close() and
nbd_export_put() call each other and the ways they actually end up being
nested is not necessarily obvious.
However, it is not really necessary to call nbd_export_close() from
nbd_export_put() when putting the last reference
The export close callback is unused by the built-in NBD server. qemu-nbd
uses it only during shutdown to wait for the unrefed export to actually
go away. It can just use nbd_export_close_all() instead and do without
the callback.
This removes the close callback from nbd_export_new() and makes
Having a refcount makes sense for all types of block exports. It is also
a prerequisite for keeping a list of all exports at the BlockExport
level.
Signed-off-by: Kevin Wolf
Reviewed-by: Max Reitz
---
include/block/export.h | 15 +
include/block/nbd.h| 2 --
block/export/export.c
Instead of letting the driver allocate and return the BlockExport
object, allocate it already in blk_exp_add() and pass it. This allows us
to initialise the generic part before calling into the driver so that
the driver can just use these values instead of having to parse the
options a second
This is a QMP equivalent of qemu-nbd's --shared option, limiting the
maximum number of clients that can attach at the same time.
Signed-off-by: Kevin Wolf
Reviewed-by: Max Reitz
Reviewed-by: Eric Blake
---
qapi/block-export.json | 10 +++--
include/block/nbd.h
nbd-server-add tries to be convenient and adds two questionable
features that we don't want to share in block-export-add, even for NBD
exports:
1. When requesting a writable export of a read-only device, the export
is silently downgraded to read-only. This should be an error in the
context
With this change, NBD exports are now only created through the
BlockExport interface. This allows us finally to move things from the
NBD layer to the BlockExport layer if they make sense for other export
types, too.
blk_exp_add() returns only a weak reference, so the explicit
nbd_export_put()
qemu-nbd allows use of writethrough cache modes, which mean that write
requests made through NBD will cause a flush before they complete.
Expose the same functionality in block-export-add.
Signed-off-by: Kevin Wolf
---
qapi/block-export.json | 7 ++-
blockdev-nbd.c | 6 +-
2
Signed-off-by: Kevin Wolf
Reviewed-by: Max Reitz
Reviewed-by: Eric Blake
---
include/block/nbd.h | 2 --
nbd/server.c| 5 -
2 files changed, 7 deletions(-)
diff --git a/include/block/nbd.h b/include/block/nbd.h
index 9bc3bfaeec..0451683d03 100644
--- a/include/block/nbd.h
+++
1 - 100 of 386 matches
Mail list logo